From 2d55229911abc7615ef86c841d5d2f0a8930a861 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Loipf=C3=BChrer?= <michael.loipfuehrer@tum.de>
Date: Thu, 23 May 2019 16:13:27 +0200
Subject: [PATCH] script, www files

---
 lustmolch.py   |  8 ++------
 www/index.html | 18 ++++++++++++++++++
 www/style.css  | 11 +++++++++++
 3 files changed, 31 insertions(+), 6 deletions(-)
 create mode 100644 www/index.html
 create mode 100644 www/style.css

diff --git a/lustmolch.py b/lustmolch.py
index 28ad460..679b943 100755
--- a/lustmolch.py
+++ b/lustmolch.py
@@ -91,7 +91,8 @@ def create_container(dry_run, config_file, name):
     # place configuration files
     context = {
         'name': name,
-        'ssh_port': next_ssh_port(config_file, name)
+        'ssh_port': next_ssh_port(config_file, name),
+        'url': f'{name}.stusta.de'
     }
     for cfg in template_files_host:
         template = env.get_template(cfg.source)
@@ -107,11 +108,6 @@ def create_container(dry_run, config_file, name):
     if not dry_run:
         run(['debootstrap', FLAVOUR, machine_path, DEBIAN_MIRROR], capture_output=True, check=True)
 
-    # start container for the first time
-    # click.echo(f'Starting container for the first time')
-    # if not dry_run:
-    #     run(['systemd-nspawn', '-D', machine_path], check=True)
-
     click.echo(f'Bootstrapping container')
     if not dry_run:
         # copy and run bootstrap shell script
diff --git a/www/index.html b/www/index.html
new file mode 100644
index 0000000..3f19249
--- /dev/null
+++ b/www/index.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8">
+  <title>StuSta</title>
+  <link href='/home/mikonse/stusta/stustanet/lustmolch/www/style.css' rel="stylesheet">
+</head>
+<body>
+  <div class="container">
+    <div class="link-box">
+      <a href="pot.stusta.de">Pot</a>
+    </div>
+    <div class="link-box">
+      <a href="manhattan.stusta.de">MANHATTAN</a>
+    </div>
+  </div>
+</body>
+</html>
\ No newline at end of file
diff --git a/www/style.css b/www/style.css
new file mode 100644
index 0000000..8a7b209
--- /dev/null
+++ b/www/style.css
@@ -0,0 +1,11 @@
+.container {
+    flex: 1 1 auto;
+}
+
+.link-box {
+    width: 150px;
+    height: 150px;
+    align-content: center;
+    justify-content: center;
+    background-color: red;
+}
\ No newline at end of file
-- 
GitLab