aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2018-02-09 09:31:50 +0100
committerFélix Sipma <felix.sipma@no-log.org>2018-02-09 09:31:50 +0100
commit4d9f241bac3b2d8bfafcb0c920a5ec9a2f664c27 (patch)
tree193acfe8a78daeb778adad0beede26221a893fc2
parenta25946d570d981a19e0bfef8adc9d35d58fdf085 (diff)
update layouts to use bundle js/css
-rw-r--r--Makefile15
-rw-r--r--layouts/_default/baseof.html6
-rw-r--r--layouts/index.html8
3 files changed, 14 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 2d2eee9..1f9d2c3 100644
--- a/Makefile
+++ b/Makefile
@@ -17,25 +17,32 @@ css:
mkdir -p $(DIST_STATIC)/css
cat \
node_modules/bootstrap/dist/css/bootstrap.min.css \
- node_modules/leaflet/dist/leaflet.css \
node_modules/font-awesome/css/font-awesome.min.css \
- $(STATIC)/css/* \
+ $(STATIC)/css/fournil.css \
> $(TMP)/css/fournil.css
+ cat \
+ node_modules/leaflet/dist/leaflet.css \
+ > $(TMP)/css/fournil-map.css
cp $(TMP)/css/fournil.css $(DIST_STATIC)/css
+ cp $(TMP)/css/fournil-map.css $(DIST_STATIC)/css
js:
mkdir -p $(TMP)/js/
mkdir -p $(DIST_STATIC)/js
cat \
- node_modules/leaflet/dist/leaflet.js \
node_modules/jquery/dist/jquery.js \
node_modules/popper.js/dist/umd/popper.js \
node_modules/bootstrap/js/dist/util.js \
node_modules/bootstrap/js/dist/collapse.js \
- $(STATIC)/js/* \
> $(TMP)/js/fournil.js
+ cat \
+ node_modules/leaflet/dist/leaflet.js \
+ $(STATIC)/js/fournil-map.js \
+ > $(TMP)/js/fournil-map.js
uglifyjs --compress --mangle -o $(TMP)/js/fournil.min.js $(TMP)/js/fournil.js
+ uglifyjs --compress --mangle -o $(TMP)/js/fournil-map.min.js $(TMP)/js/fournil-map.js
cp $(TMP)/js/fournil.min.js $(DIST_STATIC)/js
+ cp $(TMP)/js/fournil-map.min.js $(DIST_STATIC)/js
fonts:
mkdir -p $(DIST_STATIC)/fonts
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 3768a20..446c42d 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<title>{{ block "title" . }}{{ .Site.Title }} - {{ .Title }}{{ end }}</title>
{{ block "head" . }}{{ end }}
- <link href="{{ "css/bootstrap.min.css" | relURL }}" rel="stylesheet" type="text/css">
<link href="{{ "css/fournil.css" | relURL }}" rel="stylesheet" type="text/css">
</head>
<body>
@@ -35,10 +34,7 @@
{{ block "main" . }}
{{ end }}
</div>
- <script src="{{ "js/jquery.min.js" | relURL }}"></script>
- <script src="{{ "js/popper.min.js" | relURL }}"></script>
- <script src="{{ "js/util.js" | relURL }}"></script>
- <script src="{{ "js/collapse.js" | relURL }}"></script>
+ <script src="{{ "js/fournil.min.js" | relURL }}"></script>
{{ block "footer" . }}
{{ end }}
</body>
diff --git a/layouts/index.html b/layouts/index.html
index 26cbec8..a20c01b 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,5 +1,5 @@
{{ define "head" }}
-<link href="{{ "css/leaflet.css" | relURL }}" rel="stylesheet" type="text/css">
+<link href="{{ "css/fournil-map.css" | relURL }}" rel="stylesheet" type="text/css">
{{ end }}
{{ define "footer" }}
@@ -16,11 +16,7 @@
}
});
</script>
-<script src="{{ "js/leaflet.js" | relURL }}"></script>
-<script src="{{ "js/jquery.min.js" | relURL }}"></script>
-<script src="{{ "js/util.js" | relURL }}"></script>
-<script src="{{ "js/dropdown.js" | relURL }}"></script>
-<script src="{{ "js/fournil-map.js" | relURL }}"></script>
+<script src="{{ "js/fournil-map.min.js" | relURL }}"></script>
{{ end }}
{{ define "fournil-nav-classes" }} fournil-nologo-nav{{ end }}