Merge pull request #576 from nextcloud/style-fixes

Add version switcher, global configuration and fix some styling issues
This commit is contained in:
John Molakvoæ 2017-10-25 09:39:14 +02:00 committed by GitHub
commit da3ea60b52
13 changed files with 130 additions and 1290 deletions

View File

@ -144,10 +144,16 @@
<div class="content row">
<main class="main">
<div class="row page-content-header">
<div class="col-md-6">
<div class="col-md-8">
<h1><a href="{{ pathto(master_doc) }}">{{ project|e }}</a></h1>
<div class="doc-version-switch">
Versions:
{%- for v in doc_versions %}
<a href="https://docs.nextcloud.com/server/{{ v }}/{{current_doc}}/{{pagename}}.html" {% if version == v %} class="current-doc"{% endif %}>{{v}}</a>
{%- endfor %}
</div>
</div>
<div class="col-md-5 col-md-offset-1">
<div class="col-md-4">
{% if theme_show_search %}
<form class="headersearch" style="margin: 16px 0;" action="{{ pathto('search') }}" method="get">
<input type="text" value="" name="q" id="q" class="form-control" />

View File

@ -6,7 +6,7 @@
<li class="prev">
<a href="{{ prev.link|e }}" title="{{ _('Previous Chapter: ') + prev.title|striptags }}">
{%- if theme_bootstrap_version == "3" -%}<span class="glyphicon glyphicon-chevron-left visible-sm"></span>{%- endif -%}
<span class="hidden-sm">{{ "&laquo;"|safe }} {{ prev.title|striptags|truncate(length=16, killwords=True) }}</span>
<span class="hidden-sm">{{ "&laquo;"|safe }} {{ prev.title|striptags }}</span>
</a>
</li>
{%- endif %}
@ -14,7 +14,7 @@
<li class="next">
<a href="{{ next.link|e }}" title="{{ _('Next Chapter: ') + next.title|striptags }}">
{%- if theme_bootstrap_version == "3" -%}<span class="glyphicon glyphicon-chevron-right visible-sm"></span>{%- endif -%}
<span class="hidden-sm">{{ next.title|striptags|truncate(length=16, killwords=True) }} {{ "&raquo;"|safe }}</span>
<span class="hidden-sm">{{ next.title|striptags }} {{ "&raquo;"|safe }}</span>
</a>
</li>
{%- endif %}

View File

