gnu-social/public/assets/css/base.css

297 lines
5.6 KiB
CSS

:root {
/* FONTS */
--display-font: 'Manrope-ExtraBold', sans-serif;
--main-font: 'Inter', sans-serif;
/* UNITS
* unit size - every element should be a multiplier of this
* main size - used for headers and icons
* medium size - same as above, except that the element in question is contained in something else
* small size - used in common text, borders
*/
--unit-size: 0.5rem;
--main-size: 1.4rem;
--medium-size: 1.2rem;
--small-size: 1rem;
/* colours and shadows */
--bg1: #242434;
--bg2: #46465E;
--bg3: #8081BA;
--translucent: #1A1A2666;
--white: #FFFFFF;
--shadow: 0px 0px 32px 0px #00000066;
/* transitions and animations */
--cubic-transition: all 200ms cubic-bezier(0, 0.55, 0.45, 1);
--fade-in: fadeIn 200ms cubic-bezier(0, 0.55, 0.45, 1);
--fade-out: fadeOut 200ms cubic-bezier(0, 0.55, 0.45, 1);
}
#instance:focus svg,
#instance:hover svg {
fill: var(--bg1);
transition: var(--cubic-transition);
}
/* DEFAULTS */
.bg {
background-color: var(--bg3);
background-image: url(../images/bg.png);
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
}
#header {
z-index: 1;
font-size: var(--main-size);
display: flex;
justify-content: space-between;
position: fixed;
top: 0;
background-color: var(--bg1);
padding: var(--unit-size);
width: 100%;
align-items: center;
box-shadow: var(--shadow);
}
#instance {
display: flex;
align-items: center;
}
.icon-logo {
margin-right: var(--small-size);
fill: var(--white);
}
/* CONTAINS ALL ELEMENTS BESIDES HEADER */
.container {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
/*margin-top: calc(3 * var(--small-size) + var(--main-size));*/
margin-top: 4.3rem;
}
/* THE FOCUSED (middle) DIV */
.content {
display: flex;
flex-direction: column;
margin-left: 20%;
margin-right: 20%;
padding: 0 var(--unit-size) 0 var(--unit-size);
width: 100%;
max-width: 60%;
}
.markdown-blocks {
background-color: var(--translucent);
border-radius: 0 0 var(--unit-size) var(--unit-size);
border: solid 2px var(--bg2);
border-top: solid 2px var(--bg3);
padding: var(--unit-size);
}
.markdown-blocks ul {
margin-left: 1em;
list-style: disc;
}
.markdown-blocks ul li {
margin-bottom: 0.2em;
}
.doc-navigation {
background-color: var(--translucent);
border-radius: var(--unit-size) var(--unit-size) 0 0;
border: solid 2px var(--bg2);
border-bottom: none;
padding: var(--unit-size);
}
.doc-navigation ul {
display: flex;
justify-content: space-evenly;
font-size: var(--main-size);
font-family: var(--display-font);
}
/* NOTES */
.h-feed,
.notes {
margin-top: var(--main-size);
}
.h-feed,
.notes hr {
margin-top: var(--unit-size);
margin-bottom: var(--main-size);
}
.h-entry,
.note {
background-color: var(--translucent);
border: solid 2px var(--bg2);
border-top: solid 2px var(--bg3);
border-radius: var(--unit-size);
}
.note-info {
display: flex;
border-radius: var(--unit-size);
box-sizing: border-box;
background-color: var(--translucent);
font-size: var(--main-size);
padding: var(--unit-size);
}
.note-info .avatar {
width: auto;
height: var(--main-size);
}
.note-content {
padding: var(--small-size);
}
.note-content p {
font-size: var(--medium-size);
padding-left: var(--small-size);
padding-right: var(--small-size);
}
.note-attachments {
display: flex;
}
.note-attachments > figure {
display: flex;
flex-direction: column;
margin: 0;
border-radius: var(--unit-size);
background-color: var(--translucent);
padding: var(--small-size);
}
.note-attachments > figure figcaption {
display: flex;
padding-top: var(--small-size);
}
.note-attachments > figure img,
.note-attachments > figure video {
width: 100%;
height: auto;
}
/* SIDE PANELS */
.panel {
font-size: var(--main-size);
}
.panel aside {
animation: var(--fade-in);
padding: var(--unit-size);
box-sizing: border-box;
width: 20%;
display: flex;
flex-direction: column;
position: absolute;
top: 100%;
}
.panel aside .footer {
margin-top: auto;
}
.icon {
fill: var(--white);
vertical-align: middle;
}
.icon-left,
.icon-right {
display: none;
}
/* MEDIA RESIZE */
@media (max-width: 1200px) {
.icon-left,
.icon-right {
display: flex;
}
.content {
margin: unset;
max-width: 100%;
}
.panel aside {
display: none;
}
.panel[open] {
width: 100%;
font-size: var(--main-size);
}
.panel[open] {
all: unset;
display: flex;
flex-direction: column;
}
.panel aside {
display: none;
}
.panel[open] aside {
padding: var(--unit-size);
box-sizing: border-box;
width: 100%;
height: 100vh;
background-color: var(--bg3);
background-image: url(../images/bg.png);
background-position: center;
background-repeat: no-repeat;
background-size: 100% 100%;
min-height: 100%;
display: block !important;
}
}
/* ANIMATIONS */
@keyframes fadeIn {
0% {
opacity: 0;
transform: translateY(-10px);
}
100% {
opacity: unset;
transform: none;
}
}
@keyframes fadeOut {
100% {
opacity: 0;
transform: translateY(-10px);
}
0% {
opacity: unset;
transform: none;
}
}