libreddit/static/style.css

577 lines
8.2 KiB
CSS
Raw Normal View History

2020-10-25 21:25:59 +01:00
/* General */
2020-12-20 04:54:46 +01:00
:root {
2020-12-22 06:39:55 +01:00
--accent: aqua;
2020-12-20 04:54:46 +01:00
--background: #0F0F0F;
--foreground: #222;
--outside: #1F1F1F;
--post: #161616;
--highlighted: #333;
--black-contrast: 0 1px 3px rgba(0,0,0,0.5);
}
2021-01-01 00:54:13 +01:00
::selection {
color: var(--background);
background: var(--accent);
}
2020-10-25 21:25:59 +01:00
* {
transition: 0.2s all;
2020-12-29 03:42:46 +01:00
margin: 0;
2020-10-25 21:25:59 +01:00
color: white;
font-family: sans-serif;
}
2020-12-20 04:54:46 +01:00
body {
background: var(--background);
2020-12-21 06:49:31 +01:00
visibility: visible !important;
2020-10-25 21:25:59 +01:00
}
2020-12-21 02:45:26 +01:00
nav {
2020-10-25 21:25:59 +01:00
display: flex;
justify-content: space-between;
2021-01-01 00:54:13 +01:00
align-items: center;
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-12-20 04:54:46 +01:00
background: var(--outside);
2021-01-01 00:54:13 +01:00
padding: 5px 15px;
2020-10-25 21:25:59 +01:00
font-size: 20px;
2021-01-01 00:54:13 +01:00
height: 40px;
2020-10-25 21:25:59 +01:00
}
2020-12-30 19:53:27 +01:00
nav #lib, nav #github, nav #version { color: white; }
nav #version { opacity: 25%; }
2020-11-23 01:29:05 +01:00
2020-10-25 21:25:59 +01:00
main {
2020-12-24 07:16:04 +01:00
display: flex;
justify-content: center;
2020-10-25 21:25:59 +01:00
max-width: 750px;
2020-12-24 07:16:04 +01:00
padding: 10px 20px;
2020-12-29 03:42:46 +01:00
margin: 20px auto;
2020-10-25 21:25:59 +01:00
}
2020-11-19 22:49:32 +01:00
footer {
display: flex;
justify-content: center;
}
2021-01-01 00:54:13 +01:00
footer > a {
margin-right: 5px;
}
2020-10-25 21:25:59 +01:00
button {
background: none;
border: none;
font-weight: bold;
}
2020-12-29 03:42:46 +01:00
hr {
margin: 20px 0;
}
2020-10-25 21:25:59 +01:00
a {
color: inherit;
text-decoration: none;
}
a:not(.post_right):hover {
text-decoration: underline;
}
2020-12-29 03:42:46 +01:00
img[src=""] {
display: none;
2020-10-25 21:25:59 +01:00
}
2020-12-24 07:16:04 +01:00
aside {
flex-grow: 1;
2020-12-29 03:42:46 +01:00
margin: 20px 20px 0 20px;
max-width: 350px;
2020-12-24 07:16:04 +01:00
}
/* User & Subreddit */
2020-10-25 21:25:59 +01:00
2020-12-29 03:42:46 +01:00
#user, #subreddit, #sidebar {
margin: 40px auto 0 auto;
2020-10-25 21:25:59 +01:00
display: flex;
2020-12-24 07:16:04 +01:00
flex-direction: column;
align-items: center;
2020-12-29 03:42:46 +01:00
padding: 20px;
height: max-content;
background: var(--outside);
border-radius: 5px;
2020-10-25 21:25:59 +01:00
}
2020-12-29 03:42:46 +01:00
#sidebar, #sidebar_contents {
margin-top: 20px;
}
#sidebar_label {
border: 2px solid var(--highlighted);
padding: 10px;
}
#user_icon, #subreddit_icon {
2020-10-25 21:25:59 +01:00
width: 100px;
height: 100px;
2020-12-24 07:16:04 +01:00
border: 2px solid var(--accent);
2020-10-25 21:25:59 +01:00
border-radius: 100%;
2020-12-24 07:16:04 +01:00
padding: 10px;
margin: 10px;
2020-10-25 21:25:59 +01:00
}
2020-12-29 03:42:46 +01:00
#user_name, #subreddit_name {
2020-11-23 01:29:05 +01:00
margin-top: 10px;
}
2020-12-29 03:42:46 +01:00
#user_description, #subreddit_description {
2020-12-24 07:16:04 +01:00
margin: 10px 20px;
text-align: center;
font-size: 15px;
2020-10-25 21:25:59 +01:00
}
2020-12-29 03:42:46 +01:00
#user_details, #subreddit_details {
2020-12-24 07:16:04 +01:00
display: grid;
grid-template-columns: repeat(2, 1fr);
margin-top: 15px;
grid-column-gap: 20px;
2020-10-25 21:25:59 +01:00
}
2020-12-29 03:42:46 +01:00
#user_details > label, #subreddit_details > label {
2020-12-24 07:16:04 +01:00
color: var(--accent);
font-size: 15px;
2020-10-25 21:25:59 +01:00
}
2021-01-01 00:54:13 +01:00
/* Sorting and Search */
2020-10-25 21:25:59 +01:00
2021-01-01 00:54:13 +01:00
select {
2020-12-21 06:49:31 +01:00
background: var(--outside);
2021-01-01 00:54:13 +01:00
}
select, #search {
2020-12-29 03:42:46 +01:00
border: 0;
padding: 0 15px;
2020-12-21 06:49:31 +01:00
height: 40px;
font-size: 15px;
appearance: none;
2021-01-01 00:54:13 +01:00
border-radius: 5px 0px 0px 5px;
}
#searchbox {
display: flex;
box-shadow: var(--black-contrast);
}
#searchbox > *, #sort_submit {
background: var(--highlighted);
height: 40px;
}
#search {
border-right: 2px var(--outside) solid;
min-width: 0;
flex-grow: 1;
}
#inside {
display: flex;
font-size: 15px;
align-items: center;
border-right: 2px var(--outside) solid;
height: 40px;
padding: 0 10px;
2020-12-21 06:49:31 +01:00
}
2021-01-01 00:54:13 +01:00
#restrict_sr { margin-right: 5px; }
input[type="submit"] {
border: 0;
border-radius: 0px 5px 5px 0px;
}
select:hover { background: var(--foreground); }
input[type="submit"]:hover { color: var(--accent); }
2020-12-30 02:11:47 +01:00
#timeframe {
2021-01-01 00:54:13 +01:00
border-radius: 5px 0px 0px 5px;
margin-left: 10px;
2020-12-30 02:11:47 +01:00
}
2021-01-01 00:54:13 +01:00
#search_sort {
2020-12-21 06:49:31 +01:00
background: var(--highlighted);
2021-01-01 00:54:13 +01:00
border-radius: 5px;
overflow: hidden;
}
#search_sort > #search {
2020-12-29 03:42:46 +01:00
border: 0;
2021-01-01 00:54:13 +01:00
background: transparent;
}
#search_sort > :not(:first-child), #search_sort > #sort_options {
margin: 0;
border-radius: 0;
border-right: 0;
border-left: 2px solid var(--background);
box-shadow: none;
background: transparent;
}
#sort_options {
2020-12-21 06:49:31 +01:00
height: 40px;
2020-10-25 21:25:59 +01:00
}
2021-01-01 00:54:13 +01:00
#sort, #search_sort {
display: flex;
align-items: center;
margin-bottom: 20px;
}
2020-12-29 03:42:46 +01:00
2021-01-01 00:54:13 +01:00
#sort_options, footer > a {
border-radius: 5px;
2020-12-20 06:44:30 +01:00
box-shadow: var(--black-contrast);
2020-12-20 04:54:46 +01:00
background: var(--outside);
2021-01-01 00:54:13 +01:00
display: flex;
overflow: hidden;
}
#sort_options > a, footer > a {
2020-10-25 21:25:59 +01:00
color: lightgrey;
padding: 10px 20px;
text-align: center;
cursor: pointer;
}
2021-01-01 00:54:13 +01:00
#sort_options > a.selected {
2020-12-22 06:39:55 +01:00
background: var(--accent);
2020-11-23 01:29:05 +01:00
color: black;
}
2021-01-01 00:54:13 +01:00
#sort_options > a:not(.selected):hover {
2020-12-20 04:54:46 +01:00
background: var(--foreground);
2020-10-25 21:25:59 +01:00
}
/* Post */
.post {
border-radius: 5px;
2020-12-20 04:54:46 +01:00
background: var(--post);
box-shadow: var(--black-contrast);
2020-10-25 21:25:59 +01:00
display: flex;
}
2020-12-24 07:16:04 +01:00
.post.highlighted {
2020-12-29 03:42:46 +01:00
margin: 20px 0;
2020-12-24 07:16:04 +01:00
}
2020-10-25 21:25:59 +01:00
.post:hover {
2020-12-20 04:54:46 +01:00
background: var(--foreground);
2020-10-25 21:25:59 +01:00
}
.post:hover > .post_left {
2020-12-20 04:54:46 +01:00
background: var(--highlighted);
2020-10-25 21:25:59 +01:00
}
.post_left, .post_right {
display: flex;
flex-direction: column;
2020-11-18 01:56:37 +01:00
overflow-wrap: anywhere;
2020-10-25 21:25:59 +01:00
}
.post_left {
text-align: center;
2020-12-20 04:54:46 +01:00
background: var(--foreground);
2020-12-29 03:42:46 +01:00
border-radius: 5px 0 0 5px;
2020-10-25 21:25:59 +01:00
min-width: 50px;
padding: 5px;
}
2020-12-23 03:29:43 +01:00
.post_score {
margin-top: 20px;
color: var(--accent);
2020-12-29 03:42:46 +01:00
font-size: 16px;
2020-12-23 03:29:43 +01:00
}
.nsfw {
color: #FF5C5D;
margin-top: 20px;
border: 1px solid #FF5C5D;
padding: 5px;
font-size: 12px;
border-radius: 5px;
font-weight: bold;
}
2020-12-30 04:01:02 +01:00
.stickied {
--accent: #5cff85;
border: 1px solid #5cff85;
padding: 5px;
}
2020-10-25 21:25:59 +01:00
.post_subreddit {
font-weight: bold;
}
2020-12-07 20:20:24 +01:00
.post_title {
font-size: 18px;
2021-01-01 00:54:13 +01:00
line-height: 1.5;
2020-12-07 20:20:24 +01:00
}
2020-10-25 21:25:59 +01:00
.post_right {
padding: 20px 25px;
flex-grow: 1;
flex-shrink: 1;
}
.post_right > * {
margin: 5px;
}
.post_media {
2020-12-06 05:54:43 +01:00
max-width: 90%;
2020-10-25 21:25:59 +01:00
align-self: center;
}
.post_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
2020-12-12 05:36:06 +01:00
#post_url {
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-12-12 05:36:06 +01:00
}
2020-10-25 21:25:59 +01:00
.post_thumbnail {
object-fit: cover;
width: auto;
flex-shrink: 0;
padding: 10px;
border-radius: 15px;
2020-12-06 05:54:43 +01:00
max-width: 20%;
2020-10-25 21:25:59 +01:00
}
2020-12-20 20:29:23 +01:00
.post_flair {
2020-12-22 06:39:55 +01:00
background: var(--accent);
2020-12-06 05:54:43 +01:00
color: black;
padding: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
2020-11-17 03:49:08 +01:00
}
2020-10-25 21:25:59 +01:00
/* Comment */
.comment {
2020-12-22 06:39:55 +01:00
margin-top: 15px;
2020-10-25 21:25:59 +01:00
border-radius: 5px;
display: flex;
2020-12-20 07:25:00 +01:00
font-size: 15px;
2020-10-25 21:25:59 +01:00
}
.comment_left, .comment_right {
display: flex;
flex-direction: column;
}
.comment_left {
text-align: center;
min-width: 50px;
2020-12-29 03:42:46 +01:00
padding: 5px 0;
2020-12-20 04:54:46 +01:00
align-items: center;
2020-10-25 21:25:59 +01:00
}
2020-12-29 03:42:46 +01:00
.comment_title { font-size: 20px; }
.comment_link { text-decoration: underline; }
.comment_author { opacity: 0.9; }
2020-12-20 04:54:46 +01:00
2020-12-21 17:38:24 +01:00
.comment_author.op {
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-12-21 17:38:24 +01:00
font-weight: bold;
}
2020-12-20 20:29:23 +01:00
.author_flair {
background: var(--highlighted);
color: white;
padding: 5px;
margin-right: 5px;
border-radius: 5px;
font-size: 12px;
font-weight: bold;
}
2020-10-25 21:25:59 +01:00
.comment_subreddit {
font-weight: bold;
}
.comment_score {
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-12-20 04:54:46 +01:00
background: var(--foreground);
min-width: 40px;
border-radius: 5px;
2020-12-29 03:42:46 +01:00
padding: 10px 0;
font-size: 16px;
2020-10-25 21:25:59 +01:00
}
.comment_right {
2020-10-26 03:05:09 +01:00
word-wrap: anywhere;
2020-12-20 04:54:46 +01:00
padding: 10px 25px 10px 5px;
2020-10-25 21:25:59 +01:00
flex-grow: 1;
flex-shrink: 1;
}
2020-12-20 04:54:46 +01:00
.comment_data > * {
2020-10-25 21:25:59 +01:00
margin: 5px;
}
.comment_image {
max-width: 500px;
align-self: center;
}
.comment_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
.comment_body > p:not(:first-child) {
2020-12-22 06:39:55 +01:00
margin-top: 20px;
2020-10-25 21:25:59 +01:00
}
.comment_body a {
text-decoration: underline;
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-10-26 03:55:00 +01:00
}
2020-12-22 02:17:40 +01:00
.deeper_replies {
2020-12-22 06:39:55 +01:00
color: var(--accent);
margin-left: 15px;
2020-12-22 02:17:40 +01:00
}
2020-12-20 04:54:46 +01:00
::marker {
2020-12-22 06:39:55 +01:00
color: var(--accent);
2020-12-20 04:54:46 +01:00
}
2020-12-21 06:49:31 +01:00
.replies > .comment {
margin-left: -20px;
2020-12-22 02:17:40 +01:00
padding: 5px;
2020-12-20 04:54:46 +01:00
}
.datetime {
opacity: 0.75;
}
.line {
width: 2px;
height: 100%;
background: var(--foreground);
}
2020-11-23 20:33:43 +01:00
.post.comment {
background: #000;
2020-12-20 04:54:46 +01:00
border: 2px solid var(--foreground);
2020-11-23 20:33:43 +01:00
}
.post.comment > .post_left {
background: black;
}
2020-12-29 03:42:46 +01:00
/* Markdown */
.md > *:not(:first-child) {
margin-top: 20px;
}
.md p { font-size: 15px; }
.md h1 { font-size: 22px; }
.md h2 { font-size: 20px; }
.md h3 { font-size: 18px; }
.md h4 { font-size: 16px; }
.md h5 { font-size: 14px; }
.md h6 { font-size: 12px; }
.md blockquote {
padding-left: 8px;
margin: 4px 0 4px 8px;
border-left: 4px solid var(--highlighted);
}
.md a {
text-decoration: underline;
color: var(--accent);
}
.md li { margin: 10px 0; }
2020-12-20 07:25:00 +01:00
2020-12-29 03:42:46 +01:00
.md pre {
2020-12-20 07:25:00 +01:00
background: var(--outside);
padding: 20px;
margin-top: 10px;
border-radius: 5px;
box-shadow: var(--black-contrast);
}
2020-12-29 03:42:46 +01:00
.md code {
2020-12-20 07:25:00 +01:00
font-family: monospace;
font-size: 14px;
}
2020-12-29 03:42:46 +01:00
.md code:not(.md pre > code) { background: var(--highlighted); }
2020-10-26 03:55:00 +01:00
/* Tables */
table {
2020-12-20 04:54:46 +01:00
border: 3px var(--highlighted) solid;
2020-12-22 06:39:55 +01:00
border-spacing: 0;
2020-10-26 03:55:00 +01:00
}
td, th {
2020-12-20 04:54:46 +01:00
border: 1px var(--highlighted) solid;
2020-12-22 06:39:55 +01:00
padding: 10px;
2020-12-06 05:54:43 +01:00
}
/* Mobile */
@media screen and (max-width: 480px) {
.post {
flex-direction: column-reverse;
}
.post_left {
2020-12-29 03:42:46 +01:00
border-radius: 0 0 5px 5px;
2020-12-06 05:54:43 +01:00
}
.post_right {
padding: 20px;
}
.post_score {
margin-top: 0;
}
.post_thumbnail {
max-width: initial;
}
.replies > .comment {
margin-left: -25px;
2020-12-29 03:42:46 +01:00
padding: 5px 0;
}
2020-12-06 05:54:43 +01:00
.datetime {
width: 100%;
}
2020-12-24 07:16:04 +01:00
}
@media screen and (max-width: 800px) {
2021-01-01 00:54:13 +01:00
main { flex-direction: column-reverse; }
nav { flex-direction: column; }
2020-12-24 07:16:04 +01:00
aside {
2020-12-29 03:42:46 +01:00
margin: 20px 0 0 0;
max-width: 100%;
}
2020-12-30 02:11:47 +01:00
#user, #sidebar {
2020-12-29 03:42:46 +01:00
margin: 20px 0;
2020-12-24 07:16:04 +01:00
}
2020-10-25 21:25:59 +01:00
}