Skip to content

Commit

Permalink
Sidebar improvements
Browse files Browse the repository at this point in the history
- Show text on desktop
- Add notification when not delegated
  • Loading branch information
TimDaub committed Jan 3, 2024
1 parent 6ef96cd commit 1f4dfd3
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 18 deletions.
31 changes: 16 additions & 15 deletions src/public/news.css
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ body {
width: 100%;
}
/* Media query for larger screens */
@media (min-width: 900px) {
@media (min-width: 1024px) {
#hnmain > table:first-of-type > tbody > tr:first-of-type {
background-color: #e6e6df;
}
Expand Down Expand Up @@ -461,13 +461,11 @@ body {
}
.sidebar .kiwi-logo {
display: flex;
justify-content: center;
align-items: center;
font-size: 1.9rem;
margin: 14px 14px 14px 10px;
margin: 14px 14px 14px 20px;
}
.sidebar {

z-index: 6;
overflow: hidden;
background-color: rgb(246, 246, 239);
Expand Down Expand Up @@ -506,28 +504,31 @@ body {
width: auto;
}
.svg-container + span {
display: none;
margin: 0 0.25rem 0 0.75rem;
font-size: 1rem;
}
.sidebar a {
font-size: 2em;
/* Adjust to preferred size */
}
#nav-profile, #nav-settings, #nav-disconnect {
height: 32px;
.sidebar a:not(.kiwi-logo):hover{
background-color: rgba(0,0,0,0.1);
border-radius: 5px;
}
.sidebar .icon-svg {
width: 36px;
height: 36px;
}
.sidebar-div {
font-size: 2em;
/* Adjust to preferred size */
/* This has to have same font-size as sidebar a */
font-size: 1.7em;
}
}
.sidebar a {
margin: 1.25rem 10px 10px 10px;
font-size: 1.7rem;
font-weight: bold;
padding: 0.3rem 0 0.3rem 0;
margin: 0.5rem 10px 0.2rem 10px;
font-size: 1.7rem;
font-weight: bold;
}
.svg-container {
width: 19%;
Expand All @@ -553,15 +554,15 @@ body {
color: black;
text-decoration: none;
display: block;
margin: 1.25rem 10px 10px 10px;
padding: 0.3rem 0 0.3rem 0;
margin: 0.5rem 10px 0.2rem 10px;
font-size: 1.7rem;
font-weight: bold;
cursor: pointer;
}
@media (min-width: 768px) {
.sidebar-div {
font-size: 2em;
/* Adjust to preferred size */
font-size: 1.7em;
}
}
#overlay {
Expand Down
1 change: 1 addition & 0 deletions src/views/components/sidebar.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ const sidebar = (path) => html`
<div class="svg-container">
${path === "/submit" ? submitfull : submit}
</div>
<span>Submit</span>
</div>
</a>
<a
Expand Down
2 changes: 1 addition & 1 deletion src/views/settings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default async function index(theme, identity) {
style="color: black; font-style: italic; margin-bottom: 10px;"
>
Cost:
<span style="font-weight: bold;"> 0.1 USD</span> (Optimism
<span style="font-weight: bold;"> $0.4</span> (Optimism
gas fees)
</p>
<div
Expand Down
19 changes: 17 additions & 2 deletions src/web/src/Navigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,26 @@ const Settings = (props) => {
}}
>
<div style={{ display: "flex", alignItems: "center" }}>
<div className="svg-container">
<div className="svg-container" style={{ position: "relative" }}>
{window.location.pathname === "/settings" ? (
<SettingsSVGFull />
) : (
<SettingsSVG />
<>
<SettingsSVG />
{!localAccount && (
<span
style={{
position: "absolute",
top: "0",
left: "10px",
backgroundColor: "red",
borderRadius: "50%",
minWidth: "12px",
height: "12px",
}}
/>
)}
</>
)}
</div>
<span>Settings</span>
Expand Down

0 comments on commit 1f4dfd3

Please sign in to comment.