[UI] Further work into new side panel design

This commit is contained in:
rainydaysavings 2020-07-13 23:51:19 +01:00 committed by Hugo Sales
parent 4eaf272929
commit f8fc226673
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
4 changed files with 277 additions and 200 deletions

View File

@ -1,4 +1,3 @@
/* GENERAL ----------------------------*/
:root {
--head-font: 'Montserrat', sans-serif;
--main-font: 'Open Sans', sans-serif;
@ -7,7 +6,7 @@
--small-size: 0.65em;
--unit-size: 1em;
--side-margin: 5em;
--nav-size: 12em;
--nav-size: 15em;
}
body,
@ -55,8 +54,6 @@ b {
font-weight: 800;
}
/*-------------------------------------*/
/* CONTAINER --------------------------*/
#container {
display: flex;
justify-content: space-between;
@ -83,7 +80,6 @@ b {
align-items: center;
}
/* MENU -------------------------------*/
.icon-menu {
margin: 0;
padding: 0;
@ -95,10 +91,8 @@ b {
fill: currentColor;
}
/*-------------------------------------*/
/* INSTANCE ---------------------------*/
#instance {
order: 2;
order: 1;
}
#instance b {
@ -118,8 +112,10 @@ b {
fill: currentColor;
}
/*-------------------------------------*/
/* SEARCH -----------------------------*/
#left-panel {
order: 2;
}
#search {
order: 3;
}
@ -135,38 +131,42 @@ b {
fill: currentColor;
}
/*-------------------------------------*/
/* LEFT PANEL -------------------------*/
.navbar {
width: var(--nav-size);
height: calc(100vh - (3 * var(--unit-size)));
position: fixed;
background-color: rgba(0, 0, 0, 0.40);
margin-top: calc(2 * var(--medium-size) + var(--main-size));
margin-top: calc(2 * var(--medium-size) + var(--main-size) + 0.15em);
}
.nav-item a {
.navbar {
left: -15em;
top: 0;
transition: 0.3s ease;
}
.navbar a {
display: block;
color: #91B9D0;
margin-left: var(--unit-size);
margin-bottom: var(--small-size);
font-size: var(--medium-size);
}
.nav-item a:hover {
.navbar a:nth-child(1) {
margin-top: var(--unit-size);
}
.navbar a:hover {
color: #F6F6F6;
transition: all 0.8s ease;
}
label {
display: block;
cursor: pointer
}
.navbar {
width: 100%;
display: none;
}
.navbar a {
display: block;
cursor: pointer
}
#toggle {
@ -175,4 +175,49 @@ label {
#toggle:checked+.navbar {
display: block;
left: 0;
top: 0;
transition: 0.3s ease;
}
.profile {
display: flex;
flex-wrap: wrap;
background-color: rgba(0, 0, 0, 0.40);
padding: var(--unit-size);
font-size: var(--small-size);
margin-bottom: var(--unit-size);
vertical-align: middle;
}
.icon-avatar {
order: 1;
height: calc(5 * var(--unit-size));
weight: auto;
width: 25%;
margin-right: var(--small-size);
}
.info {
order: 2;
}
.info #nick {
order: 1;
margin-bottom: var(--small-size);
}
.info .tags {
order: 2;
margin-bottom: var(--small-size);
}
.info .stats {
order: 3;
}
.info .tags i {
color: #91B9D0;
}
.info .tags i:last-child {
margin-left: var(--small-size);
}
.stats span:last-child {
margin-left: var(--small-size);
}

View File

@ -1,13 +1,11 @@
/*-------------------------------------*/
/* PAGES ------------------------------*/
.content {
display: flex;
flex-wrap: wrap;
margin-top: 5em;
margin-top: calc(2 * var(--medium-size) + var(--main-size) + 0.15em);;
justify-content: center;
align-items: center;
margin-left: calc(var(--nav-size) + var(--side-margin));
margin-right: var(--side-margin);
margin-left: calc(var(--nav-size));
margin-right: 0;
box-shadow: 0px 0px 60px -20px rgba(41, 50, 60, 1);
}
@ -28,8 +26,8 @@
align-items: stretch;
justify-content: space-evenly;
width: 100%;
margin-left: calc(var(--side-margin) * 0.25);
margin-right: calc(var(--side-margin) * 0.25);
margin-left: var(--side-margin);
margin-right: var(--side-margin);
padding: 0;
}
@ -56,6 +54,7 @@
.markd {
order: 2;
background-color: #00000040;
font-size: var(--medium-size);
font-size: var(--small-size);
padding: var(--unit-size);
height: 100%;
}

