Skip to content

Commit

Permalink
not critical css for cara website #532
Browse files Browse the repository at this point in the history
  • Loading branch information
martvanrijthoven committed Jun 21, 2023
1 parent d30fd5e commit 804936d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
25 changes: 15 additions & 10 deletions radboudumc-template/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,21 @@
{% endif %}

<style>
{% if page %}
/* above the fold for {{ page.template }} */
{% include ["critical_css/" + page.template + ".css", "critical_css/home.css"] %}
{% elif article %}
/* above the fold for article */
{% include "critical_css/article.css" %}
{% elif page_name == 'highlights/index' or page_name == 'news/index' %}
/* above the fold for hightlights */
{% include "critical_css/index.css" %}
{% if NO_CRITICAL_CSS is defined and NO_CRITICAL_CSS == True %}
{# Do nothing, effectively a pass #}
{% else %}
/* no above the fold css for {{ page_name}} */
{% if page %}
/* above the fold for {{ page.template }} */
{% include ["critical_css/" + page.template + ".css", "critical_css/home.css"] %}
{% elif article %}
/* above the fold for article */
{% include "critical_css/article.css" %}
{% elif page_name == 'highlights/index' or page_name == 'news/index' %}
/* above the fold for hightlights */
{% include "critical_css/index.css" %}
{% else %}
/* no above the fold css for {{ page_name}} */
{% endif %}
{% endif %}
</style>

Expand Down Expand Up @@ -105,6 +109,7 @@

<body>


{% include "blocks/svg-definitions.html" %}
{% include "blocks/nav-top.html" %}

Expand Down
3 changes: 1 addition & 2 deletions website-cara-lab/pelicanconf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,7 @@
THEME = "../radboudumc-template"
DIRECT_TEMPLATES = ['index', 'archives', 'sitemap']



NO_CRITICAL_CSS = True

# Plugins
PLUGIN_PATHS = ["../plugins"]
Expand Down

0 comments on commit 804936d

Please sign in to comment.