From d1b1a4f4f1c049203e79735fbfe3c2f5df71af78 Mon Sep 17 00:00:00 2001
From: Guillaume AGNIERAY <dev@agnieray.net>
Date: Wed, 15 Sep 2021 11:45:34 +0200
Subject: [PATCH 2/2] Use same theme as main website; closes #1442

---
 .../static/fonts/ptsans-bold-webfont.woff     | Bin 0 -> 31284 bytes
 .../static/fonts/ptsans-bold-webfont.woff2    | Bin 0 -> 24296 bytes
 .../fonts/ptsans-bolditalic-webfont.woff      | Bin 0 -> 33248 bytes
 .../fonts/ptsans-bolditalic-webfont.woff2     | Bin 0 -> 26076 bytes
 .../static/fonts/ptsans-italic-webfont.woff   | Bin 0 -> 33324 bytes
 .../static/fonts/ptsans-italic-webfont.woff2  | Bin 0 -> 26180 bytes
 .../static/fonts/ptsans-regular-webfont.woff  | Bin 0 -> 30712 bytes
 .../static/fonts/ptsans-regular-webfont.woff2 | Bin 0 -> 23928 bytes
 source/_styles/static/galette.css             | 245 ++++++++++++------
 source/_styles/templates/galette/layout.html  |  33 ++-
 10 files changed, 184 insertions(+), 94 deletions(-)
 create mode 100644 source/_styles/static/fonts/ptsans-bold-webfont.woff
 create mode 100644 source/_styles/static/fonts/ptsans-bold-webfont.woff2
 create mode 100644 source/_styles/static/fonts/ptsans-bolditalic-webfont.woff
 create mode 100644 source/_styles/static/fonts/ptsans-bolditalic-webfont.woff2
 create mode 100644 source/_styles/static/fonts/ptsans-italic-webfont.woff
 create mode 100644 source/_styles/static/fonts/ptsans-italic-webfont.woff2
 create mode 100644 source/_styles/static/fonts/ptsans-regular-webfont.woff
 create mode 100644 source/_styles/static/fonts/ptsans-regular-webfont.woff2

diff --git a/source/_styles/static/fonts/ptsans-bold-webfont.woff b/source/_styles/static/fonts/ptsans-bold-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..cdec41522a0d94eac2c08defaa15ef05206e1310
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-bold-webfont.woff2 b/source/_styles/static/fonts/ptsans-bold-webfont.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..da2c4b194b45a3a2617cc1dc7f2d5ecb55294a57
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-bolditalic-webfont.woff b/source/_styles/static/fonts/ptsans-bolditalic-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..bff9f09abfb4a67cad670a14e6b6e1ddc1dde22b
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-bolditalic-webfont.woff2 b/source/_styles/static/fonts/ptsans-bolditalic-webfont.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..98cd674168d3ae52fd62381c54a3e99dfedad81e
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-italic-webfont.woff b/source/_styles/static/fonts/ptsans-italic-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..0b4ea3eaab963fbec69d5a87a4ce88790e08d03c
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-italic-webfont.woff2 b/source/_styles/static/fonts/ptsans-italic-webfont.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..dabcf17e80f707cf7dc8e01eb319ea9038e3a2db
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-regular-webfont.woff b/source/_styles/static/fonts/ptsans-regular-webfont.woff
new file mode 100644
index 0000000000000000000000000000000000000000..028f627f42a18af5ebbd3f05faf1b22a33321fc6
GIT binary patch
diff --git a/source/_styles/static/fonts/ptsans-regular-webfont.woff2 b/source/_styles/static/fonts/ptsans-regular-webfont.woff2
new file mode 100644
index 0000000000000000000000000000000000000000..80d06fadf174d05742a39bf61a936bc32c82af74
GIT binary patch
diff --git a/source/_styles/static/galette.css b/source/_styles/static/galette.css
index cd69fe55..6c48603d 100644
--- a/source/_styles/static/galette.css
+++ b/source/_styles/static/galette.css
@@ -9,13 +9,51 @@
 
 @import url("basic.css");
 
