Browse Source

reorganize css

Alexander Avery 3 weeks ago
parent
commit
0f8172ef84
  1. 121
      assets/css/main.css

121
assets/css/main.css

@ -22,8 +22,18 @@ body {
margin: 0; margin: 0;
} }
header { a {
background-color: var(--header); color: var(--links);
text-decoration: none;
}
a:visited, a:hover {
color: var(--link-hover);
text-decoration: underline;
}
p {
margin-bottom: 1.5rem;
} }
header div, main, footer { header div, main, footer {
@ -32,6 +42,12 @@ header div, main, footer {
padding: 1rem; padding: 1rem;
} }
/* Header */
header {
background-color: var(--header);
box-shadow: 0 5px 10px black;
}
header div { header div {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
@ -52,33 +68,43 @@ header li {
margin-right: 8px; margin-right: 8px;
} }
footer { /* Responsive */
border-top: 1px solid var(--light); @media (max-width: 700px) {
aside.index-articles {
display: none;
}
} }
section.index { /* Article Lists */
.article-group {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap;
gap: 20px;
} }
section.index aside { flex-shrink: 4; }
.index-articles { .index-articles {
display: flex;
justify-content: flex-end; justify-content: flex-end;
flex-wrap: wrap;
flex-direction: row;
gap: 20px;
} }
.author-articles { .author-articles {
justify-content: center;
}
.index-articles aside {
flex-shrink: 4;
}
section.index {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
flex-wrap: wrap;
gap: 20px;
justify-content: center;
} }
section.index aside {
flex-shrink: 4;
}
/* Article Cards */
article { article {
background-color: #111; background-color: #111;
border-radius: 10px; border-radius: 10px;
@ -90,10 +116,6 @@ article.index {
height: 414px; height: 414px;
} }
@media(max-width: 700px) {
aside.index-articles { display: none; }
}
article.index img { article.index img {
height: 50%; height: 50%;
width: 100%; width: 100%;
@ -107,28 +129,30 @@ article.index h3 {
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.float-on-hover{ article.alt {
transition: all .25s cubic-bezier(.2,.1,.47,1); display: flex;
} flex-wrap: wrap;
gap: 8px;
.float-on-hover:hover{ justify-content: space-evenly;
transform:translateY(-10px); align-items: center;
}
a {
color: var(--links);
text-decoration: none;
} }
a:visited, a:hover { article.alt img {
color: var(--link-hover); border-radius: 50%;
text-decoration: underline; height: 256px;
width: 256px;
} }
p { /* Images */
margin-bottom: 1.5rem; img.featured, img.author {
display: block;
border-radius: 8px;
margin: 12px 0;
object-fit: cover;
max-height: 500px;
} }
/* Code Blocks */
code { code {
white-space: nowrap; white-space: nowrap;
} }
@ -148,26 +172,23 @@ pre code {
overflow-x: auto; overflow-x: auto;
border-left: .3rem solid var(--beetbox-purple); border-left: .3rem solid var(--beetbox-purple);
border-radius: .4rem; border-radius: .4rem;
box-shadow: 0 4px 8px black;
} }
article.alt { /* Effects */
display: flex; .float-on-hover {
flex-wrap: wrap; transition: all .25s cubic-bezier(.2,.1,.47,1);
gap: 8px;
justify-content: space-evenly;
align-items: center;
} }
article.alt img { .float-on-hover:hover {
border-radius: 50%; transform: translateY(-10px);
height: 256px;
width: 256px;
} }
img.featured, img.author { .shadow{
display: block; box-shadow: 0 4px 8px black;
border-radius: 8px; }
margin: 12px 0;
object-fit: cover; /* Footer */
max-height: 500px; footer {
border-top: 1px solid var(--light);
} }
Loading…
Cancel
Save