1
0
mirror of https://github.com/actix/actix-website synced 2024-11-27 18:12:57 +01:00

Small screen optimizations

This commit is contained in:
Armin Ronacher 2018-05-27 12:04:29 -07:00
parent ede773dd93
commit 64553f27f5
3 changed files with 36 additions and 4 deletions

View File

@ -14,7 +14,11 @@
<div class="row"> <div class="row">
<div class="col-md-3"> <div class="col-md-3">
<nav class="leftnav"> <button class="btn doctoggle" type="button" data-toggle="collapse" data-target="#collapsing-docnav" aria-expanded="false" aria-controls="collapsing-docnav">
Toggle navigation
</button>
<nav class="leftnav collapse show" id="collapsing-docnav">
<div class="" id=""> <div class="" id="">
<h5>Introduction</h5> <h5>Introduction</h5>
<div> <div>

View File

@ -123,6 +123,8 @@ td {
.navbar-brand img { .navbar-brand img {
animation: spin-logo 30s linear infinite; animation: spin-logo 30s linear infinite;
width: 48px;
height: 48px;
} }
.navbar-light { .navbar-light {
@ -170,6 +172,16 @@ td {
padding-top: 0; padding-top: 0;
} }
.doctoggle {
margin: -1rem 0 2rem 0;
display: none;
}
.leftnav {
margin: 0 -1rem;
padding: 0 1rem;
}
.leftnav li { .leftnav li {
margin: 1rem 0rem; margin: 1rem 0rem;
} }
@ -179,8 +191,8 @@ td {
} }
.leftnav li.active { .leftnav li.active {
margin: -0.5rem 0 -.5rem -1rem; margin: -0.5rem -1rem -.5rem -1rem;
padding: 0.5rem 0 0.5rem 1rem; padding: 0.5rem 1rem 0.5rem 1rem;
background: #dceaea; background: #dceaea;
} }
@ -241,6 +253,7 @@ td {
.jumbotron .actix-logo { .jumbotron .actix-logo {
max-height: 10rem; max-height: 10rem;
max-width: 80%;
} }
.jumbotron .lead { .jumbotron .lead {
@ -540,6 +553,18 @@ h5:hover a {
} }
} }
@media screen and (max-width: 767px) {
.doctoggle {
display: block;
}
}
@media screen and (min-width: 768px) {
.leftnav {
display: block;
}
}
@media (min-width: 992px) { @media (min-width: 992px) {
.actix-footer-gray { .actix-footer-gray {
width: 960px; width: 960px;

View File

@ -19,7 +19,10 @@
scrollTop: $('.actix-showcase').offset().top scrollTop: $('.actix-showcase').offset().top
}, 1000); }, 1000);
} else { } else {
activateFeature('#' + $('div.actix-feature')[0].id); var firstFeature = $('div.actix-feature')[0];
if (firstFeature) {
activateFeature('#' + firstFeature.id);
}
} }
$('ul li.actix-feature-selector a').on('click', function(evt) { $('ul li.actix-feature-selector a').on('click', function(evt) {