@ -975,7 +975,7 @@ img.desaturate {
background-size: cover;
-o-background-size: cover;
/* border: 0px; */
/* min-height: 450px; background-position: 35% 40%; */
/* min-height: 450px; background-position: 35% 40%; */
position: relative;
margin-left: 0px !important;
margin-right: 0px !important;
@ -1020,7 +1020,7 @@ img.desaturate {
@media (max-width: 767px) {
.ft-everywhere-img {
/* height: auto; */
/* height: auto; */
width: 20%;
right: 5%;
}
@ -1060,9 +1060,9 @@ img.desaturate {
top: 30%;
left: 45%;
margin-top: 10px;
/* width: 0px; */
/* height: 0px; */
/* padding: 50%; */
/* width: 0px; */
/* height: 0px; */
/* padding: 50%; */
}
.youtube i {
@ -1129,11 +1129,6 @@ a.headerlink {
#menu-support.menu ul ul ul {
list-style-type: square;
}
/* having a separator between each elements of the top list and
between above the top of the third level list */
#menu-support.menu ul ul ul {
border-top: 1px solid #EFEFEF;
}
.terminal-image {
box-shadow: 1px 1px 15px rgba(0, 0, 0, 0.3);
@ -1203,3 +1198,15 @@ li > dl > dt {
background: #ddd;
border-radius: 50%;
}
/* Version switcher */
.doc-version-switch a {
padding: 3px;
margin-left:10px;
display: inline-block;
}
.doc-version-switch .current-doc {
font-weight: 900;
}

View File

@ -100,25 +100,23 @@
<div class="wrap container not-front">
<div class="content row">
<main class="main">
<div class="row page-content-header">
<div class="col-md-5 col-md-offset-7">
{% if theme_show_search %}
<form class="headersearch" style="margin-bottom:-3px;" action="{{ pathto('search') }}" method="get">
<input type="text" value="" name="q" id="q" class="form-control" />
<button class="btn btn-default" type="submit" id="searchsubmit">Search</button>
</form>
{% endif %}
</div>
</div>
{% block sidebartoc %}
<div class="row">
<div class="col-md-3">
<div class="sidebar">
<h1>{{ project|e }}</h1>
{% if theme_show_search %}
<div class="sidebar-search">
<form class="headersearch" action="{{ pathto('search') }}" method="get">
<input type="text" value="" name="q" id="q" class="form-control" />
<button class="btn btn-default" type="submit" id="searchsubmit">Search</button>
</form>
</div>
{% endif %}
<div class="menu-support-container">
<ul id="menu-support" class="menu">
<ul>
<li><a href="{{ pathto(master_doc) }}">Table of Contents</a></li>
<li><a href="{{ pathto(master_doc) }}">Table of Contents</a></li>
</ul>
{{ toctree(maxdepth=3) }}
</ul>

View File

@ -6,7 +6,7 @@
<li class="prev">
<a href="{{ prev.link|e }}" title="{{ _('Previous Chapter: ') + prev.title|striptags }}">
{%- if theme_bootstrap_version == "3" -%}<span class="glyphicon glyphicon-chevron-left visible-sm"></span>{%- endif -%}
<span class="hidden-sm">{{ "&laquo;"|safe }} {{ prev.title|striptags|truncate(length=16, killwords=True) }}</span>
<span class="hidden-sm">{{ "&laquo;"|safe }} {{ prev.title|striptags }}</span>
</a>
</li>
{%- endif %}
@ -14,7 +14,7 @@
<li class="next">
<a href="{{ next.link|e }}" title="{{ _('Next Chapter: ') + next.title|striptags }}">
{%- if theme_bootstrap_version == "3" -%}<span class="glyphicon glyphicon-chevron-right visible-sm"></span>{%- endif -%}
<span class="hidden-sm">{{ next.title|striptags|truncate(length=16, killwords=True) }} {{ "&raquo;"|safe }}</span>
<span class="hidden-sm">{{ next.title|striptags }} {{ "&raquo;"|safe }}</span>
</a>
</li>
{%- endif %}

File diff suppressed because it is too large Load Diff

View File

@ -290,6 +290,25 @@ div.thumbnail > img {
/* -- Start specific css for documentation -- */
.sidebar h1 {
font-size: 1.5em;
margin: 0;
padding: 10px;
border-bottom: 1px solid #ccc;
}
.sidebar-search form {
display: flex;
width: 100%;
}
.sidebar-search input,
.sidebar-search button {
margin: 10px;
}
.sidebar-search input {
flex-grow: 1;
margin-right: 0;
}
ul#menu-support.menu {
padding-left: 0;
}
@ -308,12 +327,6 @@ ul#menu-support.menu ul ul {
ul#menu-support.menu ul ul ul {
list-style-type: square;
}
/* having a separator between each elements of the top list and
between above the top of the third level list */
ul#menu-support.menu > ul > li,
ul#menu-support.menu ul ul ul {
border-top: 1px solid #EFEFEF;
}
/* set to default padding for the sublist of the current entry */
ul#menu-support.menu ul > li.current > ul {
padding-left: 20px;
@ -347,25 +360,14 @@ ul#menu-support.menu > ul li.toctree-l1.current {
padding-right: 0;
}
#menu-support > ul > li:nth-child(odd) {
#menu-support > ul > li {
border-top: 1px solid #ccc;
}
#menu-support > ul:last-child {
border-bottom: 1px solid #ccc;
}
#menu-support > ul > li:last-child {
border-bottom: 0;
}
#menu-support > ul > .current {
border: 1px solid #999 !important;
border-right: 0 !important;
border-bottom-left-radius: 5px;
border-top-left-radius: 5px;
}
#menu-support > ul > .current + li{
border-top: 0;
}
#menu-support ul ul {
padding-left: 27px;
}
@ -483,3 +485,14 @@ li.next {
li.next {
float: right;
}
.not-front .content.row,
.content > .main > .row {
margin-top: 0;
}
.page-content {
margin-top: 10px;
}
.content > .main > .row .sidebar {
border-right: 1px solid #ccc;
}

View File

@ -13,6 +13,10 @@
import sys, os
# import global configuration from parent directory
sys.path.insert(0, os.path.abspath('../'))
from conf import *
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -44,13 +48,13 @@ master_doc = 'contents'
# built documents.
#
# The short X.Y version.
version = '12'
#version = '12'
# The full version, including alpha/beta/rc tags.
release = '12'
#release = '12'
# General information about the project.
project = u'Nextcloud %s Server Administration Manual' % (version)
copyright = u'2012-2017, The Nextcloud developers'
project = u'Nextcloud %s Administration Manual' % (version)
#copyright = u'2012-2017, The Nextcloud developers'
# The language for content autogenerated by Sphinx. Refer to documentation
@ -281,4 +285,4 @@ epub_copyright = u'2012-2017, The Nextcloud developers'
#epub_tocdup = True
# Include todos?
todo_include_todos = True
todo_include_todos = True

24
conf.py Normal file
View File

@ -0,0 +1,24 @@
# global configuration for every documentation added at the end
import os
# General information about the project.
copyright = u'2012-2017, The Nextcloud developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '13'
# The full version, including alpha/beta/rc tags.
release = '13'
# substitutions go here
rst_epilog = '.. |version| replace:: %s' % version
html_context = {
'doc_versions': ['11', '12', '13'],
'current_doc': os.path.basename(os.getcwd()),
}

BIN
conf.pyc Normal file

Binary file not shown.

View File

@ -13,6 +13,10 @@
import sys, os
# import global configuration from parent directory
sys.path.insert(0, os.path.abspath('../'))
from conf import *
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -40,17 +44,17 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Nextcloud Developer Manual'
copyright = u'2012-2017, The Nextcloud developers'
project = u'Nextcloud %s Developer Manual' % (version)
#copyright = u'2012-2017, The Nextcloud developers'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '13'
#version = '13'
# The full version, including alpha/beta/rc tags.
release = '13'
#release = '13'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -13,6 +13,10 @@
import sys, os
# import global configuration from parent directory
sys.path.insert(0, os.path.abspath('../'))
from conf import *
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -44,13 +48,13 @@ master_doc = 'contents'
# built documents.
#
# The short X.Y version.
version = '12'
#version = '12'
# The full version, including alpha/beta/rc tags.
release = '12'
#release = '12'
# General information about the project.
project = u'Nextcloud %s User Manual' % (version)
copyright = u'2012-2017, The Nextcloud developers'
#copyright = u'2012-2017, The Nextcloud developers'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -290,7 +294,4 @@ epub_copyright = u'2012-2017, The Nextcloud developers'
#epub_tocdup = True
# Include todos?
todo_include_todos = True
# substitutions go here
rst_epilog = '.. |version| replace:: %s' % version
todo_include_todos = True

View File

@ -13,6 +13,10 @@
import sys, os
# import global configuration from parent directory
sys.path.insert(0, os.path.abspath('../'))
from conf import *
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@ -44,13 +48,13 @@ master_doc = 'contents'
# built documents.
#
# The short X.Y version.
version = '12'
#version = '12'
# The full version, including alpha/beta/rc tags.
release = '12'
#release = '12'
# General information about the project.
project = u'Nextcloud %s Benutzerhandbuch' % (version)
copyright = u'2012-2017, Die Nextcloud Entwickler'
#copyright = u'2012-2017, Die Nextcloud Entwickler'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@ -290,7 +294,4 @@ epub_copyright = u'2012-2017, Die Nextcloud Entwickler'
#epub_tocdup = True
# Include todos?
todo_include_todos = True
# substitutions go here
rst_epilog = '.. |version| replace:: %s' % version
todo_include_todos = True