+@font-face {
+    font-family: 'PtSans';
+    src: url('fonts/ptsans-regular-webfont.woff2') format('woff2'),
+         url('fonts/ptsans-regular-webfont.woff') format('woff');
+    font-weight: normal;
+    font-style: normal;
+}
+
+@font-face {
+    font-family: 'PtSans';
+    src: url('fonts/ptsans-bold-webfont.woff2') format('woff2'),
+         url('fonts/ptsans-bold-webfont.woff') format('woff');
+    font-weight: bold;
+    font-style: normal;
+}
+
+@font-face {
+    font-family: 'PtSans';
+    src: url('fonts/ptsans-bolditalic-webfont.woff2') format('woff2'),
+         url('fonts/ptsans-bolditalic-webfont.woff') format('woff');
+    font-weight: bold;
+    font-style: italic;
+}
+
+@font-face {
+    font-family: 'PtSans';
+    src: url('fonts/ptsans-italic-webfont.woff2') format('woff2'),
+         url('fonts/ptsans-italic-webfont.woff') format('woff');
+    font-weight: normal;
+    font-style: italic;
+}
+
+html {
+    line-height: 1.15;
+}
+
 body {
     background: #636B70 url(images/bg.png) top left no-repeat;
     padding: 0;
     margin: 0;
-    font-family: Arial, sans-serif;
-    font-size: 0.8125em;
-    line-height: 160%;
+    font: 400 14px/1.4em PtSans, Arial, sans-serif;
+    font-feature-settings: "kern" 1;
+    font-kerning: normal;
+    color: #6b6b6b;
+    text-align: justify;
 }
 
 img, a img {
@@ -27,6 +65,9 @@ img, a img {
     margin: 0 auto;
     clear:both;
 }
+.document + div.related {
+    font-size: 1em;
+}
 
 div.related ul {
     list-style: none;
@@ -45,10 +86,12 @@ div.related ul {
 .related .li{
     display:inline;
 }
-.related a {
+#page div.related a,
+#page div.related a:visited {
     border-bottom: none;
     padding: 0 0.4em 0 0;
     color:#636b70!important;
+    text-decoration: none;
 }
 
 .related li {
@@ -59,30 +102,28 @@ div.related ul {
 /** /Menu related */
 
 div.sphinxsidebar {
-    margin:0;
     float:right;
-    margin-left:0;
-    padding: 0 25px;
-    width: 200px;
+    margin:3rem 0 0 0;
+    padding:0 3rem 0 1rem;
+    width: 210px;
+    font-size: unset;
 }
 
-div.sphinxsidebar ul li.current > a {
-    font-weight: bold;
+div.sphinxsidebar p.topless,
+div.sphinxsidebar ul {
+    margin: 0;
 }
 
-div.sphinxsidebar ul li.current.toctree-l1 > a {
-    font-size: 1.1em;
-}
-div.sphinxsidebar ul ul, div.sphinxsidebar ul.want-points {
-    margin-left: 10px;
+div.sphinxsidebar ul li.current > a {
+    border-bottom: 1px solid #ffb619;
 }
 
 .document{
-    margin:0 250px 0 0;
+    margin:0 277px 0 0;
 }
 
 div.sphinxsidebarwrapper {
-    padding: 15px 0 0 0;
+    padding: 0;
     margin: 0;
     position: relative;
 }
@@ -96,20 +137,17 @@ div.sphinxsidebarwrapper {
 }
 
 .sphinxsidebarwrapper h3 {
-    font-size:1.4em;
-    font-weight: bold;
-    margin:.5em 0 1em;
-    color:#636B70;
-    text-shadow: 1px 1px 1px rgba(242,161,4,0.5);
-    border-bottom: 1px dotted #636B70;
+    margin:1em 0 .5em;
+    color:#6b6b6b;
+    border-width:0;
 }
 .sphinxsidebarwrapper h3 a{
-    color:#636B70!important;
+    color:#6b6b6b!important;
 }
 
 .sphinxsidebarwrapper h4 {
-    font-size: 1em;
     font-weight: bold;
+    border-width:0;
 }
 
 .sphinxsidebarwrapper p.topless {
@@ -124,15 +162,23 @@ div.sphinxsidebarwrapper {
     color: #6B6B6B!important;
     text-decoration:none!important;
     display: block;
+    padding: .2em .3em;
+    text-align: left;
 }
 
 .sphinxsidebarwrapper a:hover {
-    color: #9AC528!important;
+    color: #0486b5 !important;
+    background: rgba(0, 0, 0, 0.1);
 }
 
 #searchbox {
     display: block;
-    padding-bottom: 25px;
+    padding-bottom: 12em;
+}
+
+div.sphinxsidebar #searchbox input[type="text"],
+div.sphinxsidebar #searchbox input[type="submit"] {
+    padding: 0.5em;
 }
 
 .searchformwrapper::after,
@@ -148,6 +194,13 @@ div.admonition {
     -moz-border-radius:10px;
     -webkit-border-radius:10px;
     border-radius:10px;
+    color: #000;
+}
+
+div.admonition::after,
+blockquote::after {
+    display: unset;
+    content: unset;
 }
 
 div.admonition p{
@@ -192,7 +245,6 @@ div.warning {
 }
 
 .literal {
-    font-size:1.2em;
     background-color:rgba(99, 107, 112, 0.2);
     padding:.1em;
 }
@@ -230,12 +282,14 @@ h4,
 h5 {
     border: none;
     font-weight: bold;
-    color: #666;
+    color: #6b6b6b;
     background-color: inherit;
     font-size: 100%;
     line-height: 115%;
-    margin: .5em 0 .3em 0;
+    margin: 1.25em 0 .3em;
     clear: left;
+    border-bottom: 1px dotted #0486b5;
+    display: inline-block;
 }
 
 h1 a,
@@ -244,36 +298,32 @@ h3 a,
 h4 a,
 h5 a,
 a.nolink {
-    color: #636b70 !important;
+    color: #6b6b6b !important;
     text-decoration: none !important;
 }
 
-h2, h3, h4 {
-    color: #0486B5;
-    margin: 1.25em 0 .3em;
-    text-shadow: 1px 1px 1px rgba(242, 161, 4, 0.5);
+h1 a:hover,
+h2 a:hover,
+h3 a:hover,
+h4 a:hover,
+h5 a:hover,
+a.nolink:hover {
+    color: #000;
 }
 
 /* special headlines */
 h1 {
-    font-size: 180%;
-    /*padding:0 0 0 20px;*/
-    /*background:url(images/gbullet2.png) 0 50% no-repeat;*/
-    text-shadow: 1px 1px 1px rgba(242, 161, 4, 0.5);
-    color: #6B6B6B;
-    border-bottom: 1px solid #F2A104;
+    font-size: 2em;
+    border-bottom: 1px solid #ffb619;
 }
 h2 {
-    font-size: 160%;
+    font-size: 1.5em;
 }
 h3 {
-    font-size: 150%;
+    font-size: 1.25em;
 }
 h4 {
-    font-size: 140%;
-}
-h5 {
-    font-size: 130%;
+    font-size: 1em;
 }
 
 /* --------------- Links ------------------ */
@@ -281,15 +331,14 @@ h5 {
 a:link,
 a:visited {
     color: #279AC4;
-    text-decoration: none;
+    text-decoration: underline;
 }
 a:visited {
-    color: #708fab;
+    color: #279AC4;
 }
 a:hover,
 a:active {
-    color: #708fab;
-    text-decoration: underline;
+    color: #279AC4;
 }
 
 /* external link */
@@ -323,21 +372,22 @@ a.wikilink2 {
 }
 
 pre {
-    font-size: 120%;
     padding: 0.5em;
     border: 1px dashed #c4c4c4;
     color: #666;
     overflow: auto;
+    text-align: left;
+}
+
+pre,
+div[class*="highlight-"] {
+    clear: unset;
 }
 
 blockquote {
     border-left: 2px solid #c4c4c4;
     padding-left: 3px;
-}
-
-/* inline code words */
-code {
-    font-size: 120%;
+    text-align: left;
 }
 
 /** Form elements */
@@ -489,7 +539,7 @@ div#footer img {
 
 #logo {
     position: absolute;
-    top: 30px;
+    top: 29px;
     width: 100%;
 }
 
@@ -524,12 +574,11 @@ div#footer img {
     margin: 0 auto;
     background-color: #fff;
     border-radius: 6px;
-    max-width: 980px;
+    max-width: 1024px;
 }
 
 .documentwrapper {
-    padding: 60px 25px;
-    border-right: 1px solid #bfbfbf;
+    padding: 4rem 2rem 6rem 2rem;
 }
 
 #tests-unitaires {
@@ -558,17 +607,24 @@ div#footer img {
 }
 
 #footer{
-    padding: .5em .5em 0 .5em;
     text-align: center;
-    margin-top: 3em;
-    font-size: .9em;
+    margin-bottom: .5em;
 }
 
 #footer, #footer a{
-    color:rgba(255, 255, 255, 0.8);
+    color:rgba(255, 255, 255, 0.7);
 }
 #footer a {
-    text-decoration: underline;
+    text-decoration: none;
+    padding: .1em .3em;
+}
+#footer a:hover {
+    background-color: rgba(255, 255, 255, 0.2);
+    color: rgba(255, 255, 255, 0.7);
+}
+#footer a svg {
+    vertical-align: middle;
+    margin-right: .2rem;
 }
 
 .licbutton {
@@ -986,8 +1042,8 @@ div.error{
 #page div.related:first-child {
     position: absolute;
     z-index: 200;
-    top: 25px;
-    left: 25px;
+    top: 2rem;
+    left: 2rem;
     background:none;
     width: auto;
 }
@@ -1006,21 +1062,21 @@ div.error{
 
 #page div.related:last-child {
     position: absolute;
-    bottom: 25px;
-    left: 25px;
+    bottom: 3em;
+    left: 50%;
+    transform: translateX(-50%);
     background:none;
     width: auto;
 }
 
 #page div.related:last-child ul {
-    padding: 5px 10px;
-    margin: 0 250px 0 0;
+    display: flex;
 }
 
 #page div.related:last-child .right {
-    float: none;
     color: transparent;
     margin: 0;
+    order: 2;
 }
 
 #page div.related:last-child .right a {
