diff --git a/data-example.json b/data-example.json
new file mode 100644
index 0000000..45b81f8
--- /dev/null
+++ b/data-example.json
@@ -0,0 +1,12 @@
+{
+ "title": "Portal",
+ "entries": [
+ {
+ "active": true,
+ "target": "https://example.org",
+ "label": "Example",
+ "image": "https://cdn.iconscout.com/icon/premium/png-128-thumb/plant-2941089-2470533.png"
+ }
+ ]
+}
+
diff --git a/data.json b/data.json
deleted file mode 100644
index 45cda34..0000000
--- a/data.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "title": "Portal",
- "entries": [
- {
- "target": "https://example.org",
- "label": "Example"
- }
- ]
-}
-
diff --git a/entry.html.tpl b/entry.html.tpl
deleted file mode 100644
index 42c076f..0000000
--- a/entry.html.tpl
+++ /dev/null
@@ -1 +0,0 @@
-
{{label}}
diff --git a/main.html.tpl b/main.html.tpl
deleted file mode 100644
index f7932ce..0000000
--- a/main.html.tpl
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
- {{title}}
-
-
-
-
-
-
diff --git a/index.html.php b/source/index.html.php
similarity index 66%
rename from index.html.php
rename to source/index.html.php
index 0fd90b0..66edda1 100644
--- a/index.html.php
+++ b/source/index.html.php
@@ -1,5 +1,7 @@
__DIR__,
+ 'name' => $template_name,
+ ]
+ )
+ ),
$arguments
);
}
+/**
+ */
function main(
) : void
{
$data = \json_decode(
- \file_get_contents('data.json'),
+ \file_get_contents(__DIR__ . '/data.json'),
true
);
print(
@@ -45,9 +59,13 @@ function main(
[
'label' => $entry['label'],
'target' => $entry['target'],
+ 'image' => $entry['image'],
]
),
- $data['entries']
+ \array_values(\array_filter(
+ $data['entries'],
+ fn($entry) => ($entry['active'] ?? true)
+ ))
)
),
]
diff --git a/source/media/circuit.svg b/source/media/circuit.svg
new file mode 100644
index 0000000..14b4601
--- /dev/null
+++ b/source/media/circuit.svg
@@ -0,0 +1,1794 @@
+
+
diff --git a/source/media/icons/chat.png b/source/media/icons/chat.png
new file mode 100644
index 0000000..6e2cbbf
Binary files /dev/null and b/source/media/icons/chat.png differ
diff --git a/source/media/icons/example.png b/source/media/icons/example.png
new file mode 100644
index 0000000..02929bc
Binary files /dev/null and b/source/media/icons/example.png differ
diff --git a/source/media/icons/git.png b/source/media/icons/git.png
new file mode 100644
index 0000000..0a13f31
Binary files /dev/null and b/source/media/icons/git.png differ
diff --git a/source/media/icons/git_.png b/source/media/icons/git_.png
new file mode 100644
index 0000000..09d77a9
Binary files /dev/null and b/source/media/icons/git_.png differ
diff --git a/source/media/icons/login.png b/source/media/icons/login.png
new file mode 100644
index 0000000..ef723a1
Binary files /dev/null and b/source/media/icons/login.png differ
diff --git a/source/media/icons/pad.png b/source/media/icons/pad.png
new file mode 100644
index 0000000..39f96bd
Binary files /dev/null and b/source/media/icons/pad.png differ
diff --git a/source/media/icons/wiki.png b/source/media/icons/wiki.png
new file mode 100644
index 0000000..68c21b3
Binary files /dev/null and b/source/media/icons/wiki.png differ
diff --git a/source/media/lag-logo.svg b/source/media/lag-logo.svg
new file mode 100644
index 0000000..f4d0315
--- /dev/null
+++ b/source/media/lag-logo.svg
@@ -0,0 +1,253 @@
+
+
+
diff --git a/source/stylesheets/main.css b/source/stylesheets/main.css
new file mode 100644
index 0000000..0600ac3
--- /dev/null
+++ b/source/stylesheets/main.css
@@ -0,0 +1,82 @@
+:root {
+ --hue: 150;
+}
+
+html {
+ background-color: hsl(var(--hue), 0%, 0%);
+ color: hsl(var(--hue), 0%, 100%);
+ margin: 0;
+ padding: 0;
+ font-family: monospace;
+ font-size: 2.5em;
+}
+
+
+html::before {
+ content: "";
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-image: url("../media/circuit.svg");
+ filter: saturate(0) brightness(0.5);
+ z-index: -20;
+}
+
+body {
+ background-color: hsl(var(--hue), 0%, 6.125%);
+ color: hsl(var(--hue), 75%, 93.75%);
+ max-width: 960px;
+ margin: auto;
+ padding: 16px;
+ min-height: 100vh;
+ overflow: hidden;
+ text-align: center;
+ position: relative;
+ opacity: 80%;
+}
+
+a {
+ text-decoration: none;
+}
+
+a:not(:hover) {
+ color: hsl(var(--hue), 75%, 50%);
+ transition: 0.25s ease;
+}
+
+a:hover {
+ color: hsl(var(--hue), 75%, 87.5%);
+ transition: 0.5s ease;
+}
+
+#list ul {
+ display: flex;
+ flex-direction: row;
+ flex-wrap: wrap;
+ margin: 0;
+ padding: 0;
+}
+
+#list li {
+ margin: 32px 0;
+ flex-basis: 33%;
+ flex-shrink: 0;
+ flex-grow: 0;
+ list-style-type: none;
+ text-align: center;
+}
+
+#logo > img {
+ display: block;
+ width: 40%;
+ margin: auto;
+ filter: hue-rotate(0deg) saturate(0) brightness(3);
+}
+
+.option img {
+ width: 30%;
+ filter: saturate(0) brightness(0) invert(100%) brightness(0.5);
+}
+
diff --git a/source/templates/entry.html.tpl b/source/templates/entry.html.tpl
new file mode 100644
index 0000000..f725636
--- /dev/null
+++ b/source/templates/entry.html.tpl
@@ -0,0 +1,7 @@
+
+
+
+
+ {{label}}
+
+
diff --git a/source/templates/main.html.tpl b/source/templates/main.html.tpl
new file mode 100644
index 0000000..7f3d371
--- /dev/null
+++ b/source/templates/main.html.tpl
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+ {{title}}
+
+
+
+

