From 6c9a2fe2e0df2db03ed6f5ac8ec9d89136c671ca Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 00:30:39 +0200 Subject: [PATCH 1/9] add imgping to on-off shortcode now if a image can be downloadet the service stateis on else off --- layouts/shortcodes/on-off.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/on-off.html b/layouts/shortcodes/on-off.html index e2d2308..0f74280 100644 --- a/layouts/shortcodes/on-off.html +++ b/layouts/shortcodes/on-off.html @@ -1,8 +1,26 @@ -{{ $mode := .Get 0 }} +{{ $mode := .Get 0 }}{{ $opt := .Get 1 }} + +{{ $img_on := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-on-icon_smal.png" )}} +{{ $img_off := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-off-icon_smal.png" )}} + {{ if eq $mode "on" }} - On + On {{ else if eq $mode "off"}} - Off + Off +{{ else if eq $mode "imgping" }} + {{ with $opt }} + {{ $id := md5 $opt }} + Off + + {{ else }} + Ned URL to image + {{ end }} {{ else }} ??? -{{end}} +{{ end }} From 5a00eaf362b4a3a4dd39f772bb11e7a2194bdffc Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 00:43:31 +0200 Subject: [PATCH 2/9] add default falue to imgping in on-of shortcode --- layouts/shortcodes/on-off.html | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/layouts/shortcodes/on-off.html b/layouts/shortcodes/on-off.html index 0f74280..4194899 100644 --- a/layouts/shortcodes/on-off.html +++ b/layouts/shortcodes/on-off.html @@ -1,4 +1,4 @@ -{{ $mode := .Get 0 }}{{ $opt := .Get 1 }} +{{ $mode := .Get 0 }}{{ $opt1 := .Get 1 }}{{ $opt2 := .Get 2 }} {{ $img_on := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-on-icon_smal.png" )}} {{ $img_off := ( printf "%s%s" $.Page.Site.BaseURL "img/on-off/switch-off-icon_smal.png" )}} @@ -8,18 +8,24 @@ {{ else if eq $mode "off"}} Off {{ else if eq $mode "imgping" }} - {{ with $opt }} - {{ $id := md5 $opt }} - Off + {{ with $opt1 }} + {{ $id := md5 $opt1 }} + {{ if eq $opt2 "on" }} + On + {{ else }} + Off + {{ end }} {{ else }} - Ned URL to image + imgping [URL to image] [default on/off] {{ end }} {{ else }} ??? From e0ac859df4f7f33aaf33b76522ee911e57f3bad1 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 00:57:05 +0200 Subject: [PATCH 3/9] services format table for atom now its easyer to maintain on atom --- content/services.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/content/services.md b/content/services.md index 050dd28..0464f19 100644 --- a/content/services.md +++ b/content/services.md @@ -10,17 +10,17 @@ draft = false +++ - Software | Address | Status | Comments - -----------------------------------------------|----------------------------|:-------:|:-------- - [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain - [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | - [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | - [TeamSpeak](https://www.teamspeak.com/)| [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | - [MineCraft](https://minecraft.net/) | [Obermui.DE](minecraft://Obermui.DE:25565) | {{}} | migrate server - [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} | - [OpenTracker](https://erdgeist.org/arts/software/opentracker/)| [CJDNS Address](fc15:368e:2797:79d1:71d4:f698:c081:d4a2) | {{}} | migrate server - [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore/repos) | {{}} | - [IPFS](https://ipfs.io/) | Internal | {{}} | + Software | Address | Status | Comments + ---------------------------------------------|------------------------------------------------------|:-----------------------------------------------------------------------------------:|:-------------- + [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain + [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | + [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | + [TeamSpeak](https://www.teamspeak.com/) | [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | + [MineCraft](https://minecraft.net/) | [Obermui.DE](minecraft://Obermui.DE:25565) | {{}} | migrate server + [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} | + [OpenTracker](https://erdgeist.org/arts/software/opentracker/)| [CJDNS Address](fc15:368e:2797:79d1:71d4:f698:c081:d4a2) | {{}} | migrate server + [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore/repos) | {{}} | + [IPFS](https://ipfs.io/) | Internal | {{}} | From f5d946d9ded935c2edb2218d394c23a5bf9c38d4 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 01:04:52 +0200 Subject: [PATCH 4/9] services switch static on/off to imgping --- content/services.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/services.md b/content/services.md index 0464f19..c0b023b 100644 --- a/content/services.md +++ b/content/services.md @@ -12,14 +12,14 @@ draft = false Software | Address | Status | Comments ---------------------------------------------|------------------------------------------------------|:-----------------------------------------------------------------------------------:|:-------------- - [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain - [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | - [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | + [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain + [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | + [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | [TeamSpeak](https://www.teamspeak.com/) | [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | [MineCraft](https://minecraft.net/) | [Obermui.DE](minecraft://Obermui.DE:25565) | {{}} | migrate server - [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} | + [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} | [OpenTracker](https://erdgeist.org/arts/software/opentracker/)| [CJDNS Address](fc15:368e:2797:79d1:71d4:f698:c081:d4a2) | {{}} | migrate server - [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore/repos) | {{}} | + [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore) | {{}} | [IPFS](https://ipfs.io/) | Internal | {{}} | From 348ea73a0ee54092922d36d40dd0a6c5b84ab975 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 01:05:42 +0200 Subject: [PATCH 5/9] services switch diaspora back to static for performance (timeout takes to long) --- content/services.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/services.md b/content/services.md index c0b023b..fed714c 100644 --- a/content/services.md +++ b/content/services.md @@ -12,7 +12,7 @@ draft = false Software | Address | Status | Comments ---------------------------------------------|------------------------------------------------------|:-----------------------------------------------------------------------------------:|:-------------- - [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain + [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | [TeamSpeak](https://www.teamspeak.com/) | [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | From 6b93c8ead42d769504fa40f1b9c1be375763d74f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 03:00:19 +0200 Subject: [PATCH 6/9] idee to look every 15s ... --- layouts/shortcodes/on-off.html | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/layouts/shortcodes/on-off.html b/layouts/shortcodes/on-off.html index 4194899..5f3e2b9 100644 --- a/layouts/shortcodes/on-off.html +++ b/layouts/shortcodes/on-off.html @@ -16,13 +16,23 @@ Off {{ end }} {{ else }} imgping [URL to image] [default on/off] From 0e4a1a46a0e117207d68005b8a240650238df75f Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 03:06:02 +0200 Subject: [PATCH 7/9] after some tests remove useles stuff --- layouts/shortcodes/on-off.html | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/layouts/shortcodes/on-off.html b/layouts/shortcodes/on-off.html index 5f3e2b9..a42a820 100644 --- a/layouts/shortcodes/on-off.html +++ b/layouts/shortcodes/on-off.html @@ -16,23 +16,16 @@ Off {{ end }} {{ else }} imgping [URL to image] [default on/off] From 7f5457f380f9773dc696e6cdebb639b0205325df Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 03:18:41 +0200 Subject: [PATCH 8/9] add reload shortcode reload site after n secounds --- layouts/shortcodes/reload.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 layouts/shortcodes/reload.html diff --git a/layouts/shortcodes/reload.html b/layouts/shortcodes/reload.html new file mode 100644 index 0000000..483de3b --- /dev/null +++ b/layouts/shortcodes/reload.html @@ -0,0 +1,13 @@ +{{ $seconds := .Get 0 }} +{{ $ms := ( printf "%s%s" $seconds "000" )}} + From 8230cf9a3e61c424b9ef1c8fb3ab44f22f26e617 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 14 Jul 2019 03:19:28 +0200 Subject: [PATCH 9/9] do without imgping because it takes to long and is often wrong due to cache systemes --- content/services.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/content/services.md b/content/services.md index fed714c..be826c4 100644 --- a/content/services.md +++ b/content/services.md @@ -10,17 +10,17 @@ draft = false +++ - Software | Address | Status | Comments - ---------------------------------------------|------------------------------------------------------|:-----------------------------------------------------------------------------------:|:-------------- - [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain - [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | - [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | - [TeamSpeak](https://www.teamspeak.com/) | [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | - [MineCraft](https://minecraft.net/) | [Obermui.DE](minecraft://Obermui.DE:25565) | {{}} | migrate server - [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} | - [OpenTracker](https://erdgeist.org/arts/software/opentracker/)| [CJDNS Address](fc15:368e:2797:79d1:71d4:f698:c081:d4a2) | {{}} | migrate server - [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore) | {{}} | - [IPFS](https://ipfs.io/) | Internal | {{}} | + Software | Address | Status | Comments + ---------------------------------------------|------------------------------------------------------|:------------------------:|:-------------- + [Diaspora](https://diasporafoundation.org/) | Diaspora.AltinSystems.DE | {{}} | switch domain + [NextCloud](https://nextcloud.com) | [Cloud.Obermui.de](https://cloud.obermui.de/login) | {{}} | + [PeerTube](https://joinpeertube.org) | [Video.Obermui.de](https://Video.Obermui.de) | {{}} | + [TeamSpeak](https://www.teamspeak.com/) | [Obermui.de](ts3server://80.241.216.82?port=9987) | {{}} | + [MineCraft](https://minecraft.net/) | [Obermui.DE](minecraft://Obermui.DE:25565) | {{}} | migrate server + [CJDNS](https://github.com/cjdelisle/cjdns/) | [Obermui.de:51935]({{}}post/connect-2-cjdns/) | {{}} + [OpenTracker](https://erdgeist.org/arts/software/opentracker/)| [CJDNS Address](fc15:368e:2797:79d1:71d4:f698:c081:d4a2) | {{}} | migrate server + [Gitea](https://gitea.io) | [Code.Obermui.DE](https://Code.Obermui.DE/explore) | {{}} | + [IPFS](https://ipfs.io/) | Internal | {{}} |