fixed some mobile layout issues
This commit is contained in:
@ -18,10 +18,12 @@
|
||||
<body>
|
||||
<main>
|
||||
<header>{% include 'partials/header.njk' %}</header>
|
||||
<hr/>
|
||||
<article>
|
||||
<h1>{{ title }}</h1>
|
||||
{{ content | safe }}
|
||||
</article>
|
||||
<hr/>
|
||||
<footer>{% include 'partials/footer.njk' %}</footer>
|
||||
</main>
|
||||
<aside>{% include 'partials/sidebar.njk' %}</aside>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<nav>
|
||||
<a href="/">Home</a><br/>
|
||||
<a href="/blog/">Blog</a><br/>
|
||||
<a href="/about/">About</a><br/>
|
||||
<a href="/links/">Links</a><br/>
|
||||
<a href="/contact/">Contact</a>
|
||||
<a href="/">/</a><br/>
|
||||
<a href="/blog/">/blog</a><br/>
|
||||
<a href="/about/">/about</a><br/>
|
||||
<a href="/links/">/links</a><br/>
|
||||
<a href="/contact/">/contact</a>
|
||||
</nav>
|
||||
{#INFO: It's important to stucture your links with the slashes / on either side of the href /about/ to ensure the links are always from the root of the site.#}
|
@ -53,6 +53,10 @@ a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
body {
|
||||
color: var(--text);
|
||||
background: var(--bg);
|
||||
@ -80,11 +84,6 @@ main {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1000px) {
|
||||
body {
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
}
|
||||
|
||||
aside {
|
||||
position: sticky;
|
||||
@ -117,6 +116,36 @@ aside {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1100px) {
|
||||
body {
|
||||
flex-direction: column-reverse;
|
||||
max-width: 100%;
|
||||
/* this is a pretty bad solution */
|
||||
margin: -20px 20px 20px;
|
||||
}
|
||||
|
||||
main {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
aside {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* nav {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 1rem;
|
||||
} */
|
||||
|
||||
.sidebar-contents {
|
||||
/* padding: 15px; */
|
||||
margin: 0 0 -25px 0;
|
||||
/* width: min-content; */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* body > footer {
|
||||
margin-top: 4rem;
|
||||
padding: 2rem 1rem 1.5rem 1rem;
|
||||
|
Reference in New Issue
Block a user