mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add/modified the canonical link to work with all /index/ links. Added style for "danger'
This commit is contained in:
parent
b4e1b8d2e2
commit
509e25cf04
3 changed files with 30 additions and 8 deletions
33
docs/theme/docker/layout.html
vendored
33
docs/theme/docker/layout.html
vendored
|
@ -25,11 +25,25 @@
|
|||
+ ['//fonts.googleapis.com/css?family=Cabin:400,700,400italic']
|
||||
%}
|
||||
|
||||
{%- if pagename == 'index' %}
|
||||
<link rel="canonical" href="http://docs.docker.io/en/latest/">
|
||||
{% else %}
|
||||
<link rel="canonical" href="http://docs.docker.io/en/latest/{{ pagename }}/">
|
||||
{% endif %}
|
||||
{% set pagename = 'use/commandline/run/index/' %}
|
||||
|
||||
|
||||
combined = {{ combined }}
|
||||
|
||||
{#
|
||||
This part is hopefully complex because things like |cut '/index/' are not available in spinx jinja
|
||||
and will make it crash. (and we need index/ out.
|
||||
#}
|
||||
<link rel="canonical" href="http://docs.docker.io/en/latest/
|
||||
{%- for word in pagename.split('/') -%}
|
||||
{%- if word != 'index' -%}
|
||||
{%- if word != '' -%}
|
||||
{{ word }}/
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}
|
||||
">
|
||||
|
||||
{%- for cssfile in css_files %}
|
||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||
{%- endfor %}
|
||||
|
@ -124,7 +138,14 @@
|
|||
<small>Current version:</small>
|
||||
<ul class="inline">
|
||||
{% for slug, url in versions %}
|
||||
<li class="alternative"><a href="{{ url }}{{ pagename }}/" title="Switch to {{ slug }}">{{ slug }}</a></li>
|
||||
<li class="alternative"><a href="{{ url }}{%- for word in pagename.split('/') -%}
|
||||
{%- if word != 'index' -%}
|
||||
{%- if word != '' -%}
|
||||
{{ word }}/
|
||||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
{%- endfor -%}"
|
||||
title="Switch to {{ slug }}">{{ slug }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
|
3
docs/theme/docker/static/css/main.css
vendored
3
docs/theme/docker/static/css/main.css
vendored
|
@ -397,7 +397,8 @@ dt:hover > a.headerlink {
|
|||
.admonition .admonition-title {
|
||||
font-size: larger;
|
||||
}
|
||||
.admonition.warning {
|
||||
.admonition.warning,
|
||||
.admonition.danger {
|
||||
border-color: #ac0004;
|
||||
}
|
||||
.admonition.note {
|
||||
|
|
2
docs/theme/docker/static/css/main.less
vendored
2
docs/theme/docker/static/css/main.less
vendored
|
@ -594,7 +594,7 @@ dt:hover > a.headerlink {
|
|||
font-size: larger;
|
||||
}
|
||||
|
||||
&.warning {
|
||||
&.warning, &.danger {
|
||||
border-color: #ac0004;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue