Primo test stilistico vagamente serio
parent
26268329d9
commit
6c36b803e9
@ -1,485 +1,308 @@
|
|||||||
|
/* TODO: Don't use CDN and serve as assets */
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Share:wght@700&family=Ubuntu+Mono&family=Ubuntu:wght@300;700&display=swap');
|
|
||||||
|
|
||||||
/* @import url('https://fonts.googleapis.com/css2?family=Sen&family=Work+Sans:wght@700&display=swap'); */
|
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--font-title: 'Share', cursive;
|
--bg: #f0f0f0;
|
||||||
--font-text: 'Ubuntu', sans-serif;
|
--fg: #333;
|
||||||
--font-mono: 'Ubuntu Mono', monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
/* --bg-dark: #e0e0d6;
|
||||||
body {
|
--bg-darker: #d6d6cc; */
|
||||||
position: relative;
|
|
||||||
|
|
||||||
margin: 0;
|
|
||||||
min-height: 100%;
|
|
||||||
|
|
||||||
width: 100vw;
|
--bg-dark: hsl(220, 5%, 93%);
|
||||||
overflow-x: hidden;
|
--bg-darker: hsl(220, 5%, 90%);
|
||||||
|
|
||||||
font-family: var(--font-text);
|
--accent-1: #278542;
|
||||||
font-weight: 300;
|
--accent-1-fg: #154d24;
|
||||||
font-size: 17px;
|
|
||||||
line-height: 1.25;
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
--font-sf: 'Inter', sans-serif;
|
||||||
background: white;
|
--font-weight-light: 300;
|
||||||
|
--font-weight-normal: 400;
|
||||||
|
--font-weight-medium: 500;
|
||||||
|
--font-weight-bold: 700;
|
||||||
|
|
||||||
height: 100%;
|
--shadow-1: 0 0 16px 0 #00000018;
|
||||||
min-height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
* {
|
||||||
margin: 0 auto;
|
box-sizing: border-box;
|
||||||
padding-bottom: 5rem;
|
|
||||||
|
|
||||||
max-width: 850px;
|
|
||||||
text-align: justify;
|
|
||||||
|
|
||||||
background: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Typography */
|
html, body {
|
||||||
|
|
||||||
h1, h2, h3, h4 {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
width: 100%;
|
||||||
font-family: var(--font-title);
|
height: fit-content;
|
||||||
font-weight: 700;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0.75rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
p:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Elements */
|
|
||||||
|
|
||||||
nav {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
border: 4px solid;
|
|
||||||
border-top: none;
|
|
||||||
|
|
||||||
gap: 2px;
|
|
||||||
/* border-bottom: 1rem solid black; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-item {
|
body {
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
height: 2.5rem;
|
|
||||||
|
|
||||||
padding: 0 0.75rem;
|
background: var(--bg);
|
||||||
margin: -2px;
|
color: var(--fg);
|
||||||
|
|
||||||
font-size: 130%;
|
font-family: var(--font-sf);
|
||||||
font-weight: bold;
|
font-size: 17px;
|
||||||
|
font-weight: var(--font-weight-normal);
|
||||||
|
|
||||||
border: 2px solid black;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-dropdown {
|
.main {
|
||||||
flex-grow: 1;
|
max-width: 70ch;
|
||||||
margin: -2px;
|
margin: 0 auto 8rem;
|
||||||
|
|
||||||
max-width: 100%;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
|
||||||
|
|
||||||
z-index: 1;
|
gap: 3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-dropdown .label {
|
nav {
|
||||||
display: flex;
|
margin: 1rem 0;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
height: 2.5rem;
|
|
||||||
|
|
||||||
padding: 0 0.75rem;
|
|
||||||
|
|
||||||
font-size: 130%;
|
display: grid;
|
||||||
font-weight: bold;
|
grid-template-columns: auto 1fr;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
border: 2px solid black;
|
align-items: center;
|
||||||
}
|
font-weight: var(--font-weight-medium);
|
||||||
|
|
||||||
.nav-dropdown .label .icons8 {
|
color: var(--accent-1-fg);
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
|
|
||||||
margin-left: 0.5rem;
|
z-index: 0;
|
||||||
transform: translate(0, 0.1rem);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-dropdown .dropdown {
|
/* Tutti i link dentro la navbar sono speciali e non sembrano link */
|
||||||
position: absolute;
|
nav a {
|
||||||
|
|
||||||
top: 100%;
|
|
||||||
width: 100%;
|
|
||||||
/* margin-bottom: 0.5rem; */
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
gap: 2px;
|
|
||||||
|
|
||||||
border: 2px solid black;
|
|
||||||
|
|
||||||
background: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown:not(:hover) .dropdown {
|
align-items: center;
|
||||||
display: none;
|
justify-content: center;
|
||||||
}
|
|
||||||
|
|
||||||
nav a {
|
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
color: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
nav a:hover {
|
||||||
border: 4px solid;
|
color: var(--accent-1-fg);
|
||||||
|
text-decoration: none;
|
||||||
padding: 1rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
header {
|
nav .nav-logo {
|
||||||
|
/* height: 3.5rem; */
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
padding: 0.5rem;
|
||||||
margin: 2.5rem 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .logo {
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
margin-right: 1rem;
|
background: var(--bg-dark);
|
||||||
object-fit: contain;
|
border-radius: 4px;
|
||||||
object-position: right;
|
border: 1px solid #dadada;
|
||||||
|
box-shadow: var(--shadow-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
header .title {
|
nav .nav-main {
|
||||||
flex-grow: 1;
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, 1fr) 2fr 1fr;
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
}
|
|
||||||
|
|
||||||
header .title h1 {
|
background: var(--bg-dark);
|
||||||
font-size: 56px;
|
border-radius: 4px;
|
||||||
display: inline-block;
|
border: 1px solid #dadada;
|
||||||
transform: translate(-0.125rem);
|
box-shadow: var(--shadow-1);
|
||||||
}
|
|
||||||
|
|
||||||
.service-list {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
gap: 0.5rem;
|
z-index: -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.service {
|
nav .nav-main a {
|
||||||
flex: 1 1 calc(50% - 1rem);
|
padding: 0.75rem 1rem;
|
||||||
min-width: 300px;
|
|
||||||
|
|
||||||
padding: 1rem 0.75rem;
|
|
||||||
|
|
||||||
/* Brutal */
|
|
||||||
border: 2px solid black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-list {
|
nav .nav-main .nav-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
gap: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.user {
|
|
||||||
display: flex;
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
width: calc(50% - 0.25rem / 2);
|
|
||||||
min-width: 250px;
|
|
||||||
|
|
||||||
align-items: center;
|
background: var(--bg-dark);
|
||||||
justify-content: space-between;
|
|
||||||
|
|
||||||
padding: 0.125rem 0.25rem;
|
user-select: none;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
border: 2px solid black;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user h4 {
|
nav .nav-main .nav-item:hover {
|
||||||
font-size: 90%;
|
background: var(--bg-darker);
|
||||||
line-height: 1;
|
|
||||||
font-family: var(--font-mono);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.user a {
|
nav .nav-main .nav-item:last-child {
|
||||||
text-decoration: none;
|
grid-column: 7 / 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user a:hover img {
|
nav .nav-main .nav-item.dropdown {
|
||||||
opacity: 0.6;
|
position: relative;
|
||||||
}
|
|
||||||
|
|
||||||
.user img {
|
z-index: 1;
|
||||||
margin: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
nav .nav-main .nav-item.dropdown .name {
|
||||||
position: absolute;
|
width: 100%;
|
||||||
bottom: 0;
|
height: 100%;
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
background: black;
|
background: var(--bg-dark);
|
||||||
color: white;
|
|
||||||
|
z-index: 10;
|
||||||
border-bottom: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
footer a, footer a:visited {
|
nav .nav-main .nav-item.dropdown .name:hover {
|
||||||
color: white;
|
background: var(--bg-darker);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-item {
|
nav .nav-main .nav-item.dropdown .nav-items {
|
||||||
padding: 0.5rem;
|
position: absolute;
|
||||||
font-size: 90%;
|
top: 100%;
|
||||||
}
|
width: 100%;
|
||||||
|
|
||||||
.search {
|
display: none;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
max-width: 27rem;
|
|
||||||
margin: 1.5rem auto;
|
|
||||||
|
|
||||||
border: 2px solid black;
|
background: var(--bg-dark);
|
||||||
}
|
border-radius: 4px;
|
||||||
|
border: 1px solid #dadada;
|
||||||
#search-field {
|
box-shadow: var(--shadow-1);
|
||||||
width: 100%;
|
|
||||||
flex-grow: 1;
|
|
||||||
|
|
||||||
height: 1.75rem;
|
|
||||||
padding: 0 0.5rem;
|
|
||||||
|
|
||||||
border: none;
|
|
||||||
border-right: 2px solid black;
|
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
nav .nav-main .nav-item.dropdown .nav-items::before {
|
||||||
|
position: absolute;
|
||||||
|
content: '';
|
||||||
|
top: -2px;
|
||||||
|
height: 2px;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
.search img {
|
background: var(--bg-darker);
|
||||||
display: block;
|
} */
|
||||||
transform: scale(0.8);
|
|
||||||
|
|
||||||
width: 1.75rem;
|
|
||||||
height: 1.75rem;
|
|
||||||
|
|
||||||
cursor: pointer;
|
nav .nav-main .nav-item.dropdown .name:hover + .nav-items, nav .nav-main .nav-item.dropdown .name + .nav-items:hover {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Common */
|
/* .nav-main borders */
|
||||||
|
.nav-main > .nav-item:first-child {
|
||||||
img {
|
border-top-left-radius: 4px;
|
||||||
display: block;
|
border-bottom-left-radius: 4px;
|
||||||
}
|
}
|
||||||
|
.nav-main > .nav-item:last-child {
|
||||||
a, a:visited {
|
border-top-right-radius: 4px;
|
||||||
color: black;
|
border-bottom-right-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
footer {
|
||||||
color: gray;
|
position: absolute;
|
||||||
}
|
bottom: 0;
|
||||||
|
left: 50%;
|
||||||
|
height: 3rem;
|
||||||
|
|
||||||
hr {
|
width: 80ch;
|
||||||
width: 100%;
|
|
||||||
height: 1rem;
|
|
||||||
|
|
||||||
margin: 1rem 0;
|
|
||||||
padding: 0;
|
|
||||||
|
|
||||||
background: black;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
ul {
|
transform: translate(-50%, 0);
|
||||||
list-style: square;
|
|
||||||
}
|
|
||||||
|
|
||||||
li {
|
background: var(--bg-dark);
|
||||||
margin: 0.25rem 0;
|
border-radius: 4px;
|
||||||
}
|
border: 1px solid #dadada;
|
||||||
|
border-bottom: none;
|
||||||
|
box-shadow: var(--shadow-1);
|
||||||
|
|
||||||
form {
|
display: flex;
|
||||||
margin: 3rem auto;
|
align-items: center;
|
||||||
padding: 0.75rem;
|
justify-content: center;
|
||||||
|
|
||||||
max-width: 30rem;
|
border-top-left-radius: 4px;
|
||||||
border: 4px solid black;
|
border-top-right-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form .row {
|
/* Components */
|
||||||
|
|
||||||
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
form .row:not(:last-child) {
|
.card-list {
|
||||||
margin-bottom: 0.5rem;
|
display: flex;
|
||||||
}
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
form label {
|
gap: 1rem;
|
||||||
width: 30%;
|
|
||||||
}
|
|
||||||
|
|
||||||
form input[type=text], form input[type=password] {
|
margin-top: 1rem;
|
||||||
flex-grow: 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
form button, form input[type=submit] {
|
.card {
|
||||||
margin-top: 0.5rem;
|
background: var(--bg-dark);
|
||||||
}
|
border-radius: 4px;
|
||||||
|
border: 1px solid #dadada;
|
||||||
|
box-shadow: var(--shadow-1);
|
||||||
|
|
||||||
input[type=text], input[type=password] {
|
max-width: 60ch;
|
||||||
font-size: 15px;
|
|
||||||
|
|
||||||
padding: 0 0.2rem;
|
padding: 1rem;
|
||||||
height: 1.5rem;
|
|
||||||
|
|
||||||
appearance: none;
|
|
||||||
outline: none;
|
|
||||||
|
|
||||||
border: 2px solid black;
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=text]:focus, input[type=password]:focus {
|
.card .title {
|
||||||
background: #e0e0e0;
|
font-size: 22px;
|
||||||
|
font-weight: var(--font-weight-bold);
|
||||||
}
|
}
|
||||||
|
|
||||||
button, input[type=submit] {
|
.card .date {
|
||||||
outline: none;
|
font-size: 15px;
|
||||||
|
color: #666;
|
||||||
font-size: 17px;
|
|
||||||
font-family: var(--font-title);
|
|
||||||
|
|
||||||
padding: 0 4rem;
|
|
||||||
height: 1.6rem;
|
|
||||||
|
|
||||||
background: black;
|
|
||||||
color: white;
|
|
||||||
|
|
||||||
border: none;
|
|
||||||
/* border: 2px solid black; */
|
|
||||||
|
|
||||||
cursor: pointer;
|
margin-bottom: 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
button:hover, input[type=submit]:hover {
|
.card .description {
|
||||||
background: #444;
|
font-weight: var(--font-weight-light);
|
||||||
|
color: #222;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Utils */
|
/* Typography */
|
||||||
|
|
||||||
.icons8 {
|
|
||||||
width: 25px;
|
|
||||||
height: 25px;
|
|
||||||
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 .icons8 {
|
h1, h2, h3, h4 {
|
||||||
transform: translateY(-0.125rem);
|
margin: 0;
|
||||||
}
|
margin-top: 1rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
|
||||||
.hfill {
|
font-weight: var(--font-weight-light);
|
||||||
/* min-height: 0.5rem; */
|
|
||||||
flex-grow: 1000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 850px) {
|
p {
|
||||||
section, nav {
|
margin: 0.5rem 0;
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 30rem) {
|
/* Controls */
|
||||||
form {
|
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Large screen */
|
a {
|
||||||
@media screen and (min-width: 421px) {
|
color: var(--accent-1-fg);
|
||||||
.nav-dropdown .dropdown {
|
text-decoration: none;
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile screen */
|
a:hover {
|
||||||
@media screen and (max-width: 420px) and (orientation: portrait) {
|
color: var(--accent-1);
|
||||||
nav {
|
text-decoration: underline;
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown:hover {
|
|
||||||
padding: 0 0.25rem 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown, .nav-dropdown .nav-item {
|
|
||||||
margin: -2px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-item, .nav-dropdown .label {
|
|
||||||
max-width: 100%;
|
|
||||||
|
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nav-dropdown .dropdown {
|
|
||||||
position: relative;
|
|
||||||
|
|
||||||
border: 4px solid black;
|
|
||||||
border-top-width: 2px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue