add layout template
This commit is contained in:
parent
d27b50afa0
commit
5c965eb61d
12 changed files with 176 additions and 131 deletions
|
@ -1,4 +1,5 @@
|
|||
<h1>Login</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}Login{/pageTitle}
|
||||
|
||||
<p>To log in, submit your credentials.</p>
|
||||
<p>To register, submit desired credentials.</p>
|
||||
|
@ -16,3 +17,4 @@
|
|||
<br>
|
||||
<input type="submit">
|
||||
</form>
|
||||
{/include}
|
|
@ -1,2 +1,6 @@
|
|||
{#include layout}
|
||||
{#pageTitle}Account{/pageTitle}
|
||||
|
||||
<p>Logged in as {username}</p>
|
||||
<p><a href="/auth/logout">Log out</a></p>
|
||||
{/include}
|
|
@ -1,13 +1,17 @@
|
|||
<p>Registering as <strong>{username}</strong></p>
|
||||
{#include layout}
|
||||
{#pageTitle}Register{/pageTitle}
|
||||
|
||||
{#if message != null}
|
||||
<h3>{message}</h3>
|
||||
{/if}
|
||||
|
||||
<form method="post" action="/auth/action/register">
|
||||
<input type="hidden" name="username" value="{username}">
|
||||
<label for="username">Username</label>
|
||||
<input type="text" id="username" name="username" disabled value="{username}">
|
||||
<br>
|
||||
<label for="password">Confirm password</label>
|
||||
<input type="password" id="password" name="password">
|
||||
<br>
|
||||
<input type="submit" value="Register">
|
||||
</form>
|
||||
{/include}
|
|
@ -1,4 +1,5 @@
|
|||
<h1>Creating a page</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}Create a page{/pageTitle}
|
||||
|
||||
<p>Editing as {user:name}</p>
|
||||
|
||||
|
@ -15,3 +16,4 @@
|
|||
{#if http:param("error") != null}
|
||||
<p>Error: <strong>{http:param("error")}</strong></p>
|
||||
{/if}
|
||||
{/include}
|
|
@ -1,4 +1,5 @@
|
|||
<h1>Editing {page.title}</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}Editing {page.title}{/pageTitle}
|
||||
|
||||
<p>Editing as {user:name}</p>
|
||||
|
||||
|
@ -12,3 +13,4 @@
|
|||
{#if http:param("error") != null}
|
||||
<p>Error: <strong>{http:param("error")}</strong></p>
|
||||
{/if}
|
||||
{/include}
|
|
@ -1,4 +1,5 @@
|
|||
<h1>History of {page.getTitle}</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}History of {page.getTitle}{/pageTitle}
|
||||
|
||||
{#for revision in revisions}
|
||||
{#if page.latestRevision == revision}
|
||||
|
@ -24,3 +25,4 @@
|
|||
<li><a href="/page/Talk:{page.getSlug}">Talk:{page.getTitle}</a></li>
|
||||
<li><a href="/edit/{page.getSlug}">Edit page</a></li>
|
||||
</ul>
|
||||
{/include}
|
|
@ -1,4 +1,5 @@
|
|||
<h1>{title}</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}{title}{/pageTitle}
|
||||
|
||||
Page titled "{title}" doesn't exist. There's no history to show.
|
||||
|
||||
|
@ -6,3 +7,4 @@ Page titled "{title}" doesn't exist. There's no history to show.
|
|||
<li><a href="/edit/{path}">Create it</a></li>
|
||||
<li><a href="/">Go home</a></li>
|
||||
</ul>
|
||||
{/include}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
{#include layout customTitle=true}
|
||||
{#pageTitle}TalkPages{/pageTitle}
|
||||
|
||||
<form action="/search">
|
||||
<input type="text" name="query" id="query" placeholder="Search query">
|
||||
<input type="submit" value="Search">
|
||||
|
@ -13,3 +16,4 @@
|
|||
</ul>
|
||||
|
||||
<small>Running <a href="/page/TalkPages">TalkPages</a> version {config:["quarkus.application.version"]}</small>
|
||||
{/include}
|
|
@ -1,4 +1,5 @@
|
|||
<h1>{title}</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}{title}{/pageTitle}
|
||||
|
||||
<p>There is no such article.</p>
|
||||
|
||||
|
@ -16,3 +17,4 @@
|
|||
<li><a href="/edit/{title}">Create</a></li>
|
||||
<li><a href="/">Go home</a></li>
|
||||
</ul>
|
||||
{/include}
|
|
@ -1,3 +1,5 @@
|
|||
{#include layout}
|
||||
{#header}
|
||||
{#if http:param("redirectFrom") != null}
|
||||
<p>Redirected from {http:param("redirectFrom")}</p>
|
||||
{/if}
|
||||
|
@ -13,8 +15,9 @@
|
|||
<h4>This is the current revision #{revision.index} authored by {revision.author.name}.</h4>
|
||||
{/if}
|
||||
{/if}
|
||||
{/header}
|
||||
|
||||
<h1>{page.title}</h1>
|
||||
{#pageTitle}{page.title}{/pageTitle}
|
||||
|
||||
{revision.content.sanitizeContent.raw}
|
||||
|
||||
|
@ -22,3 +25,4 @@
|
|||
|
||||
<small>Modified {revision.timestamp.toString()} | <a href="/history/{page.getSlug}">Full history</a> | <a href="/edit/{page.getSlug}">Edit</a>
|
||||
{#if !page.title.startsWith("Talk:")} | <a href="/page/Talk:{page.getSlug}">Talk</a>{/if}</small>
|
||||
{/include}
|
|
@ -1,7 +1,9 @@
|
|||
<h1>{page.getTitle}</h1>
|
||||
{#include layout}
|
||||
{#pageTitle}{page.getTitle}{/pageTitle}
|
||||
|
||||
There is no revision #{revisionId}.
|
||||
<ul>
|
||||
<li><a href="/history/{page.getSlug}">View history</a></li>
|
||||
<li><a href="/page/{page.getSlug}">Back to {page.getTitle}</a></li>
|
||||
</ul>
|
||||
{/include}
|
15
src/main/resources/templates/layout.html
Normal file
15
src/main/resources/templates/layout.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!-- TODO opengraph tags and maybe some nice css. also add errors and stuff here -->
|
||||
<title>{#insert pageTitle /}{#if !customTitle??} - TalkPages{/if}</title> <!-- I give up -->
|
||||
</head>
|
||||
<body>
|
||||
{#insert header}{/}
|
||||
<h1>{#insert pageTitle /}</h1>
|
||||
|
||||
{#insert}{/}
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue