mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-18 14:17:30 -06:00
🐸restructure frontend stuff, include admin and future user panel in main repo, properly deduplicate bundles for css+js across uses
This commit is contained in:
parent
f3b44426f4
commit
f971763743
36 changed files with 8978 additions and 1252 deletions
9
web/source/css/_colors.css
Normal file
9
web/source/css/_colors.css
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
$bg: #525c66;
|
||||
$fg: #fafaff;
|
||||
$fg_dark: #b0b0b5;
|
||||
|
||||
$bg_accent: color-mod(var(--bg) lightness(-5%));
|
||||
|
||||
$acc1: #de8957; // sloth light orange
|
||||
$acc2: #c76d33; // sloth dark orange
|
||||
$blue: #5897df;
|
||||
227
web/source/css/base.css
Normal file
227
web/source/css/base.css
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: $bg_accent;
|
||||
color: $fg;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
body {
|
||||
display: grid;
|
||||
|
||||
grid-template-rows: auto 1fr auto;
|
||||
min-height: 100vh;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
main {
|
||||
background: $bg;
|
||||
display: grid;
|
||||
padding-top: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
grid-template-columns: 1fr 50% 1fr;
|
||||
grid-template-columns: auto min(92%, 90ch) auto;
|
||||
|
||||
.left {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.right {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
&.lightgray {
|
||||
background: $bg;
|
||||
}
|
||||
|
||||
& > * {
|
||||
align-self: start;
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
|
||||
header {
|
||||
background: $bg_accent;
|
||||
padding: 2rem 0;
|
||||
padding-bottom: 0;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
img {
|
||||
height: 4rem;
|
||||
padding-left: 2rem;
|
||||
padding-bottom: 2rem;
|
||||
}
|
||||
|
||||
div {
|
||||
height: 100%;
|
||||
margin: 0 2rem;
|
||||
margin-top: -2rem;
|
||||
flex-grow: 1;
|
||||
align-self: center;
|
||||
display: flex;
|
||||
|
||||
h1 {
|
||||
align-self: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
h1 {
|
||||
/* color: $acc1; */
|
||||
margin: 0;
|
||||
line-height: 2.4rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $acc1;
|
||||
}
|
||||
|
||||
.button, button {
|
||||
border-radius: 0.2rem;
|
||||
background: $acc1;
|
||||
color: $fg;
|
||||
text-decoration: none;
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
padding: 0.5rem;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
background: $acc2;
|
||||
}
|
||||
}
|
||||
|
||||
.count {
|
||||
background: $bg_accent;
|
||||
border-radius: 0.3rem;
|
||||
padding: 0.2rem;
|
||||
}
|
||||
|
||||
.nounderline {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.accent {
|
||||
color: $acc1;
|
||||
}
|
||||
|
||||
.logo {
|
||||
justify-self: center;
|
||||
img {
|
||||
height: 30vh;
|
||||
}
|
||||
}
|
||||
|
||||
section.apps {
|
||||
align-self: start;
|
||||
|
||||
.applist {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-gap: 0.5rem;
|
||||
align-content: start;
|
||||
|
||||
.entry {
|
||||
display: grid;
|
||||
grid-template-columns: 30% 1fr;
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
background: $bg_accent;
|
||||
border-radius: 0.5rem;
|
||||
|
||||
.logo {
|
||||
align-self: center;
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.logo.redraw {
|
||||
fill: $fg;
|
||||
stroke: $fg;
|
||||
}
|
||||
|
||||
div {
|
||||
padding: 1rem 0;
|
||||
h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section.login {
|
||||
form {
|
||||
display: inline-grid;
|
||||
grid-template-columns: auto 100%;
|
||||
grid-gap: 0.7rem;
|
||||
|
||||
button {
|
||||
place-self: center;
|
||||
grid-column: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
section.error {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
span {
|
||||
font-size: 2em;
|
||||
}
|
||||
pre {
|
||||
border: 1px solid #ff000080;
|
||||
margin-left: 1em;
|
||||
padding: 0 0.7em;
|
||||
border-radius: 0.5em;
|
||||
background-color: #ff000010;
|
||||
font-size: 1.3em;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
}
|
||||
|
||||
input, select, textarea {
|
||||
border: 1px solid $fg;
|
||||
color: $fg;
|
||||
background: $bg;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
footer {
|
||||
align-self: end;
|
||||
|
||||
padding: 2rem;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
|
||||
a {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (orientation: portrait) {
|
||||
main {
|
||||
grid-template-columns: 1fr 92% 1fr;
|
||||
}
|
||||
|
||||
header {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 2rem;
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
div {
|
||||
margin: 0.3rem 0;
|
||||
}
|
||||
}
|
||||
|
||||
section.apps .applist {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
113
web/source/css/profile.css
Normal file
113
web/source/css/profile.css
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
main {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.headerimage {
|
||||
img {
|
||||
width: 100%;
|
||||
height: 15em;
|
||||
object-fit: cover;
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.profile {
|
||||
position: relative;
|
||||
background: color($bg lightness(-3%));
|
||||
padding: 2rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-around;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.2rem;
|
||||
|
||||
.basic {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 1 25em;
|
||||
gap: 0.5rem;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 25em;
|
||||
|
||||
.avatar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
|
||||
img {
|
||||
object-fit: cover;
|
||||
border-radius: 10px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.avatar-container:before {
|
||||
content: "";
|
||||
float: left;
|
||||
padding-top: 100%;
|
||||
}
|
||||
|
||||
|
||||
.displayname {
|
||||
font-weight: bold;
|
||||
font-size: 1.6rem;
|
||||
align-self: start;
|
||||
}
|
||||
}
|
||||
|
||||
.detailed {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 1 25em;
|
||||
|
||||
h2 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.bio {
|
||||
margin: 0;
|
||||
|
||||
a {
|
||||
color: $acc1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.accountstats {
|
||||
position: relative;
|
||||
background: color($bg lightness(-3%));
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-evenly;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 0.2rem;
|
||||
|
||||
.entry {
|
||||
background: color($bg lightness(+3%));
|
||||
padding: 0.5rem;
|
||||
flex-grow: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
footer + div {
|
||||
/* something weird from the devstack.. */
|
||||
display: none;
|
||||
}
|
||||
227
web/source/css/status.css
Normal file
227
web/source/css/status.css
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
main {
|
||||
background: transparent;
|
||||
grid-auto-rows: auto;
|
||||
}
|
||||
|
||||
.thread {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.toot {
|
||||
position: relative;
|
||||
background: color($bg lightness(-3%));
|
||||
padding: 2rem;
|
||||
/* padding-bottom: 0; */
|
||||
display: grid;
|
||||
grid-template-columns: 3.2rem auto 1fr;
|
||||
column-gap: 0.5rem;
|
||||
margin-bottom: 0.2rem;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
grid-row: span 2;
|
||||
|
||||
img {
|
||||
height: 3.2rem;
|
||||
width: 3.2rem;
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
|
||||
.displayname {
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
align-self: start;
|
||||
}
|
||||
|
||||
.username {
|
||||
color: $fg_dark;
|
||||
justify-self: start;
|
||||
}
|
||||
|
||||
input.spoiler:checked ~ .content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.spoiler {
|
||||
label {
|
||||
background: $acc1;
|
||||
border-radius: 0.3rem;
|
||||
padding: 0.3rem;
|
||||
margin-left: 0.4rem;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
margin: 0;
|
||||
grid-column: span 2;
|
||||
|
||||
a {
|
||||
color: $acc1;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.media {
|
||||
margin-top: 0.6rem;
|
||||
border-radius: 0.2rem;
|
||||
grid-column: span 3;
|
||||
display: grid;
|
||||
grid-template-columns: 50% 50%;
|
||||
grid-auto-rows: 10rem;
|
||||
overflow: hidden;
|
||||
gap: 0.3rem;
|
||||
|
||||
a {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.no-image-desc {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
bottom: 0.1rem;
|
||||
right: 0.4rem;
|
||||
color: white;
|
||||
background: $blue;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 100%;
|
||||
z-index: 3;
|
||||
|
||||
i.fa {
|
||||
display: block;
|
||||
line-height: 1.3rem;
|
||||
}
|
||||
|
||||
span {
|
||||
margin-left: 0.3rem;
|
||||
display: none;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
border-radius: 0.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
&.single a {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
&.odd a:first-child, &.double a {
|
||||
grid-row: span 2;
|
||||
}
|
||||
}
|
||||
|
||||
.info {
|
||||
display: none;
|
||||
|
||||
div {
|
||||
position: relative;
|
||||
padding-right: 1.3rem;
|
||||
}
|
||||
|
||||
.stats {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
color: #b0b0b5;
|
||||
grid-column: span 3;
|
||||
margin-top: 0.5rem;
|
||||
flex-wrap: wrap;
|
||||
|
||||
div.stats::after {
|
||||
display: none;
|
||||
}
|
||||
|
||||
div::after {
|
||||
$size: 0.25rem;
|
||||
display: block;
|
||||
background: $fg_dark;
|
||||
height: $size;
|
||||
width: $size;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: calc((1.5rem - $size) / 2);
|
||||
right: 0.55rem;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
div:last-child {
|
||||
&::after {
|
||||
display: none;
|
||||
}
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.toot-link {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
text-indent: 100%;
|
||||
white-space: nowrap;
|
||||
|
||||
position: absolute;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
$border-radius: 0.3rem;
|
||||
&:first-child {
|
||||
/* top left, top right */
|
||||
border-radius: $border-radius $border-radius 0 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
/* bottom left, bottom right */
|
||||
border-radius: 0 0 $border-radius $border-radius;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
&.expanded {
|
||||
background: $bg;
|
||||
padding-bottom: 1.5rem;
|
||||
|
||||
.displayname {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
.text {
|
||||
grid-column: span 3;
|
||||
grid-row: span 1;
|
||||
margin-top: 0.3rem;
|
||||
}
|
||||
|
||||
.info {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.media {
|
||||
grid-auto-rows: 1fr;
|
||||
max-height: 120rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
footer + div { /* something weird from the devstack.. */
|
||||
display: none;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue