deblan.io-murph/assets/css/app.scss

944 lines
16 KiB
SCSS

@import "app/config";
@import "~wire.css/src/scss/wire";
@import 'app/prism';
@import 'app/alert';
@font-face {
font-family: "MainFont";
src: url(../fonts/ubuntu/ubuntu-light.woff) format('woff');
}
@font-face {
font-family: "deblan-icon";
src: url('../fonts/deblan/deblan-icon.eot?v=5');
src: url('../fonts/deblan/deblan-icon.woff?vmatrix5') format('woff'),
url('../fonts/deblan/deblan-icon.ttf?v=5') format('truetype');
font-style: normal;
font-weight: normal;
text-rendering: optimizeLegibility;
}
@mixin make-pre {
padding: 10px;
border: 1px solid $color-code-border;
overflow: auto;
background: $color-code-background;
color: $color-code-text;
font-size: 13px;
}
@mixin make-pre-code {
color: $color-code-text;
display: inline-block;
max-width: 100%;
}
html, body {
scroll-behavior: smooth;
}
$dicons: coffee server search project share contact list response twitter diaspora github code rss linkedin mastodon pixelfed gpg matrix murph cube;
.d-none {
display: none;
}
.deblan-icon {
font-family: 'deblan-icon';
vertical-align: middle;
@each $dicon in $dicons {
&-#{$dicon}::before {
content: "#{$dicon}";
}
}
}
.deblan-icon-svg svg {
vertical-align: middle;
margin-top: -4px;
margin-right: 3px;
}
.button .deblan-icon {
margin-right: 5px;
margin-left: -3px;
}
li, p {
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
-o-hyphens: auto;
hyphens: auto;
}
code mark {
color: inherit;
background: $color-code-mark-background;
}
a:focus .logo-svg * {
fill: $color-grey;
}
pre[class*="language-"] {
border-radius: 0 !important;
}
.page {
min-height: 100vh;
background: $color-white;
font-family: "MainFont";
}
.no-margin {
margin: 0;
}
.navigation {
padding-top: 35px;
font-size: 15px;
.deblan-icon {
margin-right: 9px;
}
ul {
margin: 0;
padding: 0;
list-style: none;
}
li {
margin: 0 0 3px 0;
padding: 0;
}
a {
color: $color-white;
display: block;
padding: 12px 15px;
background: $color-navigation-item-background;
&:hover, &.active, &:focus {
background: $color-navigation-item-background-active;
}
}
}
.small-menu {
background: $color-small-menu-background;
padding: 5px;
position: fixed;
bottom: 0;
width: 100%;
z-index: 1000;
.navigation {
padding-top: 0;
float: right;
a {
margin-left: 2px;
}
.deblan-icon {
margin-right: 0;
}
}
img {
padding: 10px;
}
}
.wide-menu {
width: 230px;
background: linear-gradient(to bottom, $color-wide-menu-background-from 0%, $color-wide-menu-background-to 500px);
padding: 34px 25px;
min-height: calc(100vh - 130px);
.navigation {
li {
$radius: 8px;
&:first-child a {
border-top-right-radius: $radius;
border-top-left-radius: $radius;
}
&:last-child a {
border-bottom-right-radius: $radius;
border-bottom-left-radius: $radius;
}
}
}
}
@keyframes gradientBackground {
0% {
background-position: 0 0%;
}
50% {
background-position: 0 75%;
}
100% {
background-position: 0 0%;
}
}
.header {
padding: 30px;
background: linear-gradient(180deg, $color-header-background-from, $color-header-background-to);
background-size: 100% 200%;
color: $color-white;
animation: gradientBackground 10s ease infinite;
text-shadow: 0px 0px 6px #000;
}
.fixed-menu {
position: fixed;
width: calc(230px - 50px);
}
.content {
background: $color-content-background;
width: calc(100% - 230px);
}
.header {
color: $color-header-text;
p, h1, ul {
position: relative;
z-index: 1000;
}
#particles {
width: 100%;
top: 0;
overflow: hidden;
position: absolute;
z-index: 50;
}
.h1 {
font-weight: normal;
font-size: 24px;
}
.h3 {
font-size: 17px;
font-weight: normal;
}
a {
color: $color-header-text !important;
&:focus {
color: $color-blue !important;
background: $color-white;
}
}
}
.body {
padding: 25px 40px;
max-width: 900px;
iframe {
margin-bottom: 25px;
border: none;
}
img {
width: auto;
cursor: zoom-in;
}
a, h1, h2, h3, h4, h5, p, ul {
color: $color-body-text;
}
p a, ul a {
border-bottom: 1px dotted $color-body-link-border;
}
blockquote {
border-left: 2px solid $color-blockquote-border;
margin: 10px;
padding: 5px 20px;
p {
margin: 0;
padding: 0;
}
}
code {
color: $code-color;
}
}
.content hr {
border: 0;
border-bottom: 1px dashed $color-hr-border;
background: $color-hr-background;
}
.reviews {
padding: 0 40px;
max-width: 900px;
hr:first-child {
margin-bottom: 30px;
}
blockquote {
border-left: 2px solid $color-blockquote-border;
margin: 10px;
padding: 5px 20px;
p {
margin: 0;
padding: 0;
}
}
}
.review-body {
code {
color: $code-color;
}
pre {
@include make-pre;
code {
@include make-pre-code;
}
}
img {
width: auto;
}
}
@for $i from 1 through 6 {
.review.offset-#{$i} {
margin-left: 5% * $i - 1%;
width: 100% - ($i * 5%);
}
}
.review {
width: 100%;
.review-avatar {
display: inline-block;
width: 60px;
margin-right: 10px;
}
.review-content {
display: inline-block;
width: calc(100% - 75px);
}
ul {
margin: 0;
padding: 0 0 25px 0;
}
a svg {
display: inline-block;
height: 21px;
width: 15px;
vertical-align: middle;
margin-right: 3px;
}
.review-header {
border-bottom: 1px solid $color-very-light-grey;
padding-bottom: 5px;
margin-bottom: 5px;
color: $color-dark-grey;
.review-anchor-link {
color: $color-dark-grey;
}
}
.review-body {
color: $color-dark-grey;
margin-bottom: 10px;
ul {
margin: 0 !important;
padding: 0 0 10px 10px !important;
}
li {
list-style: disc;
margin: 0 0 0 15px;
padding: 0;
}
}
}
.body {
pre {
@include make-pre;
code {
@include make-pre-code;
}
&.with-title {
margin-top: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
}
&[class*="language-"] {
padding-bottom: 10px;
padding-top: 10px;
border: 1px solid #3c3c3c;
}
}
}
.code-title {
background: $color-code-title-background;
padding: 10px 15px;
color: $color-code-title-text;
}
.body-content {
line-height: 30px;
}
.quick-image {
img {
width: 100%;
height: 350px;
background-position: center center;
background: #f2f2f2 url('../images/quick-post-load.png') no-repeat center center;
border: 2px solid $color-very-light-grey;
border-bottom: 0;
cursor: pointer;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
}
.quick-video {
.video-ratio {
border: 2px solid $color-very-light-grey;
border-bottom: 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
iframe {
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
}
}
.video-ratio {
position: relative;
width: 100%;
height: 0;
iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
}
}
.quick-body {
padding: 10px 10px 0 10px;
border: 2px solid $color-very-light-grey;
margin-top: -7px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
> p:last-child {
margin-bottom: 8px;
}
}
.error_list {
color: $color-red !important;
padding: 4px 0 !important;
}
.content-footer {
font-size: 14px;
background: darken($color-dark-grey, 10%);
text-align: center;
border-top: 1px dotted $color-very-dark-grey;
color: $color-white;
padding-top: 20px;
padding-bottom: 20px;
a {
font-weight: bold;
color: $color-white;
}
ul {
margin: 0;
padding: 0 0 10px 0;
}
li {
padding: 0;
margin: 0;
&::after {
content: '-';
margin: 0 5px;
}
&:last-child::after {
display: none;
}
}
p {
margin-bottom: 0;
margin-top: 10px;
padding: 0;
}
}
.links {
margin: 0;
padding: 5px 0 0 0;
text-align: center;
}
.link {
margin: 0 1px;
display: inline-block;
a {
display: block;
font-size: 13px;
padding-top: 1px;
padding-right: 1px;
height: 20px;
width: 20px;
overflow: hidden;
color: $color-white;
span {
display: none;
}
}
}
.links a:focus, .wide-menu a:focus .fixed {
border: 1px solid $color-white;
}
$links: (
twitter: #20b8ff,
rss: #fd9f13,
linkedin: #006699,
diaspora: #90b92e,
github: #8cc345,
code: #51d066,
mastodon: #2984d2,
pixelfed: #e72151,
matrix: #1a588a,
gpg: #42a73b,
murph: #19b4db
);
@each $site, $bg in $links {
.link-#{$site} {
background-color: $bg;
&:hover a, &:focus a, a:focus, a:hover {
color: $color-very-light-grey;
}
}
}
.form .field input[type="checkbox"] + label, .form .field input[type="radio"] + label {
margin-left: 1rem;
margin-top: -2px;
}
.preview-button {
cursor: pointer;
margin-left: 3px;
}
.content-footer, .body, .review, form {
a:focus {
background: $color-blue;
color: $color-white;
}
}
.button {
&:focus {
background: $color-very-dark-grey;
}
}
.button, .btn, input[type="submit"], input[type="button"] {
background: $color-blue;
}
.button:hover, .btn:hover, input:hover[type="submit"], input:hover[type="button"] {
background: $color-blue2;
}
.button:focus, .btn:focus, input:focus[type="submit"], input:focus[type="button"] {
background: $color-blue2;
}
.pager {
padding: 20px 20px 0 20px;
.pager-page {
padding: 0 2px 2px 2px;
&.active {
font-weight: bold;
}
}
.button {
padding: 8px;
}
}
@keyframes bounceIn {
0%{
opacity: 0;
}
50%{
opacity: 0.9;
}
80%{
opacity: 1;
}
100%{
opacity: 1;
}
}
@keyframes knmc {
0%{
left: -256px;;
}
100%{
left: 150vw;
}
}
.knmc {
animation-name: knmc;
animation-duration: 15s;
animation-iteration-count: 1;
}
.logo-svg {
animation-name: bounceIn;
animation-duration: 1s;
}
.logo-svg {
animation-name: bounceIn;
animation-duration: 1s;
}
.modal-open {
overflow: hidden;
.modal {
overflow-x: hidden;
overflow-y: auto;
}
}
.modal {
position: fixed;
top: 0;
left: 0;
z-index: 2000;
display: none;
width: 100%;
height: 100%;
overflow: hidden;
outline: 0;
}
.modal-header {
}
.modal-dialog {
position: relative;
width: 1280px;
margin: 100px auto;
pointer-events: none;
.modal-header {
.close {
cursor: pointer;
position: absolute;
right: 15px;
top: 13px;
width: 30px;
height: 30px;
z-index: 1000 + 4;
&:hover::before, &:hover::after {
background-color: #333;
}
&:before, &:after {
position: absolute;
left: 15px;
content: ' ';
height: 30px;
width: 2px;
background-color: #333;
z-index: 2001;
ransition-property: background-color;
transition-duration: 0.3s;
}
&:before {
transform: rotate(45deg);
}
&:after {
transform: rotate(-45deg);
}
}
}
}
.modal-content {
position: relative;
display: flex;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-color: #fff;
background-clip: padding-box;
outline: 0;
}
.modal-backdrop {
position: fixed;
display: none;
top: 0;
left: 0;
z-index: 1999;
width: 100vw;
height: 100vh;
background-color: #333;
opacity: 0.89;
}
.modal-body {
position: relative;
flex: 1 1 auto;
padding: 0;
height: calc(100vh - 300px);
iframe {
border: 0;
height: 100%;
width: 100%;
}
}
.mesh {
border: 1px solid $color-hr-border;
border-radius: 10px;
margin: 20px;
&-preview {
img {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
}
&-title {
font-size: 16px;
padding: 10px;
color: $color-body-text;
}
&-description {
padding-left: 10px;
padding-right: 10px;
}
}
@media screen and (max-width: 1024px) {
.mesh-wrapper {
width: 100%;
}
}
@media screen and (max-width: 980px) {
.quick-image img {
height: 200px;
}
.mesh-wrapper {
width: 100%;
}
}
@media screen and (max-width: 719px) {
.content-footer {
margin-bottom: 40px;
}
}
@media screen and (max-width: 550px) {
.body {
padding: 10px 10px 20px 10px;
}
.reviews {
padding: 10px 10px 20px 10px;
}
}
@media screen and (max-width: 719px) {
.content {
width: 100%;
}
.review {
.review-avatar {
display: none;
}
.review-content {
width: 100%;
margin: 0;
}
}
}
@media screen and (max-width: 380px) {
.navigation {
a {
padding: 7px 10px;
}
}
.small-menu {
img {
width: 20px;
margin-top: 11px;
padding: 0;
}
}
}
@media (prefers-color-scheme: dark) {
.content {
background: #35363f;
}
.body, .review, #form {
a, h1, h2, h3, h4, h5, p, ul, li, label, th, td,
.h1, .h2, .h3, .h4, .h5, .review-body {
color: #fff;
}
}
.review .review-header .review-anchor-link {
color: #ccc;
}
.body p a, .body ul a {
border-bolor: #ccc;
}
img.border {
border-color: #32333b;
}
.form .field {
input[type=text],
input[type=email],
input[type=url],
textarea {
border-color: #32333b;
background: #86899f;
}
}
.content hr {
background: none;
}
.quick-body,
.quick-video .video-ratio,
.quick-image img,
.content hr,
.alert
{
border-color: #86899f;
}
.code-title {
background: #000000;
}
.body pre {
background: #141414;
}
.body pre[class*="language-"], .code-title {
border: 1px solid #000000;
border-radius: 0;
}
.mesh {
border-color: #86899f;
&-title {
color: #fff;
}
&-description {
color: #fff;
}
}
}
@media all and (max-height: 465px) {
.wide-menu {
.navigation {
max-height: calc(100vh - 100px);
padding-top: 10px;
overflow: auto;
}
}
}