Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
tabler
提交
2fe21d24
T
tabler
项目概览
知鸟1号
/
tabler
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tabler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2fe21d24
编写于
12月 12, 2019
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aside menu
上级
99c38743
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
223 addition
and
58 deletion
+223
-58
_config.yml
_config.yml
+1
-1
pages/_data/menu.yml
pages/_data/menu.yml
+24
-17
pages/_includes/layout/aside.html
pages/_includes/layout/aside.html
+0
-7
pages/_includes/layout/menu-aside.html
pages/_includes/layout/menu-aside.html
+38
-0
pages/_includes/layout/menu.html
pages/_includes/layout/menu.html
+1
-4
pages/_includes/layout/navbar-logo.html
pages/_includes/layout/navbar-logo.html
+1
-1
pages/_includes/layout/navbar-search.html
pages/_includes/layout/navbar-search.html
+1
-1
pages/_includes/layout/navbar.html
pages/_includes/layout/navbar.html
+3
-3
pages/_includes/layout/sidebar.html
pages/_includes/layout/sidebar.html
+15
-0
pages/_includes/layout/topnav.html
pages/_includes/layout/topnav.html
+1
-1
pages/_layouts/default.html
pages/_layouts/default.html
+1
-1
pages/layout-test.html
pages/layout-test.html
+1
-0
scss/_dark.scss
scss/_dark.scss
+2
-2
scss/layout/_core.scss
scss/layout/_core.scss
+3
-13
scss/layout/_layout.scss
scss/layout/_layout.scss
+103
-7
scss/mixins/_mixins.scss
scss/mixins/_mixins.scss
+28
-0
未找到文件。
_config.yml
浏览文件 @
2fe21d24
...
...
@@ -6,7 +6,7 @@ title: Tabler
description
:
Premium and Open Source dashboard template with responsive and high quality UI.
github_url
:
https://github.com/tabler/tabler
debug
:
tru
e
debug
:
fals
e
plugins
:
-
jekyll-random
...
...
pages/_data/menu.yml
浏览文件 @
2fe21d24
...
...
@@ -7,6 +7,7 @@ forms:
url
:
form-elements.html
title
:
Form elements
icon
:
check-square
badge
:
New
base
:
title
:
Base
...
...
@@ -15,42 +16,48 @@ base:
buttons
:
url
:
buttons.html
title
:
Buttons
badge
:
New
cards
:
url
:
cards.html
title
:
Cards
c
:
url
:
c.html
title
:
C
calendar
:
title
:
Calendar
icon
:
calendar
url
:
calendar.html
users
:
title
:
Users
icon
:
users
url
:
users.html
gallery
:
title
:
Gallery
icon
:
image
url
:
gallery.html
charts
:
url
:
charts.html
title
:
Charts
icon
:
pie-chart
calendar
:
title
:
Calendar
icon
:
calendar
url
:
calendar.html
users
:
title
:
Users
icon
:
users
url
:
users.html
gallery
:
title
:
Gallery
icon
:
image
url
:
gallery.html
layouts
:
title
:
Layouts
icon
:
layout
url
:
layouts.html
extra
:
title
:
Extra
icon
:
star
children
:
invoice
:
icon
:
file
title
:
Invoice
url
:
invoice.html
docs
:
title
:
Documentation
icon
:
file-text
url
:
docs/index.html
docs
:
true
#changelog:
# url: changelog.html
...
...
pages/_includes/layout/aside.html
已删除
100644 → 0
浏览文件 @
99c38743
<aside
class=
"sidebar sidebar-dark"
>
<!-- Sidebar logo -->
{% include_cached parts/navbar-logo.html prefix="sidebar" %}
<!-- Sidebar menu -->
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores commodi consequuntur, doloribus fugiat mollitia nesciunt pariatur quod reiciendis, sequi soluta tempora unde? Ab eligendi molestiae odio, pariatur quisquam quo voluptas.
</aside>
\ No newline at end of file
pages/_includes/layout/menu-aside.html
0 → 100644
浏览文件 @
2fe21d24
{% assign current-page = page.menu | default: layout.menu | split: '.' %}
<ul
class=
"sidebar-nav"
>
<li
class=
"sidebar-nav-title"
>
Navigation
</li>
{% for level-1 in site.data.menu %}
<li
class=
"sidebar-nav-item"
>
<a
href=
"{{ site.base }}/{{ level-2[1].url }}"
class=
"sidebar-nav-link{% if level-1[0] == current-page[0] and current-page.size == 1 %} active{% endif %}"
>
{% if level-1[1].icon %}
{% assign icon = level-1[1].icon %}
{% include ui/icon.html icon=icon %}
{% endif %}
<span>
{{ level-1[1].title }}
</span>
</a>
{% comment %}
<div
class=
"sidebar-nav-title"
>
{{ level-1[1].title }}
</div>
{% endcomment %}
{% if level-1[1].children %}
<ul>
{% for level-2 in level-1[1].children %}
<li
class=
"sidebar-nav-item"
>
<a
href=
"{{ site.base }}/{{ level-2[1].url }}"
class=
"sidebar-nav-link{% if level-1[0] == current-page[0] and level-2[0] == current-page[1] and current-page.size == 2 %} active{% endif %}"
>
<span>
{{ level-2[1].title }}
</span>
{% if level-2[1].badge %}
{% assign badge = level-2[1].badge %}
{% include ui/badge.html text=badge color="green" %}
{% endif %}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
\ No newline at end of file
pages/_includes/layout/menu.html
浏览文件 @
2fe21d24
{%
removeemptylines
%}
{%
assign current-page = page.menu | default: layout.menu | split: '.'
%}
<ul
class=
"navbar-nav flex-wrap{% if include.class %} {{ include.class }}{% endif %}"
>
{% assign current-page = page.menu | default: layout.menu | split: '.' %}
{% for level-1 in site.data.menu %}
{% assign icon = level-1[1].icon %}
...
...
@@ -46,4 +44,3 @@
</li>
{% endfor %}
</ul>
{% endremoveemptylines %}
pages/_includes/
parts
/navbar-logo.html
→
pages/_includes/
layout
/navbar-logo.html
浏览文件 @
2fe21d24
{% assign prefix = include.prefix | default: 'navbar' %}
<a
href=
"{{ site.base }}"
class=
"{{ prefix }}-brand"
>
<a
href=
"{{ site.base }}"
class=
"{{ prefix }}-brand
{% if include.class %} {{ include.class }}{% endif %}
"
>
<img
src=
"{{ site.base }}/img/logo{% if include.dark %}-white{% endif %}.svg"
alt=
"{{ site.title }}"
class=
"{{ prefix }}-brand-logo {{ prefix }}-brand-logo-lg"
>
<img
src=
"{{ site.base }}/img/logo-small{% if include.dark %}-white{% endif %}.svg"
alt=
"{{ site.title }}"
class=
"{{ prefix }}-brand-logo {{ prefix }}-brand-logo-sm"
>
</a>
\ No newline at end of file
pages/_includes/
parts
/navbar-search.html
→
pages/_includes/
layout
/navbar-search.html
浏览文件 @
2fe21d24
<div
class=
"navbar-search
ml-4
d-none d-lg-block"
>
<div
class=
"navbar-search d-none d-lg-block"
>
<form
action=
""
method=
"get"
>
<input
type=
"text"
name=
"q"
class=
"form-control bg-light"
placeholder=
"Search..."
>
</form>
...
...
pages/_includes/
parts
/navbar.html
→
pages/_includes/
layout
/navbar.html
浏览文件 @
2fe21d24
{% assign person-id = include.person-id | default: 12 | minus: 1 %}
{% assign person = site.data.people[person-id] %}
{% if
pag
e.menu-layout != 'vertical' %}
{% include_cached
parts/navbar-logo.html
%}
{% if
includ
e.menu-layout != 'vertical' %}
{% include_cached
layout/navbar-logo.html class="mr-4"
%}
{% endif %}
{% include_cached
parts
/navbar-search.html %}
{% include_cached
layout
/navbar-search.html %}
<ul
class=
"nav navbar-menu align-items-center ml-auto"
>
<li
class=
"nav-item d-none d-lg-flex mr-3"
>
...
...
pages/_includes/layout/sidebar.html
0 → 100644
浏览文件 @
2fe21d24
<aside
class=
"sidebar sidebar-dark"
>
<!-- Sidebar logo -->
{% include_cached layout/navbar-logo.html prefix="sidebar" %}
<div
class=
"sidebar-content"
>
<div>
<!-- Sidebar menu -->
{% include layout/menu-aside.html %}
</div>
<div
class=
"mt-auto"
>
{% include ui/button.html text="Logout" color="primary" icon="log-out" block=true %}
</div>
</div>
</aside>
\ No newline at end of file
pages/_includes/layout/topnav.html
浏览文件 @
2fe21d24
<header
class=
"topnav topbar"
>
<div
class=
"container{% if include.fluid %}-fluid{% endif %}"
>
<div
class=
"navbar navbar-expand-lg {% if include.dark %}navbar-dark bg-dark text-white{% else %}navbar-light{% endif %}{% if include.sticky %} navbar-sticky{% endif %}"
>
{% include_cached
parts/navbar.html search=true
%}
{% include_cached
layout/navbar.html search=true menu-layout=page.menu-layout
%}
</div>
</div>
</header>
...
...
pages/_layouts/default.html
浏览文件 @
2fe21d24
...
...
@@ -5,7 +5,7 @@ layout: base
<div
class=
"wrapper"
>
{% if page.menu-layout == 'vertical' %}
{% include layout/
aside
.html %}
{% include layout/
sidebar
.html %}
{% endif %}
<div
class=
"content"
>
...
...
pages/layout-test.html
浏览文件 @
2fe21d24
...
...
@@ -5,6 +5,7 @@ sidenav-dark: true
page-title: Layout test
page-title-actions: breadcrumb
menu-layout: vertical
menu: base.buttons
---
<div
class=
"card"
id=
"card-test"
>
...
...
scss/_dark.scss
浏览文件 @
2fe21d24
...
...
@@ -41,11 +41,11 @@
}
body
.theme-dark
{
@include
dark-mode
()
;
@include
dark-mode
;
}
@media
(
prefers-color-scheme
:
dark
)
{
body
.auto-theme-dark
{
@include
dark-mode
()
;
@include
dark-mode
;
}
}
scss/layout/_core.scss
浏览文件 @
2fe21d24
...
...
@@ -11,20 +11,10 @@ body {
touch-action
:
manipulation
;
text-rendering
:
optimizeLegibility
;
font-feature-settings
:
"liga"
0
;
}
body
*
:
:-
webkit-scrollbar
{
width
:
6px
;
height
:
6px
;
transition
:
.3s
background
;
}
body
*
:
:-
webkit-scrollbar-thumb
{
background
:
$gray-400
;
}
body
*
:hover::-webkit-scrollbar-thumb
{
background
:
$gray-500
;
*
{
@include
scrollbar
;
}
}
/**
...
...
scss/layout/_layout.scss
浏览文件 @
2fe21d24
//sidenav
$sidenav-width
:
16
.25rem
;
$sidenav-width-folded
:
4rem
;
$sidenav-bg
:
$white
;
$sidenav-border-color
:
$border-color-alpha
;
$sidenav-dark-bg
:
$dark
;
$sidenav-
link-padding-x
:
.7
5rem
;
$sidenav-
padding
:
1
.2
5rem
;
$sidenav-breakpoint-show
:
'md'
;
$sidenav-breakpoint-folded
:
false
;
/**
Topnav
*/
.topnav
{
border-bottom
:
1px
solid
;
background-color
:
$navbar-bg
;
...
...
@@ -37,6 +39,9 @@ $sidenav-breakpoint-folded: false;
}
}
/**
Topbar
*/
.topbar
{
position
:
absolute
;
top
:
0
;
...
...
@@ -75,12 +80,18 @@ $sidenav-breakpoint-folded: false;
z-index
:
$zindex-fixed
;
}
/**
Wrapper
*/
.wrapper
{
height
:
100%
;
overflow
:
hidden
;
width
:
100%
;
}
/**
Content
*/
.content
{
overflow
:
hidden
;
min-height
:
100vh
;
...
...
@@ -124,12 +135,13 @@ Sidebar
width
:
$sidenav-width
;
position
:
fixed
;
z-index
:
$zindex-fixed
;
padding
:
.75rem
;
padding
:
0
;
background
:
$white
;
border-right
:
1px
solid
$border-color-alpha
;
//padding-top: $navbar-height;
top
:
0
;
bottom
:
0
;
display
:
flex
;
flex-direction
:
column
;
@if
$sidenav-breakpoint-folded
{
@include
media-breakpoint-down
(
$sidenav-breakpoint-folded
)
{
...
...
@@ -143,10 +155,14 @@ Sidebar
}
.sidebar-brand
{
line-height
:
1
;
display
:
block
;
text-align
:
center
;
margin-bottom
:
1
.5rem
;
line-height
:
$navbar-height
;
width
:
$sidenav-width
;
position
:
fixed
;
top
:
0
;
left
:
0
;
}
.sidebar-brand-logo
{
...
...
@@ -169,9 +185,89 @@ Sidebar
}
}
.sidebar-content
{
padding
:
$sidenav-padding
;
flex
:
1
;
display
:
flex
;
flex-direction
:
column
;
overflow
:
auto
;
@include
scrollbar
(
true
);
.sidebar-brand
+
&
{
margin-top
:
$navbar-height
;
}
}
/**
Sidebar menu
*/
.sidebar-nav
{
margin
:
(
-
$sidenav-padding
)
(
-
$sidenav-padding
)
$sidenav-padding
;
padding
:
0
;
list-style
:
none
;
ul
{
margin
:
0
;
padding
:
0
;
list-style
:
none
;
}
}
.sidebar-nav-link
{
padding
:
.5rem
$sidenav-padding
;
transition
:
.3s
color
,
.3s
background-color
;
color
:
inherit
;
display
:
flex
;
align-items
:
center
;
.sidebar-nav-item
.sidebar-nav-item
&
{
padding-left
:
add
(
1
.5rem
,
$sidenav-padding
);
}
.sidebar-nav-item
.sidebar-nav-item
.sidebar-nav-item
&
{
padding-left
:
add
(
3rem
,
$sidenav-padding
);
}
&
:hover
{
background-color
:
rgba
(
#fff
,
.02
);
text-decoration
:
none
;
color
:
#fff
;
}
&
.active
{
opacity
:
1
;
color
:
#fff
;
box-shadow
:
inset
3px
0
$primary
;
background-color
:
rgba
(
#fff
,
.01
);
}
.icon
{
width
:
1rem
;
margin-right
:
.5rem
;
}
.badge
{
margin-left
:
auto
;
}
}
.sidebar-nav-title
{
@include
subheader
(
false
);
color
:
inherit
;
opacity
:
.8
;
padding
:
$sidenav-padding
$sidenav-padding
.5rem
;
&
:not
(
:first-child
)
{
margin-top
:
.5rem
;
}
}
/**
Sidebar dark
*/
.sidebar-dark
{
background
:
$dark
;
color
:
$
white
;
color
:
$
text-muted
;
border-color
:
transparent
;
.sidebar-brand
{
...
...
scss/mixins/_mixins.scss
浏览文件 @
2fe21d24
...
...
@@ -8,3 +8,31 @@
color
:
$text-muted
;
}
}
@mixin
scrollbar
(
$is-dark
:
false
)
{
&
::-webkit-scrollbar
{
width
:
6px
;
height
:
6px
;
transition
:
.3s
background
;
}
&
::-webkit-scrollbar-thumb
{
border-radius
:
5px
;
@if
(
$is-dark
)
{
background
:
transparent
;
}
@else
{
background
:
$gray-400
;
}
}
&
:hover::-webkit-scrollbar-thumb
{
background
:
$gray-500
;
@if
(
$is-dark
)
{
background
:
mix
(
#fff
,
$dark
,
20%
);
}
@else
{
background
:
$gray-500
;
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录