fediparty/themes/starter/source/assets/scss/partials/_layout.scss
2023-09-24 00:16:54 +03:00

519 lines
7.1 KiB
SCSS

*,
*:after,
*:before {
box-sizing: border-box;
}
* {
padding: 0;
margin: 0;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
}
html,
body {
width: 100%;
}
html {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: grayscale;
-ms-text-size-adjust: 100%;
height: 100%;
font-size: 100%;
}
body {
font-size: 1.05rem;
font-family: $font-primary;
line-height: 1.6;
overflow-x: hidden;
color: $black;
background-color: $black;
text-rendering: optimizeLegibility;
}
body.main {
height: 100%;
}
*::-moz-selection {
color: $black;
background: $golden;
}
*::selection {
color: $black;
background: $golden;
}
button::-moz-focus-inner {
border: 0;
}
img {
max-width: 100%;
}
a {
text-decoration: none;
color: $black;
border-bottom: 1px solid $black;
transition: all .15s ease;
background-repeat: repeat-x;
background-size: 0 0;
background-position: 0 65%;
&:hover,
&:focus,
&:active {
color: $golden;
outline: none;
border-bottom: none;
background-image: linear-gradient($black, $black);
background-size: 1.5em 1.5em;
}
}
a.dark-ui {
color: $white;
border-bottom: 1px solid $white;
&:hover,
&:focus,
&:active {
outline: none;
border-bottom: none;
}
}
small {
font-size: .85rem;
}
pre {
margin-left: 1.3em;
}
code,
pre {
line-height: 1.5;
font-size: 95%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: sans-serif;
letter-spacing: .02em;
}
h1 {
font-size: 2.4rem;
}
h3 {
font-size: 1.4rem;
}
ul > li {
list-style-type: none;
padding: .2em 0;
}
ol {
padding-left: 1em;
}
dfn {
font-style: inherit;
cursor: pointer;
border-bottom: 1px dashed $grey;
}
input[type="checkbox"],
input[type="radio"] {
cursor: pointer;
&:focus {
outline: none;
}
}
sup {
font-size: .7rem;
margin: 0 .2em;
}
.f-icon {
fill: $white;
&:hover {
fill: $golden;
}
}
.btn-action {
max-width: 170px;
border: none;
margin: .5em 0;
background: $golden;
border-radius: 6px;
padding: 7px;
&:hover,
&:active,
&:focus {
background: $black;
box-shadow: 0 2px 4px 0 $grey;
}
}
.btn-action.centered {
margin: .5em auto;
}
.container,
.container-wrapper {
height: inherit;
width: inherit;
}
.container {
background-color: $white;
}
.container:before,
.container:after {
display: table;
content: " ";
}
.container:after {
clear: both;
}
.contents {
padding: 2em 15% 1.5em;
}
.contents img {
display: block;
margin: 0 auto;
}
.contents p:not(.u-nomargin) {
margin: 1em 0;
}
.contents .section {
display: flex;
flex-wrap: wrap;
margin: 1em 0;
}
.contents .section.u-nomargin {
margin: 0;
}
.contents .section.u-block {
display: block;
}
.section-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.section-wrapper > .column {
flex: 48% 0 0;
}
.section-wrapper:last-child > .column .section {
margin: 0;
}
.section h4 {
text-transform: uppercase;
}
.section:not(.u-block) h4 {
margin-right: 1em;
width: 150px;
}
.section-title {
border-bottom: 1px solid $grey;
padding-bottom: 1em;
margin-bottom: 1em;
}
.section-title h2,
.section-title h4 {
text-transform: uppercase;
}
.section-title h2 {
display: inline;
font-size: 1.8rem;
}
.section-title h2,
.section-title > div {
vertical-align: middle;
}
.section-title h4 {
color: $grey;
}
.section-title > .icon-share {
width: 20px;
height: 20px;
fill: $golden;
vertical-align: sub;
margin-right: .4em;
}
.section-title .icon-logotype {
color: $white;
width: 22px;
margin: 0 auto;
}
.section-title > div {
border-radius: 50%;
width: 42px;
height: 42px;
display: inline-flex;
align-items: center;
margin-right: 1em;
}
.section-list li:last-of-type > span,
.article-list li:last-of-type > span {
display: none;
}
.article-list > h2,
.article-list > h3,
.article-list > h4 {
margin: 1em 0;
}
.section-hero {
width: 65%;
margin: 0 auto;
}
.section-hero > h3 {
margin: .5em 0;
}
.section-hero > h3:first-child {
margin-top: .5em;
}
.section-hero > h3:last-child {
margin-bottom: 1.5em;
}
.section-hero span {
margin: 0 .5em;
display: inline-block;
}
.section-hero span:first-child {
text-transform: uppercase;
min-width: 183px;
}
.section-hero span:first-child,
.section-hero span:last-of-type {
color: $grey;
}
.section-hero sup > a {
border-bottom: none;
}
.section.with-image {
text-align: center;
}
.section.with-image a {
display: inline-block;
margin: 1em .5em;
width: 60px;
height: 60px;
border: 2px solid $golden;
border-radius: 50%;
&:hover,
&:focus,
&:active {
border: 2px solid $coral;
box-shadow: 0 1px 8px 0 $coral;
background-image: none;
}
}
.article-list li:before,
.warning-list li:before {
content: "";
width: 7px;
margin: 0 .4em 3px;
height: 7px;
display: inline-block;
border-radius: 50%;
background: $golden;
}
svg.f-tag {
position: absolute;
width: 20px;
height: 20px;
right: .5em;
top: .5em;
fill: $golden;
}
$list: (diaspora, $diaspora),
(friendica, $friendica),
(hubzilla, $hubzilla),
(gnusocial, $gnusocial),
(mastodon, $mastodon),
(socialhome, $socialhome),
(pleroma, $pleroma),
(peertube, $peertube),
(misskey, $misskey),
(osada, $osada),
(pixelfed, $pixelfed),
(funkwhale, $funkwhale);
@each $tag, $color in $list {
svg.#{$tag} {
fill: $color;
}
}
@each $network, $color in $list {
.article-list > li.#{$network}:before {
background: $color;
}
}
.warning-list li:before {
background: $coral;
}
.browserupgrade {
margin: .2em 0;
background: $grey;
color: $black;
padding: .2em 0;
}
.no-js {
position: absolute;
top: .3em;
left: 50%;
transform: translateX(-50%);
background: $white;
color: $black;
padding: .4em 1.3em;
text-align: center;
z-index: $zIndex--3;
}
@media screen and (max-width: $mq-large) {
.section-hero {
width: 75%;
}
.contents.network {
padding: 2em 13% 1.5em;
}
.contents.misc {
padding: 2em 10% 1.5em;
}
}
@media screen and (max-width: $mq-medium) {
h1 {
font-size: 2rem;
}
.section-hero {
width: 90%;
}
.contents {
padding: 2em 10% 1.5em;
}
.section-wrapper > .column {
flex: 100% 0 0;
}
}
@media screen and (max-width: $mq-small) {
h1 {
font-size: 1.3rem;
line-height: 1.3;
}
h2,
.section-title h2 {
font-size: 1.2rem;
}
h3 {
font-size: 1.1rem;
}
h4 {
padding: 0 3em;
line-height: 1.3;
}
.section-hero > h3:last-child {
margin-right: 11%;
}
.contents {
padding: 2em 8% 1.5em;
}
.contents .section {
flex-direction: column;
}
.contents h4 {
padding: 0;
}
.section-hero {
width: 100%;
}
.section-hero span:last-child {
display: none;
}
.no-js {
width: 100%;
line-height: 1.3;
}
}
@media screen and (max-width: $mq-xsmall) {
body {
font-size: 90%;
}
.no-js {
display: none;
}
}