[UI] Basic implementation of the new base design

This commit is contained in:
rainydaysavings 2020-07-12 23:32:24 +01:00 committed by Hugo Sales
parent 115257f3bb
commit 4eaf272929
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 124 additions and 213 deletions

View File

@ -6,7 +6,8 @@
--medium-size: 0.8em; --medium-size: 0.8em;
--small-size: 0.65em; --small-size: 0.65em;
--unit-size: 1em; --unit-size: 1em;
--side-margin: 20%; --side-margin: 5em;
--nav-size: 12em;
} }
body, body,
@ -29,55 +30,28 @@ ul {
list-style: none; list-style: none;
} }
.drop-down ul li { li {
position: relative; margin: 0;
z-index: 2; padding: 0;
}
.drop-down ul li ul a {
line-height: 0.8em;
}
.drop-down ul li ul {
display: none;
position: absolute;
background-color: #F6F6F6;
padding: 0.4em 0.8em 0.8em 0.8em;
border-radius: 0.5em;
color: #29323c;
}
.drop-down ul li:hover ul {
display: block;
}
.drop-down ul li ul a:hover {
color: rgb(0, 0, 0);
transition: all 0.8s ease;
}
#hover-effect:hover {
color: #F6F6F6;
transition: all 0.8s ease;
} }
a:link { a:link {
text-decoration: none; text-decoration: none;
outline: 0; outline: 0;
color: #F6F6F6; color: #F6F6F6;
margin: 0;
padding: 0;
} }
a:visited { a:visited {
outline: 0; outline: 0;
color: #F6F6F6; color: #F6F6F6;
} margin: 0;
padding: 0;
ul li ul a {
font-size: var(--small-size);
} }
b { b {
font-family: 'Montserrat', sans-serif; font-family: var(--head-font);
font-weight: 800; font-weight: 800;
} }
@ -92,31 +66,28 @@ b {
/*-------------------------------------*/ /*-------------------------------------*/
/* HEADER -----------------------------*/ /* HEADER -----------------------------*/
#header { #header {
display: flex; position: fixed;
justify-content: space-between; top: 0;
flex-wrap: wrap; left: 0;
order: 1; right: 0;
width: 100%; background-color: #272E36;
margin-left: var(--side-margin);
margin-right: var(--side-margin);
background-color: rgba(0, 0, 0, 0.40);
box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1); box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1);
padding: var(--medium-size) var(--unit-size) var(--medium-size) var(--unit-size);
} }
#top { #top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
vertical-align: top;
flex-wrap: wrap; flex-wrap: wrap;
order: 1;
width: 100%; width: 100%;
padding: var(--unit-size) var(--unit-size) var(--small-size) var(--unit-size); align-items: center;
} }
/* MENU -------------------------------*/ /* MENU -------------------------------*/
.icon-menu { .icon-menu {
margin: 0;
padding: 0;
display: inline-block; display: inline-block;
vertical-align: top;
width: var(--unit-size); width: var(--unit-size);
height: var(--unit-size); height: var(--unit-size);
stroke-width: 0; stroke-width: 0;
@ -137,8 +108,9 @@ b {
} }
.icon-logo { .icon-logo {
margin: 0;
padding: 0;
display: inline-block; display: inline-block;
vertical-align: top;
width: var(--unit-size); width: var(--unit-size);
height: var(--unit-size); height: var(--unit-size);
stroke-width: 0; stroke-width: 0;
@ -153,8 +125,9 @@ b {
} }
.icon-search { .icon-search {
margin: 0;
padding: 0;
display: inline-block; display: inline-block;
vertical-align: top;
width: var(--unit-size); width: var(--unit-size);
height: var(--unit-size); height: var(--unit-size);
stroke-width: 0; stroke-width: 0;
@ -162,64 +135,44 @@ b {
fill: currentColor; fill: currentColor;
} }
/*-------------------------------------*/
/* PROFILE ----------------------------*/ .navbar {
#cover { width: var(--nav-size);
display: flex; height: calc(100vh - (3 * var(--unit-size)));
justify-content: start; position: fixed;
align-items: center; background-color: rgba(0, 0, 0, 0.40);
order: 3; margin-top: calc(2 * var(--medium-size) + var(--main-size));
width: 100%;
} }
#cover-img { .nav-item a {
width: 100%;
height: auto;
}
#avatar {
z-index: 1;
position: absolute;
width: 4em;
height: 4em;
margin-left: var(--unit-size);
}
#profile {
display: flex;
flex-wrap: wrap;
justify-content: flex-start;
width: 100%;
padding: var(--medium-size) var(--medium-size);
order: 4;
font-size: var(--medium-size);
align-items: center;
}
#info {
order: 1;
display: flex;
justify-content: flex-start;
}
#tags {
color: #91B9D0; color: #91B9D0;
}
#tags i {
margin-left: var(--small-size);
}
#stats {
margin-left: auto;
order: 2;
display: flex;
justify-content: flex-end;
}
#stats b:last-child {
margin-left: var(--unit-size); margin-left: var(--unit-size);
font-size: var(--medium-size);
} }
/*-------------------------------------*/ .nav-item a:hover {
color: #F6F6F6;
transition: all 0.8s ease;
}
label {
display: block;
cursor: pointer
}
.navbar {
width: 100%;
display: none;
}
.navbar a {
display: block;
}
#toggle {
display: none;
}
#toggle:checked+.navbar {
display: block;
}

