[CSS][TWIG] Timeline navigation is now a part of the left panel, this way more items could be displayed at a time. Left panel styling WIP.

Signed-off-by: Eliseu Amaro <mail@eliseuama.ro>
This commit is contained in:
Eliseu Amaro 2021-07-23 19:28:11 +01:00 committed by Hugo Sales
parent 22f394f28f
commit e5649d82ba
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
5 changed files with 205 additions and 168 deletions

View File

@ -69,6 +69,7 @@ p {
font-weight: 400; font-weight: 400;
letter-spacing: -0.30px; letter-spacing: -0.30px;
word-spacing: -0.10px; word-spacing: -0.10px;
margin-bottom: var(--small-size) !important;
text-transform: none; text-transform: none;
} }
@ -101,16 +102,16 @@ a:visited {
a:focus, a:focus,
a:hover { a:hover {
border-radius: var(--unit-size); border-radius: var(--unit-size);
padding: 0 var(--unit-size) 0 var(--unit-size); padding: var(--unit-size) var(--small-size) var(--unit-size) var(--small-size);
background: var(--white); background: var(--white) !important;
color: var(--bg1) !important; color: var(--bg1) !important;
transition: all 0.8s ease; transition: all 0.4s ease;
} }
#instance a:focus svg, #instance a:focus svg,
#instance a:hover svg { #instance a:hover svg {
fill: var(--bg1); fill: var(--bg1);
transition: all 0.8s ease; transition: all 0.4s ease;
} }
summary:hover > *, summary:hover > *,
@ -118,16 +119,14 @@ summary:focus > * {
border-radius: var(--unit-size); border-radius: var(--unit-size);
background: var(--white); background: var(--white);
fill: var(--bg1); fill: var(--bg1);
transition: all 0.8s ease; transition: all 0.4s ease;
} }
hr { hr {
all: unset; all: unset;
display: block; display: block;
height: 1px; height: 2px;
background-image: linear-gradient(var(--bg1), var(--bg2)); background-image: linear-gradient(to right, var(--bg1), transparent 90%);
margin-top: var(--unit-size);
margin-bottom: var(--main-size);
} }
/* DEFAULTS */ /* DEFAULTS */
@ -195,48 +194,26 @@ html {
/* THE FOCUSED (middle) DIV */ /* THE FOCUSED (middle) DIV */
.content { .content {
margin: var(--main-size);
margin-left: calc(2 * var(--main-size));
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: calc(3 * (100%/5)); width: calc(3 * (100% / 5));
}
/* NAVIGATION */
.navigation {
display: flex;
flex-direction: column;
width: 100%;
text-align: center;
}
.navigation nav {
padding: var(--small-size);
}
.navigation a {
font-family: var(--display-font);
font-size: var(--main-size);
color: var(--accent-blue);
}
.active {
color: var(--white) !important;
}
.main-nav {
background: radial-gradient(ellipse at 50% 100%, var(--bg1), transparent 30%);
}
.sec-nav {
background: radial-gradient(ellipse at 50% 100%, var(--bg1), transparent 50%);
}
.sec-nav ul {
display: flex;
justify-content: space-around;
}
.sec-nav a {
font-size: var(--medium-size);
} }
/* NOTES */ /* NOTES */
.h-feed,
.notes { .notes {
margin-top: var(--main-size); margin-top: var(--main-size);
} }
.h-feed,
.notes hr {
margin-top: var(--unit-size);
margin-bottom: var(--main-size);
}
.h-entry,
.note { .note {
background-image: radial-gradient(ellipse at 10% 10%, var(--bg3), var(--accent-blue)), background-image: radial-gradient(ellipse at 10% 10%, var(--bg3), var(--accent-blue)),
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAACUkpSEhoSMioyMjoyEgoRr6djFAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAU1JREFUKJEVUcl1xTAIpAVLSgECXIAYUoCAX0Bi919LlCPLm5ValiOUUe2+ZRVFuYpKXFsUX9aIp0V6GtC8VRhNL0X2fikvswhKrNDhes7pbpPkufFAtI0B76LEjfc2bgdHDk6RX4A/sjt6LCylfoYpNYYJx/9COhIugsjluzN9VGZ/Hnl51jIH2ba+Ywsy2RJCFdoDe8Obw61TXGAv+ewExMRJs7gd7YcimPuk42uMqY2VJ1fK+bDL32rb7kwok/la/u7Mrz7Xf0DTssSP2Btp1ZS0zw35tM/SsJKgWNLcRh+/th1QqntwtM3Tx0LNosoBYbM3qjJFiMeLsMH2i5BcQdU3n9sJHOE1Hoqn1GA/bm4s0YkVB/y4r0PbltF32FpljXmdlOOwbDvFWkoDYLppSG4pnM6UxX3Src1lhXeU36FOu3o+R2vNaHME/wESUl9/3zMniwAAAABJRU5ErkJggg==); url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAACUkpSEhoSMioyMjoyEgoRr6djFAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAU1JREFUKJEVUcl1xTAIpAVLSgECXIAYUoCAX0Bi919LlCPLm5ValiOUUe2+ZRVFuYpKXFsUX9aIp0V6GtC8VRhNL0X2fikvswhKrNDhes7pbpPkufFAtI0B76LEjfc2bgdHDk6RX4A/sjt6LCylfoYpNYYJx/9COhIugsjluzN9VGZ/Hnl51jIH2ba+Ywsy2RJCFdoDe8Obw61TXGAv+ewExMRJs7gd7YcimPuk42uMqY2VJ1fK+bDL32rb7kwok/la/u7Mrz7Xf0DTssSP2Btp1ZS0zw35tM/SsJKgWNLcRh+/th1QqntwtM3Tx0LNosoBYbM3qjJFiMeLsMH2i5BcQdU3n9sJHOE1Hoqn1GA/bm4s0YkVB/y4r0PbltF32FpljXmdlOOwbDvFWkoDYLppSG4pnM6UxX3Src1lhXeU36FOu3o+R2vNaHME/wESUl9/3zMniwAAAABJRU5ErkJggg==);
@ -296,12 +273,8 @@ figcaption a:link {
} }
/* ANIMATIONS */ /* ANIMATIONS */
.content {
animation: fadeIn 200ms cubic-bezier(0, 0.55, 0.45, 1);
}
details[open] > div { details[open] > div {
animation: fadeIn 200ms cubic-bezier(0, 0.55, 0.45, 1); animation: fadeIn 300ms cubic-bezier(0, 0.55, 0.45, 1);
} }
@keyframes fadeIn { @keyframes fadeIn {

View File

@ -17,6 +17,11 @@
height: auto; height: auto;
} }
#left-container[open] {
height: calc(100vh - (3 * var(--small-size) + var(--main-size)));
width: calc(100vw / 5);
}
#left-container[open] > div { #left-container[open] > div {
opacity: 100%; opacity: 100%;
} }
@ -25,17 +30,72 @@
tab-index: 0; tab-index: 0;
} }
#left-container[open] { #left-panel {
width: calc(100vw / 4);
border-right: solid 1px var(--bg2);
margin-right: var(--main-size);
}
#left-container[open] > #left-panel {
position: fixed; position: fixed;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
font-size: var(--main-size);
width: 100%; width: inherit;
height: inherit;
padding: var(--small-size); padding: var(--small-size);
box-sizing: border-box;
}
/* PROFILE */
.profile-nav {
font-family: var(--display-font);
}
.profile {
width: 100%;
margin-bottom: var(--main-size);
background-image: radial-gradient(ellipse at 10% 10%, var(--bg3), var(--accent-blue)),
url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAElBMVEUAAACUkpSEhoSMioyMjoyEgoRr6djFAAAAAXRSTlMAQObYZgAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAU1JREFUKJEVUcl1xTAIpAVLSgECXIAYUoCAX0Bi919LlCPLm5ValiOUUe2+ZRVFuYpKXFsUX9aIp0V6GtC8VRhNL0X2fikvswhKrNDhes7pbpPkufFAtI0B76LEjfc2bgdHDk6RX4A/sjt6LCylfoYpNYYJx/9COhIugsjluzN9VGZ/Hnl51jIH2ba+Ywsy2RJCFdoDe8Obw61TXGAv+ewExMRJs7gd7YcimPuk42uMqY2VJ1fK+bDL32rb7kwok/la/u7Mrz7Xf0DTssSP2Btp1ZS0zw35tM/SsJKgWNLcRh+/th1QqntwtM3Tx0LNosoBYbM3qjJFiMeLsMH2i5BcQdU3n9sJHOE1Hoqn1GA/bm4s0YkVB/y4r0PbltF32FpljXmdlOOwbDvFWkoDYLppSG4pnM6UxX3Src1lhXeU36FOu3o+R2vNaHME/wESUl9/3zMniwAAAABJRU5ErkJggg==);
background-blend-mode: multiply;
border-radius: var(--unit-size);
padding: var(--unit-size);
box-sizing: border-box;
}
.profile a:focus,
.profile a:hover {
all: unset;
color: var(--white) !important;
}
.footer {
font-size: var(--small-size);
margin-top: auto;
}
/* TIMELINE NAVIGATION / PLUGINS */
.timeline-nav {
margin-top: var(--main-size);
display: flex;
flex-direction: column;
}
.timeline-nav a {
color: var(--white);
}
.timeline-nav .active {
color: var(--white);
}
.main-nav ul {
display: flex;
flex-direction: column;
}
.sec-nav a {
font-size: var(--medium-size);
}
.sec-nav ul {
display: flex;
flex-direction: column;
} }

