mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 11:12:44 +00:00
Use classes rather than inline styling for indentation
This commit is contained in:
@@ -64,8 +64,8 @@ const HeaderNavItem = ({ link, text, depth, className })=>{
|
|||||||
};
|
};
|
||||||
|
|
||||||
return <li>
|
return <li>
|
||||||
<a href={`#${link}`} target='_self' className={className}>
|
<a href={`#${link}`} target='_self' className={`depth-${depth} ${className ?? ''}`}>
|
||||||
<span style={{ display: 'inline-block', width: `${depth * 0.5}em` }}></span>{trimString(text, depth)}
|
{trimString(text, depth)}
|
||||||
</a>
|
</a>
|
||||||
</li>;
|
</li>;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
li {
|
li {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
a {
|
a {
|
||||||
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
font-family: 'Open Sans';
|
font-family: 'Open Sans';
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
@@ -32,6 +34,14 @@
|
|||||||
&.pageLink {
|
&.pageLink {
|
||||||
font-weight: 900;
|
font-weight: 900;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@depths: 1,2,3,4,5,6,7;
|
||||||
|
|
||||||
|
each(@depths, {
|
||||||
|
&.depth-@{value} {
|
||||||
|
padding-left: ((@value - 1) * 0.5em);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user