View File

@ -5,7 +5,9 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
{% endblock %}
<title>{% block title %}{% endblock %}</title>
<title>
{% block title %}{% endblock %}
</title>
{% block stylesheets %}
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@800&family=Open+Sans&display=swap" rel="stylesheet">
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/base.css') }}" media="screen and (min-width: 1300px)">
@ -17,66 +19,97 @@
{% block icons %}
<svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<symbol id="icon-attach" viewBox="0 0 32 32">
<symbol id="icon-attach" viewbox="0 0 32 32">
{{ source('@public_path'~asset('assets/icons/attach.svg')) }}
</symbol>
<symbol id="icon-heart" viewBox="0 0 32 32">
<symbol id="icon-heart" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/heart.svg') }}
</symbol>
<symbol id="icon-logo" viewBox="0 0 32 32">
<symbol id="icon-logo" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/logo.svg') }}
</symbol>
<symbol id="icon-drop" viewBox="0 0 32 32">
<symbol id="icon-drop" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/drop.svg') }}
</symbol>
<symbol id="icon-reply" viewBox="0 0 32 32">
<symbol id="icon-reply" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/reply.svg') }}
</symbol>
<symbol id="icon-menu" viewBox="0 0 32 32">
<symbol id="icon-menu" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/menu.svg') }}
</symbol>
<symbol id="icon-recycle" viewBox="0 0 32 32">
<symbol id="icon-recycle" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/recycle.svg') }}
</symbol>
<symbol id="icon-search" viewBox="0 0 32 32">
<symbol id="icon-search" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/search.svg') }}
</symbol>
<symbol id="icon-avatar" viewBox="0 0 32 32">
<symbol id="icon-avatar" viewbox="0 0 32 32">
{{ source('@public_path/assets/icons/avatar.svg') }}
</symbol>
</defs>
</svg>
{% endblock %}
<div class='wrapper'>
<div id='container'>
{% block header %}
<div id='header'>
<div id='top'>
<div>
<div id='left-panel'>
<label for="toggle" id='menu'>
<svg class="icon icon-menu"><use xlink:href="#icon-menu"></use></svg>
<svg class="icon icon-menu">
<use xlink:href="#icon-menu"></use>
</svg>
</label>
<input type="checkbox" id="toggle" class='visually-hidden'>
<input type="checkbox" id="toggle">
<div class='navbar'>
<div class='profile'>
<svg class="icon icon-avatar">
<use xlink:href="#icon-avatar"></use>
</svg>
<div class="info">
<b id="nick">someone</b>
<div class="tags">
<i>coffee addict</i>
<i>lazy</i>
</div>
<div class="stats">
<span>
<b>1337</b>
Followers</span>
<span>
<b>42</b>
Following</span>
</div>
</div>
</div>
<a href='#'>Bookmarks</a>
<a href='#'>Happenings</a>
<a href='#'>Messages</a>
<a href='#'>Replies</a>
<a href='#'>Favourites</a>
<a href='#'>Reverse Favs</a>
<a href='#'>Settings</a>
<a href='#'>Logout</a>
</div>
</div>
<nav id='instance'>
<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>
</a>
</nav>
<svg id='search' class="icon icon-search"><use xlink:href="#icon-search"></use></svg>
<svg id='search' class="icon icon-search">
<use xlink:href="#icon-search"></use>
</svg>
</div>
</div>
{% endblock %}
{% block nav %}{% endblock %}
{% block body %}{% endblock %}
</div>
{% block javascripts %}{% endblock %}
</body>
</html>

View File

@ -5,7 +5,7 @@
{% block header %}{{ parent() }}{% endblock %}
{% block body %}
<div class='content'>
<div class='content' data-status="finished">
<nav class='faq-nav'>
<ul>
<li>