Improve site resizing, and image viewing

Images are no longer super blown up on desktop devices, images are
now limited in size according to the current article width. On
large displays, the article width is now limited so the text is
actually readable.
This commit is contained in:
Joshua Goins 2022-11-06 22:08:00 -05:00
parent f131b7aa12
commit 7cb42d47f3
2 changed files with 20 additions and 17 deletions

View file

@ -1,15 +1,13 @@
/* desktop devices */
@media (min-width: 768px) {
aside {
flex: 200px 0 0;
}
header {
margin: 10px;
}
aside {
margin: 10px;
flex: 15em 0 0;
}
article {
@ -19,14 +17,17 @@
footer {
margin: 10px;
}
#content {
display: flex;
flex-direction: row;
max-width: 100em;
}
}
/* mobile devices */
@media (max-width: 768px) {
aside {
width: 100%;
}
aside div {
padding: 2px;
}
@ -42,12 +43,10 @@ body {
background-color: var(--background-primary);
accent-color: var(--accent-color);
display: flex;
flex-flow: row wrap;
color: var(--text-color);
}
:root {
--primary-accent: #9f5858;
--secondary-accent: #c99192;
@ -107,7 +106,8 @@ article {
padding: 15px;
flex: 2 0;
min-width: 0;
flex: 1 1 auto;
}
footer {
@ -130,16 +130,17 @@ footer {
margin-bottom: 5px;
}
.article-img {
width: 100%;
height: auto;
}
.gallery-img {
border: 1px black solid;
border-radius: 5px;
}
.article-img {
max-width: 100%;
max-height: 100%;
height: auto;
}
figure {
flex-grow: 1;
text-align: center;

View file

@ -3,8 +3,10 @@
{{- partial "head.html" . -}}
<body>
<header>{{- partial "header.html" . -}}</header>
<div id="content">
<aside>{{- partial "sidebar.html" . -}}</aside>
<article>{{- block "main" . }}{{- end }}</article>
</div>
<footer>{{- partial "footer.html" . -}}</footer>
</body>
</html>