mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-17 05:39:46 +00:00
pass in page title, fit in mobile
This commit is contained in:
@@ -44,9 +44,9 @@ const Nav = {
|
||||
}
|
||||
},
|
||||
header: ({span, className, children, ...props})=>{
|
||||
return <li className={cx([`navItem header`, className])} no-dismiss='true'>
|
||||
return <span className={cx([`navItem header`, className])} no-dismiss='true'>
|
||||
{children}
|
||||
</li>;
|
||||
</span>;
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
@@ -18,7 +18,6 @@ const Navbar = ({ children, brew, pageName, editor, title, currentPage, props })
|
||||
const mod = isMac ? '⌘' : 'Ctrl';
|
||||
const isBrew = !!brew && (brew.shareId || pageName === 'homePage' || pageName === 'newPage');
|
||||
const account = global.account;
|
||||
const generalPage = pageName === 'vaultPage' || pageName === 'changelog' || pageName === 'faq' || pageName === 'migrate';
|
||||
|
||||
const navSlots = React.Children.toArray(children).reduce((slots, child) => {
|
||||
if (!React.isValidElement(child)) return slots;
|
||||
@@ -162,7 +161,7 @@ const Navbar = ({ children, brew, pageName, editor, title, currentPage, props })
|
||||
</Dropdown>
|
||||
{navSlots.menu}
|
||||
</ul>
|
||||
{generalPage && <Nav.item className='brewTitle'>{title}</Nav.item>}
|
||||
{pageName !== 'sharePage' && <Nav.header className='brewTitle'>{title}</Nav.header>}
|
||||
<MetadataNavItem brew={brew} pageName={pageName}></MetadataNavItem>
|
||||
<ul>
|
||||
<Dropdown groupName={account.username} customTrigger={<>{account.username}</>} icon={null} key={account.username}>
|
||||
|
||||
@@ -31,17 +31,19 @@
|
||||
padding: 0;
|
||||
}
|
||||
&.brewTitle {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
color: white;
|
||||
text-align: center;
|
||||
text-transform: initial;
|
||||
white-space: nowrap;
|
||||
background-color: transparent;
|
||||
letter-spacing: 1px;
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
&.metadata {
|
||||
position: relative;
|
||||
@@ -184,6 +186,10 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
padding: 5px 10px;
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
padding: 5px;
|
||||
}
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
@@ -204,7 +210,7 @@
|
||||
&:has(ul):not(:has(ul :is(button, a):not(:disabled))) {
|
||||
color: grey; //faux disabled if all buttons are disabled
|
||||
}
|
||||
&:hover {
|
||||
&:not(.header):hover {
|
||||
background: #484848;
|
||||
}
|
||||
&:has(> i, > kbd, > img) {
|
||||
@@ -221,6 +227,9 @@
|
||||
padding: 2px 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
&.header {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.recent ul {
|
||||
position: relative;
|
||||
@@ -230,6 +239,19 @@
|
||||
gap: 5px;
|
||||
height: 2.7em;
|
||||
isolation: isolate;
|
||||
|
||||
&.header {
|
||||
display: block;
|
||||
padding: 5px 0;
|
||||
color: #bbbbbb;
|
||||
border-top: 1px solid #888888;
|
||||
&:nth-of-type(1) {
|
||||
background-color: darken(@teal, 20%);
|
||||
}
|
||||
&:nth-of-type(2) {
|
||||
background-color: darken(@purple, 30%);
|
||||
}
|
||||
}
|
||||
.clear {
|
||||
width: 55px;
|
||||
padding: 0;
|
||||
@@ -253,21 +275,6 @@
|
||||
color: #888888;
|
||||
z-index: -1;
|
||||
}
|
||||
&.header {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
padding: 5px 0;
|
||||
color: #bbbbbb;
|
||||
text-align: center;
|
||||
background-color: #333333;
|
||||
border-top: 1px solid #888888;
|
||||
&:nth-of-type(1) {
|
||||
background-color: darken(@teal, 20%);
|
||||
}
|
||||
&:nth-of-type(2) {
|
||||
background-color: darken(@purple, 30%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user