Attempt to bundle some contrib static files to reduce network requests
This commit is contained in:
parent
8c3fe1da8b
commit
d27504d46f
8 changed files with 10 additions and 11 deletions
|
@ -20,8 +20,6 @@ mkcontrib elevator-js node_modules/elevator.js/demo/music/*
|
|||
mkcontrib shareon node_modules/shareon/dist/{shareon.iife.*,shareon.min.css*}
|
||||
mkcontrib fira-code node_modules/@fontsource/fira-code/latin.css
|
||||
mkcontrib fira-code/files node_modules/@fontsource/fira-code/files/fira-code-latin-*
|
||||
mkcontrib htmx node_modules/htmx.org/dist/{htmx.min.js,ext}
|
||||
mkcontrib glightbox node_modules/glightbox/dist/css/glightbox.min.css
|
||||
|
||||
curl -sf -L https://raw.githubusercontent.com/genmon/aboutfeeds/main/tools/pretty-feed-v3.xsl -o $CONTRIB_DIR/pretty-feed-v3.xsl
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ const Elevator = require("elevator.js");
|
|||
const debounce = require("lodash.debounce");
|
||||
const throttle = require("lodash.throttle");
|
||||
|
||||
require("htmx.org");
|
||||
|
||||
const HERO = document.querySelector("section.hero");
|
||||
const ROOT = document.querySelector(":root");
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
require("lite-youtube-embed");
|
||||
const GLightbox = require("glightbox");
|
||||
|
||||
window.addEventListener("load", () => {
|
|
@ -1 +0,0 @@
|
|||
require("lite-youtube-embed");
|
3
static/src/scss/content-contrib.scss
Normal file
3
static/src/scss/content-contrib.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
@import "lite-youtube-embed/src/lite-yt-embed";
|
||||
@import "shareon/dist/shareon.min";
|
||||
@import "glightbox/dist/css/glightbox";
|
|
@ -1 +0,0 @@
|
|||
@import "lite-youtube-embed/src/lite-yt-embed";
|
|
@ -44,12 +44,11 @@
|
|||
{% footer %}
|
||||
{% endcache %}
|
||||
|
||||
<script async defer type="text/javascript" src="{% static 'js/base.js' %}" integrity="{% sri_integrity_static 'js/base.js' %}"></script>
|
||||
<script async defer type="text/javascript" src="{% static 'contrib/htmx/htmx.min.js' %}" integrity="{% sri_integrity_static 'contrib/htmx/htmx.min.js' %}"></script>
|
||||
|
||||
{# Not async to avoid bright flashes #}
|
||||
{% sri_static "js/dark-mode.js" %}
|
||||
|
||||
<script async defer type="text/javascript" src="{% static 'js/base.js' %}" integrity="{% sri_integrity_static 'js/base.js' %}"></script>
|
||||
|
||||
{% block extra_js %}{% endblock %}
|
||||
|
||||
{% block plausible %}
|
||||
|
|
|
@ -23,15 +23,13 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block extra_css %}
|
||||
{% sri_static "css/lite-youtube-embed.css" %}
|
||||
{% sri_static "css/content-contrib.css" %}
|
||||
{% sri_static "contrib/shareon/shareon.min.css" %}
|
||||
{% sri_static "contrib/glightbox/glightbox.min.css" %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="{% url 'code-block:styles' %}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
<script async defer type="text/javascript" src="{% static 'js/lite-youtube-embed.js' %}" integrity="{% sri_integrity_static 'js/lite-youtube-embed.js' %}"></script>
|
||||
<script async defer type="text/javascript" src="{% static 'js/content.js' %}" integrity="{% sri_integrity_static 'js/content.js' %}"></script>
|
||||
<script async defer type="text/javascript" src="{% static 'contrib/shareon/shareon.iife.js' %}" integrity="{% sri_integrity_static 'contrib/shareon/shareon.iife.js' %}" init></script>
|
||||
<script async defer type="text/javascript" src="{% static 'js/lightbox.js' %}" integrity="{% sri_integrity_static 'js/lightbox.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in a new issue