Skip to content

Commit

Permalink
Meilleur affichage petits écrans
Browse files Browse the repository at this point in the history
  • Loading branch information
c-geek committed Apr 8, 2017
1 parent e8c50cf commit c68474f
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 9 deletions.
34 changes: 33 additions & 1 deletion content/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ body {
margin-top: 10px;
}

#tipue_search_input {
width: 100%;
}

.search-query {
border-radius: 4px !important;
}
Expand Down Expand Up @@ -160,4 +164,32 @@ img.credits {

.dashed {
border: 1px dashed gray;
}
}

@media (max-width:992px) {

.navbar-header a {
/*padding-right: 0 !important;*/
}

.navbar-header img {
margin-right: 0 !important;
}

#siteName {
display: none;
}

.navbar-collapse li {
/*max-width: 100px;*/
}

.navbar-collapse li a {
margin-left: 0;
margin-right: 0;
}

.nav.navbar-nav {
width: 90%;
}
}
9 changes: 1 addition & 8 deletions pelican-themes/pelican-bootstrap3/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
{% endif %}
<a href="{{ SITEURL }}/" class="navbar-brand">
{% if SITELOGO %}<img class="img-responsive pull-left gap-right" src="{{ SITEURL }}/{{ SITELOGO }}" width="{{ SITELOGO_SIZE }}"/> {% endif %}
{% if not HIDE_SITENAME %}{{ SITENAME }}{% endif %}
{% if not HIDE_SITENAME %}<span id="siteName">{{ SITENAME }}</span>{% endif %}
</a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
Expand Down Expand Up @@ -145,13 +145,6 @@
{% endif %}
</ul>
<ul class="nav navbar-nav navbar-right">
{% if 'tipue_search' in PLUGINS %}
<li><span>
<form class="navbar-search" action="{{ SEARCH_URL | default('/search.html') }}">
<input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required>
</form></span>
</li>
{% endif %}
{% if ARCHIVES_SAVE_AS %}
<li><a href="{{ SITEURL }}/{{ ARCHIVES_URL | default('archives.html') }}"><i class="fa fa-th-list"></i><span class="icon-label">{{ _('Archives') }}</span></a></li>
{% endif %}
Expand Down
10 changes: 10 additions & 0 deletions pelican-themes/pelican-bootstrap3/templates/includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

<section class="well well-sm">
<ul class="list-group list-group-flush">

<!-- Search bar in low width mode -->
{% if 'tipue_search' in PLUGINS %}
<li id="searchSideBar" class="list-group-item"><span>
<form class="navbar-search" action="{{ SEARCH_URL | default('/search.html') }}">
<input type="text" class="search-query" placeholder="Search" name="q" id="tipue_search_input" required>
</form></span>
</li>
{% endif %}

{% if SOCIAL %}
<li class="list-group-item"><h4><i class="fa fa-home fa-lg"></i><span class="icon-label">{{ _('Social') }}</span></h4>
<ul class="list-group" id="social">
Expand Down

0 comments on commit c68474f

Please sign in to comment.