Skip to content

Commit

Permalink
Merge pull request #394 from EDI-N/Kolya
Browse files Browse the repository at this point in the history
Kolya
  • Loading branch information
EDI-N committed Oct 30, 2020
2 parents 535bb36 + 3b7af70 commit df21f4f
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 2 deletions.
49 changes: 48 additions & 1 deletion docs/_static/theme_overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,4 +257,51 @@
margin: 0 auto;
display: block;
background: white
}
}

/**
Это для уведомления на всех страницах: переходите на новый правильный сайт
*/

#version-warning-banner {
margin: 10px 0;
padding: 10px;
border-radius: 4px;

letter-spacing: 1px;
color: #fff;
text-shadow: 0 0 2px #000;
text-align: center;
font-size: 0.9em;

background: #d54526
repeating-linear-gradient(
135deg,
transparent,
transparent 20px,
rgba(255, 255, 255, 0.1) 20px,
rgba(255, 255, 255, 0.1) 40px
);
}

#version-warning-banner .admonition-title {
font-size: inherit;
font-weight: bold;
}

#version-warning-banner p.admonition-title::after {
content: none;
}

#version-warning-banner a {
color: #11dad1;
border-color: #fff;
}

#version-warning-banner p {
display: inline;
}

div.warning {
border: 0;
}
34 changes: 34 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
'sphinx.ext.autodoc',
'sphinxcontrib.contentui',
'notfound.extension',
'versionwarning.extension',
]

# for 404 page
Expand Down Expand Up @@ -397,3 +398,36 @@ def setup(app):

# If false, no index is generated.
#epub_use_index = True

# -- sphinx-version-warning config ----------------------------------------------

# stupid example how it can be set up
#versionwarning_messages = {
# "latest": (
# "This document is for the development version. "
# 'For the stable version documentation, see <a href="/en/stable/">here</a>.'
# ),
# "stable": (
# "<strong>Black Lives Matter.</strong> "
# 'Support the <a href="https://eji.org/">Equal Justice Initiative</a> and '
# '<a href="https://colorofchange.org/">Color of Change</a>.'
# ),
# "2.x-line": (
# "marshmallow 2 is no longer supported as of 2020-08-18. "
# '<a href="https://marshmallow.readthedocs.io/en/latest/upgrading.html#upgrading-to-3-0">'
# "Update your code to use marshmallow 3</a>."
# ),
#}

versionwarning_messages = {
"latest": (
"<strong>Внимание:</strong> к сожалению эта версия wiki более не поддерживается. "
'Актуальная документация находится по <a href="https://wiki.edin.ua/uk/latest/">ссылке</a>.'
),
}

# Show warning at top of page
versionwarning_body_selector = "div.document"
# versionwarning_banner_title = ""
# For debugging locally
# versionwarning_project_version = "stable"
4 changes: 3 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
-e git://github.com/ulrobix/sphinxcontrib-contentui.git#egg=sphinxcontrib-contentui
# For fancy 404 pages
git+https://github.com/rtfd/sphinx-notfound-page@master#egg=sphinx-notfound-page
git+https://github.com/rtfd/sphinx-notfound-page@master#egg=sphinx-notfound-page
# For warning message to new site
git+https://github.com/humitos/sphinx-version-warning@master

0 comments on commit df21f4f

Please sign in to comment.