]> git.llucax.com Git - personal/website.git/commitdiff
Revamp the looks of the page
authorLeandro Lucarella <luca@llucax.com>
Thu, 15 Oct 2020 11:42:39 +0000 (13:42 +0200)
committerLeandro Lucarella <luca@llucax.com>
Thu, 15 Oct 2020 12:16:44 +0000 (14:16 +0200)
Use the https://github.com/guzzle/guzzle_sphinx_theme that is more clean
and it's supposed to be mobile-friendly.

README [new file with mode: 0644]
source/_templates/layout.html [deleted file]
source/_templates/sidebar_donate.html [new file with mode: 0644]
source/conf.py
source/index.rst

diff --git a/README b/README
new file mode 100644 (file)
index 0000000..89ab59b
--- /dev/null
+++ b/README
@@ -0,0 +1,6 @@
+# Dependencies
+
+To build this website, at least these packages are needed:
+
+* `apt install python3-sphinx`
+* `pip install guzzle_sphinx_theme`
diff --git a/source/_templates/layout.html b/source/_templates/layout.html
deleted file mode 100644 (file)
index 1f2c743..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-{% extends "!layout.html" %}
-
-{% block header %}
-<div style="background-color: white; text-align: left; font-size: xx-large; padding: 10px 10px 15px 15px">
-       <a href="/">Leandro Lucarella's Home Page</a>
-       &nbsp;
-       <a href="https://www.paypal.com/donate?hosted_button_id=UZRR3REUC4SY2" title="Donate via Paypal"><img src="https://img.shields.io/badge/Donate-Paypal-0070ba" alt="Donate" /></a>
-       <a href="https://www.buymeacoffee.com/llucax" title="Donate via Buy Me A Coffee"><img src="https://img.shields.io/badge/Donate-Buy%20Me%20A%20Coffee-ffdd00" alt="Donate" /></a>
-       <a href="https://flattr.com/@llucax" title="Donate via Flattr"><img src="https://img.shields.io/badge/Donate-Flattr-6bc76b" alt="Donate" /></a>
-</div>
-{% endblock %}
-
-{%- block sidebarsearch %}
-{%- endblock %}
-
diff --git a/source/_templates/sidebar_donate.html b/source/_templates/sidebar_donate.html
new file mode 100644 (file)
index 0000000..d190b79
--- /dev/null
@@ -0,0 +1,7 @@
+<div class="sidebar-block">
+  <div class="sidebar-wrapper">
+    <a href="https://www.paypal.com/donate?hosted_button_id=UZRR3REUC4SY2" title="Donate via Paypal"><img src="https://img.shields.io/badge/Donate-Paypal-0070ba" alt="Donate" /></a><br />
+    <a href="https://flattr.com/@llucax" title="Donate via Flattr"><img src="https://img.shields.io/badge/Donate-Flattr-6bc76b" alt="Donate" /></a><br />
+    <a href="https://www.buymeacoffee.com/llucax" title="Donate via Buy Me A Coffee"><img src="https://img.shields.io/badge/Donate-Buy%20Me%20A%20Coffee-ffdd00" alt="Donate" /></a><br />
+  </div>
+</div>
index e7f1b99e23b72b62f616487badaa3301924a31bb..5684c71aa58d8f2180aa6b61a5dcc9425b3e90c3 100644 (file)
@@ -12,6 +12,7 @@
 # serve to show the default.
 
 import sys, os
+import guzzle_sphinx_theme
 
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
@@ -37,7 +38,7 @@ source_suffix = '.rst'
 master_doc = 'index'
 
 # General information about the project.
-project = u'Lala'
+project = u'Leandro Lucarella'
 copyright = u'2009, Leandro Lucarella'
 
 # The version info for the project you're documenting, acts as replacement for
@@ -89,24 +90,28 @@ pygments_style = 'sphinx'
 
 # -- Options for HTML output ---------------------------------------------------
 
+# Register the theme as an extension to generate a sitemap.xml
+extensions.append("guzzle_sphinx_theme")
+
 # The theme to use for HTML and HTML Help pages.  Major themes that come with
 # Sphinx are currently 'default' and 'sphinxdoc'.
-html_theme = 'default'
+html_theme = 'guzzle_sphinx_theme'
 
-# 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 = {}
+# Guzzle theme options (see theme.conf for more information)
+html_theme_options = {
+    # Set the name of the project to appear in the sidebar
+    "project_nav_name": "Leandro Lucarella",
+}
 
 # Add any paths that contain custom themes here, relative to this directory.
-#html_theme_path = []
+html_theme_path = guzzle_sphinx_theme.html_theme_path()
 
 # The name for this set of Sphinx documents.  If None, it defaults to
 # "<project> v<release> documentation".
-html_title = "Leandro Lucarella's Home Page"
+html_title = "Leandro Lucarella"
 
 # A shorter title for the navigation bar.  Default is the same as html_title.
-html_short_title = "Home"
+html_short_title = "Luca's Web"
 
 # The name of an image file (relative to this directory) to place at the top
 # of the sidebar.
@@ -131,7 +136,12 @@ html_static_path = ['_static']
 #html_use_smartypants = True
 
 # Custom sidebar templates, maps document names to template names.
-#html_sidebars = {}
+html_sidebars = { '**': [
+    'logo-text.html',
+    'globaltoc.html',
+    'searchbox.html',
+    'sidebar_donate.html',
+] }
 
 # Additional templates that should be rendered to pages, maps page names to
 # template names.
index 57a13776c37e62551cc20e8a71a72b94520e1ddd..34ac2903557e416452ff92749a8652b5fde4a41e 100644 (file)
@@ -17,16 +17,7 @@ for now. These are the things you can do:
 * Read my :doc:`resume/index` / `LinkedIn profile <https://www.linkedin.com/in/llucax/>`_.
 * Look at my `public photos collection`__.
 * See my :doc:`projects <proj/index>` and Git__ / GitHub__ / GitLab__ repositories.
-* :ref:`Search <search>` for something in particular [*]_.
-* .. raw:: html
-
-   <div>
-   <a target="_blank" rel="noreferrer noopener"
-       href="https://nextcloud.com/federation#luca@cloud.llucax.com"
-       style="padding:10px;background-color:#0082c9;color:#ffffff;border-radius:3px;padding-left:4px;">
-     <span style="background-image:url(https://cloud.llucax.com/core/img/logo.svg);width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;"></span>
-     Share with me via Nextcloud</a>
-   </div>
+* Search this website `using Google`__ (the local search is a bit limited).
 
 __ blog/
 __ http://llucax.newsblur.com/
@@ -34,16 +25,6 @@ __ https://www.flickr.com/photos/llucax/albums
 __ https://git.llucax.com/
 __ https://github.com/llucax
 __ https://gitlab.com/llucax
-
-
-.. [*] Sphinx_-generated pages only. Use the `big G`__ to `search the whole
-   site`__.
-
-__ http://www.google.com/
 __ https://www.google.com/search?q=site%3Allucax.com
 
-
-.. _sphinx: http://sphinx.pocoo.org/
-
-
 .. vim: set et sw=3 sts=3 tw=78 :