redsunlib/static/style.css

489 lines
6.5 KiB
CSS
Raw Normal View History

2020-10-26 09:25:59 +13:00
/* General */
2020-12-20 16:54:46 +13:00
:root {
2020-12-22 18:39:55 +13:00
--accent: aqua;
2020-12-20 16:54:46 +13:00
--background: #0F0F0F;
--foreground: #222;
--outside: #1F1F1F;
--post: #161616;
--highlighted: #333;
--black-contrast: 0 1px 3px rgba(0,0,0,0.5);
}
2020-10-26 09:25:59 +13:00
* {
transition: 0.2s all;
margin: 0px;
color: white;
font-family: sans-serif;
font-weight: normal;
2020-12-21 18:49:31 +13:00
outline: none;
2020-10-26 09:25:59 +13:00
}
2020-12-20 16:54:46 +13:00
body {
background: var(--background);
2020-12-21 18:49:31 +13:00
visibility: visible !important;
2020-10-26 09:25:59 +13:00
}
2020-12-21 14:45:26 +13:00
nav {
2020-10-26 09:25:59 +13:00
display: flex;
justify-content: space-between;
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-12-20 16:54:46 +13:00
background: var(--outside);
2020-10-26 09:25:59 +13:00
padding: 15px;
font-weight: bold;
font-size: 20px;
}
2020-11-23 13:29:05 +13:00
#lib, #github {
color: white;
}
2020-10-26 09:25:59 +13:00
main {
2020-12-24 19:16:04 +13:00
display: flex;
justify-content: center;
2020-10-26 09:25:59 +13:00
max-width: 750px;
2020-12-24 19:16:04 +13:00
padding: 10px 20px;
2020-10-26 09:25:59 +13:00
margin: 0 auto;
}
2020-11-20 10:49:32 +13:00
footer {
display: flex;
justify-content: center;
2020-12-23 15:29:43 +13:00
margin-bottom: 20px;
2020-11-20 10:49:32 +13:00
}
2020-10-26 09:25:59 +13:00
button {
background: none;
border: none;
font-weight: bold;
}
a {
color: inherit;
text-decoration: none;
}
a:not(.post_right):hover {
text-decoration: underline;
}
#about {
2020-12-20 19:25:00 +13:00
padding-top: 20px;
2020-10-26 09:25:59 +13:00
background: #151515;
}
2020-12-24 19:16:04 +13:00
aside {
/* background: #151515; */
padding: 20px;
height: max-content;
border-radius: 5px;
flex-grow: 1;
margin: 80px 20px 0px 20px;
background: var(--outside);
}
2020-12-06 18:29:25 +13:00
#version {
color: white;
opacity: 25%;
}
2020-12-24 19:16:04 +13:00
/* User & Subreddit */
2020-10-26 09:25:59 +13:00
2020-12-24 19:16:04 +13:00
.user, .subreddit {
max-width: 350px;
2020-10-26 09:25:59 +13:00
margin: 0 auto;
display: flex;
2020-12-24 19:16:04 +13:00
flex-direction: column;
align-items: center;
2020-10-26 09:25:59 +13:00
}
2020-12-24 19:16:04 +13:00
.user_icon, .subreddit_icon {
2020-10-26 09:25:59 +13:00
width: 100px;
height: 100px;
2020-12-24 19:16:04 +13:00
border: 2px solid var(--accent);
2020-10-26 09:25:59 +13:00
border-radius: 100%;
2020-12-24 19:16:04 +13:00
padding: 10px;
margin: 10px;
2020-10-26 09:25:59 +13:00
}
2020-12-24 19:16:04 +13:00
.user_name, .subreddit_name {
2020-11-23 13:29:05 +13:00
margin-top: 10px;
}
2020-12-24 19:16:04 +13:00
.user_description, .subreddit_description {
margin: 10px 20px;
text-align: center;
font-size: 15px;
2020-10-26 09:25:59 +13:00
}
2020-12-24 19:16:04 +13:00
.user_details, .subreddit_details {
display: grid;
grid-template-columns: repeat(2, 1fr);
margin-top: 15px;
grid-column-gap: 20px;
2020-10-26 09:25:59 +13:00
}
2020-12-24 19:16:04 +13:00
.user_details > label, .subreddit_details > label {
color: var(--accent);
font-size: 15px;
2020-10-26 09:25:59 +13:00
}
/* Sorting */
#sort {
2020-12-21 18:49:31 +13:00
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;
2020-10-26 09:25:59 +13:00
}
2020-11-20 10:49:32 +13:00
#sort > div, footer > a {
2020-12-20 18:44:30 +13:00
box-shadow: var(--black-contrast);
2020-12-20 16:54:46 +13:00
background: var(--outside);
2020-10-26 09:25:59 +13:00
color: lightgrey;
border-radius: 5px;
margin-right: 5px;
padding: 10px 20px;
text-align: center;
cursor: pointer;
}
2020-11-23 13:29:05 +13:00
#sort > div.selected {
2020-12-22 18:39:55 +13:00
background: var(--accent);
2020-11-23 13:29:05 +13:00
color: black;
}
2020-10-26 09:25:59 +13:00
#sort > div:hover {
2020-12-20 16:54:46 +13:00
background: var(--foreground);
2020-10-26 09:25:59 +13:00
}
/* Post */
.post {
border-radius: 5px;
2020-12-20 16:54:46 +13:00
background: var(--post);
box-shadow: var(--black-contrast);
2020-10-26 09:25:59 +13:00
display: flex;
}
2020-12-24 19:16:04 +13:00
.post.highlighted {
margin-top: 20px;
}
2020-10-26 09:25:59 +13:00
.post:hover {
2020-12-20 16:54:46 +13:00
background: var(--foreground);
2020-10-26 09:25:59 +13:00
}
.post:hover > .post_left {
2020-12-20 16:54:46 +13:00
background: var(--highlighted);
2020-10-26 09:25:59 +13:00
}
.post_left, .post_right {
display: flex;
flex-direction: column;
2020-11-18 13:56:37 +13:00
overflow-wrap: anywhere;
2020-10-26 09:25:59 +13:00
}
.post_left {
text-align: center;
2020-12-20 16:54:46 +13:00
background: var(--foreground);
2020-10-26 09:25:59 +13:00
border-radius: 5px 0px 0px 5px;
min-width: 50px;
padding: 5px;
}
2020-12-23 15:29:43 +13:00
.post_score {
margin-top: 20px;
color: var(--accent);
}
.nsfw {
color: #FF5C5D;
margin-top: 20px;
border: 1px solid #FF5C5D;
padding: 5px;
font-size: 12px;
border-radius: 5px;
font-weight: bold;
}
2020-10-26 09:25:59 +13:00
.post_subreddit {
font-weight: bold;
}
2020-12-08 08:20:24 +13:00
.post_title {
font-size: 18px;
}
2020-10-26 09:25:59 +13:00
.post_right {
padding: 20px 25px;
flex-grow: 1;
flex-shrink: 1;
}
.post_right > * {
margin: 5px;
}
.post_right > p {
opacity: 0.75;
2020-12-06 17:54:43 +13:00
font-size: 16px;
2020-10-26 09:25:59 +13:00
}
.post_media {
2020-12-06 17:54:43 +13:00
max-width: 90%;
2020-10-26 09:25:59 +13:00
align-self: center;
}
.post_media[src=""] {
2020-10-26 09:25:59 +13:00
display: none;
}
.post_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
.post_body > p:not(:first-child) {
2020-12-22 18:39:55 +13:00
margin-top: 20px;
2020-10-26 09:25:59 +13:00
}
2020-12-09 08:31:01 +13:00
.post_body a {
2020-10-26 09:25:59 +13:00
text-decoration: underline;
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-10-26 09:25:59 +13:00
}
2020-12-12 17:36:06 +13:00
#post_url {
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-12-12 17:36:06 +13:00
}
2020-10-26 09:25:59 +13:00
.post_thumbnail {
object-fit: cover;
width: auto;
flex-shrink: 0;
padding: 10px;
border-radius: 15px;
2020-12-06 17:54:43 +13:00
max-width: 20%;
2020-10-26 09:25:59 +13:00
}
.post_thumbnail[src=""] {
2020-12-06 17:54:43 +13:00
display: none;
2020-10-26 09:25:59 +13:00
}
2020-12-21 08:29:23 +13:00
.post_flair {
2020-12-22 18:39:55 +13:00
background: var(--accent);
2020-12-06 17:54:43 +13:00
color: black;
padding: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
2020-11-17 15:49:08 +13:00
}
2020-10-26 09:25:59 +13:00
/* Comment */
.comment {
2020-12-22 18:39:55 +13:00
margin-top: 15px;
2020-10-26 09:25:59 +13:00
border-radius: 5px;
display: flex;
2020-12-20 19:25:00 +13:00
font-size: 15px;
2020-10-26 09:25:59 +13:00
}
.comment_left, .comment_right {
display: flex;
flex-direction: column;
}
.comment_left {
text-align: center;
min-width: 50px;
2020-12-20 19:25:00 +13:00
padding: 5px 0px;
2020-12-20 16:54:46 +13:00
align-items: center;
2020-10-26 09:25:59 +13:00
}
.comment_title {
font-size: 20px;
}
2020-12-20 16:54:46 +13:00
.comment_author {
opacity: 0.9;
}
2020-12-22 05:38:24 +13:00
.comment_author.op {
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-12-22 05:38:24 +13:00
font-weight: bold;
}
2020-12-21 08:29:23 +13:00
.author_flair {
background: var(--highlighted);
color: white;
padding: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
}
2020-10-26 09:25:59 +13:00
.comment_subreddit {
font-weight: bold;
}
.comment_score {
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-12-20 16:54:46 +13:00
background: var(--foreground);
min-width: 40px;
border-radius: 5px;
padding: 10px 0px;
2020-10-26 09:25:59 +13:00
}
.comment_right {
2020-10-26 15:05:09 +13:00
word-wrap: anywhere;
2020-12-20 16:54:46 +13:00
padding: 10px 25px 10px 5px;
2020-10-26 09:25:59 +13:00
flex-grow: 1;
flex-shrink: 1;
}
2020-12-20 16:54:46 +13:00
.comment_data > * {
2020-10-26 09:25:59 +13:00
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) {
2020-12-22 18:39:55 +13:00
margin-top: 20px;
2020-10-26 09:25:59 +13:00
}
.comment_body a {
text-decoration: underline;
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-10-26 15:55:00 +13:00
}
2020-12-22 14:17:40 +13:00
.deeper_replies {
2020-12-22 18:39:55 +13:00
color: var(--accent);
margin-left: 15px;
2020-12-22 14:17:40 +13:00
}
2020-12-20 16:54:46 +13:00
::marker {
2020-12-22 18:39:55 +13:00
color: var(--accent);
2020-12-20 16:54:46 +13:00
}
2020-12-21 18:49:31 +13:00
.replies > .comment {
margin-left: -20px;
2020-12-22 14:17:40 +13:00
padding: 5px;
2020-12-20 16:54:46 +13:00
}
.datetime {
opacity: 0.75;
}
.line {
width: 2px;
height: 100%;
background: var(--foreground);
}
2020-11-24 08:33:43 +13:00
.post.comment {
background: #000;
2020-12-20 16:54:46 +13:00
border: 2px solid var(--foreground);
2020-11-24 08:33:43 +13:00
}
.post.comment > .post_left {
background: black;
}
2020-12-20 19:25:00 +13:00
/* 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;
}
2020-10-26 15:55:00 +13:00
/* Tables */
table {
2020-12-20 16:54:46 +13:00
border: 3px var(--highlighted) solid;
2020-12-22 18:39:55 +13:00
border-spacing: 0;
2020-10-26 15:55:00 +13:00
}
td, th {
2020-12-20 16:54:46 +13:00
border: 1px var(--highlighted) solid;
2020-12-22 18:39:55 +13:00
padding: 10px;
2020-12-06 17:54:43 +13:00
}
/* 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;
2020-12-22 14:17:40 +13:00
padding: 5px 0px;
}
2020-12-06 17:54:43 +13:00
.datetime {
width: 100%;
}
2020-12-24 19:16:04 +13:00
}
@media screen and (max-width: 800px) {
main {
flex-direction: column-reverse;
}
aside {
margin: 20px 0px 0px 0px;
}
2020-10-26 09:25:59 +13:00
}