Skip to contentSkip to conversation

HTML site tweaks + SVG

PATCH In review Stephen Boyd 2 participants 5 messages Aug 7, 2017 – Aug 8, 2017 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

cover HTML site tweaks + SVG

These patches tweak the config to have the github project and sidebar as well as add an SVG for the devicetree logo and then uses that logo instead of the png on the website.

Stephen Boyd (3):
conf: Configure html to have github project and sidebar Add an SVG logo
Use the svg for html logo

 source/conf.py             | 17 +++++++++++++----
 source/devicetree-logo.svg | 14 ++++++++++++++
 2 files changed, 27 insertions(+), 4 deletions(-)
 create mode 100644 source/devicetree-logo.svg
Signature · 1 line
2.10.0.297.gf6727b0

A message that is not in the archive (sent off-list or not yet received): 20170807233917.17409-1-stephen.boyd-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org

#2 lore raw

PATCH 1/3 conf: Configure html to have github project and sidebar

The sidebar helps in navigating the document. Otherwise you have to go to the home page to find the other sections. Also, add the github repo information so we can link to it automatically with the "watch" button.

---
 source/conf.py | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
source/conf.py +12 -3
index 8f7111709646..4654e49761d2 100644
@@ -133,7 +133,10 @@ html_theme = 'alabaster'
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
-#html_theme_options = {}
+html_theme_options = {
+        'github_user': 'devicetree-org',
+        'github_repo': 'devicetree-specification',
+}
 
 # Add any paths that contain custom themes here, relative to this directory.
 html_theme_path = [alabaster.get_path()]
@@ -174,8 +177,14 @@ html_static_path = ['_static']
 #html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
-
+html_sidebars = {
+    '**': [
+        'about.html',
+        'navigation.html',
+        'relations.html',
+        'searchbox.html',
+    ]
+}
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
 #html_additional_pages = {}
Signature · 1 line
2.10.0.297.gf6727b0
#3 lore raw

PATCH 2/3 Add an SVG logo

In reply to a message not in the archive

Traced over the png version in inkscape and then run through an optimizer/simplifier to remove all the inkscape cruft.

---
 source/devicetree-logo.svg | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 source/devicetree-logo.svg
source/devicetree-logo.svg new file +14 -0
new file mode 100644
index 000000000000..56f30d1bdbe3
@@ -0,0 +1,14 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 251.46 250.81">
+  <g transform="translate(-52.713 -357.557)">
+    <path fill="none" stroke="#000" stroke-width="4.5" d="M157.4 376.82l-.08-16.9M72.4 545.25l-17.3.07M301.57 545.48l-17.32.08M301.9 503.6l-17.2.07M301.7 461.87l-16.9.08M301.5 420.13l-16.92.08M240.73 376.88l-.08-16.9M198.85 376.82l-.08-16.9M115.63 377.2l-.07-17.36M71.9 420.36l-16.9.07M72.12 462.1l-16.9.07M72.3 503.82l-17.2.07M115.48 605.77l-.07-16.9M198.92 605.94l-.07-16.9M240.73 605.9l-.08-16.92M157.4 606.1l-.08-16.92M115.74 568.2H240.4" stroke-linecap="round"/>
+    <path fill="none" stroke="#000" stroke-width="4.4000001" d="M157.03 567.96v-36.2l-27.8-15.68"/>
+    <path fill="none" stroke="#000" stroke-width="5" d="M177.48 488.73l-33.36-19.04"/>
+    <path fill="none" stroke="#000" stroke-width="4.49999952" d="M178.48 566.8V450.97"/>
+    <path fill="none" stroke="#000" stroke-width="4.4000001" d="M199.03 567v-76.87l26.86-14.75"/>
+    <path fill="none" stroke="#000" stroke-width="4.7" d="M79.95 379.12h198.1c2.8 0 4.4 1.57 4.4 3.87l.06 200.16c0 2.13-2.03 3.66-4.38 3.66H81.98c-7.14 0-7.23 0-7.23-6.4V385.43c0-4.6 1.08-6.32 5.2-6.32z" stroke-linejoin="round"/>
+    <circle cx="128.28833" cy="458.41843" r="20.60775" fill="#8b63a9"/>
+    <circle cx="178.59291" cy="431.41653" r="20.60775" fill="#0cb2dd"/>
+    <circle cx="244.23465" cy="467.79355" r="20.60775" fill="#f48414"/>
+    <circle cx="112.6982" cy="507.95236" r="20.60775" fill="#009641"/>
+  </g>
+</svg>
Signature · 1 line
2.10.0.297.gf6727b0
#4 lore raw

PATCH 3/3 conf: Use the svg for html logo

In reply to a message not in the archive

I couldn't get the pdf output to use the svg, but at least we can get the html output to.

---
 source/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
source/conf.py +1 -1
index 4654e49761d2..1881e29c8414 100644
@@ -150,7 +150,7 @@ html_theme_path = [alabaster.get_path()]
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
-html_logo = "devicetree-logo.png"
+html_logo = "devicetree-logo.svg"
 
 # The name of an image file (relative to this directory) to use as a favicon of
 # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
Signature · 1 line
2.10.0.297.gf6727b0
#5 lore raw
In reply to a message not in the archive
Quoted 9 lines · Stephen Boyd

These patches tweak the config to have the github project and sidebar as well as add an SVG for the devicetree logo and then uses that logo instead of the png on the website.

Stephen Boyd (3):
conf: Configure html to have github project and sidebar Add an SVG logo
Use the svg for html logo

Quoted 4 lines
 source/conf.py             | 17 +++++++++++++----
 source/devicetree-logo.svg | 14 ++++++++++++++
 2 files changed, 27 insertions(+), 4 deletions(-)
 create mode 100644 source/devicetree-logo.svg

Series applied. Thanks.

Rob