diff --git a/src/main/resources/templates/AuthResource/auth.html b/src/main/resources/templates/AuthResource/auth.html index aeadc35..c406e77 100644 --- a/src/main/resources/templates/AuthResource/auth.html +++ b/src/main/resources/templates/AuthResource/auth.html @@ -1,18 +1,20 @@ -

Login

+{#include layout} + {#pageTitle}Login{/pageTitle} -

To log in, submit your credentials.

-

To register, submit desired credentials.

+

To log in, submit your credentials.

+

To register, submit desired credentials.

-{#if message != null} -

{message}

-{/if} + {#if message != null} +

{message}

+ {/if} -
- - -
- - -
- -
\ No newline at end of file +
+ + +
+ + +
+ +
+{/include} \ No newline at end of file diff --git a/src/main/resources/templates/AuthResource/authenticated.html b/src/main/resources/templates/AuthResource/authenticated.html index 38e56bf..794f3a6 100644 --- a/src/main/resources/templates/AuthResource/authenticated.html +++ b/src/main/resources/templates/AuthResource/authenticated.html @@ -1,2 +1,6 @@ -

Logged in as {username}

-

Log out

\ No newline at end of file +{#include layout} + {#pageTitle}Account{/pageTitle} + +

Logged in as {username}

+

Log out

+{/include} \ No newline at end of file diff --git a/src/main/resources/templates/AuthResource/register.html b/src/main/resources/templates/AuthResource/register.html index 8a371c2..61e2c91 100644 --- a/src/main/resources/templates/AuthResource/register.html +++ b/src/main/resources/templates/AuthResource/register.html @@ -1,13 +1,17 @@ -

Registering as {username}

+{#include layout} + {#pageTitle}Register{/pageTitle} -{#if message != null} -

{message}

-{/if} + {#if message != null} +

{message}

+ {/if} -
- - - -
- -
\ No newline at end of file +
+ + +
+ + +
+ +
+{/include} \ No newline at end of file diff --git a/src/main/resources/templates/EditResource/create.html b/src/main/resources/templates/EditResource/create.html index 92cd5ae..6ba7d47 100644 --- a/src/main/resources/templates/EditResource/create.html +++ b/src/main/resources/templates/EditResource/create.html @@ -1,17 +1,19 @@ -

Creating a page

+{#include layout} + {#pageTitle}Create a page{/pageTitle} -

Editing as {user:name}

+

Editing as {user:name}

-
- - -
- - -
- -
+
+ + +
+ + +
+ +
-{#if http:param("error") != null} -

Error: {http:param("error")}

-{/if} \ No newline at end of file + {#if http:param("error") != null} +

Error: {http:param("error")}

+ {/if} +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/EditResource/edit.html b/src/main/resources/templates/EditResource/edit.html index 90ff250..268e02d 100644 --- a/src/main/resources/templates/EditResource/edit.html +++ b/src/main/resources/templates/EditResource/edit.html @@ -1,14 +1,16 @@ -

Editing {page.title}

+{#include layout} + {#pageTitle}Editing {page.title}{/pageTitle} -

Editing as {user:name}

+

Editing as {user:name}

-
- - -
- -
+
+ + +
+ +
-{#if http:param("error") != null} -

Error: {http:param("error")}

-{/if} \ No newline at end of file + {#if http:param("error") != null} +

Error: {http:param("error")}

+ {/if} +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/HistoryResource/history.html b/src/main/resources/templates/HistoryResource/history.html index 7e24020..2e2db63 100644 --- a/src/main/resources/templates/HistoryResource/history.html +++ b/src/main/resources/templates/HistoryResource/history.html @@ -1,26 +1,28 @@ -

History of {page.getTitle}

+{#include layout} + {#pageTitle}History of {page.getTitle}{/pageTitle} -{#for revision in revisions} -{#if page.latestRevision == revision} - - + {#for revision in revisions} + {#if page.latestRevision == revision} + + + #{revision.getIndex} + ({revision.getDelta}) {revision.getTimestamp.toString()} by + {revision.getAuthor.getName} + + + {#else} + #{revision.getIndex} ({revision.getDelta}) {revision.getTimestamp.toString()} by {revision.getAuthor.getName} - - -{#else} - - #{revision.getIndex} - ({revision.getDelta}) {revision.getTimestamp.toString()} by - {revision.getAuthor.getName} - -{/if} -
-{/for} + + {/if} +
+ {/for} - \ No newline at end of file + +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/HistoryResource/notFound.html b/src/main/resources/templates/HistoryResource/notFound.html index d0e1f52..84d8460 100644 --- a/src/main/resources/templates/HistoryResource/notFound.html +++ b/src/main/resources/templates/HistoryResource/notFound.html @@ -1,8 +1,10 @@ -

{title}

+{#include layout} + {#pageTitle}{title}{/pageTitle} -Page titled "{title}" doesn't exist. There's no history to show. + Page titled "{title}" doesn't exist. There's no history to show. - \ No newline at end of file + +{/include} diff --git a/src/main/resources/templates/IndexResource/index.html b/src/main/resources/templates/IndexResource/index.html index c48a406..606b024 100644 --- a/src/main/resources/templates/IndexResource/index.html +++ b/src/main/resources/templates/IndexResource/index.html @@ -1,15 +1,19 @@ -
- - -
+{#include layout customTitle=true} + {#pageTitle}TalkPages{/pageTitle} - -Running TalkPages version {config:["quarkus.application.version"]} \ No newline at end of file + Running TalkPages version {config:["quarkus.application.version"]} +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/PageResource/notFound.html b/src/main/resources/templates/PageResource/notFound.html index 2751302..c8d5761 100644 --- a/src/main/resources/templates/PageResource/notFound.html +++ b/src/main/resources/templates/PageResource/notFound.html @@ -1,18 +1,20 @@ -

{title}

+{#include layout} + {#pageTitle}{title}{/pageTitle} -

There is no such article.

+

There is no such article.

-{#if !suggestions.isEmpty()} -

Are you looking for:

- -

Actions:

-{/if} + {#if !suggestions.isEmpty()} +

Are you looking for:

+ +

Actions:

+ {/if} - \ No newline at end of file + +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/PageResource/page.html b/src/main/resources/templates/PageResource/page.html index 57cef6e..f63ba12 100644 --- a/src/main/resources/templates/PageResource/page.html +++ b/src/main/resources/templates/PageResource/page.html @@ -1,24 +1,28 @@ -{#if http:param("redirectFrom") != null} -

Redirected from {http:param("redirectFrom")}

-{/if} +{#include layout} + {#header} + {#if http:param("redirectFrom") != null} +

Redirected from {http:param("redirectFrom")}

+ {/if} -{#if old} -{#if page.latestRevision != revision} -

- You are viewing an outdated revision #{revision.getIndex} of this page from {revision.getTimestamp.toString()}, authored by {revision.getAuthor.getName}. -
- See current version -

-{#else} -

This is the current revision #{revision.index} authored by {revision.author.name}.

-{/if} -{/if} + {#if old} + {#if page.latestRevision != revision} +

+ You are viewing an outdated revision #{revision.getIndex} of this page from {revision.getTimestamp.toString()}, authored by {revision.getAuthor.getName}. +
+ See current version +

+ {#else} +

This is the current revision #{revision.index} authored by {revision.author.name}.

+ {/if} + {/if} + {/header} -

{page.title}

+ {#pageTitle}{page.title}{/pageTitle} -{revision.content.sanitizeContent.raw} + {revision.content.sanitizeContent.raw} -

+

-Modified {revision.timestamp.toString()} | Full history | Edit - {#if !page.title.startsWith("Talk:")} | Talk{/if} \ No newline at end of file + Modified {revision.timestamp.toString()} | Full history | Edit + {#if !page.title.startsWith("Talk:")} | Talk{/if} +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/PageResource/revisionNotFound.html b/src/main/resources/templates/PageResource/revisionNotFound.html index 9069e2b..7e16407 100644 --- a/src/main/resources/templates/PageResource/revisionNotFound.html +++ b/src/main/resources/templates/PageResource/revisionNotFound.html @@ -1,7 +1,9 @@ -

{page.getTitle}

+{#include layout} + {#pageTitle}{page.getTitle}{/pageTitle} -There is no revision #{revisionId}. - \ No newline at end of file + There is no revision #{revisionId}. + +{/include} \ No newline at end of file diff --git a/src/main/resources/templates/layout.html b/src/main/resources/templates/layout.html new file mode 100644 index 0000000..9af0d96 --- /dev/null +++ b/src/main/resources/templates/layout.html @@ -0,0 +1,15 @@ + + + + + + + {#insert pageTitle /}{#if !customTitle??} - TalkPages{/if} + + + {#insert header}{/} +

{#insert pageTitle /}

+ + {#insert}{/} + + \ No newline at end of file