make tabs vertical

This commit is contained in:
Pavel Makhov 2018-09-12 19:20:36 -04:00
parent 7e61ba4617
commit 5a9d449155
3 changed files with 52 additions and 24 deletions

View File

@ -75,14 +75,10 @@
<div class="container"> <div class="container">
<div class="section"> <div class="section">
<div class="row"> <div class="row">
<div class="col s12 m8 offset-m2">
{{content}} {{content}}
</div> </div>
</div> </div>
</div>
<br><br> <br><br>
<div class="section"> <div class="section">

View File

@ -53,18 +53,45 @@ main {
flex: 1 0 auto; flex: 1 0 auto;
} }
.tabs .indicator { .tabs-vertical {
background-color: teal; .tabs {
} height: auto;
.tabs .tab { -ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
display: -webkit-flex;
display: flex;
}
.tab {
width: 100%;
.active {
-moz-transition: border-color .5s ease;
-o-transition: border-color .5s ease;
-webkit-transition: border-color .5s ease;
transition: border-color .5s ease;
border-right: 3px solid teal;
}
:hover {
border-right: 3px solid #eeeeee;
}
a {
color: teal;
:hover { color: teal; }
}
a:hover{
color: teal;
}
a.active { a.active {
color: teal; color: teal;
} }
a:hover {
color: teal;
} }
a{
color: teal; .indicator {
display: none;
} }
} }

View File

@ -2,12 +2,17 @@
layout: page layout: page
--- ---
<ul class="tabs"> <div class="tabs-vertical">
<div class="col s4 m3 l2">
<ul class="tabs">
{% for widget in site.widgets %} {% for widget in site.widgets %}
<li class="tab col s2"><a href="#tab{{ widget.title }}">{{ widget.title }}</a></li> <li class="tab"><a href="#tab{{ widget.title }}">{{ widget.title }}</a></li>
{% endfor %} {% endfor %}
</ul> </ul>
</div>
{% for widget in site.widgets %} <div class="col s8 m9 l6">
<div id="tab{{ widget.title }}" class="widget col s12">{{ widget.content }}</div> {% for widget in site.widgets %}
{% endfor %} <div id="tab{{ widget.title }}" class="widget col s12">{{ widget.content }}</div>
{% endfor %}
</div>
</div>