@@ -1036,8 +1092,7 @@ div.error{
 }
 
 #page div.related:last-child li.right:nth-child(2) {
-    /*margin-right: 0;*/
-    float: left;
+    order: 1;
 }
 
 #page div.related:last-child .nav-item {
@@ -1062,11 +1117,10 @@ div.error{
     }
 
     div.sphinxsidebarwrapper {
-        padding-top: 72px;
+        padding-top: 1.5em;
     }
 
     .document {
-        /*padding-top: 0;*/
         margin: 0;
         background-color: white;
         transform: translateX(0) translateZ(0);
@@ -1140,16 +1194,45 @@ div.error{
     [class^="nav-button"] {
         display: none;
     }
+    div.sphinxsidebar {
+        width: 190px;
+    }
+    .document{
+        margin:0 240px 0 0;
+    }
+    #page div.related:last-child {
+        left: 40%;
+    }
 }
 
 @media (max-width: 979px) {
-    #page {
-        border-radius: 0;
-    }
-
     div.admonition,
     .docs {
       width: auto;
       display: block;
     }
 }
+
+@media (min-width: 992px) {
+    div.sphinxsidebar {
+        padding:0 3rem 0 1rem;
+        width: 216px;
+        margin-top: 2rem;
+    }
+    .documentwrapper {
+        padding: 5rem 1rem 5rem 3rem;
+    }
+    .document{
+        margin:0 286px 0 0;
+    }
+    #page div.related:first-child {
+        top: 3rem;
+        left: 3rem;
+    }
+}
+
+@media (max-width: 1024px) {
+    #page {
+        border-radius: 0;
+    }
+}
diff --git a/source/_styles/templates/galette/layout.html b/source/_styles/templates/galette/layout.html
index c6749190..d9125b9d 100644
--- a/source/_styles/templates/galette/layout.html
+++ b/source/_styles/templates/galette/layout.html
@@ -39,25 +39,32 @@
   </div><!-- /wrapper -->
   <div id="footer">
     <span>
