microblog.pub/app/scss/main.scss

579 lines
8.3 KiB
SCSS
Raw Permalink Normal View History

$font-stack: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell,
Ubuntu, roboto, noto, arial, sans-serif;
2022-07-14 08:33:40 -05:00
$background: #ddd;
2022-07-14 09:31:16 -05:00
$light-background: #e6e6e6;
2022-07-14 08:33:40 -05:00
$text-color: #111;
$primary-color: #1d781d;
$secondary-color: #781d78;
2022-07-03 15:01:47 -05:00
$form-background-color: #ccc;
2022-07-14 11:40:38 -05:00
$form-text-color: #333;
2022-07-14 08:33:40 -05:00
$muted-color: #555; // solarized comment text
2022-07-29 14:26:19 -05:00
$primary-button-text-color: #fff;
2022-08-04 12:10:57 -05:00
$code-highlight-background: #f0f0f0;
2022-07-01 12:35:34 -05:00
2022-07-04 13:49:23 -05:00
// Load custom theme
2022-07-29 14:01:45 -05:00
@import "theme.scss";
2022-07-09 01:15:33 -05:00
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Set core root defaults */
html:focus-within {
scroll-behavior: smooth;
}
/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
font: inherit;
}
html {
max-width: 90ch;
padding: 3em 1em;
margin: auto;
line-height: 1.75;
font-size: 1.25em;
}
body {
font-family: $font-stack;
background: $background;
color: $text-color;
display: flex;
min-height: 100vh;
flex-direction: column;
}
a {
text-decoration: none;
}
2022-08-22 11:50:20 -05:00
.primary-color {
color: $primary-color;
}
2022-08-29 14:42:54 -05:00
#admin {
.admin-menu {
margin-bottom: 30px;
padding: 0 20px;
}
}
.empty-state {
padding: 20px;
}
.public-top-menu {
margin: 30px 0 0 0;
}
.width-95 {
width: 95%;
}
.bold {
font-weight: bold;
}
.admin-new {
textarea {
font-size: 1.2em;
width: 95%;
}
}
.show-more-wrapper {
.p-summary {
display: inline-block;
}
label {
margin-left: 5px;
}
.show-more-state {
display: none;
}
.show-more-state ~ .obj-content {
margin-top: 0;
}
.show-more-state:checked ~ .obj-content {
display: none;
}
}
.sensitive-attachment {
display: inline-block;
.sensitive-attachment-state {
display: none;
}
.sensitive-attachment-state:checked ~ .sensitive-attachment-box div {
display: none;
}
.sensitive-attachment-box {
position: relative;
div {
position: absolute;
width: 100%;
height: 100%;
z-index: 10;
backdrop-filter: blur(2em);
}
}
}
2022-08-03 12:53:55 -05:00
blockquote {
border-left: 3px solid $secondary-color;
margin-left: 0;
padding-left: 1.5em;
}
.muted {
color: $muted-color;
}
2022-07-09 01:15:33 -05:00
.light-background {
background: $light-background;
2022-07-01 12:35:34 -05:00
}
2022-07-12 12:52:29 -05:00
2022-08-10 01:58:18 -05:00
dl {
display: flex;
dt {
width: 200px;
flex: 0 0 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
dd {
flex: 1 1 auto;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
p {
display: inline;
}
}
}
2022-07-03 15:42:14 -05:00
.shared-header {
margin-left: 20px;
margin-top: 30px;
margin-bottom: -20px;
strong {
color: $primary-color;
}
span {
color: $muted-color;
}
2022-07-03 15:42:14 -05:00
}
2022-07-12 12:52:29 -05:00
div.highlight {
background: $code-highlight-background;
padding: 0 10px;
overflow: auto;
display: block;
margin: 20px 0;
2022-07-03 15:42:14 -05:00
}
2022-07-12 12:52:29 -05:00
2022-07-09 01:15:33 -05:00
.box {
padding: 0 20px;
2022-07-09 01:15:33 -05:00
}
2022-07-01 12:35:34 -05:00
code,
pre {
2022-07-03 15:01:47 -05:00
color: $secondary-color; // #cb4b16; // #268bd2; // #2aa198;
2022-07-03 15:42:14 -05:00
font-family: monospace;
2022-07-01 12:35:34 -05:00
}
2022-07-14 11:40:38 -05:00
2022-07-03 15:01:47 -05:00
.form {
input,
select,
textarea {
font-size: 20px;
border: 0;
padding: 5px;
background: $form-background-color;
color: $form-text-color;
&:focus {
outline: 1px solid $secondary-color;
2022-07-03 15:01:47 -05:00
}
}
input[type="submit"] {
font-size: 20px;
outline: none;
background: $primary-color;
color: $primary-button-text-color;
padding: 5px 12px;
cursor: pointer;
}
2022-07-03 15:01:47 -05:00
}
2022-07-14 11:40:38 -05:00
2022-07-01 12:35:34 -05:00
header {
2022-07-09 01:15:33 -05:00
padding: 0 20px;
2022-07-01 12:35:34 -05:00
.title {
font-size: 1.3em;
text-decoration: none;
.handle {
font-size: 0.85em;
2022-07-03 15:01:47 -05:00
color: $muted-color;
2022-07-01 12:35:34 -05:00
}
}
.counter {
2022-07-03 15:01:47 -05:00
color: $muted-color;
2022-07-01 12:35:34 -05:00
}
2022-07-29 14:35:02 -05:00
.summary {
a:hover {
text-decoration: underline;
}
}
2022-07-01 12:35:34 -05:00
}
a {
2022-07-03 15:01:47 -05:00
color: $primary-color;
&:hover {
color: $secondary-color;
}
2022-06-22 13:11:22 -05:00
}
#main {
display: flex;
flex: 1;
2022-06-22 13:11:22 -05:00
}
main {
width: 100%;
margin: 30px auto;
2022-06-22 13:11:22 -05:00
}
2022-08-28 10:36:58 -05:00
2022-09-20 13:00:35 -05:00
.main-flex {
display: flex;
flex: 1;
2022-09-20 13:00:35 -05:00
}
2022-08-28 10:36:58 -05:00
.centered {
display: flex;
2022-09-20 13:00:35 -05:00
flex: 1;
2022-08-28 10:36:58 -05:00
justify-content: center;
align-items: center;
2022-09-20 13:00:35 -05:00
div {
display: block;
}
2022-08-28 10:36:58 -05:00
}
2022-06-22 13:11:22 -05:00
footer {
font-size: 1em;
2022-08-24 14:18:30 -05:00
width: 100%;
margin: 20px auto;
color: $muted-color;
p {
margin: 0;
2022-08-24 14:18:30 -05:00
}
2022-07-01 12:35:34 -05:00
}
2022-08-26 00:43:39 -05:00
.tiny-actor-icon {
max-width: 24px;
max-height: 24px;
position: relative;
top: 5px;
}
2022-07-01 12:35:34 -05:00
.actor-box {
display: flex;
column-gap: 20px;
margin: 10px 0;
2022-07-01 12:35:34 -05:00
.icon-box {
flex: 0 0 50px;
}
.actor-handle {
font-size: 0.85em;
line-height: 1em;
2022-07-03 15:01:47 -05:00
color: $muted-color;
2022-07-01 12:35:34 -05:00
}
.actor-icon {
max-width: 50px;
}
2022-06-22 13:11:22 -05:00
}
2022-07-25 15:51:53 -05:00
#articles {
list-style-type: none;
margin: 30px 0;
padding: 0 20px;
li {
display: block;
span {
padding-right: 10px;
2022-07-25 15:51:53 -05:00
}
}
2022-07-25 15:51:53 -05:00
}
#notifications,
#followers,
#following {
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
li {
display: block;
}
2022-06-22 13:11:22 -05:00
}
2022-07-15 13:01:55 -05:00
@mixin admin-button() {
font-size: 20px;
line-height: 32px;
font-family: $font-stack;
background: $form-background-color;
color: $form-text-color;
border: 1px solid $background;
padding: 8px 10px 5px 10px;
cursor: pointer;
&:hover {
border: 1px solid $form-text-color;
}
2022-07-15 13:01:55 -05:00
}
.show-sensitive-btn,
.show-more-btn,
.label-btn {
@include admin-button;
padding: 10px 5px;
margin: 20px 0;
2022-07-15 13:01:55 -05:00
}
2022-08-29 14:42:54 -05:00
.show-hide-sensitive-btn {
display: inline-block;
2022-08-29 14:42:54 -05:00
}
.no-margin-top {
margin-top: 0;
}
.float-right {
float: right;
}
ul.poll-items {
list-style-type: none;
padding: 0;
li {
display: block;
p {
margin: 20px 0 10px 0;
.poll-vote {
padding-left: 20px;
}
}
.poll-bar {
width: 100%;
height: 20px;
line {
stroke: $secondary-color;
stroke-width: 20px;
}
2022-08-29 14:42:54 -05:00
}
}
}
.attachment-wrapper {
.attachment-item {
margin-top: 20px;
}
img.attachment {
margin: 0;
}
a.attachment {
display: inline-block;
margin-bottom: 15px;
}
audio.attachment {
width: 480px;
}
}
2022-07-03 15:42:14 -05:00
nav {
form {
margin: 15px 0;
}
input[type="submit"],
button {
@include admin-button;
}
2022-07-03 15:42:14 -05:00
}
2022-06-22 13:11:22 -05:00
nav.flexbox {
ul {
display: flex;
flex-wrap: wrap;
align-items: center;
list-style-type: none;
margin: 0;
padding: 0;
}
2022-06-22 13:11:22 -05:00
ul li {
margin-right: 20px;
2022-06-22 13:11:22 -05:00
&:last-child {
margin-right: 0px;
2022-07-01 12:35:34 -05:00
}
}
a:not(.label-btn) {
color: $primary-color;
text-decoration: none;
&:hover,
&:active {
color: $secondary-color;
text-decoration: underline;
2022-06-22 13:11:22 -05:00
}
}
a.active:not(.label-btn) {
color: $secondary-color;
font-weight: bold;
}
2022-06-22 13:11:22 -05:00
}
2022-09-21 14:00:17 -05:00
// after nav.flexbox to override default behavior
a.label-btn {
color: $form-text-color;
&:hover {
text-decoration: none;
color: $form-text-color;
}
}
2022-07-09 01:15:33 -05:00
.ap-object {
margin: 15px 0;
padding: 20px;
nav {
color: $muted-color;
}
.in-reply-to {
display: inline;
color: $muted-color;
}
.e-content,
.activity-og-meta {
a:hover {
text-decoration: underline;
2022-07-07 13:37:16 -05:00
}
}
.activity-attachment {
margin: 30px 0 20px 0;
img,
audio,
video {
width: 100%;
max-width: 740px;
2022-07-14 08:16:58 -05:00
}
}
img.inline-img {
display: block;
max-width: 740px;
}
2022-07-07 13:37:16 -05:00
}
2022-08-29 14:42:54 -05:00
.activity-og-meta {
display: flex;
column-gap: 20px;
margin: 20px 0;
img {
max-width: 200px;
max-height: 100px;
}
small {
display: block;
}
}
2022-07-09 01:15:33 -05:00
.ap-object-expanded {
border: 2px dashed $secondary-color;
2022-07-09 01:15:33 -05:00
}
2022-06-22 13:11:22 -05:00
2022-07-26 11:51:20 -05:00
.error-box {
color: $secondary-color;
2022-07-26 11:51:20 -05:00
}
2022-06-25 03:20:07 -05:00
.actor-action {
margin-top: 20px;
margin-bottom: -20px;
2022-07-09 01:15:33 -05:00
padding: 0 20px;
2022-06-25 03:20:07 -05:00
span {
2022-07-03 15:01:47 -05:00
color: $muted-color;
2022-06-25 03:20:07 -05:00
}
}
2022-07-03 15:01:47 -05:00
.actor-metadata {
color: $muted-color;
2022-07-03 15:01:47 -05:00
}
.emoji,
.custom-emoji {
max-width: 25px;
}
2022-08-29 14:42:54 -05:00
.indieauth-box {
display: flex;
column-gap: 20px;
.indieauth-logo {
flex: initial;
width: 100px;
img {
max-width: 100px;
}
}
.indieauth-details {
flex: 1;
div {
padding-left: 20px;
a {
font-size: 1.2em;
font-weight: 600;
}
}
}
}
.public-interactions {
display: flex;
column-gap: 20px;
flex-wrap: wrap;
margin-top: 20px;
.interactions-block {
flex: 0 1 30%;
max-width: 50%;
.facepile-wrapper {
display: flex;
column-gap: 20px;
row-gap: 20px;
flex-wrap: wrap;
margin-top: 20px;
a {
height: 50px;
img {
max-width: 50px;
}
}
.and-x-more {
display: inline-block;
align-self: center;
}
}
}
}
.error-title {
a {
text-decoration: underline;
}
}
.ap-place {
h3 {
display: inline;
font-weight: normal;
}
h3::after {
content: ': ';
}
}