Skip to content
Closed
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions templates/base/head_navbar.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
{{$notificationUnreadCount = call .NotificationUnreadCount}}
{{end}}

<nav id="navbar" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
<nav id="navbar" class="ui secondary menu" aria-label="{{ctx.Locale.Tr "aria.navbar"}}">
<div class="navbar-left">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ui secondary menu should be on class="navbar-left"?

Ideally the layout should be:

<div "ui secondary menu">
   <div "item active">...</>
   <div "item">...</>
</>

Copy link
Author

@lianguan lianguan Dec 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. I believe the “notifications” on the right should also take effect. It's just that “PageIsNotifications” is not set in Go at the moment.

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ui secondary menu is from Fomantic UI: https://fomantic-ui.com/collections/menu.html#secondary-menu

I do not think we should abuse it by inserting unrelated elements between menu and item.

image

If you'd like to make it work for "nav-right", you could do this:

<div navbar>
   <div navbar-left ui secondary menu> item ... </div>
   <div navbar-right ui secondary menu> item ... </div>
</div>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there could be another choice: totally drop Fomantic UI, and add a .navbar-left > .item.active, .navbar-right > .item.active { ... } style

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually there could be another choice: totally drop Fomantic UI, and add a .navbar-left > .item.active, .navbar-right > .item.active { ... } style

Hmm ...... I think we need to do this, because the styles are all done by us, not by Fomantic UI, and there is a plan to remove Fomantic UI step by step.

image

<!-- the logo -->
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home"}}{{end}}">
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
</a>

<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
<div class="ui secondary menu item navbar-mobile-right only-mobile">
<div class="item navbar-mobile-right only-mobile">
{{if and .IsSigned EnableTimetracking .ActiveStopwatch}}
<a id="mobile-stopwatch-icon" class="active-stopwatch item tw-mx-0" href="{{.ActiveStopwatch.IssueLink}}" title="{{ctx.Locale.Tr "active_stopwatch"}}" data-seconds="{{.ActiveStopwatch.Seconds}}">
<div class="tw-relative">
Expand Down
Loading