Compare commits

..

21 Commits

Author SHA1 Message Date
Moritz Kempe bfb7453a79 added images 2023-07-08 03:25:11 +02:00
Moritz Kempe df0f7fd625 deleted now unused pictures 2023-07-08 03:25:11 +02:00
Moritz Kempe f5b68c8893 first rewrote 2023-07-08 03:25:11 +02:00
alex 4fd397929e Centering status indicator 2023-07-05 15:14:51 +02:00
alex 3d28b7a71d Adapt style for better mobile centering of status indicator 2023-07-05 15:12:31 +02:00
alex 59a9b68528 Removed sandbox attribute for spaceapi status indicator 2023-07-05 15:06:34 +02:00
alex 37150331f8 Allowed more functions for iframe for the embedded spaceapi status indicator 2023-07-05 14:06:08 +02:00
alex e6d4595a68 Merge pull request 'Embed status indicator for spaceapi' (#89) from spaceapi-status-indicator into main
Reviewed-on: #89
2023-07-05 13:59:53 +02:00
alex 64c4042276 Merge pull request 'added jetzt2 Geekend' (#88) from moke/Homepage:jetzt2 into main
Reviewed-on: #88
2023-07-05 09:22:50 +02:00
Alexander Böhm b6bdd10d73 Embed status indicator for spaceapi 2023-07-02 02:24:37 +02:00
Moritz Kempe 0ca690a84d added blog entry for #jetzt2 Geekend 2023-07-01 20:30:58 +02:00
moke 1270eed53a Merge pull request 'main' (#2) from Frontend/Homepage:main into main
Reviewed-on: moke/Homepage#2
2023-07-01 19:08:08 +02:00
alex 019bad3b99 Merge pull request 'Bugfix logo change' (#87) from bugfix-logo-change into main
Reviewed-on: #87
2023-06-28 22:42:37 +02:00
alex af4560513b Added shebang 2023-06-28 22:37:35 +02:00
alex 2b5ddcd72b Cosmetic changes 2023-06-28 22:32:44 +02:00
alex bc98aa2fa2 „spaceapi.py“ ändern 2023-06-28 22:30:33 +02:00
alex 69f8f48fcc Merge pull request 'SpaceAPI on our homepage' (#86) from moke/Homepage:spaceapi into main
Reviewed-on: #86
2023-06-28 22:27:03 +02:00
Moritz Kempe f594a82881 successfull deployment on test system 2023-06-25 21:41:18 +02:00
Moritz Kempe 79d8daf77c scripts for replacing the logo according to the space status 2023-06-24 23:12:04 +02:00
Moritz Kempe cde60e8d35 added alternative logo to visualize the space status 2023-06-24 23:08:18 +02:00
moke 58928da928 Merge pull request 'main' (#1) from Frontend/Homepage:main into main
Reviewed-on: moke/Homepage#1
2023-02-27 23:23:14 +01:00
16 changed files with 382 additions and 0 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 34 KiB

BIN
assets/logo_closed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

79
assets/logo_closed.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/logo_open.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

78
assets/logo_open.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

BIN
assets/logo_unknown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

79
assets/logo_unknown.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -90,6 +90,9 @@ latest_remote_sha () {
# do the build
build_page() {
# sync logo with spaceapi
./spaceapi.py "$CLONE_DIR"
TMPDIR=$(mktemp -d -t hugo_build_XXXXX)
$HUGO_CMD \

View File

@ -75,6 +75,9 @@ params:
schema: true
twitter_cards: true
spaceapi:
embed_indicator: /spaceapi-status
# Define all supported taxonomies
taxonomies:
category: categories

View File

@ -0,0 +1,20 @@
---
title: "21.07. - 23.07.2023: chaos.jetzt Geekend"
slug: jetzt2-geekend
date: 2023-07-01T20:00:00+02:00
type: post
draft: false
categories:
- Veranstaltungen
tags:
- dezentrale
- chaos.jetzt
- jetzt2
- CCC
author: pilgrim
---
Am 21. - 23.07. findet in unseren Räumen #jetzt2, das dritte Chaos.Jetzt Geekend statt. Chaos.Jetzt ist eine Vernetzung von Jugendlichen im Chaos-Umfeld. Alle chaos-nahen Wesen zwischen 16 und 25 Jahren sind dazu eingeladen, sich ein kostenloses Ticket zu klicken.
Alles Weitere (Ticketverfügbarkeit, Fahrtkostenerstattung, Übernachtung in der Jugendherberge, ...) wird auf der [chaos.jetzt Website](https://chaos.jetzt/), im [Matrix Raum](https://matrix.to/#/#allgemein:chaos.jetzt) und auf [Mastodon](https://chaos.social/@jetzt) bekannt geben. Eine Teilname ist nur mit dem kostenlosen Ticket möglich.
Das #jetzt2 Orgateam und die dezentrale freuen sich auf ein cooles Geekend.

View File

@ -35,6 +35,7 @@ Hinweis
### 2023
* _21.07. - 23.07.2023_ -- [chaos.jetzt Geekend #jetzt2]({{< ref "/posts/2023/07/chaos-jetzt-jetzt2-geekend.md" >}})
* _25.03.2023_ -- [Tag des offenen Hackspace]({{< ref "/posts/2023/03/tag-des-offenen-hackspace.md" >}})

View File

@ -9,3 +9,4 @@
<meta name="robots" content="noindex">
<meta http-equiv="refresh" content="{{ $delay }}; url={{ $url }}">
{{- end }}
<link rel="stylesheet" href="/styles.css">

View File

@ -0,0 +1,43 @@
{{- $showhead := default true .Site.Params.showNavHeader }}
{{- if or $showhead .Site.Menus.main }}
<div class="navigation">
{{- if $showhead }}
<div class="navigation-header clearfix">
<div class="pure-menu pure-menu-horizontal">
{{- with .Site.Title }}
<a class="pure-menu-heading pure-menu-link" href="{{ $.Site.Home.RelPermalink }}">
{{ . }}
</a>
{{- end }}
{{- with .Site.Params.subtitle }}
<ul class="pure-menu-list navigation-header-subtitle pull-end">
<li class="pure-menu-item pure-menu-disabled">
<span class="pure-menu-link">{{ . }}</span>
</li>
</ul>
{{- end }}
</div>
</div>
{{- end }}
{{- if .Site.Menus.main }}
<div class="navigation-content">
<div class="pure-menu pure-menu-horizontal">
<ul class="pure-menu-list">
{{- $curr := . }}
{{- range .Site.Menus.main }}
{{- $selected := cond (or ($curr.IsMenuCurrent "main" .) ($curr.HasMenuCurrent "main" .)) " pure-menu-selected" "" }}
<li class="pure-menu-item{{ $selected }}"{{ if .Title }} title="{{ .Title }}"{{ end }}>
<a class="pure-menu-link" href="{{ .URL }}">{{ .Name }}</a>
</li>
{{- end }}
</ul>
</div>
</div>
{{- end }}
</div>
{{- end }}
{{- with .Site.Params.spaceapi.embed_indicator -}}
<div class="space-api-indicator">
<iframe scrolling="no" src="{{ $.Site.Params.spaceapi.embed_indicator }}" class="space-api-indicator"></iframe>
</div>
{{- end }}

60
spaceapi.py Executable file
View File

@ -0,0 +1,60 @@
#!/usr/bin/env python3
# Python Requirements
# python3
# requests
# shutil
import requests
import os
import sys
from typing import List
path: str = sys.argv[1]
api: str = "https://api.dezentrale.cloud/spaceapi/v14"
space_open: str = path + "/assets/logo_open"
space_closed: str = path + "/assets/logo_closed"
space_unknown: str = path + "/assets/logo_unknown"
space_logo: str = path + "/assets/logo"
extensions: List[str] = [".png", ".svg"]
# every extension needs to be linked
def link(src: str, dest: str):
for ext in extensions:
try:
os.symlink(src + ext, dest + ext)
print("linked " + dest + ext + " to " + src + ext)
except:
print("cannot link " + dest + ext + " to " + src + ext)
def delete(file: str):
for ext in extensions:
try:
os.remove(file + ext)
print("deleted " + file + ext)
except:
try:
os.unlink(file + ext)
print("unlinked "+ file + ext)
except:
print(file + ext + " is already deleted and unlinked")
if __name__ == "__main__":
delete(space_logo)
try:
resp: requests.Response = requests.get(api)
resp_dict: dict = resp.json()
door_open: bool = resp_dict.get("state").get("open")
print(door_open)
path = ""
if door_open:
path = space_open
else:
path = space_closed
# the linking seems to be the wrong way around, but it links correct
# the link is pointing from dest to src (https://docs.python.org/3/library/os.html)
link(path, space_logo)
except:
link(space_unknown, space_logo)

1
static/spaceapi-status Normal file
View File

@ -0,0 +1 @@
1

14
static/styles.css Normal file
View File

@ -0,0 +1,14 @@
.space-api-indicator-big {
display: inline-block;
vertical-align: middle;
width: 100%;
}
iframe.space-api-indicator {
border: none;
vertical-align: middle;
width: 40%;
height: 2em;
overflow: hidden;
margin-left: 30%;
}