View File

@ -17,27 +17,29 @@
} }
#right-container[open] { #right-container[open] {
width: calc(100vw / 4); width: calc(100vw / 5);
border-left: solid 1px var(--bg2);
margin-left: var(--main-size);
} }
#right-panel { #right-panel {
position: fixed; font-size: var(--main-size);
display: flex; width: inherit;
flex-direction: column; height: inherit;
padding: var(--small-size);
box-sizing: border-box;
}
width: 100%; .create-notice {
border-radius: var(--unit-size);
padding: var(--small-size); padding: var(--small-size);
} }
input[type="file"] { .custom-file-upload {
font-family: var(--display-font); display: inline-block;
padding: var(--small-size) var(--medium-size);
} }
.custom-file-upload { #post_attachments {
border: 1px solid #ccc; font-family: var(--display-font);
display: inline-block; font-size: var(--medium-size);
padding: 6px 12px;
cursor: pointer; cursor: pointer;
} }

View File

@ -23,46 +23,9 @@
<div class="content"> <div class="content">
<div class="navigation">
<nav class='main-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}"
class='{{ active('main_public', 'main_all', "home_all") }}'>Timeline</a>
</li>
</ul>
</nav>
<nav class='sec-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}"
class='{{ active('main_public') }}'>Public</a>
</li>
{% if user_nickname is defined %}
<li>
<a href="{{ path("home_all", {'nickname' : user_nickname}) }}"
class='{{ active("home_all") }}'>Home</a>
</li>
{% endif %}
<li>
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
</li>
{% if main_nav_tabs is defined %}
{% for tab in main_nav_tabs %}
<li>
<a href="{{ path(tab['route']) }}"
class='{{ active(tab['route']) }}'>{{ tab['title'] }}</a>
</li>
{% endfor %}
{% endif %}
</ul>
</nav>
</div>
{# Backwards compatibility with hAtom 0.1 #} {# Backwards compatibility with hAtom 0.1 #}
<div class="h-feed hfeed timeline"> <div class="timeline">
<div class="notes"> <div class="h-feed hfeed notes">
{% if notes is defined and notes is not empty %} {% if notes is defined and notes is not empty %}
{% for conversation in notes %} {% for conversation in notes %}
{% include '/note/view.html.twig' with {'note': conversation['note'], 'have_user': have_user, 'replies': conversation['replies']} only %} {% include '/note/view.html.twig' with {'note': conversation['note'], 'have_user': have_user, 'replies': conversation['replies']} only %}

View File

@ -1,66 +1,105 @@
{% if app.user %} <div id='left-panel'>
<div id='left-panel'> <div class='profile-nav'>
<div class='navbar'>
<div class="left-nav"> {% if app.user %}
<div class='profile'> <div class='profile'>
{% for extra in profile_extras %} {% for extra in profile_extras %}
{% include '/'~ extra.name ~ '/view.html.twig' with {'vars': extra.vars} only %} {% include '/'~ extra.name ~ '/view.html.twig' with {'vars': extra.vars} only %}
{% endfor %}
<a href="{{ path('settings_avatar') }}">
<img src='{{ user_avatar }}' alt="Your avatar." class="icon icon-avatar">
</a>
<a href="{{ path('settings_personal_info') }}">
<div class="info">
<b id="nick">{{ user_nickname }}</b>
<div class="tags">
{% if user_tags %}
{% for tag in user_tags %}
<a href='#'><i> #{{ tag }} </i></a>
{% endfor %}
{% else %}
<i> {{ '(No tags)' | trans }} </i>
{% endif %}
</div>
<div class="stats">
<span> <b> {{ user_followers }} </b> {{ 'Followers' | trans }} </span>
<span> <b> {{ user_followed }} </b> {{ 'Followed' | trans }} </span>
</div>
</div>
</a>
</div>
<a href='#'>Messages</a>
<a href="{{ path("replies", {'nickname' : user_nickname}) }}"
class='hover-effect {{ active("replies") }}'>Replies</a>
{% for link in handle_event('InsertLeftPanelLink', user_nickname) %}
{{ link | raw }}
{% endfor %} {% endfor %}
<a href="{{ path('settings_personal_info') }}" <a href="{{ path('settings_avatar') }}">
class='hover-effect {{ active('settings_') }}'>Settings</a> <img src='{{ user_avatar }}' alt="Your avatar." class="icon icon-avatar">
<a href='{{ path('logout') }}'>Logout</a> </a>
<a href="{{ path('settings_personal_info') }}">
<div class="info">
<b id="nick">{{ user_nickname }}</b>
<div class="tags">
{% if user_tags %}
{% for tag in user_tags %}
<a href='#'><i> #{{ tag }} </i></a>
{% endfor %}
{% else %}
<i> {{ '(No tags)' | trans }} </i>
{% endif %}
</div>
<div class="stats">
<span> <b> {{ user_followers }} </b> {{ 'Followers' | trans }} </span>
<span> <b> {{ user_followed }} </b> {{ 'Followed' | trans }} </span>
</div>
</div>
</a>
</div> </div>
<div class="footer">
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a> <ul>
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a> <li>
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a> <a href='#'>Messages</a>
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a> </li>
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a> <li>
<a href="{{ path("replies", {'nickname' : user_nickname}) }}"
class='hover-effect {{ active("replies") }}'>Replies</a>
</li>
{% for link in handle_event('InsertLeftPanelLink', user_nickname) %}
<li>{{ link | raw }}</li>
{% endfor %}
<li>
<a href="{{ path('settings_personal_info') }}"
class='hover-effect {{ active('settings_') }}'>Settings</a>
</li>
<li>
<a href='{{ path('logout') }}'>Logout</a>
</li>
</ul>
{% else %}
<div class="profile">
<ul>
<li>
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a>
</li>
<li>
<a href="{{ path('register') }}">Register</a>
</li>
</ul>
</div> </div>
{% endif %}
<div class="timeline-nav">
<a href="{{ path('main_public') }}"
class='{{ active('main_public', 'main_all', "home_all") }}'>Timeline</a>
<hr>
<nav class='sec-nav'>
<ul>
<li>
<a href="{{ path('main_public') }}"
class='{{ active('main_public') }}'>Public</a>
</li>
{% if user_nickname is defined %}
<li>
<a href="{{ path("home_all", {'nickname' : user_nickname}) }}"
class='{{ active("home_all") }}'>Home</a>
</li>
{% endif %}
<li>
<a href="{{ path('main_all') }}" class='hover-effect {{ active('main_all') }}'>Network</a>
</li>
{% if main_nav_tabs is defined %}
{% for tab in main_nav_tabs %}
<li>
<a href="{{ path(tab['route']) }}"
class='{{ active(tab['route']) }}'>{{ tab['title'] }}</a>
</li>
{% endfor %}
{% endif %}
</ul>
</nav>
</div> </div>
</div> </div>
{% else %}
<div id='left-panel'> <div class="footer">
<div class='navbar'> <a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
<div class="left-nav"> <a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
<a href="{{ path('login') }}" class='hover-effect {{ active('login') }}'>Login</a> <a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a>
<a href="{{ path('register') }}">Register</a> <a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
</div> <a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
<div class="footer">
<a href="{{ path('doc_faq') }}" class='hover-effect {{ active('doc_faq') }}'>FAQ</a>
<a href="{{ path('doc_tos') }}" class='hover-effect {{ active('doc_tos') }}'>TOS</a>
<a href="{{ path('doc_privacy') }}" class='hover-effect {{ active('doc_privacy') }}'>Privacy</a>
<a href="{{ path('doc_source') }}" class='hover-effect {{ active('doc_source') }}'>Source</a>
<a href="{{ path('doc_version') }}" class='hover-effect {{ active('doc_version') }}'>Version</a>
</div>
</div>
</div> </div>
{% endif %} </div>