View File

@ -1,18 +1,26 @@
/*-------------------------------------*/ /*-------------------------------------*/
/* PAGES ------------------------------*/ /* PAGES ------------------------------*/
.content {
display: flex;
flex-wrap: wrap;
margin-top: 5em;
justify-content: center;
align-items: center;
margin-left: calc(var(--nav-size) + var(--side-margin));
margin-right: var(--side-margin);
box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1);
}
.faq-nav { .faq-nav {
order: 1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
order: 2;
width: 100%; width: 100%;
margin-left: var(--side-margin);
margin-right: var(--side-margin);
background-color: #00000080; background-color: #00000080;
padding: var(--medium-size) var(--medium-size); padding: var(--medium-size) var(--medium-size);
font-size: var(--medium-size); font-size: var(--medium-size);
font-family: var(--head-font); font-family: var(--head-font);
box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1);
} }
.faq-nav ul { .faq-nav ul {
@ -43,28 +51,11 @@
.faq-nav a:hover { .faq-nav a:hover {
color: #F6F6F6; color: #F6F6F6;
transition: all 0.8s ease; transition: all 0.8s ease;
} }
/*-------------------------------------*/ .markd {
/*-------------------------------------*/ order: 2;
/* CONTENT ----------------------------*/ background-color: #00000040;
.content { font-size: var(--medium-size);
order: 3; padding: var(--unit-size);
width: 100%;
margin-top: var(--unit-size);
margin-bottom: var(--unit-size);
margin-left: var(--side-margin);
margin-right: var(--side-margin);
background-color: rgba(0, 0, 0, 0.40);
padding: 0 var(--unit-size) var(--unit-size) var(--unit-size);
border-radius: var(--unit-size);
font-size: var(--small-size);
box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1);
}
.content ul {
margin: 0;
padding-left: calc(var(--unit-size) * 2);
list-style: disc;
} }

View File

@ -52,57 +52,24 @@
{% block header %} {% block header %}
<div id='header'> <div id='header'>
<div id='top'> <div id='top'>
<nav class='drop-down' id='menu'> <div>
<ul> <label for="toggle" id='menu'>
<li>
<a href="#" class='hover-effect'>
<svg class="icon icon-menu"><use xlink:href="#icon-menu"></use></svg> <svg class="icon icon-menu"><use xlink:href="#icon-menu"></use></svg>
</a> </label>
<ul> <input type="checkbox" id="toggle" class='visually-hidden'>
<li><a>Main Page</a></li> <div class='navbar'>
<li><a>Social</a></li> <a href='#'>Bookmarks</a>
<li><a>Bookmarks</a></li> <a href='#'>Happenings</a>
<li><a>Messages</a></li> <a href='#'>Messages</a>
<li><a>Settings</a></li> </div>
<li><a>Logout</a></li> </div>
</ul>
</li>
</ul>
</nav>
<nav id='instance'> <nav id='instance'>
<a href="#" class='hover-effect'> <a href="#">
<svg class="icon icon-logo"><use xlink:href="#icon-logo"></use></svg> <svg class="icon icon-logo"><use xlink:href="#icon-logo"></use></svg>
<b>GNU social</b> <b>GNU social</b>
</a> </a>
</nav> </nav>
<div id='search'> <svg id='search' class="icon icon-search"><use xlink:href="#icon-search"></use></svg>
<svg class="icon icon-search"><use xlink:href="#icon-search"></use></svg>
</div>
</div>
<div id='cover'>
<img id="cover-img" src="{{ asset('assets/bitmap.png') }}">
<svg id="avatar"><use xlink:href="#icon-avatar"></use></svg>
</div>
<div id='profile'>
<div id='info'>
<div id='nick'>
<b id='name'>someone</b>
</div>
<div id='tags'>
<i>coffee addict</i>
<i>lazy</i>
</div>
</div>
<div id='stats'>
<div id='followers'>
<b>1337</b> Followers
</div>
<div id='following'>
<b>42</b> Following
</div>
</div>
</div> </div>
</div> </div>
{% endblock %} {% endblock %}

View File

@ -4,7 +4,8 @@
{% block header %}{{ parent() }}{% endblock %} {% block header %}{{ parent() }}{% endblock %}
{% block nav %} {% block body %}
<div class='content'>
<nav class='faq-nav'> <nav class='faq-nav'>
<ul> <ul>
<li> <li>
@ -24,9 +25,7 @@
</li> </li>
</ul> </ul>
</nav> </nav>
{% endblock %} <div class='markd'>
{% block body %}
<div class="content">
{% block markdown %} {% block markdown %}
{% apply markdown_to_html %} {% apply markdown_to_html %}
## What is this site? ## What is this site?
@ -47,4 +46,5 @@
{% endapply %} {% endapply %}
{% endblock %} {% endblock %}
</div> </div>
</div>
{% endblock %} {% endblock %}