covering the bases

This commit is contained in:
Víctor Losada Hernández
2026-10-10 22:23:13 +02:00
parent a8a9ba736d
commit 5d48173b76
3 changed files with 46 additions and 44 deletions
-1
View File
@@ -1,4 +1,3 @@
import './navbar.less';
import React from 'react'; import React from 'react';
import cx from 'classnames'; import cx from 'classnames';
+45 -43
View File
@@ -1,7 +1,6 @@
@import '@sharedStyles/core.less'; @import '@sharedStyles/core.less';
@navbarHeight: 29px; @navbarHeight: 29px;
@viewerToolsHeight: 32px;
.homebrew nav { .homebrew nav {
position: relative; position: relative;
@@ -173,34 +172,6 @@
} }
} }
button,
a {
&:disabled {
color: #777;
}
display: grid;
place-items: center;
height: 100%;
width: 100%;
padding: 5px 10px;
@media screen and (max-width: 800px) {
padding: 5px;
}
}
a {
color: inherit;
text-decoration: none;
}
i.fa-power-off {
color: red;
&.active {
color: #00b634;
filter: drop-shadow(0 0 2px #00b634c3);
}
}
.navItem, .navItem,
.menu-wrapper { .menu-wrapper {
--activeTriggerColor: #666; --activeTriggerColor: #666;
@@ -216,14 +187,6 @@
justify-content: space-between; justify-content: space-between;
} }
kbd {
font-size: 0.8em;
font-family: monospace;
color: #aaa;
background: #222;
padding: 2px 5px;
border-radius: 5px;
}
&.header { &.header {
cursor: default; cursor: default;
place-content: center; place-content: center;
@@ -231,7 +194,6 @@
&.recent ul { &.recent ul {
position: relative; position: relative;
.navItem { .navItem {
position: relative; position: relative;
gap: 5px; gap: 5px;
@@ -292,6 +254,7 @@
align-items: center; align-items: center;
height: 100%; height: 100%;
> .menu-wrapper { > .menu-wrapper {
height: 100%; height: 100%;
text-wrap: nowrap; text-wrap: nowrap;
@@ -304,16 +267,12 @@
} }
} }
&:last-child ul {
padding-right: 10px;
translate: -10px 0;
}
ul { ul {
background: #333; background: #333;
font-size: 12px; font-size: 12px;
text-transform: capitalize; text-transform: capitalize;
padding-bottom: 5px; padding-bottom: 5px;
min-width: 80px;
.navItem { .navItem {
min-height: 2.2em; min-height: 2.2em;
@@ -333,5 +292,48 @@
margin-block: 2px; margin-block: 2px;
} }
} }
&:last-child ul {
padding-right: 10px;
translate: -10px 0;
}
} }
button,
a {
&:disabled {
color: #777;
}
display: grid;
place-items: center;
height: 100%;
width: 100%;
padding: 5px 10px;
@media screen and (max-width: 800px) {
padding: 5px;
}
}
a {
color: inherit;
text-decoration: none;
}
i.fa-power-off {
color: red;
&.active {
color: #00b634;
filter: drop-shadow(0 0 2px #00b634c3);
}
}
kbd {
font-size: 0.8em;
font-family: monospace;
color: #aaa;
background: #222;
padding: 2px 5px;
border-radius: 5px;
}
} }
@@ -143,6 +143,7 @@ const RecentItems = createReactClass({
// if(!this.state.showDropdown) return null; // if(!this.state.showDropdown) return null;
const makeItems = (brews)=>{ const makeItems = (brews)=>{
if(brews.length === 0) return <Nav.item>No recent brews</Nav.item>
return <div className='nav-section'> return <div className='nav-section'>
{_.map(brews, (brew, i)=>{ {_.map(brews, (brew, i)=>{
return <a className='navItem' href={brew.url} key={`${brew.id}-${i}`} target='_blank' rel='noopener noreferrer' title={brew.title || '[ no title ]'}> return <a className='navItem' href={brew.url} key={`${brew.id}-${i}`} target='_blank' rel='noopener noreferrer' title={brew.title || '[ no title ]'}>