[UI] Complete base CSS overhaul and new theme

This commit is contained in:
rainydaysavings 2020-08-13 23:32:41 +01:00 committed by Hugo Sales
parent 565140adcf
commit 915f1dfcdb
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 230 additions and 98 deletions

View File

@ -1,23 +1,34 @@
:root { :root {
/* fonts */
--head-font: 'Montserrat', sans-serif; --head-font: 'Montserrat', sans-serif;
--main-font: 'Open Sans', sans-serif; --main-font: 'Open Sans', sans-serif;
/* font and margin sizes */
--main-size: 1.25em; --main-size: 1.25em;
--medium-size: 0.8em; --medium-size: 0.8em;
--small-size: 0.65em; --small-size: 0.65em;
--unit-size: 1em; --unit-size: 1em;
--side-margin: 2em; --side-margin: 2em;
--nav-size: 15em; --nav-size: 14em;
/* colours and shadows */
--fg: #eceff4;
--accent: #81a1c1;
--bg1: #2e3440;
--bg2: #3b4252;
--bg3: #4c566a;
--bg4: #2e344075;
--bg5: #2e344090;
--shadow: 0px 0px 90px 0px rgba(46,52,64,0.95);
} }
/* DEFAULTS */
body, body,
html { html {
background: #2E3945; background: var(--bg3);
background: -moz-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: -webkit-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
color: #F6F6F6; color: var(--fg);
font-family: var(--main-font); font-family: var(--main-font);
font-size: var(--main-size); font-size: var(--main-size);
margin: 0; margin: 0;
@ -39,20 +50,20 @@ li {
a:link { a:link {
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
} }
a:visited { a:visited {
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:hover { a:hover {
color: #F6F6F6; color: var(--fg);
transition: all 0.8s ease; transition: all 0.8s ease;
} }
a:focus { a:focus {
color: #F6F6F6; color: var(--fg);
transition: all 0.8s ease; transition: all 0.8s ease;
} }
@ -61,21 +72,14 @@ b {
font-weight: 800; font-weight: 800;
} }
#container { /* HEADER */
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
/*-------------------------------------*/
/* HEADER -----------------------------*/
#header { #header {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
background-color: #272E36; background-color: var(--bg1);
box-shadow: 0px 0px 60px -20px rgba(0, 0, 0, 0.75); box-shadow: var(--shadow);
padding: var(--main-size); padding: var(--main-size);
height: var(--main-size); height: var(--main-size);
} }
@ -126,27 +130,22 @@ b {
order: 2; order: 2;
} }
#search { /* left panel z-index fix */
order: 3; .form {
width: var(--unit-size); position: relative;
height: var(--unit-size); z-index: 0;
} }
#header {
.icon-search { z-index: 1;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
align-self: center;
} }
/* RIGHT PANEL */ /* RIGHT PANEL */
#right-panel { #right-panel {
order: 4; order: 3;
} }
.arrow { .arrow {
border: solid white; border: solid var(--fg);
border-width: 0 3px 3px 0; border-width: 0 3px 3px 0;
display: inline-block; display: inline-block;
padding: 0.3em; padding: 0.3em;
@ -162,8 +161,9 @@ b {
width: var(--nav-size); width: var(--nav-size);
height: calc(100vh - (3 * var(--unit-size))); height: calc(100vh - (3 * var(--unit-size)));
position: fixed; position: fixed;
background-color: rgba(0, 0, 0, 0.40); background-color: var(--bg2);
margin-top: calc(3 * var(--main-size)); margin-top: calc(3 * var(--main-size));
z-index: 0;
} }
.right-panel input[type=checkbox] { .right-panel input[type=checkbox] {
@ -181,7 +181,7 @@ b {
} }
.arrow label { .arrow label {
display: block; display: block;
cursor: pointer cursor: pointer;
} }
#toggle-right { #toggle-right {
position: absolute; position: absolute;

View File

@ -1,23 +1,34 @@
:root { :root {
/* fonts */
--head-font: 'Montserrat', sans-serif; --head-font: 'Montserrat', sans-serif;
--main-font: 'Open Sans', sans-serif; --main-font: 'Open Sans', sans-serif;
/* font and margin sizes */
--main-size: 1.2em; --main-size: 1.2em;
--medium-size: 0.85em; --medium-size: 0.85em;
--small-size: 0.65em; --small-size: 0.65em;
--unit-size: 1em; --unit-size: 1em;
--side-margin: 5em; --side-margin: 5em;
--nav-size: 15em; --nav-size: 15em;
/* colours and shadows */
--fg: #eceff4;
--accent: #81a1c1;
--bg1: #2e3440;
--bg2: #3b4252;
--bg3: #4c566a;
--bg4: #2e344075;
--bg5: #2e344090;
--shadow: 0px 0px 90px 0px rgba(46,52,64,0.95);
} }
/* DEFAULTS */
body, body,
html { html {
background: #2E3945; background: var(--bg3);
background: -moz-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: -webkit-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
color: #F6F6F6; color: var(--fg);
font-family: var(--main-font); font-family: var(--main-font);
font-size: var(--main-size); font-size: var(--main-size);
margin: 0; margin: 0;
@ -39,18 +50,22 @@ li {
a:link { a:link {
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:visited { a:visited {
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:hover {
color: var(--fg);
transition: all 0.8s ease;
}
a:focus { a:focus {
color: #F6F6F6; color: var(--fg);
transition: all 0.8s ease; transition: all 0.8s ease;
} }
@ -59,15 +74,14 @@ b {
font-weight: 800; font-weight: 800;
} }
/*-------------------------------------*/ /* HEADER */
/* HEADER -----------------------------*/
#header { #header {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
background-color: #272E36; background-color: var(--bg1);
box-shadow: 0px 0px 60px -20px rgba(0, 0, 0, 0.75); box-shadow: var(--shadow);
padding: var(--main-size); padding: var(--main-size);
height: var(--main-size); height: var(--main-size);
} }
@ -92,7 +106,7 @@ b {
.icon-menu label { .icon-menu label {
width: var(--unit-size); width: var(--unit-size);
height: 2px; height: 2px;
background: #F6F6F6; background: var(--fg);
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
} }
.icon-menu label::before, .icon-menu label::before,
@ -101,7 +115,7 @@ b {
position: absolute; position: absolute;
width: var(--unit-size); width: var(--unit-size);
height: 2px; height: 2px;
background: #F6F6F6; background: var(--fg);
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
} }
.icon-menu label::before { .icon-menu label::before {
@ -147,22 +161,6 @@ b {
order: 1; order: 1;
} }
#search {
order: 3;
}
.icon-search {
margin: 0;
padding: 0;
display: inline-block;
width: var(--unit-size);
height: var(--unit-size);
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
align-self: center;
}
/* left panel z-index fix */ /* left panel z-index fix */
.form { .form {
position: relative; position: relative;
@ -170,4 +168,71 @@ b {
} }
#header { #header {
z-index: 1; z-index: 1;
}
/* RIGHT PANEL */
#right-panel {
order: 3;
}
.arrow {
border: solid var(--fg);
border-width: 0 3px 3px 0;
display: inline-block;
padding: 0.3em;
}
.right {
transform: rotate(135deg);
-webkit-transform: rotate(135deg);
}
.rss {
display: flex;
flex-direction: column;
width: var(--nav-size);
height: calc(100vh - (3 * var(--unit-size)));
position: fixed;
background-color: var(--bg3);
margin-top: calc(3 * var(--main-size));
}
.right-panel input[type=checkbox] {
transform: scale(3);
-ms-transform: scale(3);
-webkit-transform: scale(3);
padding: 3em;
}
/* untoggled */
.rss {
right: -100%;
top: 0;
transition: 0.3s ease;
}
.arrow label {
display: block;
cursor: pointer
}
#toggle-right {
position: absolute;
z-index: 2;
cursor: pointer;
opacity: 0;
}
#toggle-right:not(:checked)+.arrow {
transform: rotate(135deg);
transition: 0.3s ease;
}
/* toggled */
#toggle-right:checked~.rss {
display: flex;
right: 0;
top: 0;
transition: 0.3s ease;
}
#toggle-right:checked+.arrow {
transform: rotate(-45deg);
transition: 0.3s ease;
} }

