Feat: remove nav and toctree in small screen

This commit is contained in:
Bertrand Benjamin 2022-08-31 05:58:33 +02:00
parent b6b089542e
commit 1764489028
2 changed files with 412 additions and 420 deletions

View File

@ -124,8 +124,8 @@ aside {
.title {
text-align: center;
margin-bottom: 50px;
margin-top: 50px;
padding-bottom: 20px;
padding-top: 20px;
img {
padding: 20px;
@ -143,146 +143,20 @@ aside {
font-size: .92em;
}
}
nav {
background-color: @navbar-bg;
h2 {
background-color: @navbar-bg;
margin-bottom: 0;
display: none;
}
ul {
padding-inline-start: 0px;
display: block;
}
ul.toctree {
li {
a {
color: @navbar-text-color;
border: none;
}
}
li.toctree-l1 {
li.current{
background-color: @navbar-toctree-l2-sel-bg;
color: @navbar-toctree-l2-sel-txt;
padding: 10px;
border-left: solid 2px @orange;
}
}
li.current{
a {
background-color: @navbar-toctree-l1-sel-bg;
color: @navbar-toctree-l1-sel-txt;
border-top: solid 1px @light-grey;
border-bottom: solid 1px @light-grey;
border-left: solid 2px @orange;
}
a:hover {
color: @orange;
}
}
li.toctree-l2 {
a {
border: none;
background-color: @navbar-toctree-l2-bg;
color: @navbar-toctree-l2-txt;
}
}
a {
padding: 10px;
}
a:hover {
color: @orange;
}
}
ul.list {
li {
display: inline;
line-height: 1.6em;
font-size: 1.28em;
text-transform: lowercase;
}
}
}
.tagcloud {
h2 {
margin-bottom: 0;
background-color: @sidebar-bg;
display: none;
}
ul {
list-style: none;
padding: 0;
margin: 10px;
}
ul li {
display: inline-block;
}
li.tag-0 {
font-size: 170%;
}
li.tag-1 {
font-size: 150%;
}
li.tag-2 {
font-size: 120%;
}
li.tag-3 {
font-size: 100%;
}
li.tag-4 {
font-size: 80%;
}
}
}
main {
nav {
text-align: center;
text-transform: uppercase;
font-size: .72em;
padding: 14px 0 14px 0;
border-bottom: @nav-border-color 1px solid;
display: none;
}
nav, .translations {
a {
padding: 0 4px 0 4px;
border-left: @nav-border-color 1px solid;
border-right: @nav-border-color 1px solid;
}
:first-child {
border-left: none;
}
:last-child {
border-right: none;
}
}
.neighbors {
margin: 4% 0% 4% 0%;
height: 20px;
}
.pagination {
margin: 4% 8% 4% 8%;
height: 20px;
}
.social-share {
p {
font-size: .8em;
}
}
article {
margin: 0 8% 2% 8%;
@ -561,18 +435,111 @@ ul.social {
left: 0;
overflow-y: auto;
div {
.title {
padding-bottom: 50px;
padding-top: 50px;
}
nav {
display: block;
background-color: @navbar-bg;
h2 {
background-color: @navbar-bg;
margin-bottom: 0;
}
ul {
padding-inline-start: 0px;
display: block;
li {
padding: 0;
display: block;
}
}
ul.toctree {
li {
a {
color: @navbar-text-color;
border: none;
}
}
li.toctree-l1 {
li.current{
background-color: @navbar-toctree-l2-sel-bg;
color: @navbar-toctree-l2-sel-txt;
padding: 10px;
border-left: solid 2px @orange;
}
}
li.current{
a {
background-color: @navbar-toctree-l1-sel-bg;
color: @navbar-toctree-l1-sel-txt;
border-top: solid 1px @light-grey;
border-bottom: solid 1px @light-grey;
border-left: solid 2px @orange;
}
a:hover {
color: @orange;
}
}
li.toctree-l2 {
a {
border: none;
background-color: @navbar-toctree-l2-bg;
color: @navbar-toctree-l2-txt;
}
}
a {
padding: 10px;
}
a:hover {
color: @orange;
}
}
ul.list {
li {
display: inline;
line-height: 1.6em;
font-size: 1.28em;
text-transform: lowercase;
}
}
}
ul.social {
padding-top: 32px;
.tagcloud {
display: block;
h2 {
margin-bottom: 0;
background-color: @sidebar-bg;
}
ul {
list-style: none;
padding: 0;
margin: 10px;
}
ul li {
display: inline-block;
}
li.tag-0 {
font-size: 170%;
}
li.tag-1 {
font-size: 150%;
}
li.tag-2 {
font-size: 120%;
}
li.tag-3 {
font-size: 100%;
}
li.tag-4 {
font-size: 80%;
}
}
}
@ -584,6 +551,31 @@ ul.social {
top: 0;
right: 2.5%;
nav {
display: block;
text-align: center;
text-transform: uppercase;
font-size: .72em;
padding: 14px 0 14px 0;
border-bottom: @nav-border-color 1px solid;
}
nav, .translations {
a {
padding: 0 4px 0 4px;
border-left: @nav-border-color 1px solid;
border-right: @nav-border-color 1px solid;
}
:first-child {
border-left: none;
}
:last-child {
border-right: none;
}
}
article {
&.single {

File diff suppressed because one or more lines are too long