Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
tabler
提交
1b0f3283
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,体验更适合开发者的 AI 搜索 >>
提交
1b0f3283
编写于
4月 05, 2020
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
navigations fixes
上级
1d1b9317
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
54 addition
and
9 deletion
+54
-9
pages/_data/menu-sample.yml
pages/_data/menu-sample.yml
+2
-0
pages/_includes/layout/navbar-menu.html
pages/_includes/layout/navbar-menu.html
+5
-1
pages/_includes/layout/navbar-side.html
pages/_includes/layout/navbar-side.html
+1
-0
pages/_includes/layout/navbar.html
pages/_includes/layout/navbar.html
+13
-3
pages/navigation.html
pages/navigation.html
+7
-3
scss/_variables.scss
scss/_variables.scss
+3
-0
scss/layout/_navbar.scss
scss/layout/_navbar.scss
+22
-0
scss/ui/_badges.scss
scss/ui/_badges.scss
+1
-2
未找到文件。
pages/_data/menu-sample.yml
浏览文件 @
1b0f3283
...
...
@@ -2,10 +2,12 @@ first:
url
:
'
#'
icon
:
star
title
:
First
active
:
true
second
:
url
:
'
#'
icon
:
star
badge
:
2
title
:
Second
third
:
...
...
pages/_includes/layout/navbar-menu.html
浏览文件 @
1b0f3283
...
...
@@ -9,7 +9,7 @@
<ul
class=
"navbar-nav{% if include.class %} {{ include.class }}{% endif %}"
>
{% for level-1 in menu %}
{% assign icon = level-1[1].icon %}
<li
class=
"nav-item{% if level-1[0] == current-page[0] %} active{% endif %}{% if level-1[1].children %} dropdown{% endif %}"
>
<li
class=
"nav-item{% if level-1[0] == current-page[0]
or level-1[1].active
%} active{% endif %}{% if level-1[1].children %} dropdown{% endif %}"
>
<a
class=
"nav-link{% if level-1[1].children %} dropdown-toggle{% endif %}"
{%
if
level-1
[1].
children
%}
href=
"#navbar-{{ level-1[0] }}"
data-toggle=
"dropdown"
role=
"button"
aria-expanded=
"{% if level-1[0] == current-page[0] %}true{% else %}false{% endif %}"
{%
else
%}
href=
"{{ site.base }}/{{ level-1[1].url }}"
{%
endif
%}
>
{% unless hide-icons %}
...
...
@@ -23,6 +23,10 @@
{{ level-1[1].title }}
{% endif %}
</span>
{% if level-1[1].badge %}
<span
class=
"badge bg-red"
>
{{ level-1[1].badge }}
</span>
{% endif %}
</a>
{% if level-1[1].children %}
...
...
pages/_includes/layout/navbar-side.html
浏览文件 @
1b0f3283
...
...
@@ -4,6 +4,7 @@
<li
class=
"nav-item nav-item-icon dropdown d-none d-md-flex mr-3"
>
<a
href=
"#"
class=
"nav-link px-0"
data-toggle=
"dropdown"
tabindex=
"-1"
>
{% include ui/icon.html icon="bell" %}
<span
class=
"badge bg-red"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right dropdown-menu-card"
>
{% include cards/navbar-notifications.html %}
...
...
pages/_includes/layout/navbar.html
浏览文件 @
1b0f3283
{% assign breakpoint = include.breakpoint | default: 'md' %}
{% assign secondary = include.secondary | default: false %}
<header
class=
"navbar navbar-expand-{{ breakpoint }} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}
"
{%
if
include.background
%}
style=
"background: {{ include.background
}}"
{%
endif
%}
>
<header
class=
"navbar navbar-expand-{{ breakpoint }} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}
{% if include.background %} bg-{{ include.background }}{% endif %}"
{%
if
include.background-color
%}
style=
"background: {{ include.background-color
}}"
{%
endif
%}
>
<div
class=
"container-xl"
>
{% include layout/navbar-toggler.html target="navbar-menu" %}
{% include layout/navbar-logo.html dark=include.dark small-logo=include.small-logo hide-logo=include.hide-logo class="d-none-navbar-horizontal pr-0 pr-md-3" breakpoint=breakpoint show-title=include.show-title %}
{% unless include.hide-brand %}
{% include layout/navbar-logo.html dark=include.dark small-logo=include.small-logo hide-logo=include.hide-logo class="d-none-navbar-horizontal pr-0 pr-md-3" breakpoint=breakpoint show-title=include.show-title %}
{% endunless %}
{% include layout/navbar-side.html class="order-md-last" hide-username=include.hide-username person-id=include.person-id %}
{% unless secondary %}
...
...
@@ -14,7 +18,13 @@
{% else %}
<div
class=
"d-flex flex-column flex-md-row flex-fill align-items-stretch align-items-md-center"
>
{% include layout/navbar-menu.html sample=include.sample hide-icons=include.hide-icons %}
{% include layout/navbar-search.html breakpoint="lg" class="flex-grow-1 flex-md-grow-0 ml-md-auto pl-md-4 mr-md-4 order-first order-md-last" dark=include.dark %}
{% assign search-class = "ml-md-auto pl-md-4 mr-md-4 order-first order-md-last flex-grow-1" %}
{% unless include.fluid-search %}
{% assign search-class = search-class | append: " flex-md-grow-0" %}
{% endunless %}
{% include layout/navbar-search.html breakpoint="lg" class=search-class dark=include.dark %}
</div>
{% endif %}
</div>
...
...
pages/navigation.html
浏览文件 @
1b0f3283
...
...
@@ -14,14 +14,18 @@ page-header: Navigation
</div>
<div
class=
"mb-3"
>
{% include layout/navbar.html sample=true dark=true small-logo=true background="#7952b3" hide-search=true person-id=4 %}
{% include layout/navbar.html sample=true dark=true small-logo=true background
-color
="#7952b3" hide-search=true person-id=4 %}
</div>
<div
class=
"mb-3"
>
{% include layout/navbar.html sample=true
secondary=true small-logo=true show-titl
e=true person-id=5 %}
{% include layout/navbar.html sample=true
dark=true background="primary" hide-brand=true hide-icons=true fluid-search=true hide-usernam
e=true person-id=5 %}
</div>
<div
class=
"mb-3"
>
{% include layout/navbar.html sample=true secondary=true dark-secondary=true person-id=6 %}
{% include layout/navbar.html sample=true secondary=true small-logo=true show-title=true person-id=6 %}
</div>
<div
class=
"mb-3"
>
{% include layout/navbar.html sample=true secondary=true dark=true person-id=7 %}
</div>
</div>
\ No newline at end of file
scss/_variables.scss
浏览文件 @
1b0f3283
...
...
@@ -251,6 +251,9 @@ $breadcrumb-variants: (
)
!
default
;
//badges
$badge-padding-y
:
.125rem
!
default
;
$badge-padding-x
:
.25rem
!
default
;
$badge-font-size
:
$h6-font-size
!
default
;
$badge-font-weight
:
$font-weight-bold
!
default
;
$badge-empty-size
:
.5rem
!
default
;
...
...
scss/layout/_navbar.scss
浏览文件 @
1b0f3283
.navbar
{
.nav-link
{
position
:
relative
;
.badge
{
position
:
absolute
;
top
:
.375rem
;
right
:
.375rem
;
transform
:
translate
(
50%
,
-50%
);
}
}
}
.navbar-expand
{
@each
$breakpoint
in
map-keys
(
$grid-breakpoints
)
{
$next
:
breakpoint-next
(
$breakpoint
,
$grid-breakpoints
);
...
...
@@ -9,6 +23,14 @@
position
:
absolute
;
}
.nav-link
{
.badge
{
position
:
static
;
margin-left
:
.5rem
;
transform
:
none
;
}
}
.navbar-collapse
{
.navbar-nav
{
width
:
100%
;
...
...
scss/ui/_badges.scss
浏览文件 @
1b0f3283
...
...
@@ -2,11 +2,10 @@
@include
subheader
(
false
);
display
:
inline-flex
;
justify-content
:
center
;
padding
:
0
.5em
;
line-height
:
1
.75em
;
background
:
$gray-500
;
overflow
:
hidden
;
vertical-align
:
text-bottom
;
user-select
:
none
;
@at-root
a
#{
&
}
{
color
:
$white
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录