View File

@ -1,23 +1,34 @@
:root { :root {
/* fonts */
--head-font: 'Montserrat', sans-serif; --head-font: 'Montserrat', sans-serif;
--main-font: 'Open Sans', sans-serif; --main-font: 'Open Sans', sans-serif;
/* font and margin sizes */
--main-size: 1.2em; --main-size: 1.2em;
--medium-size: 0.85em; --medium-size: 0.85em;
--small-size: 0.65em; --small-size: 0.65em;
--unit-size: 1em; --unit-size: 1em;
--side-margin: 2em; --side-margin: 2em;
--nav-size: 100%; --nav-size: 100%;
/* colours and shadows */
--fg: #eceff4;
--accent: #81a1c1;
--bg1: #2e3440;
--bg2: #3b4252;
--bg3: #4c566a;
--bg4: #2e344075;
--bg5: #2e344090;
--shadow: 0px 0px 90px 0px rgba(46,52,64,0.95);
} }
/* DEFAULTS */
body, body,
html { html {
background: #2E3945; background: var(--bg3);
background: -moz-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: -webkit-linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background: linear-gradient(80deg, #2E3945 0%, #61778C 100%);
background-attachment: fixed; background-attachment: fixed;
background-size: cover; background-size: cover;
color: #F6F6F6; color: var(--fg);
font-family: var(--main-font); font-family: var(--main-font);
font-size: var(--main-size); font-size: var(--main-size);
margin: 0; margin: 0;
@ -39,18 +50,22 @@ li {
a:link { a:link {
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:visited { a:visited {
outline: 0; outline: 0;
color: #F6F6F6; color: var(--fg);
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
a:hover {
color: var(--fg);
transition: all 0.8s ease;
}
a:focus { a:focus {
color: #F6F6F6; color: var(--fg);
transition: all 0.8s ease; transition: all 0.8s ease;
} }
@ -59,15 +74,14 @@ b {
font-weight: 800; font-weight: 800;
} }
/*-------------------------------------*/ /* HEADER */
/* HEADER -----------------------------*/
#header { #header {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
background-color: #272E36; background-color: var(--bg1);
box-shadow: 0px 0px 60px -20px rgba(0, 0, 0, 0.75); box-shadow: var(--shadow);
padding: var(--main-size); padding: var(--main-size);
height: var(--main-size); height: var(--main-size);
} }
@ -75,20 +89,24 @@ b {
#top { #top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
width: 100%; width: 100%;
align-items: center;
} }
.icon-menu { .icon-menu {
position: relative; position: relative;
display: flex;
align-items: center;
width: var(--unit-size); width: var(--unit-size);
height: var(--unit-size); height: var(--unit-size);
cursor: pointer;
transition: all .5s ease-in-out;
} }
.icon-menu label { .icon-menu label {
width: var(--unit-size); width: var(--unit-size);
height: 2px; height: 2px;
background: #F6F6F6; background: var(--fg);
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
} }
.icon-menu label::before, .icon-menu label::before,
@ -97,7 +115,7 @@ b {
position: absolute; position: absolute;
width: var(--unit-size); width: var(--unit-size);
height: 2px; height: 2px;
background: #F6F6F6; background: var(--fg);
transition: all .5s ease-in-out; transition: all .5s ease-in-out;
} }
.icon-menu label::before { .icon-menu label::before {
@ -143,21 +161,6 @@ b {
order: 1; order: 1;
} }
#search {
order: 3;
}
.icon-search {
margin: 0;
padding: 0;
display: inline-block;
width: var(--unit-size);
height: var(--unit-size);
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
/* left panel z-index fix */ /* left panel z-index fix */
.form { .form {
position: relative; position: relative;
@ -165,4 +168,71 @@ b {
} }
#header { #header {
z-index: 1; z-index: 1;
}
/* RIGHT PANEL */
#right-panel {
order: 3;
}
.arrow {
border: solid var(--fg);
border-width: 0 3px 3px 0;
display: inline-block;
padding: 0.3em;
}
.right {
transform: rotate(135deg);
-webkit-transform: rotate(135deg);
}
.rss {
display: flex;
flex-direction: column;
width: var(--nav-size);
height: calc(100vh - (3 * var(--unit-size)));
position: fixed;
background-color: var(--bg1);
margin-top: calc(3 * var(--main-size));
}
.right-panel input[type=checkbox] {
transform: scale(3);
-ms-transform: scale(3);
-webkit-transform: scale(3);
padding: 3em;
}
/* untoggled */
.rss {
right: -100%;
top: 0;
transition: 0.3s ease;
}
.arrow label {
display: block;
cursor: pointer
}
#toggle-right {
position: absolute;
z-index: 2;
cursor: pointer;
opacity: 0;
}
#toggle-right:not(:checked)+.arrow {
transform: rotate(135deg);
transition: 0.3s ease;
}
/* toggled */
#toggle-right:checked~.rss {
display: flex;
right: 0;
top: 0;
transition: 0.3s ease;
}
#toggle-right:checked+.arrow {
transform: rotate(-45deg);
transition: 0.3s ease;
} }

View File

@ -63,9 +63,6 @@
</svg><b>GNU social</b> </svg><b>GNU social</b>
</a> </a>
</nav> </nav>
<svg id='search' class="icon icon-search">
<use xlink:href="#icon-search"></use>
</svg>
<div id="right-panel"> <div id="right-panel">
<input type="checkbox" id="toggle-right" autofocus> <input type="checkbox" id="toggle-right" autofocus>
<div class="arrow right"> <div class="arrow right">