aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-05-01 13:52:46 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-05-01 13:52:46 +0200
commitddf6e90fe171130b5497f31faa79978319aa8c92 (patch)
tree66495499d5bd4093002133df160743830f8b6efb
parentMerge branch 'master' into tooltip (diff)
downloadcalp-ddf6e90fe171130b5497f31faa79978319aa8c92.tar.gz
calp-ddf6e90fe171130b5497f31faa79978319aa8c92.tar.xz
Setup local mirroring of frontend libs.
-rw-r--r--README19
-rw-r--r--README.in15
-rwxr-xr-xdownload-deps10
-rw-r--r--module/output/html.scm6
-rw-r--r--static/.gitignore2
5 files changed, 42 insertions, 10 deletions
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 <hugo@lysator.liu.se>.
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.*