Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
52252e70
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
52252e70
编写于
8月 16, 2017
作者:
P
Phil Hughes
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Improvements to breadcrumbs
Closes #35269
上级
63812b2f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
29 addition
and
39 deletion
+29
-39
app/assets/stylesheets/new_nav.scss
app/assets/stylesheets/new_nav.scss
+16
-26
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+8
-3
app/views/layouts/nav/_breadcrumbs.html.haml
app/views/layouts/nav/_breadcrumbs.html.haml
+5
-10
未找到文件。
app/assets/stylesheets/new_nav.scss
浏览文件 @
52252e70
...
...
@@ -402,6 +402,20 @@ header.navbar-gitlab-new {
}
}
.breadcrumbs-list
{
display
:
flex
;
margin-bottom
:
0
;
>
li
{
display
:
flex
;
align-items
:
center
;
}
a
{
color
:
$gl-text-color
;
}
}
.breadcrumbs-extra
{
display
:
flex
;
flex
:
0
0
auto
;
...
...
@@ -409,34 +423,10 @@ header.navbar-gitlab-new {
}
.breadcrumbs-sub-title
{
margin
:
2px
0
;
font-size
:
16px
;
margin
:
0
;
font-size
:
$gl-font-size
;
font-weight
:
normal
;
line-height
:
1
;
ul
{
margin
:
0
;
}
li
{
display
:
inline-block
;
&
:not
(
:last-child
)
{
&
::after
{
content
:
"/"
;
margin
:
0
2px
0
5px
;
color
:
rgba
(
$black
,
.65
);
}
}
&
:last-child
a
{
font-weight
:
600
;
}
}
a
{
color
:
$gl-text-color
;
}
}
.top-area
{
...
...
app/helpers/projects_helper.rb
浏览文件 @
52252e70
...
...
@@ -58,7 +58,7 @@ module ProjectsHelper
link_to
(
simple_sanitize
(
owner
.
name
),
user_path
(
owner
))
end
project_link
=
link_to
project_path
(
project
),
{
class:
"project-item-select-holder"
}
do
project_link
=
link_to
project_path
(
project
),
{
class:
(
"project-item-select-holder"
unless
show_new_nav?
)
}
do
output
=
if
show_new_nav?
project_icon
(
project
,
alt:
project
.
name
,
class:
'avatar-tile'
,
width:
16
,
height:
16
)
...
...
@@ -70,13 +70,18 @@ module ProjectsHelper
output
.
html_safe
end
if
current_user
if
show_new_nav?
namespace_link
=
content_tag
"li"
,
namespace_link
project_link
=
content_tag
"li"
,
project_link
end
if
current_user
&&
!
show_new_nav?
project_link
<<
button_tag
(
type:
'button'
,
class:
'dropdown-toggle-caret js-projects-dropdown-toggle'
,
aria:
{
label:
'Toggle switch project dropdown'
},
data:
{
target:
'.js-dropdown-menu-projects'
,
toggle:
'dropdown'
,
order_by:
'last_activity_at'
})
do
icon
(
"chevron-down"
)
end
end
"
#{
namespace_link
}
/
#{
project_link
}
"
.
html_safe
"
#{
namespace_link
}
#{
project_link
}
"
.
html_safe
end
def
remove_project_message
(
project
)
...
...
app/views/layouts/nav/_breadcrumbs.html.haml
浏览文件 @
52252e70
...
...
@@ -7,21 +7,16 @@
=
button_tag
class:
'toggle-mobile-nav'
,
type:
'button'
do
%span
.sr-only
Open sidebar
=
icon
(
'bars'
)
.breadcrumbs-links.js-title-container
-
unless
hide_top_links
.title
=
link_to
"GitLab"
,
root_path
\/
.breadcrumbs-links.js-title-container
%ul
.list-unstyled.breadcrumbs-list
-
if
content_for?
(
:header_title_before
)
=
yield
:header_title_before
\/
%li
=
yield
:header_title_before
=
header_title
%h2
.breadcrumbs-sub-title
%ul
.list-unstyled
-
if
@breadcrumbs_extra_links
-
@breadcrumbs_extra_links
.
each
do
|
extra
|
%li
=
link_to
extra
[
:text
],
extra
[
:link
]
%li
=
link_to
@breadcrumb_title
,
breadcrumb_link
%li
%h2
.breadcrumbs-sub-title
=
link_to
@breadcrumb_title
,
breadcrumb_link
-
if
content_for?
(
:breadcrumbs_extra
)
.breadcrumbs-extra.hidden-xs
=
yield
:breadcrumbs_extra
=
yield
:header_content
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录