Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
tabler
提交
72599898
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,发现更多精彩内容 >>
提交
72599898
编写于
1月 21, 2020
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
topnav refactoring
上级
2583d02b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
122 addition
and
162 deletion
+122
-162
pages/_includes/layout/menu.html
pages/_includes/layout/menu.html
+1
-1
pages/_includes/layout/topnav.html
pages/_includes/layout/topnav.html
+57
-56
pages/layout-sidebar-only.html
pages/layout-sidebar-only.html
+1
-0
scss/_variables.scss
scss/_variables.scss
+1
-1
scss/layout/_layout.scss
scss/layout/_layout.scss
+3
-88
scss/layout/_navbar.scss
scss/layout/_navbar.scss
+59
-16
未找到文件。
pages/_includes/layout/menu.html
浏览文件 @
72599898
{% assign current-page = page.menu | default: layout.menu | split: '.' %}
<ul
class=
"navbar-nav flex-wrap{% if include.class %} {{ include.class }}{% endif %}"
>
<ul
class=
"navbar-nav flex-wrap
flex-fill
{% if include.class %} {{ include.class }}{% endif %}"
>
{% for level-1 in site.data.menu %}
{% assign icon = level-1[1].icon %}
...
...
pages/_includes/layout/topnav.html
浏览文件 @
72599898
...
...
@@ -5,73 +5,74 @@
{% assign fixed = page.topnav-fixed %}
{% assign breakpoint = 'lg' %}
<header
class=
"navbar navbar-border {% if dark %}navbar-dark bg-dark text-white{% else %}navbar-light bg-white{% endif %}{% if fixed %} fixed-top{% endif %}"
>
<div
class=
"container{% if include.topnav-fluid %}-fluid{% endif %}"
>
{% unless page.hide-topnav %}
<header
class=
"navbar-wrap navbar-expand-lg flex-column{% if fixed %} fixed-top{% endif %}"
>
<div
class=
"navbar navbar-border {% if page.topnav-dark %}navbar-dark bg-dark text-white{% else %}navbar-light bg-white{% endif %}"
>
<div
class=
"container{% if include.topnav-fluid %}-fluid{% endif %}"
>
<button
class=
"navbar-toggler mr-auto {% if page.sidebar %}hide-sidebar-visible{% else %}d-{{ breakpoint }}-none{% endif %}"
type=
"button"
data-toggle=
"collapse"
data-target=
"#nav-main-menu"
aria-expanded=
"false"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<button
class=
"navbar-toggler mr-auto {% if page.sidebar %}hide-sidebar-visible{% else %}d-{{ breakpoint }}-none{% endif %}"
type=
"button"
data-toggle=
"collapse"
data-target=
"#nav-main-menu"
aria-expanded=
"false"
>
<span
class=
"navbar-toggler-icon"
></span>
</button>
<a
href=
"{{ site.base }}"
class=
"navbar-brand hide-sidebar-visible m-0"
>
<img
src=
"{{ site.base }}/static/logo{% if dark %}-white{% endif %}.svg"
alt=
"{{ site.title }}"
class=
"navbar-brand-logo"
>
</a>
<a
href=
"{{ site.base }}"
class=
"navbar-brand hide-sidebar-visible m-0"
>
<img
src=
"{{ site.base }}/static/logo{% if dark %}-white{% endif %}.svg"
alt=
"{{ site.title }}"
class=
"navbar-brand-logo"
>
</a>
{% comment %}
{% if page.sidebar %}
{% include layout/navbar-search.html class="mr-4" %}
{% endif %}
{% endcomment %}
{% comment %}
{% if page.sidebar %}
{% include layout/navbar-search.html class="mr-4" %}
{% endif %}
{% endcomment %}
<ul
class=
"nav navbar-menu align-items-center ml-auto"
>
<li
class=
"nav-item d-none d-lg-flex mr-3"
>
{% include ui/button.html href=site.github_url text="Source code" icon="brand/github" external=true %}
</li>
<ul
class=
"nav navbar-menu align-items-center ml-auto"
>
<li
class=
"nav-item d-none d-lg-flex mr-3"
>
{% include ui/button.html href=site.github_url text="Source code" icon="brand/github" external=true %}
</li>
<li
class=
"nav-item dropdown"
>
<a
href=
"#"
data-toggle=
"dropdown"
class=
"nav-link d-flex align-items-center py-0 px-lg-0 px-2 text-reset ml-2"
>
{% include ui/avatar.html src=person.photo size="sm" %}
<span
class=
"ml-2 d-none d-lg-block lh-1"
>
<li
class=
"nav-item dropdown"
>
<a
href=
"#"
data-toggle=
"dropdown"
class=
"nav-link d-flex align-items-center py-0 px-lg-0 px-2 text-reset ml-2"
>
{% include ui/avatar.html src=person.photo size="sm" %}
<span
class=
"ml-2 d-none d-lg-block lh-1"
>
{{ person.full_name }}
<span
class=
"text-muted d-block mt-1 text-h6"
>
Administrator
</span>
</span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right dropdown-menu-arrow"
>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="user" class="dropdown-icon" %} Profile
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="settings" class="dropdown-icon" %} Settings
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="mail" class="dropdown-icon" %} Inbox
<span
class=
"badge bg-primary ml-auto"
>
6
</span>
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="send" class="dropdown-icon" %} Message
</a>
<div
class=
"dropdown-divider"
></div>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="help-circle" class="dropdown-icon" %} Need help?
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="log-out" class="dropdown-icon" %} Sign out
</a>
</div>
</li>
</ul>
<div
class=
"dropdown-menu dropdown-menu-right dropdown-menu-arrow"
>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="user" class="dropdown-icon" %} Profile
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="settings" class="dropdown-icon" %} Settings
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="mail" class="dropdown-icon" %} Inbox
<span
class=
"badge bg-primary ml-auto"
>
6
</span>
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="send" class="dropdown-icon" %} Message
</a>
<div
class=
"dropdown-divider"
></div>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="help-circle" class="dropdown-icon" %} Need help?
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% include ui/icon.html icon="log-out" class="dropdown-icon" %} Sign out
</a>
</div>
</li>
</ul>
</div>
</div>
</header>
{% unless page.sidebar %}
<nav
id=
"nav-main-menu"
class=
"navbar navbar-border {% if page.topmenu-dark %}navbar-dark bg-dark text-white{% else %}navbar-light bg-white{% endif %}{% if fixed %} fixed-top{% endif %}"
>
<div
class=
"container{% if include.fluid %}-fluid{% endif %}"
>
<div
class=
"collapse navbar-collapse"
>
{% include layout/menu.html top=true %}
{% include layout/navbar-search.html %}
{% unless page.sidebar %}
<div
class=
"navbar navbar-border collapse navbar-collapse navbar-collapse-absolute {% if page.topmenu-dark %}navbar-dark bg-dark text-white{% else %}navbar-light bg-white{% endif %}"
id=
"nav-main-menu"
>
<div
class=
"container{% if include.topnav-fluid %}-fluid{% endif %}"
>
{% include layout/menu.html top=true %}
{% include layout/navbar-search.html %}
</div>
</div>
</nav>
{% endunless %}
{% endunless %}
</header>
{% endunless %}
\ No newline at end of file
pages/layout-sidebar-only.html
浏览文件 @
72599898
...
...
@@ -2,6 +2,7 @@
page-title: Page Layouts
menu: layouts
sidebar: true
hide-topnav: true
---
{% include layout/layouts.html %}
scss/_variables.scss
浏览文件 @
72599898
...
...
@@ -303,7 +303,7 @@ $modal-sm: 300px !default;
//navbar
$navbar-padding-y
:
.5rem
!
default
;
$navbar-height
:
3
.
7
5rem
!
default
;
$navbar-height
:
3
.5rem
!
default
;
$navbar-border-color
:
$border-color
!
default
;
$navbar-toggler-padding-y
:
.75rem
!
default
;
...
...
scss/layout/_layout.scss
浏览文件 @
72599898
...
...
@@ -150,91 +150,6 @@ $sidenav-folded-item-height: 3.5rem;
}
}
/**
Top nav
*/
//.navbar-top {
// background-color: $navbar-bg;
// position: absolute;
// top: 0;
// right: 0;
// left: 0;
// z-index: $zindex-sticky;
// min-height: $navbar-height;
// box-shadow: inset 0 -1px 0 0px $navbar-border-color;
// user-select: none;
//
// & + & {
// top: $navbar-height;
// z-index: $zindex-sticky - 1;
// }
//
// & + & + & {
// top: $navbar-height * 2;
// z-index: $zindex-sticky - 2;
// }
//
// @media print {
// display: none;
// }
//
// .nav-link {
// height: $navbar-height;
// }
//
// .nav-item {
// &.active {
// position: relative;
//
// &:after {
// content: '';
// position: absolute;
// bottom: 0;
// left: 2px;
// right: 2px;
// border-bottom: 1px solid $primary;
// }
// }
// }
//
// .navbar-brand-logo {
// &-sm {
// display: none;
// }
//
// @include media-breakpoint-down($sidenav-breakpoint-show) {
// &-lg {
// display: none;
// }
//
// &-sm {
// display: block;
// }
// }
// }
//
// .sidebar + .content & {
// left: $sidenav-width;
//
// @if $sidenav-breakpoint-folded {
// @include media-breakpoint-down($sidenav-breakpoint-folded) {
// left: $sidenav-width-narrow;
// }
// }
//
// @include media-breakpoint-down($sidenav-breakpoint-show) {
// left: 0;
// padding: 0;
// }
// }
//}
//
//.topnav-fixed {
// position: fixed;
// z-index: $zindex-fixed;
//}
/**
Wrapper
*/
...
...
@@ -274,9 +189,9 @@ Content
flex
:
1
;
display
:
flex
;
@include
media-breakpoint-up
(
md
)
{
padding-left
:
$card
-group-margin-sm
;
padding-right
:
$card
-group-margin-sm
;
@include
media-breakpoint-up
(
$cards-grid-breakpoint
)
{
padding-left
:
$card
s-grid-gap
/
2
;
padding-right
:
$card
s-grid-gap
/
2
;
}
@media
print
{
...
...
scss/layout/_navbar.scss
浏览文件 @
72599898
...
...
@@ -2,22 +2,46 @@
Navbar
*/
.navbar
{
min-height
:
$navbar-height
;
&
.fixed-top
{
+
.content-page
{
padding-top
:
$navbar-height
;
}
&
,
.navbar-dark
{
min-height
:
$navbar-height
;
&
.fixed-top
{
+
.content-page
{
padding-top
:
$navbar-height
;
}
+
.navbar
:not
(
.fixed-top
)
{
margin-top
:
$navbar-height
;
+
.navbar
:not
(
.fixed-top
)
{
margin-top
:
$navbar-height
;
}
+
.navbar.fixed-top
{
top
:
$navbar-height
;
+
.content-page
{
padding-top
:
$navbar-height
*
2
;
}
}
}
}
+
.navbar.fixed-top
{
top
:
$navbar-height
;
@include
media-breakpoint-up
(
$cards-grid-breakpoint
)
{
padding-left
:
$cards-grid-gap
/
2
;
padding-right
:
$cards-grid-gap
/
2
;
}
}
+
.content-page
{
padding-top
:
$navbar-height
*
2
;
.navbar-collapse-absolute
{
@each
$breakpoint
,
$width
in
$grid-breakpoints
{
@at-root
.navbar-expand-
#{
$breakpoint
}
&
{
position
:
absolute
;
background
:
inherit
;
z-index
:
$zindex-sticky
;
left
:
0
;
right
:
0
;
@include
media-breakpoint-up
(
$breakpoint
)
{
position
:
static
;
}
}
}
...
...
@@ -74,7 +98,7 @@ navbar toggler
bottom
:
$navbar-toggler-item-spacing
;
}
.navbar-toggler
.collapsed
&
{
.navbar-toggler
[
aria-expanded
=
"true"
]
&
{
transform
:
rotate
(
45deg
);
transition
:
top
$time
,
bottom
$time
,
transform
$time
$time
,
opacity
$time
;
...
...
@@ -113,10 +137,29 @@ Navbar logo
padding-right
:
$navbar-nav-link-padding-x
;
}
.nav-item
:hover
,
.dropright
:hover
{
>
.dropdown-menu
{
display
:
block
;
@each
$breakpoint
,
$width
in
$grid-breakpoints
{
@at-root
.navbar-expand-
#{
$breakpoint
}
&
{
@include
media-breakpoint-up
(
$breakpoint
)
{
.nav-item
:hover
,
.dropright
:hover
{
>
.dropdown-menu
{
display
:
block
;
}
}
}
@include
media-breakpoint-down
(
$breakpoint
)
{
.dropdown-menu
{
box-shadow
:
none
;
border
:
0
;
padding
:
0
;
}
.dropdown-item
{
padding-left
:
add
(
$navbar-nav-link-padding-x
,
19px
);
padding-right
:
0
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录