Compare commits

...

2 Commits

Author SHA1 Message Date
Said Achmiz
42633d9f85 Mobile layout for nav UI 2020-02-11 23:34:52 -05:00
Said Achmiz
8a129fd1f0 Minor layout refactoring 2020-02-11 20:15:34 -05:00
2 changed files with 41 additions and 7 deletions

View File

@ -87,6 +87,7 @@
/* Layout. */ /* Layout. */
--deus-body-padding: 6rem 1rem; --deus-body-padding: 6rem 1rem;
--deus-post-padding: 1.25rem; --deus-post-padding: 1.25rem;
--deus-mobile-post-heading-inset: 1.75rem;
} }
} }
@media only screen and (max-width: 520px) { @media only screen and (max-width: 520px) {
@ -220,6 +221,28 @@ main nav a:active {
transform: scale(0.9); transform: scale(0.9);
} }
/*=-------------------=*/
/*= Nav items (text). =*/
/*=-------------------=*/
@media only screen and (max-width: 520px) {
main nav a.text {
font-size: 0.625em;
padding-top: 0.375em;
}
main nav a.text::before {
content: attr(data-deus-icon);
display: block;
font-family: Font Awesome;
margin: auto;
text-align: center;
font-size: 1.75em;
}
main nav a + a {
margin-left: 1.5em;
}
}
/*=-------=*/ /*=-------=*/
/*= Logo. =*/ /*= Logo. =*/
/*=-------=*/ /*=-------=*/
@ -362,7 +385,7 @@ article + article {
} }
@media only screen and (max-width: 960px) { @media only screen and (max-width: 960px) {
article + article { article + article {
margin-top: calc(1.75rem + var(--deus-post-spacing)); margin-top: calc(var(--deus-mobile-post-heading-inset) + var(--deus-post-spacing));
} }
} }
@ -435,14 +458,14 @@ article h1::after {
article h1 { article h1 {
float: none; float: none;
margin: margin:
calc(-1 * (var(--deus-post-padding) + 1.75rem)) calc(-1 * (var(--deus-post-padding) + var(--deus-mobile-post-heading-inset)))
calc(var(--deus-post-heading-spacing) + 4px) calc(var(--deus-post-heading-spacing) + 4px)
2rem 2rem
calc(var(--deus-post-heading-spacing) + 4px); calc(var(--deus-post-heading-spacing) + 4px);
text-align: center; text-align: center;
} }
article h1::after { article h1::after {
top: calc(1.75rem - 1px); top: calc(var(--deus-mobile-post-heading-inset) - 1px);
right: calc(-1 * (var(--deus-post-heading-spacing) + 2px)); right: calc(-1 * (var(--deus-post-heading-spacing) + 2px));
box-shadow: box-shadow:
0 1px 0 0 var(--deus-body-background-color), 0 1px 0 0 var(--deus-body-background-color),

View File

@ -1,10 +1,21 @@
<nav id='main-nav'> <nav id='main-nav'>
<a href='/deus/' class='logo'><img src='/deus/assets/images/deus-logo-only.png'></a> <a
<a href='/deus/pages/about'>About</a> class='nav-item logo'
<a href='/deus/posts'>News</a> href='/deus/'
><img src='/deus/assets/images/deus-logo-only.png'></a>
<a
class='nav-item text icon-solid'
data-deus-icon='&#xf05a;'
href='/deus/pages/about'
>About</a>
<a
class='nav-item text icon-regular'
data-deus-icon='&#xf143;'
href='/deus/posts'
>News</a>
<div class='social-buttons'> <div class='social-buttons'>
<a class='social-button share' href='#'>&#xf1e0;</a> <a class='social-button share' href='#'>&#xf1e0;</a>
<a class='social-button facebook' href='#'>&#xf39e;</a> <a class='social-button facebook' href='#'>&#xf39e;</a>
<a class='social-button twitter' href='#'>&#xf099;</a> <a class='social-button twitter' href='#'>&#xf099;</a>
</div> </div>
</nav> </nav>