+    {%- if show_sphinx %}
+      {% trans sphinx_version=sphinx_version|e %}Built with <a href="https://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+    {%- endif %}
+    {%- if last_updated %}
+      {%- if show_sphinx %}
+        &nbsp;-&nbsp;
+      {%- endif %}
+      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}{% endtrans %}
+    {%- endif %}
     {%- if show_copyright %}
+      {%- if show_sphinx or last_updated %}
+        &nbsp;-&nbsp;
+      {%- endif %}
+      <a href="https://creativecommons.org/licenses/by-sa/3.0" title="Attribution-ShareAlike 3.0 International (CC BY-SA 3.0)">CC BY-SA 3.0</a>&nbsp;-&nbsp;
       {%- if hasdoc('copyright') %}
-        {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
+        {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}{% endtrans %}
       {%- else %}
-        <strong>{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}</strong>
+        {% trans copyright=copyright|e %}&copy; <a href="https://galette.eu">{{ copyright }}</a>{% endtrans %}
       {%- endif %}
-      <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">
-          <img alt="CC Attribution-Share Alike 3.0 Unported" class="medialeft licbutton" src="{{ pathto('_static/images/cc-by-sa.png', 1) }}">
-      </a>
     {%- endif %}
-    {%- if last_updated %}
-      {%- if show_copyright %}
-        <br/>
-      {%- endif %}
-      {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
-    {%- endif %}
-    {%- if show_sphinx %}
-      {% trans sphinx_version=sphinx_version|e %}Created using <a href="https://sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+    {%- if show_sphinx or last_updated or show_copyright%}
+      <br/>
     {%- endif %}
+    <a href="https://github.com/galette"><svg width="16" height="15.604"><path d="M8 0C3.58 0 0 3.582 0 8c0 3.535 2.292 6.533 5.47 7.59.4.075.547-.172.547-.385 0-.19-.007-.693-.01-1.36-2.226.483-2.695-1.073-2.695-1.073-.364-.924-.89-1.17-.89-1.17-.725-.496.056-.486.056-.486.803.056 1.225.824 1.225.824.714 1.223 1.873.87 2.33.665.072-.517.278-.87.507-1.07-1.777-.2-3.644-.888-3.644-3.953 0-.873.31-1.587.823-2.147-.09-.202-.36-1.015.07-2.117 0 0 .67-.215 2.2.82.64-.178 1.32-.266 2-.27.68.004 1.36.092 2 .27 1.52-1.035 2.19-.82 2.19-.82.43 1.102.16 1.915.08 2.117.51.56.82 1.274.82 2.147 0 3.073-1.87 3.75-3.65 3.947.28.24.54.73.54 1.48 0 1.07-.01 1.93-.01 2.19 0 .21.14.46.55.38C13.71 14.53 16 11.53 16 8c0-4.418-3.582-8-8-8"/></svg> galette</a>&nbsp;
+    <a href="https://framapiaf.org/@galette"><svg width="16" height="15.604"><path transform="scale(0.07)" d="M211.80734 139.0875c-3.18125 16.36625-28.4925 34.2775-57.5625 37.74875-15.15875 1.80875-30.08375 3.47125-45.99875 2.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125 0 2.53375.15625 4.94625.46875 7.2025 3.38375 25.68625 25.47 27.225 46.39125 27.9425 21.11625.7225 39.91875-5.20625 39.91875-5.20625l.8675 19.09s-14.77 7.93125-41.08125 9.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234 213.82 1.40609 165.31125.20859 116.09125c-.365-14.61375-.14-28.39375-.14-39.91875 0-50.33 32.97625-65.0825 32.97625-65.0825C49.67234 3.45375 78.20359.2425 107.86484 0h.72875c29.66125.2425 58.21125 3.45375 74.8375 11.09 0 0 32.975 14.7525 32.975 65.0825 0 0 .41375 37.13375-4.59875 62.915"/><path transform="scale(0.07)" fill="#FFF" d="M177.50984 80.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025 0-17.4175 7.5075-17.4175 22.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375 0-15.74 6.32875-15.74 18.7975v59.15H38.90484V80.077c0-12.455 3.17125-22.3525 9.54125-29.675 6.56875-7.3225 15.17125-11.07625 25.85-11.07625 12.355 0 21.71125 4.74875 27.8975 14.2475l6.01375 10.08125 6.015-10.08125c6.185-9.49875 15.54125-14.2475 27.8975-14.2475 10.6775 0 19.28 3.75375 25.85 11.07625 6.36875 7.3225 9.54 17.22 9.54 29.675"/></svg> galette</a>&nbsp;
+    <a href="https://www.twitter.com/galette_soft"><svg width="16" height="15.604"><path d="M16 3.038c-.59.26-1.22.437-1.885.517.677-.407 1.198-1.05 1.443-1.816-.634.37-1.337.64-2.085.79-.598-.64-1.45-1.04-2.396-1.04-1.812 0-3.282 1.47-3.282 3.28 0 .26.03.51.085.75-2.728-.13-5.147-1.44-6.766-3.42C.83 2.58.67 3.14.67 3.75c0 1.14.58 2.143 1.46 2.732-.538-.017-1.045-.165-1.487-.41v.04c0 1.59 1.13 2.918 2.633 3.22-.276.074-.566.114-.865.114-.21 0-.41-.02-.61-.058.42 1.304 1.63 2.253 3.07 2.28-1.12.88-2.54 1.404-4.07 1.404-.26 0-.52-.015-.78-.045 1.46.93 3.18 1.474 5.04 1.474 6.04 0 9.34-5 9.34-9.33 0-.14 0-.28-.01-.42.64-.46 1.2-1.04 1.64-1.7z" fill-rule="nonzero"/></svg> galette_soft</a></nav>
     </span>
   </div>
   </div><!-- /galette -->
-- 
2.30.2

