Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
知鸟1号
tabler
提交
57a4c54a
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,发现更多精彩内容 >>
提交
57a4c54a
编写于
11月 21, 2020
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sticky navbar
上级
7f56afc8
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
34 deletion
+51
-34
src/pages/_data/menu.yml
src/pages/_data/menu.yml
+3
-0
src/pages/_includes/layout/navbar.html
src/pages/_includes/layout/navbar.html
+41
-33
src/pages/_layouts/default.html
src/pages/_layouts/default.html
+1
-1
src/pages/layout-navbar-sticky.html
src/pages/layout-navbar-sticky.html
+6
-0
未找到文件。
src/pages/_data/menu.yml
浏览文件 @
57a4c54a
...
...
@@ -178,6 +178,9 @@ layout:
navbar-dark
:
url
:
layout-navbar-dark.html
title
:
Navbar dark
navbar-sticky
:
url
:
layout-navbar-sticky.html
title
:
Navbar sticky
navbar-overlap
:
url
:
layout-navbar-overlap.html
title
:
Navbar overlap
...
...
src/pages/_includes/layout/navbar.html
浏览文件 @
57a4c54a
{% assign breakpoint = include.breakpoint | default: 'md' %}
{% assign condensed = include.condensed | default: false %}
<header
class=
"navbar navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}{% if include.sticky %} sticky-top{% endif %}{% if include.overlap %} navbar-overlap{% endif %}{% if include.class %} {{ include.class }}{% endif %} d-print-none"
{%
if
include.background-color
%}
style=
"background: {{ include.background-color }}"
{%
endif
%}
>
<div
class=
"container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}
"
>
{% include layout/navbar-toggler.html target="navbar-menu"
%}
{% if include.sticky %}
<div
class=
"sticky-top
"
>
{% endif
%}
{% 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
%}
<header
class=
"navbar navbar-expand-{{ breakpoint }}{% unless include.transparent %} {% if include.dark %}navbar-dark{% else %}navbar-light{% endif %}{% if include.background %} bg-{{ include.background }}{% endif %}{% endunless %}{% if include.sticky %} sticky-top{% endif %}{% if include.overlap %} navbar-overlap{% endif %}{% if include.class %} {{ include.class }}{% endif %} d-print-none"
{%
if
include.background-color
%}
style=
"background: {{ include.background-color }}"
{%
endif
%}
>
<div
class=
"container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}"
>
{% include layout/navbar-toggler.html target="navbar-menu"
%}
{% include layout/navbar-side.html class="order-md-last" hide-username=include.hide-username person-id=include.person-id %}
{% 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 %}
{% if condensed %}
<div
class=
"collapse navbar-collapse"
id=
"navbar-menu"
>
{% if include.hide-search %}
{% include layout/navbar-menu.html sample=include.sample hide-icons=include.hide-icons %}
{% elsif include.hide-menu %}
{% include layout/navbar-search.html rounded=include.transparent dark=include.dark %}
{% else %}
<div
class=
"d-flex flex-column flex-md-row flex-fill align-items-stretch align-items-md-center"
>
{% include layout/navbar-side.html class="order-md-last" hide-username=include.hide-username person-id=include.person-id %}
{% if condensed %}
<div
class=
"collapse navbar-collapse"
id=
"navbar-menu"
>
{% if include.hide-search %}
{% include layout/navbar-menu.html sample=include.sample hide-icons=include.hide-icons %}
{% elsif include.hide-menu %}
{% include layout/navbar-search.html rounded=include.transparent dark=include.dark %}
{% 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 %}
{% assign search-class = "ml-md-auto pl-md-4 py-2 py-md-0 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 %}
{% assign search-class = "ml-md-auto pl-md-4 py-2 py-md-0 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" rounded=include.transparent class=search-class dark=include.dark %}
</div>
{% include layout/navbar-search.html breakpoint="lg" rounded=include.transparent class=search-class dark=include.dark %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endif %}
</div>
</header>
{% unless condensed %}
<div
class=
"navbar-expand-{{ breakpoint }}"
>
<div
class=
"collapse navbar-collapse"
id=
"navbar-menu"
>
<div
class=
"navbar {% if include.dark-secondary %}navbar-dark{% else %}navbar-light{% endif %}"
>
<div
class=
"container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}"
>
{% include layout/navbar-menu.html sample=include.sample hide-icons=include.hide-icons long-titles=true %}
{% include layout/navbar-search.html breakpoint=breakpoint dark=include.dark-secondary class="my-2 my-md-0 flex-grow-1 flex-md-grow-0 order-first order-md-last" %}
</header>
{% unless condensed %}
<div
class=
"navbar-expand-{{ breakpoint }}"
>
<div
class=
"collapse navbar-collapse"
id=
"navbar-menu"
>
<div
class=
"navbar {% if include.dark-secondary %}navbar-dark{% else %}navbar-light{% endif %}"
>
<div
class=
"container{% if page.layout-fluid %}-fluid{% else %}-xl{% endif %}"
>
{% include layout/navbar-menu.html sample=include.sample hide-icons=include.hide-icons long-titles=true %}
{% include layout/navbar-search.html breakpoint=breakpoint dark=include.dark-secondary class="my-2 my-md-0 flex-grow-1 flex-md-grow-0 order-first order-md-last" %}
</div>
</div>
</div>
</div>
{% endunless %}
{% if include.sticky %}
</div>
{% endunless %}
\ No newline at end of file
{% endif %}
\ No newline at end of file
src/pages/_layouts/default.html
浏览文件 @
57a4c54a
...
...
@@ -8,7 +8,7 @@ layout: base
<div
class=
"page"
>
{% unless page.layout-hide-topbar %}
{% include layout/navbar.html condensed=page.layout-navbar-condensed overlap=page.layout-navbar-overlap dark=page.layout-navbar-dark hide-brand=page.layout-navbar-hide-brand hide-menu=page.layout-navbar-hide-menu class=page.layout-navbar-class %}
{% include layout/navbar.html condensed=page.layout-navbar-condensed overlap=page.layout-navbar-overlap dark=page.layout-navbar-dark hide-brand=page.layout-navbar-hide-brand hide-menu=page.layout-navbar-hide-menu
sticky=page.layout-navbar-sticky
class=page.layout-navbar-class %}
{% endunless %}
{% include layout/content.html %}
...
...
src/pages/layout-navbar-sticky.html
0 → 100644
浏览文件 @
57a4c54a
---
page-header: Navbar sticky
menu: layout.navbar-sticky
layout-navbar-sticky: true
layout: homepage
---
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录