Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Dashboards
Tabler
提交
2ce1182e
T
Tabler
项目概览
Dashboards
/
Tabler
10 个月 前同步成功
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2ce1182e
编写于
10月 22, 2019
作者:
C
codecalm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
dropdowns page
上级
976072b9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
82 addition
and
45 deletion
+82
-45
pages/_includes/ui/dropdown-menu.html
pages/_includes/ui/dropdown-menu.html
+24
-9
pages/dropdowns.html
pages/dropdowns.html
+19
-0
scss/_variables.scss
scss/_variables.scss
+6
-0
scss/ui/_dropdowns.scss
scss/ui/_dropdowns.scss
+33
-36
未找到文件。
pages/_includes/ui/dropdown-menu.html
浏览文件 @
2ce1182e
{% assign items = include.items | default: "Action|Another action|Something else|-|Separated link" | split: "|" %}
<div
class=
"dropdown-menu{% if include.right %} dropdown-menu-right{% endif %}"
>
{% for item in items %}
{% if item == '-' %}
<div
class=
"dropdown-divider"
></div>
{% else %}
<a
class=
"dropdown-item"
href=
"javascript:void(0)"
>
{{ item }}
</a>
{% endif %}
{% endfor %}
<div
class=
"dropdown-menu{% if include.right %} dropdown-menu-right{% endif %}{% if include.show %} position-relative d-inline-block{% endif %}{% if include.arrow %} dropdown-menu-arrow{% endif %}{% if include.dark %} bg-dark text-white{% endif %}{% if include.class %} {{ include.class }}{% endif %}"
>
{% if include.check or include.radio %}
{% for i in (1..3) %}
<label
class=
"dropdown-item"
><input
class=
"form-check-input m-0 mr-2"
type=
"{% if include.radio %}radio{% else %}checkbox{% endif %}"
>
Option {{ i }}
</label>
{% endfor %}
{% elsif include.type == 'text' %}
{% else %}
{% if include.header %}
<span
class=
"dropdown-header"
>
Dropdown header
</span>
{% endif %}
<a
class=
"dropdown-item"
href=
"#"
>
{% if include.icons %}{% include ui/icon.html icon="settings" %} {% endif %}
Action
{% if include.badge %}
<span
class=
"badge bg-primary ml-auto"
>
12
</span>
{% endif %}
</a>
<a
class=
"dropdown-item"
href=
"#"
>
{% if include.icons %}{% include ui/icon.html icon="edit" %} {% endif %}Another action
</a>
{% if include.active %}
<a
class=
"dropdown-item active"
href=
"#"
>
{% if include.icons %}{% include ui/icon.html icon="activity" %} {% endif %}Active action
</a>
{% endif %}
{% if include.disabled %}
<a
class=
"dropdown-item disabled"
href=
"#"
>
{% if include.icons %}{% include ui/icon.html icon="user-x" %} {% endif %}Disabled action
</a>
{% endif %}
{% if include.separated %}
<div
class=
"dropdown-divider"
></div>
<a
class=
"dropdown-item"
href=
"#"
>
{% if include.icons %}{% include ui/icon.html icon="plus" class="dropdown-icon" %} {% endif %}Separated link
</a>
{% endif %}
{% endif %}
</div>
pages/dropdowns.html
0 → 100644
浏览文件 @
2ce1182e
---
title: Dropdowns
page-title: Dropdowns
---
{% include_cached ui/dropdown-menu.html show=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true separated=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true active=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true disabled=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true header=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true icons=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true icons=true header=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true arrow=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true dark=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true arrow=true right=true dark=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true arrow=true right=true dark=true icons=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true badge=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true check=true class="mr-3 mb-3 align-top" %}
{% include_cached ui/dropdown-menu.html show=true radio=true class="mr-3 mb-3 align-top" %}
scss/_variables.scss
浏览文件 @
2ce1182e
...
...
@@ -238,6 +238,12 @@ $card-shadow-hover: rgba($dark, .08) 0 2px 12px 0 !default;
$close-font-weight
:
400
!
default
;
$close-font-size
:
1
.5rem
!
default
;
//dropdown
$dropdown-item-padding-x
:
1rem
!
default
;
$dropdown-font-size
:
$h5-font-size
!
default
;
$dropdown-divider-bg
:
$border-color
!
default
;
$dropdown-padding-y
:
.5rem
!
default
;
//nav
$nav-link-padding-y
:
.25rem
!
default
;
...
...
scss/ui/_dropdowns.scss
浏览文件 @
2ce1182e
.dropdown-divider
{
border-color
:
$border-color
;
.dropdown-menu
{
min-width
:
12rem
;
box-shadow
:
$box-shadow
;
.icon
{
width
:
1em
;
margin-right
:
.5rem
;
color
:
inherit
;
opacity
:
.5
;
text-align
:
center
;
stroke-width
:
2px
;
}
}
.dropdown-header
{
@extend
.subheader
;
padding-bottom
:
.25rem
;
pointer-events
:
none
;
}
.dropdown-menu-scrollable
{
...
...
@@ -8,57 +24,38 @@
overflow-x
:
hidden
;
}
.dropdown-menu
{
min-width
:
12rem
;
box-shadow
:
$box-shadow
;
}
.dropdown-item
{
color
:
inherit
;
display
:
flex
;
align-items
:
center
;
margin
:
0
;
}
.dropdown-menu-arrow
{
margin-top
:
.75rem
;
&
::before
{
position
:
absolute
;
top
:
-6px
;
left
:
12px
;
display
:
inline-block
;
content
:
""
;
border-right
:
5px
solid
transparent
;
border-bottom
:
5px
solid
$border-color
;
border-bottom-color
:
rgba
(
0
,
0
,
0
,
.2
);
border-left
:
5px
solid
transparent
;
}
&
::after
{
position
:
absolute
;
top
:
-
5
px
;
top
:
-
4
px
;
left
:
12px
;
display
:
inline-block
;
content
:
""
;
border-right
:
5px
solid
transparent
;
border-bottom
:
5px
solid
#fff
;
border-left
:
5px
solid
transparent
;
display
:
block
;
background
:
inherit
;
width
:
14px
;
height
:
14px
;
transform
:
rotate
(
45deg
);
transform-origin
:
center
;
border
:
1px
solid
;
border-color
:
inherit
;
z-index
:
-1
;
clip
:
rect
(
0px
,
9px
,
9px
,
0px
);
}
&
.dropdown-menu-right
{
&
::before
,
&
::after
{
&
::before
{
right
:
12px
;
left
:
auto
;
}
}
}
.dropdown-icon
{
display
:
inline-block
;
width
:
1em
;
margin-right
:
.5rem
;
margin-left
:
-.5rem
;
color
:
$text-muted
;
text-align
:
center
;
vertical-align
:
-1px
;
stroke-width
:
1
.75px
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录