Skip to content

Improve "new-menu" #24465

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/explore/navbar.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ui secondary pointing tabular top attached borderless stackable menu new-menu navbar">
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
<a class="{{if .PageIsExploreRepositories}}active {{end}}item" href="{{AppSubUrl}}/explore/repos">
{{svg "octicon-repo"}} {{.locale.Tr "explore.repos"}}
</a>
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/diff/image_diff.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<tr>
<td colspan="2">
<div class="image-diff" data-path-before="{{.root.BeforeRawPath}}/{{PathEscapeSegments .file.OldName}}" data-path-after="{{.root.RawPath}}/{{PathEscapeSegments .file.Name}}">
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu">
<div class="ui secondary pointing tabular top attached borderless menu new-menu">
<div class="new-menu-inner">
<a class="item active" data-tab="diff-side-by-side-{{.file.Index}}">{{.root.locale.Tr "repo.diff.image.side_by_side"}}</a>
{{if and .blobBase .blobHead}}
Expand Down
2 changes: 1 addition & 1 deletion templates/user/auth/signup_openid_navbar.tmpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
<div class="new-menu-inner">
<a class="{{if .PageIsOpenIDConnect}}active {{end}}item" href="{{AppSubUrl}}/user/openid/connect">
{{.locale.Tr "auth.openid_connect_title"}}
Expand Down
7 changes: 6 additions & 1 deletion web_src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@ img.ui.avatar,
}

.ui.menu.new-menu .item {
margin: 0 !important;
margin-bottom: 0 !important; /* reset fomantic's margin, because the active menu has special bottom border */
}

@media (max-width: 767px) {
Expand All @@ -1924,8 +1924,13 @@ img.ui.avatar,
}
}

.ui.menu.new-menu .item:first-child {
margin-left: auto; /* "justify-content: center" doesn't work with "overflow: auto", so use margin: auto */
}

.ui.menu.new-menu .item:last-child {
padding-right: 30px !important;
margin-right: auto;
}

.ui.menu.new-menu::-webkit-scrollbar {
Expand Down
1 change: 0 additions & 1 deletion web_src/css/explore.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.explore .navbar {
justify-content: center;
margin-bottom: 15px !important;
background-color: var(--color-navbar) !important;
border-width: 1px !important;
Expand Down
4 changes: 0 additions & 4 deletions web_src/css/runner.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
color: var(--color-white) !important;
}

.runner-container .runner-new-menu {
width: 300px;
}

.runner-container .task-status-success {
background-color: var(--color-green);
color: var(--color-white);
Expand Down