summaryrefslogtreecommitdiff
path: root/web/template
diff options
context:
space:
mode:
authorLibravatar f0x52 <f0x@cthu.lu>2021-06-21 19:46:10 +0200
committerLibravatar GitHub <noreply@github.com>2021-06-21 19:46:10 +0200
commitf9bc305acaaf26bf3c5ef4ae49f7b5a20c9c1dfe (patch)
treec7312570819f998a51ad79e950baf523ae6426f8 /web/template
parentDeletes+unboosts (#52) (diff)
downloadgotosocial-f9bc305acaaf26bf3c5ef4ae49f7b5a20c9c1dfe.tar.xz
new styling for frontpage, update login and authorize templates (#46)
* new styling for frontpage, update login and authorize templates * run go fmt * add AssetBaseDir to command flag parsing * untested: move landing page to it's own router * go fmt, fix typo * fix package, adapt to proper Route structure
Diffstat (limited to 'web/template')
-rw-r--r--web/template/authorize.tmpl43
-rw-r--r--web/template/footer.tmpl13
-rw-r--r--web/template/header.tmpl16
-rw-r--r--web/template/index.tmpl47
-rw-r--r--web/template/sign-in.tmpl41
5 files changed, 101 insertions, 59 deletions
diff --git a/web/template/authorize.tmpl b/web/template/authorize.tmpl
index fa6338b35..bc609ed66 100644
--- a/web/template/authorize.tmpl
+++ b/web/template/authorize.tmpl
@@ -1,34 +1,15 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <title>GoToSocial Authorization</title>
- <link
- rel="stylesheet"
- href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
- />
- <script src="//code.jquery.com/jquery-2.2.4.min.js"></script>
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
- </head>
-
- <body>
- <div class="container">
- <div class="jumbotron">
- <form action="/oauth/authorize" method="POST">
- <h1>Hi {{.user}}!</h1>
- <p>Application <b>{{.appname}}</b> {{if len .appwebsite | eq 0 | not}}({{.appwebsite}}) {{end}}would like to perform actions on your behalf, with scope <em>{{.scope}}</em>.</p>
- <p>The application will redirect to {{.redirect}} to continue.</p>
- <p>
+{{ template "header.tmpl" .}}
+ <form action="/oauth/authorize" method="POST">
+ <h1>Hi {{.user}}!</h1>
+ <p>Application <b>{{.appname}}</b> {{if len .appwebsite | eq 0 | not}}({{.appwebsite}}) {{end}}would like to perform actions on your behalf, with scope <em>{{.scope}}</em>.</p>
+ <p>The application will redirect to {{.redirect}} to continue.</p>
+ <p>
<button
- type="submit"
- class="btn btn-primary btn-lg"
- style="width:200px;"
+ type="submit"
+ style="width:200px;"
>
- Allow
+ Allow
</button>
- </p>
- </form>
- </div>
- </div>
- </body>
-</html>
+ </p>
+ </form>
+{{ template "footer.tmpl" .}} \ No newline at end of file
diff --git a/web/template/footer.tmpl b/web/template/footer.tmpl
new file mode 100644
index 000000000..19e9cdbc4
--- /dev/null
+++ b/web/template/footer.tmpl
@@ -0,0 +1,13 @@
+ <!-- footer.tmpl -->
+ <footer>
+ <div id="version">
+ Running GoToSocial version: <span class="accent">{{.instance.Version}}</span><br>
+ <a href="https://github.com/superseriousbusiness/gotosocial">Source Code</a>
+ </div>
+ <div id="contact">
+ Contact: <a href="/{{.instance.ContactAccount}}" class="nounderline">{{.instance.ContactAccount}}</a><br>
+ <!-- <a href="/moderation">Moderation team</a> -->
+ </div>
+ </footer>
+</body>
+</html> \ No newline at end of file
diff --git a/web/template/header.tmpl b/web/template/header.tmpl
new file mode 100644
index 000000000..62ed66de8
--- /dev/null
+++ b/web/template/header.tmpl
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<!-- header.tmpl -->
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <link rel="stylesheet" href="/assets/bundle.css">
+ <title>{{.instance.Title}} - GoToSocial</title>
+</head>
+<body>
+ <header>
+ <h1>
+ {{.instance.Title}}
+ </h1>
+ </header> \ No newline at end of file
diff --git a/web/template/index.tmpl b/web/template/index.tmpl
new file mode 100644
index 000000000..8d431b8d3
--- /dev/null
+++ b/web/template/index.tmpl
@@ -0,0 +1,47 @@
+{{ template "header.tmpl" .}}
+<aside class="left logo">
+ <img src="/assets/sloth.png" alt="Clipart styled sloth logo">
+</aside>
+<section>
+ <!-- <h1>Home to <span class="count">{ {.instance.Stats.UserCount}}</span> users
+ who posted <span class="count">{ {.instance.Stats.StatusCount}}</span> statuses,
+ federating with <span class="count">{ {.instance.Stats.DomainCount}}</span> other instances.</h1> -->
+ <h1>Home to <span class="count">3</span> users
+ who posted <span class="count">42069</span> statuses,
+ federating with <span class="count">9001</span> other instances.</h1>
+
+ <h3>This is the default landing page, you can edit it from <span class="accent">./web/template/index.tmpl</span></h1>
+ <ul>
+ <li>Some explanation about the instance (description) with instance header and profile images.</li>
+ <li>Instructions for registering.</li>
+ <li>Etc.</li>
+ </ul>
+</section>
+
+<section class="apps">
+ <p>
+ GoToSocial does not provide it's own frontend, but implements the Mastodon client API.
+ You can use this server through a variety of clients:
+ </p>
+ <div class="applist">
+ <div class="entry">
+ <svg class="logo redraw" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10000 10000">
+ <path d="M9212 5993H5987V823c1053 667 2747 2177 3225 5170zM3100 2690A12240 12240 0 01939 6035h2161zm676 7210h2448a3067 3067 0 003067-3067H5052V627a527 527 0 00-1052 0v6206H709a3067 3067 0 003067 3067z"></path>
+ </svg>
+ <div>
+ <h3>Pinafore</h3>
+ <p>Pinafore is a web client designed for speed and simplicity.</p>
+ <a class="button" href="https://pinafore.social/settings/instances/add">Use Pinafore</a>
+ </div>
+ </div>
+ <div class="entry">
+ <img class="logo" src="/assets/tusky.svg" alt="The Tusky mascot, a cartoon elephant tooting happily"/>
+ <div>
+ <h3>Tusky</h3>
+ <p>Tusky is a lightweight mobile client for Android</p>
+ <a class="button" href="https://tusky.app">Get Tusky</a>
+ </div>
+ </div>
+ </div>
+</section>
+{{ template "footer.tmpl" .}} \ No newline at end of file
diff --git a/web/template/sign-in.tmpl b/web/template/sign-in.tmpl
index b7aa7c702..cfe932b3a 100644
--- a/web/template/sign-in.tmpl
+++ b/web/template/sign-in.tmpl
@@ -1,28 +1,13 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <title>Login</title>
- <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
- <script src="//code.jquery.com/jquery-2.2.4.min.js"></script>
- <script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
-</head>
-
-<body>
- <div class="container">
- <h1>Login</h1>
- <form action="/auth/sign_in" method="POST">
- <div class="form-group">
- <label for="email">Email</label>
- <input type="text" class="form-control" name="username" required placeholder="Please enter your email address">
- </div>
- <div class="form-group">
- <label for="password">Password</label>
- <input type="password" class="form-control" name="password" placeholder="Please enter your password">
- </div>
- <button type="submit" class="btn btn-success">Login</button>
- </form>
- </div>
-</body>
-
-</html>
+{{ template "header.tmpl" .}}
+<section class="login">
+ <h1>Login</h1>
+ <form action="/auth/sign_in" method="POST">
+ <label for="email">Email</label>
+ <input type="text" class="form-control" name="username" required placeholder="Please enter your email address">
+
+ <label for="password">Password</label>
+ <input type="password" class="form-control" name="password" required placeholder="Please enter your password">
+ <button type="submit" class="btn btn-success">Login</button>
+ </form>
+</section>
+{{ template "footer.tmpl" .}}