From ddf6e90fe171130b5497f31faa79978319aa8c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 1 May 2020 13:52:46 +0200 Subject: Setup local mirroring of frontend libs. --- README | 19 +++++++++++++++---- README.in | 15 ++++++++++++--- download-deps | 10 ++++++++++ module/output/html.scm | 6 +++--- static/.gitignore | 2 ++ 5 files changed, 42 insertions(+), 10 deletions(-) create mode 100755 download-deps create mode 100644 static/.gitignore diff --git a/README b/README index f4b56e57..11892857 100644 --- a/README +++ b/README @@ -24,7 +24,7 @@ repports, and other stuff should be sent to . If you want to contribute something yourself, either see TODO.* for things to do, or run `grep -RE 'TODO|NOTE'. -Requirements & Dependencies +Requirements & Dependencies --------------------------- For basic functionallity guile-2.2 or greater should be enough (tested to work with guile-3.0). You do however need to supply your @@ -32,9 +32,12 @@ own calendar files. I recommend vdirsyncer for fetching local copies from all over the internet. For popups to work the JS library Tipped is also needed, which -brings a transitive dependency on JQuery. -- https://tippedjs.com -- JQuery +brings a transitive dependency on JQuery. The script `download-deps' +fetches both into "good" places in the static sub-directory. Tipped +[TIPPED] is used under Creative Commons BY 4.0 [CCBY], © staaky. +JQuery is used in accordance to their license [JQUERY]. + +The zoneinfo data [TZ] is in the public domain [TZLIC]. Building -------- @@ -49,3 +52,11 @@ Techical Details - Internally all weeks start on sunday, which is repsenented as `0'. +References +---------- + +[TIPPED] https://github.com/staaky/tipped +[CCBY] https://creativecommons.org/licenses/by/4.0/ +[JQUERY] https://github.com/jquery/jquery/blob/master/LICENSE.txt +[TZ] https://github.com/eggert/tz +[TZLIC] https://github.com/eggert/tz/blob/master/LICENSE diff --git a/README.in b/README.in index b3726eee..d5e66352 100644 --- a/README.in +++ b/README.in @@ -16,9 +16,9 @@ Requirements & Dependencies --------------------------- For basic functionallity guile-2.2 or greater should be enough (tested to work with guile-3.0). You do however need to supply your own calendar files. I recommend vdirsyncer for fetching local copies from all over the internet. -For popups to work the JS library Tipped is also needed, which brings a transitive dependency on JQuery. -- https://tippedjs.com -- JQuery +For popups to work the JS library Tipped is also needed, which brings a transitive dependency on JQuery. The script `download-deps' fetches both into "good" places in the static sub-directory. Tipped [TIPPED] is used under Creative Commons BY 4.0 [CCBY], © staaky. JQuery is used in accordance to their license [JQUERY]. + +The zoneinfo data [TZ] is in the public domain [TZLIC]. Building -------- @@ -29,3 +29,12 @@ Techical Details ---------------- - Internally all weeks start on sunday, which is repsenented as `0'. + +References +---------- + +[TIPPED] https://github.com/staaky/tipped +[CCBY] https://creativecommons.org/licenses/by/4.0/ +[JQUERY] https://github.com/jquery/jquery/blob/master/LICENSE.txt +[TZ] https://github.com/eggert/tz +[TZLIC] https://github.com/eggert/tz/blob/master/LICENSE \ No newline at end of file diff --git a/download-deps b/download-deps new file mode 100755 index 00000000..7cb06d1b --- /dev/null +++ b/download-deps @@ -0,0 +1,10 @@ +#!/bin/bash + +test -f v4.7.0.tar.gz || curl -sOL https://github.com/staaky/tipped/archive/v4.7.0.tar.gz +test -d static/tipped-4.7.0/ || tar xf v4.7.0.tar.gz -C static tipped-4.7.0/dist/ + +jquery="jquery-3.1.1.min.js" +test -f "static/$jquery" || { + cd static + curl -sOL "https://code.jquery.com/$jquery" +} diff --git a/module/output/html.scm b/module/output/html.scm index fb771507..ee733ab7 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -626,14 +626,14 @@ (content ,(date->string start-date "~s")))) (meta (@ (name end-time) (content ,(date->string (date+ end-date (date day: 1)) "~s")))) - ,(include-css "http://gandalf.adrift.space:8000/tipped/dist/css/tipped.css") + ,(include-css "/static/tipped-4.7.0/dist/css/tipped.css") ,(include-css "/static/style.css") ,(include-alt-css "/static/dark.css" '(title "Dark")) ,(include-alt-css "/static/light.css" '(title "Light")) - (script (@ (src "https://code.jquery.com/jquery-3.1.1.min.js")) "") - (script (@ (src "http://gandalf.adrift.space:8000/tipped/dist/js/tipped.min.js")) "") + (script (@ (src "/static/jquery-3.1.1.min.js")) "") + (script (@ (src "/static/tipped-4.7.0/dist/js/tipped.min.js")) "") (script (@ (src "/static/script.js")) "") (style ,(format #f "~:{.CAL_~a { background-color: ~a; color: ~a }~%.CAL_bg_~a { border-color: ~a }~%~}" diff --git a/static/.gitignore b/static/.gitignore new file mode 100644 index 00000000..b99de213 --- /dev/null +++ b/static/.gitignore @@ -0,0 +1,2 @@ +tipped-4.7.0 +jquery-3.* -- cgit v1.2.3