+
+
+
+
+
diff --git a/tools/build b/tools/build
new file mode 100755
index 0000000..e9ccc04
--- /dev/null
+++ b/tools/build
@@ -0,0 +1,19 @@
+#!/usr/bin/env sh
+
+## consts
+
+dir_source="source"
+
+
+## args
+
+if [ $# -ge 1 ] ; then dir_build=$1 && shift ; else dir_build="/tmp/portal" ; fi
+if [ $# -ge 1 ] ; then path_data=$1 && shift ; else path_data="" ; fi
+
+
+## exec
+
+mkdir --parents ${dir_build}
+cp --recursive ${dir_source}/* ${dir_build}/
+test -z ${path_data} || cp ${path_data} ${dir_build}/data.json
+
diff --git a/tools/deploy b/tools/deploy
new file mode 100755
index 0000000..9c4ed4e
--- /dev/null
+++ b/tools/deploy
@@ -0,0 +1,19 @@
+#!/usr/bin/env sh
+
+## args
+
+if [ $# -ge 1 ] ; then source_dir=$1 && shift ; else source_dir="/tmp/portal" ; fi
+if [ $# -ge 1 ] ; then target_sys=$1 && shift ; else target_sys="gs-ansible-test-user" ; fi
+if [ $# -ge 1 ] ; then target_dir=$1 && shift ; else target_dir="/tmp/portal" ; fi
+
+
+## exec
+
+rsync \
+ --recursive \
+ --verbose \
+ --exclude="data.json" \
+ --rsh=ssh \
+ ${source_dir}/* \
+ ${target_sys}:${target_dir}
+