diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-01 18:35:47 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-01 18:38:02 +0100 |
commit | 0323bbd5b929b55c4031974b43559ce773440723 (patch) | |
tree | 19fcf66d1e3e9a6c55a7d4a13688a3797c0c5c30 /theme/custom | |
parent | 92f04c836f4d0cd367428532f64fd82f9874b07c (diff) |
Custom template for applications page
Diffstat (limited to 'theme/custom')
-rw-r--r-- | theme/custom/applications.html | 22 | ||||
-rwxr-xr-x | theme/custom/base.html | 54 | ||||
-rwxr-xr-x | theme/custom/custom.css | 9 |
3 files changed, 47 insertions, 38 deletions
diff --git a/theme/custom/applications.html b/theme/custom/applications.html new file mode 100644 index 0000000..eb0124b --- /dev/null +++ b/theme/custom/applications.html @@ -0,0 +1,22 @@ +{% extends "page.html" %} + +{% block after_content %} +{% for page in hidden_pages|selectattr("date")|sort(reverse=true,attribute="date") %} +{% for tag in page.tags if "application" == tag.name %} + <h2><a href="{{ SITEURL }}/{{ page.url }}{% if not DISABLE_URL_HASH %}#{{ page.slug }}{% endif %}">{{ page.title }}</a></h2> + <div> + {% if summarise or page.metadata['summary'] or SUMMARY_MAX_LENGTH %} + {% if page.featured_image %} + <img src="{{ page.featured_image }}"> + {% endif %} + {{ page.summary }} + {% endif %} + </div> +{% endfor %} + {% if not loop.last %} + <hr /> + {% endif %} +{% endfor %} +{{ super() }} + +{% endblock %} diff --git a/theme/custom/base.html b/theme/custom/base.html index 829cc1f..debd12b 100755 --- a/theme/custom/base.html +++ b/theme/custom/base.html @@ -3,7 +3,6 @@ {{ msg % kwargs }} {%- endmacro -%} {% endif %} - <!DOCTYPE html> <html lang="{{ DEFAULT_LANG }}"> <head> @@ -47,7 +46,7 @@ <link rel="stylesheet/less" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.less"> <script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.min.js" type="text/javascript"></script> {% else %} - <link rel="stylesheet" title="default theme" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css"> + <link rel="stylesheet" type="text/css" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/stylesheet/style.min.css"> {% endif %} {# DARK THEME STYLES #} @@ -92,11 +91,6 @@ {% endif %} {% if PLUGINS and 'tipue_search' in PLUGINS %} - <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/jquery.min.js"></script> - <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script> - <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.js"></script> - <script src="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch_set.min.js"></script> - <script src="{{ SITEURL }}/tipuesearch_content.js"></script> <link rel="stylesheet" href="{{ SITEURL }}/{{ THEME_STATIC_DIR }}/tipuesearch/tipuesearch.min.css" /> {% endif %} @@ -141,19 +135,22 @@ <meta name="msapplication-TileColor" content="{{ BROWSER_COLOR }}"> {% endif %} - {% if REL_CANONICAL %} - {% if page %} - <link rel="canonical" href="{{ SITEURL }}/{{ page.url }}"> - {% elif article %} - <link rel="canonical" href="{{ SITEURL }}/{{ article.url }}"> - {% elif page_name == 'index' and not articles_previous_page %} - <link rel="canonical" href="{{ SITEURL }}"> - {% elif author or category or tag or page_name == 'index' %} - <link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}"> - {% else %} - <link rel="canonical" href="{{ SITEURL }}/{{ output_file }}"> + {% if not PLUGINS or 'seo' not in PLUGINS %} + {% if REL_CANONICAL %} + {% if page %} + <link rel="canonical" href="{{ SITEURL }}/{{ page.url }}"> + {% elif article %} + <link rel="canonical" href="{{ SITEURL }}/{{ article.url }}"> + {% elif page_name == 'index' and not articles_previous_page %} + <link rel="canonical" href="{{ SITEURL }}"> + {% elif author or category or tag or page_name == 'index' %} + <link rel="canonical" href="{{ SITEURL }}/{{ articles_page.url }}"> + {% else %} + <link rel="canonical" href="{{ SITEURL }}/{{ output_file }}"> + {% endif %} {% endif %} - {% endif %} + {% endif %} + {% block meta %} <meta name="author" content="{{ AUTHOR }}" /> <meta name="description" content="{{ SITEDESCRIPTION }}" /> @@ -174,6 +171,9 @@ {% if GOOGLE_TAG_MANAGER %} {% include "partial/gtm.html" %} {% endif %} + {% if MICROSOFT_CLARITY %} + {% include "partial/clarity.html" %} + {% endif %} </head> <body {% if not THEME_COLOR_AUTO_DETECT_BROWSER_PREFERENCE %}class="{{ THEME_COLOR|default('light') }}-theme"{% endif %}> {% if GOOGLE_TAG_MANAGER %} @@ -181,7 +181,7 @@ {% endif %} <aside> <div> - <a href="{{ SITEURL }}"> + <a href="{{ SITEURL }}/"> {% if SITELOGO %} <img src="{{ SITELOGO }}" alt="{{ SITETITLE }}" title="{{ SITETITLE }}"> {% else %} @@ -190,13 +190,13 @@ </a> <h1> - <a href="{{ SITEURL }}">{{ SITETITLE }}</a> + <a href="{{ SITEURL }}/">{{ SITETITLE }}</a> </h1> {% if SITESUBTITLE %}<p>{{ SITESUBTITLE }}</p>{% endif %} {% if PLUGINS and 'tipue_search' in PLUGINS %} - <form class="navbar-search" action="/search.html" role="search"> + <form class="navbar-search" action="{{ SITEURL }}/search.html" role="search"> <input type="text" name="q" id="tipue_search_input" placeholder="{{ _('Search...') }}"> </form> {% endif %} @@ -274,7 +274,7 @@ {% if MAIN_MENU %} <nav> - <a href="{{ SITEURL }}">{{ _('Home') }}</a> + <a href="{{ SITEURL }}/">{{ _('Home') }}</a> {% for title, link in MENUITEMS %} <a href="{{ link }}">{{ _(title) }}</a> @@ -320,14 +320,6 @@ {% include 'partial/github.html' %} {% endif %} - {% if PLUGINS and 'tipue_search' in PLUGINS %} - <script> - $(document).ready(function() { - $('#tipue_search_input').tipuesearch(); - }); - </script> - {% endif %} - {% block additional_js %}{% endblock %} </body> </html> diff --git a/theme/custom/custom.css b/theme/custom/custom.css index c235968..32cd429 100755 --- a/theme/custom/custom.css +++ b/theme/custom/custom.css @@ -25,6 +25,7 @@ html[data-theme="light"] { main article { margin:0 10px 10px; + max-width: unset; } main article header p{ @@ -72,8 +73,7 @@ aside nav ul li { width:20vw; } main { - left: 20vw; - width: 80vw; + padding-left:20vw; } main article { margin:0 50px 50px; @@ -231,11 +231,6 @@ main article :not(pre)>code { border-radius:3px } -/* Add an overflow for math in order to prevent the expand the whole page */ -.math { - overflow: auto; -} - aside span.amp { font-family:Baskerville,"Goudy Old Style","Palatino","Book Antiqua",serif; font-size:110%; |