aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorFuwn <[email protected]>2020-12-04 21:53:08 +0000
committerFuwn <[email protected]>2020-12-04 21:53:08 +0000
commit19c88d8fab4c59390eb795f071e960f70ed6e884 (patch)
tree44768f0b39ac20755b213c72918cf98f614ff122 /templates
parentchore: update log (diff)
downloadchan-test_actix-yarte.tar.xz
chan-test_actix-yarte.zip
not working loltest_actix-yarte
Diffstat (limited to 'templates')
-rw-r--r--templates/404.html.hbs24
-rw-r--r--templates/base.hbs14
-rw-r--r--templates/boards.html.hbs18
-rw-r--r--templates/deep/more/doc/head.hbs27
-rw-r--r--templates/deep/more/doc/t.hbs1
-rw-r--r--templates/footer.hbs10
-rw-r--r--templates/header.hbs (renamed from templates/header.html.hbs)2
-rw-r--r--templates/index.hbs20
-rw-r--r--templates/index.html.hbs33
-rw-r--r--templates/layout.html.hbs28
-rw-r--r--templates/routes/boards.hbs18
-rw-r--r--templates/threads.html.hbs57
12 files changed, 90 insertions, 162 deletions
diff --git a/templates/404.html.hbs b/templates/404.html.hbs
deleted file mode 100644
index 5940d43..0000000
--- a/templates/404.html.hbs
+++ /dev/null
@@ -1,24 +0,0 @@
-<title>chan - 404</title>
-
-{{> header }}
-
-<h1>Error 404: Resource not found...</h1>
-
-<pre>
-⣿⣿⣷⡁⢆⠈⠕⢕⢂⢕⢂⢕⢂⢔⢂⢕⢄⠂⣂⠂⠆⢂⢕⢂⢕⢂⢕⢂⢕⢂
-⣿⣿⣿⡷⠊⡢⡹⣦⡑⢂⢕⢂⢕⢂⢕⢂⠕⠔⠌⠝⠛⠶⠶⢶⣦⣄⢂⢕⢂⢕
-⣿⣿⠏⣠⣾⣦⡐⢌⢿⣷⣦⣅⡑⠕⠡⠐⢿⠿⣛⠟⠛⠛⠛⠛⠡⢷⡈⢂⢕⢂
-⠟⣡⣾⣿⣿⣿⣿⣦⣑⠝⢿⣿⣿⣿⣿⣿⡵⢁⣤⣶⣶⣿⢿⢿⢿⡟⢻⣤⢑⢂
-⣾⣿⣿⡿⢟⣛⣻⣿⣿⣿⣦⣬⣙⣻⣿⣿⣷⣿⣿⢟⢝⢕⢕⢕⢕⢽⣿⣿⣷⣔
-⣿⣿⠵⠚⠉⢀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⢕⢕⢕⢕⢕⢕⣽⣿⣿⣿⣿
-⢷⣂⣠⣴⣾⡿⡿⡻⡻⣿⣿⣴⣿⣿⣿⣿⣿⣿⣷⣵⣵⣵⣷⣿⣿⣿⣿⣿⣿⡿
-⢌⠻⣿⡿⡫⡪⡪⡪⡪⣺⣿⣿⣿⣿⣿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
-⠣⡁⠹⡪⡪⡪⡪⣪⣾⣿⣿⣿⣿⠋⠐⢉⢍⢄⢌⠻⣿⣿⣿⣿⣿⣿⣿⣿⠏⠈
-⡣⡘⢄⠙⣾⣾⣾⣿⣿⣿⣿⣿⣿⡀⢐⢕⢕⢕⢕⢕⡘⣿⣿⣿⣿⣿⣿⠏⠠⠈
-⠌⢊⢂⢣⠹⣿⣿⣿⣿⣿⣿⣿⣿⣧⢐⢕⢕⢕⢕⢕⢅⣿⣿⣿⣿⡿⢋⢜⠠⠈
-⠄⠁⠕⢝⡢⠈⠻⣿⣿⣿⣿⣿⣿⣿⣷⣕⣑⣑⣑⣵⣿⣿⣿⡿⢋⢔⢕⣿⠠⠈
-⠨⡂⡀⢑⢕⡅⠂⠄⠉⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⢔⢕⢕⣿⣿⠠⠈
-⠄⠪⣂⠁⢕⠆⠄⠂⠄⠁⡀⠂⡀⠄⢈⠉⢍⢛⢛⢛⢋⢔⢕⢕⢕⣽⣿⣿⠠⠈
-</pre>
-
-<a href="/">Return home.</a>
diff --git a/templates/base.hbs b/templates/base.hbs
new file mode 100644
index 0000000..1ac0b54
--- /dev/null
+++ b/templates/base.hbs
@@ -0,0 +1,14 @@
+{{> doc/t }}
+<html>
+ {{> doc/head }}
+
+ <body>
+ {{> header }}
+
+ {{> @partial-block }}
+
+ <div class="container">
+ {{> footer }}
+ </div>
+ </body>
+</html>
diff --git a/templates/boards.html.hbs b/templates/boards.html.hbs
deleted file mode 100644
index d86ba2b..0000000
--- a/templates/boards.html.hbs
+++ /dev/null
@@ -1,18 +0,0 @@
-<title>chan - Boards</title>
-
-{{> header }}
-
-<h1>Boards</h1>
-
-<div class="col"></div>
-<div class="col">
- <ul>
- <p><ul>Unorganized Boards</ul></p>
- {{ #each this }}
- <li>
- <a href="/board/{{ this.tag }}">{{ this.name }} <span class="badge badge-primary">New!</span> {{ #if this.nsfw }} <span class="badge badge-danger">NSFW!</span> {{ /if }}</p>
- </li>
- {{ /each }}
- </ul>
-</div>
-<div class="col"></div>
diff --git a/templates/deep/more/doc/head.hbs b/templates/deep/more/doc/head.hbs
new file mode 100644
index 0000000..3f9773a
--- /dev/null
+++ b/templates/deep/more/doc/head.hbs
@@ -0,0 +1,27 @@
+{{# unless title.is_str() && !title.is_empty() }}
+ {{$ "Need static args: title: str" }}
+{{/unless}}
+<head>
+ <meta charset="utf-8"/>
+ <title>{{ title }}</title>
+
+ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
+ <meta name="description" content="A simple `chan'-like board written in Rust.">
+ <meta name="author" content="Fuwn">
+
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
+
+ <style>
+ * {
+ font-family: Arial, Helvetica, sans-serif
+ }
+
+ .footer {
+ position: absolute;
+ left: 0;
+ bottom: 0;
+ width: 100%;
+ text-align: center;
+ }
+ </style>
+</head>
diff --git a/templates/deep/more/doc/t.hbs b/templates/deep/more/doc/t.hbs
new file mode 100644
index 0000000..0e76edd
--- /dev/null
+++ b/templates/deep/more/doc/t.hbs
@@ -0,0 +1 @@
+<!DOCTYPE html>
diff --git a/templates/footer.hbs b/templates/footer.hbs
new file mode 100644
index 0000000..4d2ad63
--- /dev/null
+++ b/templates/footer.hbs
@@ -0,0 +1,10 @@
+<div class="footer">
+ <p>
+ Copyleft - <a href="/">chan</a> |
+ Made by <a href="https://github.com/fuwn">Fuwn</a>
+ </p>
+
+ <p>
+ Fork me on <a href="https://github.com/fuwn/chan">GitHub</a>!
+ </p>
+</div>
diff --git a/templates/header.html.hbs b/templates/header.hbs
index 28786e4..0e2ec1f 100644
--- a/templates/header.html.hbs
+++ b/templates/header.hbs
@@ -1,5 +1,3 @@
-{{> layout }}
-
<ul class="nav justify-content-center">
<li class="nav-item">
<a class="nav-link" href="/">
diff --git a/templates/index.hbs b/templates/index.hbs
new file mode 100644
index 0000000..3c4bff5
--- /dev/null
+++ b/templates/index.hbs
@@ -0,0 +1,20 @@
+{{#> base title = "Home | chan" }}
+ <h1>chan</h1>
+
+ <pre>
+ ⣿⣿⣷⡁⢆⠈⠕⢕⢂⢕⢂⢕⢂⢔⢂⢕⢄⠂⣂⠂⠆⢂⢕⢂⢕⢂⢕⢂⢕⢂
+ ⣿⣿⣿⡷⠊⡢⡹⣦⡑⢂⢕⢂⢕⢂⢕⢂⠕⠔⠌⠝⠛⠶⠶⢶⣦⣄⢂⢕⢂⢕
+ ⣿⣿⠏⣠⣾⣦⡐⢌⢿⣷⣦⣅⡑⠕⠡⠐⢿⠿⣛⠟⠛⠛⠛⠛⠡⢷⡈⢂⢕⢂
+ ⠟⣡⣾⣿⣿⣿⣿⣦⣑⠝⢿⣿⣿⣿⣿⣿⡵⢁⣤⣶⣶⣿⢿⢿⢿⡟⢻⣤⢑⢂
+ ⣾⣿⣿⡿⢟⣛⣻⣿⣿⣿⣦⣬⣙⣻⣿⣿⣷⣿⣿⢟⢝⢕⢕⢕⢕⢽⣿⣿⣷⣔
+ ⣿⣿⠵⠚⠉⢀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⢕⢕⢕⢕⢕⢕⣽⣿⣿⣿⣿
+ ⢷⣂⣠⣴⣾⡿⡿⡻⡻⣿⣿⣴⣿⣿⣿⣿⣿⣿⣷⣵⣵⣵⣷⣿⣿⣿⣿⣿⣿⡿
+ ⢌⠻⣿⡿⡫⡪⡪⡪⡪⣺⣿⣿⣿⣿⣿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
+ ⠣⡁⠹⡪⡪⡪⡪⣪⣾⣿⣿⣿⣿⠋⠐⢉⢍⢄⢌⠻⣿⣿⣿⣿⣿⣿⣿⣿⠏⠈
+ ⡣⡘⢄⠙⣾⣾⣾⣿⣿⣿⣿⣿⣿⡀⢐⢕⢕⢕⢕⢕⡘⣿⣿⣿⣿⣿⣿⠏⠠⠈
+ ⠌⢊⢂⢣⠹⣿⣿⣿⣿⣿⣿⣿⣿⣧⢐⢕⢕⢕⢕⢕⢅⣿⣿⣿⣿⡿⢋⢜⠠⠈
+ ⠄⠁⠕⢝⡢⠈⠻⣿⣿⣿⣿⣿⣿⣿⣷⣕⣑⣑⣑⣵⣿⣿⣿⡿⢋⢔⢕⣿⠠⠈
+ ⠨⡂⡀⢑⢕⡅⠂⠄⠉⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⢔⢕⢕⣿⣿⠠⠈
+ ⠄⠪⣂⠁⢕⠆⠄⠂⠄⠁⡀⠂⡀⠄⢈⠉⢍⢛⢛⢛⢋⢔⢕⢕⢕⣽⣿⣿⠠⠈
+ </pre>
+{{/base }}
diff --git a/templates/index.html.hbs b/templates/index.html.hbs
deleted file mode 100644
index ef756d0..0000000
--- a/templates/index.html.hbs
+++ /dev/null
@@ -1,33 +0,0 @@
-<title>chan - Home</title>
-
-{{> header }}
-
-<h1>chan</h1>
-
-<pre>
-⣿⣿⣷⡁⢆⠈⠕⢕⢂⢕⢂⢕⢂⢔⢂⢕⢄⠂⣂⠂⠆⢂⢕⢂⢕⢂⢕⢂⢕⢂
-⣿⣿⣿⡷⠊⡢⡹⣦⡑⢂⢕⢂⢕⢂⢕⢂⠕⠔⠌⠝⠛⠶⠶⢶⣦⣄⢂⢕⢂⢕
-⣿⣿⠏⣠⣾⣦⡐⢌⢿⣷⣦⣅⡑⠕⠡⠐⢿⠿⣛⠟⠛⠛⠛⠛⠡⢷⡈⢂⢕⢂
-⠟⣡⣾⣿⣿⣿⣿⣦⣑⠝⢿⣿⣿⣿⣿⣿⡵⢁⣤⣶⣶⣿⢿⢿⢿⡟⢻⣤⢑⢂
-⣾⣿⣿⡿⢟⣛⣻⣿⣿⣿⣦⣬⣙⣻⣿⣿⣷⣿⣿⢟⢝⢕⢕⢕⢕⢽⣿⣿⣷⣔
-⣿⣿⠵⠚⠉⢀⣀⣀⣈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣗⢕⢕⢕⢕⢕⢕⣽⣿⣿⣿⣿
-⢷⣂⣠⣴⣾⡿⡿⡻⡻⣿⣿⣴⣿⣿⣿⣿⣿⣿⣷⣵⣵⣵⣷⣿⣿⣿⣿⣿⣿⡿
-⢌⠻⣿⡿⡫⡪⡪⡪⡪⣺⣿⣿⣿⣿⣿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
-⠣⡁⠹⡪⡪⡪⡪⣪⣾⣿⣿⣿⣿⠋⠐⢉⢍⢄⢌⠻⣿⣿⣿⣿⣿⣿⣿⣿⠏⠈
-⡣⡘⢄⠙⣾⣾⣾⣿⣿⣿⣿⣿⣿⡀⢐⢕⢕⢕⢕⢕⡘⣿⣿⣿⣿⣿⣿⠏⠠⠈
-⠌⢊⢂⢣⠹⣿⣿⣿⣿⣿⣿⣿⣿⣧⢐⢕⢕⢕⢕⢕⢅⣿⣿⣿⣿⡿⢋⢜⠠⠈
-⠄⠁⠕⢝⡢⠈⠻⣿⣿⣿⣿⣿⣿⣿⣷⣕⣑⣑⣑⣵⣿⣿⣿⡿⢋⢔⢕⣿⠠⠈
-⠨⡂⡀⢑⢕⡅⠂⠄⠉⠛⠻⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢋⢔⢕⢕⣿⣿⠠⠈
-⠄⠪⣂⠁⢕⠆⠄⠂⠄⠁⡀⠂⡀⠄⢈⠉⢍⢛⢛⢛⢋⢔⢕⢕⢕⣽⣿⣿⠠⠈
-</pre>
-
-<div class="footer">
- <p>
- Copyleft - <a href="/">chan</a> |
- Made by <a href="https://github.com/fuwn">Fuwn</a>
- </p>
-
- <p>
- Fork me on <a href="https://github.com/fuwn/chan">GitHub</a>!
- </p>
-</div>
diff --git a/templates/layout.html.hbs b/templates/layout.html.hbs
deleted file mode 100644
index a9c0dcc..0000000
--- a/templates/layout.html.hbs
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
- <meta name="description" content="A simple `chan'-like board written in Rust.">
- <meta name="author" content="Fuwn">
-
- <!-- External -->
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
- </head>
-
- <body>
- <style>
- * {
- font-family: Arial, Helvetica, sans-serif
- }
-
- .footer {
- position: absolute;
- left: 0;
- bottom: 0;
- width: 100%;
- text-align: center;
- }
- </style>
-
- <div class="container">
diff --git a/templates/routes/boards.hbs b/templates/routes/boards.hbs
new file mode 100644
index 0000000..92d0268
--- /dev/null
+++ b/templates/routes/boards.hbs
@@ -0,0 +1,18 @@
+{{#> ../base title = "Boards | chan" }}
+ <h1>Boards</h1>
+
+ <div class="col"></div>
+ <div class="col">
+ <ul>
+ <p><ul>Unorganized Boards</ul></p>
+ {{! {{ #each this }}
+ <li>
+ <a href="/board/{{ this.tag }}">{{ this.name }} <span class="badge badge-primary">New!</span> {{ #if this.nsfw }} <span class="badge badge-danger">NSFW!</span> {{ /if }}</p>
+ </li>
+ {{ ~/each }} !}}
+
+ {{ threads }}
+ </ul>
+ </div>
+ <div class="col"></div>
+{{/../base }}
diff --git a/templates/threads.html.hbs b/templates/threads.html.hbs
deleted file mode 100644
index f9f1b85..0000000
--- a/templates/threads.html.hbs
+++ /dev/null
@@ -1,57 +0,0 @@
-<title>chan - /{{ this.0.board }}/</title>
-
-{{> header }}
-
-<form action="/api/v1/post" method="post">
- <div class="form-group">
- <label for="name">Name <span class="badge badge-info">Optional</span></label>
- <input class="form-control" name="name" type="text"
- placeholder="Anonymous">
- </div>
-
- <div class="form-group">
- <label for="comment">Comment <span class="badge badge-warning">Required</span></label>
- <textarea class="form-control" name="comment" cols="48" rows="4"
- wrap="soft" placeholder="comment" required></textarea>
- </div>
-
- <div class="form-group form-check">
- <input class="form-check-input" type="checkbox" disabled>
- <label class="form-check-label">I'm not a robot. <span class="badge badge-warning">Required</span> <span class="badge badge-danger">Disabled</span></label>
- </div>
-
- <div class="form-group">
- <label class="form-check-label">Image <span class="badge badge-info">Optional</span> <span class="badge badge-danger">Disabled</span></label>
- <input class="form-control-file" type="file" disabled>
- </div>
-
- <input type="hidden" name="board" value="{{ this.0.board }}">
-
- <button type="submit" class="btn btn-primary">Post</button>
-</form>
-<br>
-
-<hr>
-
-{{ #if this }}
- {{ #each this }}
- <!-- <div class="post" style="width: 420px">
- <h2>{{ this.name }}</h4>
- <p>{{ this.comment }}</p>
- </div> -->
-
- <div class="card">
- <div class="card-body">
- <h2>{{ this.name }}</h4>
- <p>{{ this.comment }}</p>
-
- <button class="btn btn-primary" disabled>View thread</button>
- </div>
- </div>
- <br>
- {{ /each }}
-{{ else }}
- <div class="alert alert-primary" role="alert">
- No posts have been made today!
- </div>
-{{ /if }}