Only load lightgallery and mermaid on relevant pages
This commit is contained in:
parent
5b46a7e442
commit
cfa3c5f66f
4 changed files with 23 additions and 5 deletions
|
@ -6,7 +6,7 @@ image: resource:user-settings.png
|
||||||
|
|
||||||
VPNs are a way of accessing application which sit on a separate network using an encrypted tunnel. Contrary to popular belief, they are not designed to be used for anonymising your internet habits. Whilst VPNs are designed to enable a client to access the servers network, it's possible to use them to provide a server to access to its client's network. With this, and a simple HTTP server, it's possible to open up applications on your home network to the internet, without the need for a static IP, or a port forward!
|
VPNs are a way of accessing application which sit on a separate network using an encrypted tunnel. Contrary to popular belief, they are not designed to be used for anonymising your internet habits. Whilst VPNs are designed to enable a client to access the servers network, it's possible to use them to provide a server to access to its client's network. With this, and a simple HTTP server, it's possible to open up applications on your home network to the internet, without the need for a static IP, or a port forward!
|
||||||
|
|
||||||
{{< mermaid caption="Network layout" >}}
|
{{<mermaid caption="Network layout">}}
|
||||||
graph LR
|
graph LR
|
||||||
|
|
||||||
A[End Users]
|
A[End Users]
|
||||||
|
@ -20,7 +20,7 @@ end
|
||||||
A-->B
|
A-->B
|
||||||
C---B
|
C---B
|
||||||
C-->D
|
C-->D
|
||||||
{{< /mermaid >}}
|
{{</mermaid>}}
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,10 @@
|
||||||
{{ partial "style.html" "css/font-awesome.min.css" }}
|
{{ partial "style.html" "css/font-awesome.min.css" }}
|
||||||
{{ partial "style.html" "css/highlight.css" }}
|
{{ partial "style.html" "css/highlight.css" }}
|
||||||
|
|
||||||
|
{{ if eq .Params.layout "flickr" }}
|
||||||
|
{{ partial "style.html" "css/lightgallery.min.css" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
<title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
|
<title>{{ partial "title-item.html" . }}{{ .Site.Title }}</title>
|
||||||
|
|
||||||
{{ partial "metadata.html" . }}
|
{{ partial "metadata.html" . }}
|
||||||
|
@ -28,10 +32,24 @@
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
||||||
|
{{ $raw_content := "" }}
|
||||||
|
|
||||||
|
{{ if .Content }}
|
||||||
|
{{ $raw_content = .RawContent }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "script.html" "js/jquery.js" }}
|
{{ partial "script.html" "js/jquery.js" }}
|
||||||
{{ partial "script_async.html" "js/lightgallery.js" }}
|
|
||||||
|
{{ if eq .Params.layout "flickr" }}
|
||||||
|
{{ partial "script_async.html" "js/lightgallery.js" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "script_async.html" "js/bootstrap.js" }}
|
{{ partial "script_async.html" "js/bootstrap.js" }}
|
||||||
{{ partial "script_async.html" "js/mermaid.js" }}
|
|
||||||
|
{{ if in $raw_content "{{<mermaid" }}
|
||||||
|
{{ partial "script_async.html" "js/mermaid.js" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ partial "script_async.html" "js/app.js" }}
|
{{ partial "script_async.html" "js/app.js" }}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -12,6 +12,7 @@ cp -r $BASEDIR/node_modules/lightgallery/dist/fonts $STATIC_BUILD
|
||||||
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
cp -r $STATIC_SRC/img $STATIC_BUILD/img
|
||||||
cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
cp -r $BASEDIR/node_modules/lightgallery/dist/img/* $STATIC_BUILD/img
|
||||||
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css $STATIC_BUILD/css/font-awesome.min.css
|
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/css/all.min.css $STATIC_BUILD/css/font-awesome.min.css
|
||||||
|
cp $BASEDIR/node_modules/lightgallery/dist/css/lightgallery.min.css $STATIC_BUILD/css/lightgallery.min.css
|
||||||
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts $STATIC_BUILD
|
cp -r $BASEDIR/node_modules/@fortawesome/fontawesome-free/webfonts $STATIC_BUILD
|
||||||
|
|
||||||
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.js
|
cp $BASEDIR/node_modules/jquery/dist/jquery.min.js $STATIC_BUILD/js/jquery.js
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
@import "variables";
|
@import "variables";
|
||||||
|
|
||||||
@import "node_modules/lightgallery/src/sass/lightgallery";
|
|
||||||
@import "node_modules/bootstrap/scss/bootstrap";
|
@import "node_modules/bootstrap/scss/bootstrap";
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue