Browse Source

Change the square logo for a wide one (#6397)

Co-authored-by: Patchcoat <[email protected]>
Yuri Sizov 2 years ago
parent
commit
4096508fb6
6 changed files with 15 additions and 8 deletions
  1. 9 2
      _static/css/custom.css
  2. 4 4
      _static/js/custom.js
  3. 1 1
      _tools/list-unused-images.sh
  4. 1 1
      conf.py
  5. BIN
      img/docs_logo.png
  6. 0 0
      img/docs_logo.svg

+ 9 - 2
_static/css/custom.css

@@ -844,11 +844,17 @@ kbd.compound > .kbd,
     opacity: var(--logo-opacity);
 }
 
+.wy-side-nav-search > a {
+    padding: 0;
+    margin-bottom: 0.404em;
+    margin-top: 0.404em;
+}
+
 .wy-side-nav-search > a img.logo {
     /* Fixed size to prevent reflows and support hiDPI displays */
     /* A 5 pixel margin is added on each side. The logo itself displays at 200×200 at 100% scaling. */
-    width: 210px;
-    height: 210px;
+    width: 270px;
+    height: 70px;
 }
 
 .wy-side-nav-search {
@@ -936,6 +942,7 @@ kbd.compound > .kbd,
 /* Version branch label below the logo */
 .wy-side-nav-search > div.version {
     color: var(--navbar-level-3-color);
+    font-size: 14px;
     opacity: 0.9;
 }
 

+ 4 - 4
_static/js/custom.js

@@ -16,13 +16,13 @@ const registerOnScrollEvent = (function(){
   // Configuration.
 
   // The number of pixels the user must scroll by before the logo is completely hidden.
-  const scrollTopPixels = 234;
+  const scrollTopPixels = 84;
   // The target margin to be applied to the navigation bar when the logo is hidden.
-  const menuTopMargin = 90;
+  const menuTopMargin = 88;
   // The max-height offset when the logo is completely visible.
-  const menuHeightOffset_default = 338;
+  const menuHeightOffset_default = 180;
   // The max-height offset when the logo is completely hidden.
-  const menuHeightOffset_fixed = 102;
+  const menuHeightOffset_fixed = 98;
   // The distance between the two max-height offset values above; used for intermediate values.
   const menuHeightOffset_diff = (menuHeightOffset_default - menuHeightOffset_fixed);
 

+ 1 - 1
_tools/list-unused-images.sh

@@ -9,7 +9,7 @@ rm -f tmp-unused-images-history
 # Exceptions are ignored, and for .svg files we also look for potential .png
 # files with the same base name, as they might be sources.
 
-exceptions="docs_logo.png tween_cheatsheet.png"
+exceptions="docs_logo.svg tween_cheatsheet.png"
 
 files=$(find -name "_build" -prune -o \( -name "*.png" -o -name "*.jpg" -o -name "*.svg" -o -name "*.gif" \) -print | sort)
 

+ 1 - 1
conf.py

@@ -177,7 +177,7 @@ html_context = {
     "godot_title_prefix": "" if on_rtd else "(DEV) ",
 }
 
-html_logo = "img/docs_logo.png"
+html_logo = "img/docs_logo.svg"
 
 # These folders are copied to the documentation's HTML output
 html_static_path = ["_static"]

BIN
img/docs_logo.png


File diff suppressed because it is too large
+ 0 - 0
img/docs_logo.svg


Some files were not shown because too many files changed in this diff