diff --git a/CHANGES b/CHANGES
index 1164bac..d535654 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,12 @@
Changes
=======
+2.0.0 (*2020-07-04*)
+====================
+
+- Print media for sphinx_pyppeteer_builder
+- Remove weasyprint support
+
1.2.0 (*2020-06-??*)
====================
diff --git a/code.less b/code.less
deleted file mode 100644
index 192af2a..0000000
--- a/code.less
+++ /dev/null
@@ -1,179 +0,0 @@
-pre {
- white-space: pre-wrap;
- overflow-wrap: break-word;
-}
-
-.content {
- td.linenos, td.code {
- border: none;
- padding: 0;
- margin: 0;
- > .highlight pre {
- border: none;
- }
- }
- code {
- color: @CdTClr;
- padding: 0.25rem 0.1rem;
- margin: 0;
- font-size: 0.85em;
- background-color: @CdBgClr;
- border-bottom: @CdBClr solid 0.2em;
- a, a:visited {
- color: @CdLClr;
- &:hover {
- color: @CdLHClr;
- }
- }
- }
-
- td.linenos pre, pre span.lineno {
- border-right: solid 0.3em @CdLnBClr;
- background-color: @CdLnBgClr;
- color: @CdLnTClr;
- white-space: pre;
- overflow-wrap: normal;
- margin: 0;
- }
-
- pre span.lineno {
- float: left;
- margin: 0 0.5rem 0 -0.5rem;
- padding-left: 0.5rem;
- }
-
- pre, pre[class*="language-"] {
- line-height: 1.4;
- padding: 1.25rem 1.5rem 1.25rem 0.5rem;
- margin: 0.85rem 0;
- background-color: @PrBgClr;
- color: @PrTClr;
- border-left: @PrBClr solid 0.5em;
- code {
- color: @PrTClr;
- padding: 0;
- background-color: transparent;
- }
- a, a:visited {
- color: @PrLClr;
- &:hover {
- color: @PrLHClr;
- }
- }
- }
-}
-
-div[class*="language-"] {
- position: relative;
- background-color: @CdBgClr;
- .highlight-lines {
- padding-top: 1.3rem;
- width: 100%;
- line-height: 1.4;
- .highlighted {
- background-color: @CdBgAClr;
- color: @CdAClr;
- }
- }
- pre, pre[class*="language-"] {
- background: transparent;
- position: relative;
- z-index: 1;
- }
- &::before {
- z-index: 3;
- font-size: 0.75rem;
- color: @CdT2Clr;
- }
- &:not(.line-numbers-mode) {
- .line-numbers-wrapper {
- display: none;
- }
- }
- &.line-numbers-mode {
- .highlight-lines {
- .highlighted {
- position: relative;
- &:before {
- content: ' ';
- z-index: 3;
- display: block;
- width: @lineNumbersWrapperWidth;
- height: 100%;
- background-color: @CdBgAClr;
- color: @CdBgClr;
- }
- }
- }
- pre {
- padding-left: @lineNumbersWrapperWidth;
- vertical-align: middle;
- }
- .line-numbers-wrapper {
- width: @lineNumbersWrapperWidth;
- text-align: center;
- color: @PrLNClr;
- padding: 1.25rem 0;
- line-height: 1.4;
- .line-number {
- position: relative;
- z-index: 4;
- font-size: 0.85em;
- }
- }
- &::after {
- content: '';
- z-index: 2;
- width: @lineNumbersWrapperWidth;
- height: 100%;
- border-left: 0.5rem solid @PrB2Clr;
- background-color: @PrBgClr;
- }
- }
-}
-
-
-//for lang in js ts html md vue css sass scss less stylus go java c sh yaml rst rust zsh gdscript esc
-// div{'[class~="language-' + lang + '"]'}
-// &:before
-// content ('' + lang)
-
-div[class~="language-javascript"] {
- &:before {
- content: "js";
- }
-}
-
-div[class~="language-typescript"] {
- &:before {
- content: "ts";
- }
-}
-
-div[class~="language-markup"] {
- &:before {
- content: "html";
- }
-}
-
-div[class~="language-markdown"] {
- &:before {
- content: "md";
- }
-}
-
-div[class~="language-json"]:before {
- content: "json";
-}
-
-div[class~="language-ruby"]:before {
- content: "rb";
-}
-
-div[class~="language-python"]:before {
- content: "py";
-}
-
-div[class~="language-bash"]:before {
- content: "sh";
-}
diff --git a/package-lock.json b/package-lock.json
index 7a7d646..fede19f 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "sphinx_nervproject_theme",
- "version": "1.0.0",
+ "version": "2.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index 926053c..47306ad 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "sphinx_nervproject_theme",
- "version": "1.2.0",
+ "version": "2.0.0",
"description": "Sphinx Nerv Project Theme",
"main": "index.js",
"directories": {
@@ -8,9 +8,8 @@
},
"scripts": {
"build:theme": "lessc --clean-css='--advanced' ui/theme.less sphinx_nervproject_theme/static/sphinx_nervproject_theme.css",
- "build:weasyprint": "lessc --clean-css='--advanced' ui/theme-weasyprint.less sphinx_nervproject_theme/static/sphinx_nervproject_weasyprint.css",
"build:epub": "lessc --clean-css='--advanced' ui/theme-epub.less sphinx_nervproject_theme/static/sphinx_nervproject_epub.css",
- "build": "npm run build:theme && npm run build:weasyprint && npm run build:epub"
+ "build": "npm run build:theme && npm run build:epub"
},
"repository": {
"type": "git",
diff --git a/setup.py b/setup.py
index 6ecf23d..a06a582 100644
--- a/setup.py
+++ b/setup.py
@@ -28,7 +28,7 @@ with open("README.rst", "r") as fh:
setup(
name="sphinx_nervproject_theme",
- version="1.2.0",
+ version="2.0.0",
url="https://procrastinator.nerv-project.eu/nerv-project/communication/sphinx_nervproject_theme",
license="EUPL 1.2",
author="Kujiu",
diff --git a/sphinx_nervproject_theme/__init__.py b/sphinx_nervproject_theme/__init__.py
index da42b41..6de1147 100644
--- a/sphinx_nervproject_theme/__init__.py
+++ b/sphinx_nervproject_theme/__init__.py
@@ -6,10 +6,7 @@ from sphinx.environment.collectors import EnvironmentCollector
from sphinx import addnodes
from sphinx.util.osutil import relative_uri
-__version__ = (1, 2, 0)
-
-
-sys.setrecursionlimit(15000)
+__version__ = (2, 0, 0)
class SimpleTocTreeCollector(EnvironmentCollector):
@@ -159,15 +156,10 @@ def add_toctree_data(app, pagename, templatename, context, doctree):
def on_config_inited(app, conf):
exclude_files = list(app.config.get('epub_exclude_files', []))
exclude_files.append('_static/sphinx_nervproject_theme.js')
- exclude_files.append('_static/sphinx_nervproject_simple.css')
exclude_files.append('_static/sphinx_nervproject_theme.css')
exclude_files.append('_static/basic.css')
app.config.exclude_files = exclude_files
- app.config.weasyprint_footer_selector = 'footer.footer'
- app.config.weasyprint_header_selector = 'header.navbar'
-
-
def setup(app):
app.add_env_collector(SimpleTocTreeCollector)
app.connect('html-page-context', add_toctree_data)
diff --git a/sphinx_nervproject_theme/layout.html b/sphinx_nervproject_theme/layout.html
index 8315a2c..3121ec5 100644
--- a/sphinx_nervproject_theme/layout.html
+++ b/sphinx_nervproject_theme/layout.html
@@ -10,9 +10,7 @@
{# #}
{%- block css %}
- {% if builder=='weasyprint' %}
-
- {% elif builder=='epub' %}
+ {% if builder=='epub' %}
{% else %}
@@ -79,43 +77,58 @@
{%- block container %}
{%- block header %}{%- include "util/navbar.html" %}{% endblock %}
-
- {%- block sidebar %}
- {% if builder=='html' %}
-
- {% endif %}
- {%- endblock %}
+ {# This table is necessary for print layout #}
+
+
+ |
+
+
+
+ {%- block sidebar %}
+ {% if builder=='html' %}
+
+ {% endif %}
+ {%- endblock %}
+
+
+ {%- block document %}
+ {% block body_header %}
+ {%- include "util/bodyheader.html" %}
+ {%- endblock body_header %}
+
+ {% block body %} {% endblock %}
+
+ {%- endblock %}
+ {%- include "util/pagenav.html" %}
+
+
+ |
+
+ |
+
+
-
- {%- block document %}
- {% block body_header %}
- {%- include "util/bodyheader.html" %}
- {%- endblock body_header %}
-
- {% block body %} {% endblock %}
-
- {%- endblock %}
-
-
{%- block footer %}
- {%- include "util/pagenav.html" %}
{%- include "util/footer.html" %}
{%- endblock footer %}
-
{%- endblock container %}
{% block footer_scripts %}
diff --git a/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.mo b/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.mo
index 27d6c18..2cd0fc6 100644
Binary files a/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.mo and b/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.mo differ
diff --git a/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.po b/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.po
index 6e441be..a71de45 100644
--- a/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.po
+++ b/sphinx_nervproject_theme/locale/en/LC_MESSAGES/sphinx.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_nervproject_theme 1.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2020-05-22 18:58+0200\n"
+"POT-Creation-Date: 2020-07-04 18:23+0200\n"
"PO-Revision-Date: 2020-05-22 18:58+0200\n"
"Last-Translator: FULL NAME \n"
"Language: en\n"
@@ -59,6 +59,10 @@ msgstr ""
msgid "Locations"
msgstr ""
+#: sphinx_nervproject_theme/page.html:34
+msgid "Comments"
+msgstr ""
+
#: sphinx_nervproject_theme/postcard.html:7
msgid "About this page"
msgstr ""
@@ -83,7 +87,7 @@ msgstr ""
msgid "Location"
msgstr ""
-#: sphinx_nervproject_theme/postcard2.html:50
+#: sphinx_nervproject_theme/postcard2.html:51
msgid "Language"
msgstr ""
@@ -191,17 +195,17 @@ msgstr ""
msgid "Docs"
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:4
+#: sphinx_nervproject_theme/util/footer.html:5
#, python-format
msgid "© Copyright %(copyright)s."
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:6
+#: sphinx_nervproject_theme/util/footer.html:7
#, python-format
msgid "© Copyright %(copyright)s."
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:12
+#: sphinx_nervproject_theme/util/footer.html:13
#, python-format
msgid ""
"\n"
@@ -209,14 +213,14 @@ msgid ""
" %(license_subtype)s\n"
" %(license_version)s.\n"
" "
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:29
+#: sphinx_nervproject_theme/util/footer.html:31
#, python-format
msgid ""
"\n"
@@ -224,12 +228,12 @@ msgid ""
" "
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:38
+#: sphinx_nervproject_theme/util/footer.html:43
#, python-format
msgid "Last updated on %(last_updated)s."
msgstr ""
-#: sphinx_nervproject_theme/util/footer.html:41
+#: sphinx_nervproject_theme/util/footer.html:46
#, python-format
msgid ""
"Created using ABlog."
msgstr ""
-#: sphinx_nervproject_theme/util/isso.html:19
-msgid "Comments"
-msgstr ""
-
#: sphinx_nervproject_theme/util/linktags.html:2
msgid "About these documents"
msgstr ""
@@ -254,6 +254,10 @@ msgstr ""
msgid "Copyright"
msgstr ""
+#: sphinx_nervproject_theme/util/navbar.html:11
+msgid "Toggle sidebar"
+msgstr ""
+
#: sphinx_nervproject_theme/util/pagenav.html:5
msgid "previous chapter"
msgstr ""
diff --git a/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.mo b/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.mo
index 563aa54..d50b799 100644
Binary files a/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.mo and b/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.mo differ
diff --git a/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.po b/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.po
index 69cc57c..65265b4 100644
--- a/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.po
+++ b/sphinx_nervproject_theme/locale/fr/LC_MESSAGES/sphinx.po
@@ -8,17 +8,16 @@ msgid ""
msgstr ""
"Project-Id-Version: sphinx_nervproject_theme 1.0\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2020-05-22 18:58+0200\n"
+"POT-Creation-Date: 2020-07-04 18:23+0200\n"
"PO-Revision-Date: 2020-05-22 19:16+0200\n"
+"Last-Translator: \n"
"Language: fr\n"
"Language-Team: fr \n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=2; plural=(n > 1)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.8.0\n"
-"Last-Translator: \n"
-"X-Generator: Poedit 2.2.1\n"
#: sphinx_nervproject_theme/archives.html:4
msgid "Archives"
@@ -60,6 +59,10 @@ msgstr "Langues"
msgid "Locations"
msgstr "Lieux"
+#: sphinx_nervproject_theme/page.html:34
+msgid "Comments"
+msgstr "Commentaires"
+
#: sphinx_nervproject_theme/postcard.html:7
msgid "About this page"
msgstr "À propos de cette page"
@@ -84,7 +87,7 @@ msgstr "Auteur(s)"
msgid "Location"
msgstr "Lieu"
-#: sphinx_nervproject_theme/postcard2.html:50
+#: sphinx_nervproject_theme/postcard2.html:51
msgid "Language"
msgstr "Langue"
@@ -135,10 +138,10 @@ msgid ""
" function will automatically search for all of the words. Pages\n"
" containing fewer words won't appear in the result list."
msgstr ""
-"Vous pouvez chercher ces documents ici. Entrez vos mots clé dans le "
-"champ ci-dissous et cliquez sur «chercher». Veuillez noter que la "
-"recherche porte sur l'ensemble des mots. Les pages contenant seulement "
-"une partie n'apparaîtront pas."
+"Vous pouvez chercher ces documents ici. Entrez vos mots clé dans le champ"
+" ci-dissous et cliquez sur «chercher». Veuillez noter que la recherche "
+"porte sur l'ensemble des mots. Les pages contenant seulement une partie "
+"n'apparaîtront pas."
#: sphinx_nervproject_theme/search.html:42
msgid "search"
@@ -201,25 +204,25 @@ msgstr "Courriel"
msgid "Docs"
msgstr "Documentation"
-#: sphinx_nervproject_theme/util/footer.html:4
+#: sphinx_nervproject_theme/util/footer.html:5
#, python-format
msgid "© Copyright %(copyright)s."
msgstr "© Copyright %(copyright)s."
-#: sphinx_nervproject_theme/util/footer.html:6
+#: sphinx_nervproject_theme/util/footer.html:7
#, python-format
msgid "© Copyright %(copyright)s."
msgstr "© Copyright %(copyright)s."
-#: sphinx_nervproject_theme/util/footer.html:12
+#: sphinx_nervproject_theme/util/footer.html:13
#, python-format
msgid ""
"\n"
" Licensed under Creative Commons\n"
-"