diff --git a/static/js/click_handlers.js b/static/js/click_handlers.js index 274d543432..4e349fda06 100644 --- a/static/js/click_handlers.js +++ b/static/js/click_handlers.js @@ -541,7 +541,7 @@ export function initialize() { // SIDEBARS - $(".right-sidebar .login_button").on("click", (e) => { + $("body").on("click", ".login_button", (e) => { e.preventDefault(); e.stopPropagation(); window.location.href = hash_util.build_login_link(); diff --git a/static/js/tippyjs.js b/static/js/tippyjs.js index 075fb2c831..3fb9928f7f 100644 --- a/static/js/tippyjs.js +++ b/static/js/tippyjs.js @@ -226,6 +226,7 @@ export function initialize() { "#user_filter_icon", "#scroll-to-bottom-button-clickable-area", ".code_external_link", + ".spectator_narrow_login_button", ], appendTo: () => document.body, }); diff --git a/static/styles/dark_theme.css b/static/styles/dark_theme.css index 76d70c8f16..011b43849e 100644 --- a/static/styles/dark_theme.css +++ b/static/styles/dark_theme.css @@ -427,6 +427,7 @@ body.dark-theme { } } + .spectator_narrow_login_button, .top-navbar-border { border-color: hsla(0, 0%, 0%, 0.6); } @@ -551,6 +552,18 @@ body.dark-theme { color: hsl(0, 0%, 100%); } + .spectator_login_buttons a { + color: hsl(236, 33%, 90%); + + &:hover { + color: hsl(0, 0%, 100%); + } + } + + .spectator_narrow_login_button .login_button i { + color: hsl(236, 33%, 90%); + } + #user_presences li .user-list-sidebar-menu-icon:hover, .all-messages-sidebar-menu-icon:hover, .starred-messages-sidebar-menu-icon:hover, diff --git a/static/styles/zulip.css b/static/styles/zulip.css index fa3ef610ea..d323c8505d 100644 --- a/static/styles/zulip.css +++ b/static/styles/zulip.css @@ -450,6 +450,65 @@ p.n-margin { position: absolute; right: 0; top: 0; + + .spectator_login_buttons { + display: flex; + justify-content: space-evenly; + position: absolute; + top: 10px; + /* width of right column - width of gear icon(250px - 45px) */ + width: 205px; + + a { + font-size: calc(16em / 14); + font-weight: 600; + color: hsl(0, 0%, 20%); + + &:hover { + text-decoration: none; + color: hsl(0, 0%, 0%); + } + + i { + margin-right: 3px; + } + } + + .divider { + color: hsl(0, 0%, 88%); + font-size: 20px; + line-height: 1; + } + } + + .spectator_narrow_login_button { + position: absolute; + top: 0; + right: 0; + /* Height of navbar in tablet sizes */ + height: 40px; + /* Width of userlist-toggle button. */ + width: 45px; + border-left: 1px solid hsl(0, 0%, 88%); + + .login_button { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + opacity: 0.5; + + &:hover { + opacity: 1; + text-decoration: none; + } + + i { + color: hsl(0, 0%, 20%); + font-size: 1.6em; + } + } + } } .column-left { @@ -2955,8 +3014,12 @@ div.topic_edit_spinner .loading_indicator_spinner { #searchbox, #searchbox_legacy, .header { - height: 30px; line-height: 30px; + height: 30px; + } + + .spectator_narrow_login_button { + height: 30px !important; } #search_query { diff --git a/static/templates/navbar.hbs b/static/templates/navbar.hbs index 23b3cc01b9..b991b48675 100644 --- a/static/templates/navbar.hbs +++ b/static/templates/navbar.hbs @@ -45,7 +45,23 @@
-
+ +
0 diff --git a/static/templates/right_sidebar.hbs b/static/templates/right_sidebar.hbs index 3afffbe83e..667eedfdfc 100644 --- a/static/templates/right_sidebar.hbs +++ b/static/templates/right_sidebar.hbs @@ -33,15 +33,6 @@
{{rendered_markdown realm_rendered_description }}
-
- -