redsunlib/static/style.css
2020-12-20 21:49:31 -08:00

460 lines
5.8 KiB
CSS

/* General */
:root {
--background: #0F0F0F;
--foreground: #222;
--outside: #1F1F1F;
--post: #161616;
--highlighted: #333;
--black-contrast: 0 1px 3px rgba(0,0,0,0.5);
}
* {
transition: 0.2s all;
margin: 0px;
color: white;
font-family: sans-serif;
font-weight: normal;
outline: none;
}
body {
background: var(--background);
visibility: visible !important;
}
nav {
display: flex;
justify-content: space-between;
color: aqua;
background: var(--outside);
padding: 15px;
font-weight: bold;
font-size: 20px;
}
#lib, #github {
color: white;
}
main {
max-width: 750px;
margin: 0 auto;
margin-top: 25px;
padding: 0px 10px;
}
footer {
display: flex;
justify-content: center;
}
button {
background: none;
border: none;
font-weight: bold;
}
a {
color: inherit;
text-decoration: none;
}
a:not(.post_right):hover {
text-decoration: underline;
}
#about {
padding-top: 20px;
background: #151515;
}
#version {
color: white;
opacity: 25%;
}
/* Subreddit */
.subreddit {
max-width: 750px;
margin: 0 auto;
display: flex;
padding-bottom: 25px;
}
.subreddit_name {
margin-bottom: 10px;
}
.subreddit_right {
display: flex;
flex-flow: column;
justify-content: center;
}
.subreddit_icon {
width: 100px;
height: 100px;
border-radius: 100%;
padding: 20px;
}
#stats {
margin-top: 10px;
}
/* User */
.user {
max-width: 750px;
margin: 0 auto;
display: flex;
}
.user_right {
display: flex;
flex-flow: column;
justify-content: center;
}
.user_icon {
width: 100px;
height: 100px;
border-radius: 100%;
padding: 20px;
}
/* Sorting */
#sort {
background: var(--outside);
box-shadow: var(--black-contrast);
border: 0px;
padding: 0px 15px;
margin: 20px 0px;
height: 40px;
font-size: 15px;
border-radius: 5px 0px 0px 5px;
appearance: none;
}
#sort_submit {
background: var(--highlighted);
border: 0px;
font-size: 15px;
height: 40px;
border-radius: 0px 5px 5px 0px;
}
#sort > div, footer > a {
box-shadow: var(--black-contrast);
background: var(--outside);
color: lightgrey;
border-radius: 5px;
margin-right: 5px;
padding: 10px 20px;
text-align: center;
cursor: pointer;
}
#sort > div.selected {
background: aqua;
color: black;
}
#sort > div:hover {
background: var(--foreground);
}
/* Post */
.post {
border-radius: 5px;
background: var(--post);
box-shadow: var(--black-contrast);
display: flex;
}
.post:hover {
background: var(--foreground);
}
.post:hover > .post_left {
background: var(--highlighted);
}
.post_left, .post_right {
display: flex;
flex-direction: column;
overflow-wrap: anywhere;
}
.post_left {
text-align: center;
background: var(--foreground);
border-radius: 5px 0px 0px 5px;
min-width: 50px;
padding: 5px;
}
.post_subreddit {
font-weight: bold;
}
.post_title {
font-size: 18px;
}
.post_score {
margin-top: 1em;
color: aqua;
}
.post_right {
padding: 20px 25px;
flex-grow: 1;
flex-shrink: 1;
}
.post_right > * {
margin: 5px;
}
.post_right > p {
opacity: 0.75;
font-size: 16px;
}
.post_media {
max-width: 90%;
align-self: center;
}
.post_media[src=""] {
display: none;
}
.post_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
.post_body > p:not(:first-child) {
margin-top: 1.5em;
}
.post_body a {
text-decoration: underline;
color: aqua;
}
#post_url {
color: aqua;
}
.post_thumbnail {
object-fit: cover;
width: auto;
flex-shrink: 0;
padding: 10px;
border-radius: 15px;
max-width: 20%;
}
.post_thumbnail[src=""] {
display: none;
}
.post_flair {
background: aqua;
color: black;
padding: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
}
/* Comment */
.comment {
margin-top: 1em;
border-radius: 5px;
display: flex;
font-size: 15px;
padding: 5px;
}
.comment_left, .comment_right {
display: flex;
flex-direction: column;
}
.comment_left {
text-align: center;
min-width: 50px;
padding: 5px 0px;
align-items: center;
}
.comment_title {
font-size: 20px;
}
.comment_author {
opacity: 0.9;
}
.author_flair {
background: var(--highlighted);
color: white;
padding: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
}
.comment_upvote {
margin-top: 0.5em;
border-radius: 5px 5px 0px 0px;
background: var(--foreground);
width: 40px;
padding: 10px 0px 0px 0px;
}
.comment_subreddit {
font-weight: bold;
}
.comment_score {
color: aqua;
background: var(--foreground);
min-width: 40px;
border-radius: 5px;
padding: 10px 0px;
}
.comment_right {
word-wrap: anywhere;
padding: 10px 25px 10px 5px;
flex-grow: 1;
flex-shrink: 1;
}
.comment_data > * {
margin: 5px;
}
.comment_image {
max-width: 500px;
align-self: center;
}
.comment_image[src=""] {
display: none;
}
.comment_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
.comment_body > p:not(:first-child) {
margin-top: 1.5em;
}
.comment_body a {
text-decoration: underline;
color: aqua;
}
::marker {
color: aqua;
}
.replies > .comment {
margin-left: -20px;
}
.datetime {
opacity: 0.75;
}
.line {
width: 2px;
height: 100%;
background: var(--foreground);
}
.post.comment {
background: #000;
border: 2px solid var(--foreground);
}
.post.comment > .post_left {
background: black;
}
/* Code */
pre {
background: var(--outside);
padding: 20px;
margin-top: 10px;
border-radius: 5px;
box-shadow: var(--black-contrast);
}
code {
font-family: monospace;
font-size: 14px;
}
/* Tables */
table {
border: 3px var(--highlighted) solid;
border-spacing: 0rem;
}
td, th {
border: 1px var(--highlighted) solid;
padding: 0.5em;
}
/* Mobile */
@media screen and (max-width: 480px) {
.post {
flex-direction: column-reverse;
}
.post_left {
border-radius: 0px 0px 5px 5px;
}
.post_right {
padding: 20px;
}
.post_score {
margin-top: 0;
}
.post_thumbnail {
max-width: initial;
}
.replies > .comment {
margin-left: -25px;
padding: 10px 10px 10px 5px;
}
.datetime {
width: 100%;
}
}