platypush-home/www/css/application.css

253 lines
3.5 KiB
CSS
Raw Normal View History

2021-02-04 23:40:20 +01:00
body {
display: flex;
flex-direction: column;
width: 100%;
height: 100vh;
font-size: 20px;
font-family: 'Fira Sans', sans-serif;
font-weight: 400;
margin: 0;
}
2021-02-05 13:38:07 +01:00
/* ------------- */
/* Responsive UI */
/* ------------- */
@media screen and (max-width: 799px) {
.is-mobile {
display: block;
}
.is-desktop {
display: none !important;
}
}
@media screen and (min-width: 800px) {
.is-mobile {
display: none !important;
}
.is-desktop {
display: block;
}
}
2021-02-04 23:40:20 +01:00
/* ------ */
/* Header */
/* ------ */
header {
width: 100%;
height: 3em;
display: flex;
align-items: center;
font-size: .9em;
2021-02-05 13:38:07 +01:00
box-shadow: 1px 3px 3px 0 #bbb;
2021-02-04 23:40:20 +01:00
}
header .name {
font-family: 'Poppins', sans-serif;
margin-left: .333em;
}
header .item {
margin: 0 1em;
}
header a {
color: initial;
opacity: .8;
text-decoration: none;
}
header a:hover {
opacity: .5;
}
header a.logo {
opacity: .9;
}
header a.logo:hover {
opacity: .75;
}
header .left,
header .right {
display: flex;
align-items: center;
width: 50%;
}
header .right {
justify-content: right;
2021-04-05 10:32:27 +02:00
position: relative;
}
header .right.is-mobile button {
position: absolute;
right: 0;
2021-02-04 23:40:20 +01:00
}
header .logo {
display: flex;
align-items: center;
}
header .logo img {
width: 2.5em;
height: 2.5em;
margin: auto .5em;
}
2021-02-05 13:38:07 +01:00
header .menu-icon {
background: none;
border: none;
cursor: pointer;
}
header .menu-icon img {
height: 2.5em;
padding-top: .25em;
}
2021-02-04 23:40:20 +01:00
/* ---- */
/* Main */
/* ---- */
main {
height: calc(100% - 3em);
overflow: auto;
2021-02-05 13:38:07 +01:00
position: relative;
2021-02-04 23:40:20 +01:00
line-height: 1.5em;
color: rgb(75, 75, 75);
text-rendering: optimizelegibility;
2021-02-05 23:12:58 +01:00
margin-top: .2em;
}
main a {
color: initial;
opacity: .5;
text-decoration: none;
border-bottom: 1px dotted #444;
}
main a:hover {
opacity: .25;
2021-02-04 23:40:20 +01:00
}
main section {
width: 100%;
display: flex;
align-items: center;
2021-02-05 16:20:07 +01:00
flex-wrap: wrap;
2021-02-04 23:40:20 +01:00
}
main section:nth-child(even) {
background: #ecffec;
}
main section .title {
font-size: 1.5em;
font-weight: bold;
padding: 1em 0;
}
2021-02-05 16:20:07 +01:00
@media screen and (max-width: 799px) {
main section .left,
main section .right {
width: calc(100% - 2em);
padding: .5em 1em;
}
2021-02-05 20:18:51 +01:00
main section:nth-child(even) {
flex-direction: column-reverse;
}
2021-02-05 16:20:07 +01:00
}
@media screen and (min-width: 800px) {
main section .left,
main section .right {
width: calc(50% - 2em);
padding: 1em;
}
2021-02-04 23:40:20 +01:00
}
main section img {
width: 100%;
}
2021-02-05 13:38:07 +01:00
2021-02-05 20:18:51 +01:00
/* ********** */
/* Code block */
/* ********** */
.code {
width: 90%;
background: #123;
color: #eee;
font-size: .9em;
font-family: 'Fira Code', monospace;
padding: 1em;
border-radius: .5em;
2021-02-05 23:12:58 +01:00
white-space: pre;
2021-02-06 02:43:43 +01:00
overflow: auto;
2021-02-05 20:18:51 +01:00
}
.code .string {
color: #e47;
}
2021-02-05 23:12:58 +01:00
.code .comment {
color: #999;
}
.code .keyword {
color: #3a5;
}
2021-02-05 13:38:07 +01:00
/* *********** */
/* Mobile menu */
/* *********** */
@media screen and (min-width: 799px) {
#mobile-menu {
display: none !important;
}
}
#mobile-menu {
display: none;
}
#mobile-menu.visible {
width: 10em;
height: calc(100% - .1em);
2021-02-05 16:20:07 +01:00
position: fixed;
top: 2.75em;
2021-02-05 13:38:07 +01:00
right: 0;
display: flex;
flex-direction: column;
background: white;
2021-02-05 16:20:07 +01:00
box-shadow: 0 3px 3px 3px #bbb;
}
#mobile-menu .item {
height: 2.5em;
display: flex;
font-family: 'Poppins', sans-serif;
font-weight: 300;
box-shadow: 2px 2px 1px -1px #bbb;
}
#mobile-menu .item:hover {
background: #d8ffe8;
}
#mobile-menu .item a {
width: calc(100% - 1em);
height: calc(100% - 1em);
padding: .5em;
color: initial;
text-decoration: none;
}
#mobile-menu .item a:hover {
opacity: .6;
2021-02-05 13:38:07 +01:00
}