From c0918b17ed6881d1e7690b44cbff0df38f4e004e Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sun, 21 Nov 2021 13:08:57 +0100 Subject: [PATCH] Rename front layouts to templates --- src/assets/views/auth/account/account.svelte | 6 +++--- src/assets/views/auth/auth.svelte | 10 +++++----- src/assets/views/backend/accounts_approval.svelte | 6 +++--- src/assets/views/backend/index.svelte | 6 +++--- src/assets/views/errors/400.svelte | 4 ++-- src/assets/views/errors/401.svelte | 4 ++-- src/assets/views/errors/403.svelte | 4 ++-- src/assets/views/errors/404.svelte | 4 ++-- src/assets/views/errors/429.svelte | 4 ++-- src/assets/views/errors/500.svelte | 4 ++-- src/assets/views/errors/503.svelte | 4 ++-- src/assets/views/home.svelte | 6 +++--- src/assets/views/magic_link.svelte | 6 +++--- src/assets/views/magic_link_lobby.svelte | 6 +++--- .../BaseTemplate.svelte} | 0 .../Error.svelte => templates/ErrorTemplate.svelte} | 0 .../{layouts => templates}/base/BaseFooter.svelte | 0 .../{layouts => templates}/base/BaseHeader.svelte | 0 .../{layouts => templates}/base/BaseHeaderLogo.svelte | 0 .../{layouts => templates}/base/BaseNavMenuAuth.svelte | 0 .../base/BaseNavMenuLinks.svelte | 0 .../svelte_template.html} | 0 src/frontend/SvelteViewEngine.ts | 2 +- test/assets/views/design.svelte | 6 +++--- test/assets/views/tests.svelte | 2 +- 25 files changed, 42 insertions(+), 42 deletions(-) rename src/assets/views/{layouts/BaseLayout.svelte => templates/BaseTemplate.svelte} (100%) rename src/assets/views/{errors/Error.svelte => templates/ErrorTemplate.svelte} (100%) rename src/assets/views/{layouts => templates}/base/BaseFooter.svelte (100%) rename src/assets/views/{layouts => templates}/base/BaseHeader.svelte (100%) rename src/assets/views/{layouts => templates}/base/BaseHeaderLogo.svelte (100%) rename src/assets/views/{layouts => templates}/base/BaseNavMenuAuth.svelte (100%) rename src/assets/views/{layouts => templates}/base/BaseNavMenuLinks.svelte (100%) rename src/assets/views/{layouts/svelte_layout.html => templates/svelte_template.html} (100%) diff --git a/src/assets/views/auth/account/account.svelte b/src/assets/views/auth/account/account.svelte index a8d2fbf..dcb0329 100644 --- a/src/assets/views/auth/account/account.svelte +++ b/src/assets/views/auth/account/account.svelte @@ -1,6 +1,6 @@ - +

Personal information

@@ -101,4 +101,4 @@ {/if}
- + diff --git a/src/assets/views/auth/auth.svelte b/src/assets/views/auth/auth.svelte index db3f8d4..c34d380 100644 --- a/src/assets/views/auth/auth.svelte +++ b/src/assets/views/auth/auth.svelte @@ -1,6 +1,6 @@ - +
{#if hasRoute('login')} @@ -74,4 +74,4 @@ {/if}
-
+ diff --git a/src/assets/views/backend/accounts_approval.svelte b/src/assets/views/backend/accounts_approval.svelte index dd9cbc2..1eff009 100644 --- a/src/assets/views/backend/accounts_approval.svelte +++ b/src/assets/views/backend/accounts_approval.svelte @@ -1,6 +1,6 @@ - +
@@ -30,4 +30,4 @@
-
+ diff --git a/src/assets/views/errors/400.svelte b/src/assets/views/errors/400.svelte index 5ad9f17..26064ed 100644 --- a/src/assets/views/errors/400.svelte +++ b/src/assets/views/errors/400.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/401.svelte b/src/assets/views/errors/401.svelte index a6d9d83..516d82a 100644 --- a/src/assets/views/errors/401.svelte +++ b/src/assets/views/errors/401.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/403.svelte b/src/assets/views/errors/403.svelte index 98a397f..489c6b5 100644 --- a/src/assets/views/errors/403.svelte +++ b/src/assets/views/errors/403.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/404.svelte b/src/assets/views/errors/404.svelte index 69c414d..1e526bb 100644 --- a/src/assets/views/errors/404.svelte +++ b/src/assets/views/errors/404.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/429.svelte b/src/assets/views/errors/429.svelte index cd0e471..04ef391 100644 --- a/src/assets/views/errors/429.svelte +++ b/src/assets/views/errors/429.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/500.svelte b/src/assets/views/errors/500.svelte index 4682025..ab3ccd4 100644 --- a/src/assets/views/errors/500.svelte +++ b/src/assets/views/errors/500.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/errors/503.svelte b/src/assets/views/errors/503.svelte index 47e7f5b..4f7ceef 100644 --- a/src/assets/views/errors/503.svelte +++ b/src/assets/views/errors/503.svelte @@ -1,5 +1,5 @@ - + diff --git a/src/assets/views/home.svelte b/src/assets/views/home.svelte index b03826a..ac6c4c3 100644 --- a/src/assets/views/home.svelte +++ b/src/assets/views/home.svelte @@ -1,10 +1,10 @@ - +

swaf - Svelte Web Application Framework

Welcome to {$locals.app.name}!

@@ -22,4 +22,4 @@ {/if}
-
+ diff --git a/src/assets/views/magic_link.svelte b/src/assets/views/magic_link.svelte index d764927..fc3346b 100644 --- a/src/assets/views/magic_link.svelte +++ b/src/assets/views/magic_link.svelte @@ -1,13 +1,13 @@ - +
{#if $locals.err} @@ -18,4 +18,4 @@ {/if}
-
+ diff --git a/src/assets/views/magic_link_lobby.svelte b/src/assets/views/magic_link_lobby.svelte index b82e291..21b8eb9 100644 --- a/src/assets/views/magic_link_lobby.svelte +++ b/src/assets/views/magic_link_lobby.svelte @@ -1,6 +1,6 @@ - +
Waiting for you to open the link...

-
+ diff --git a/src/assets/views/layouts/BaseLayout.svelte b/src/assets/views/templates/BaseTemplate.svelte similarity index 100% rename from src/assets/views/layouts/BaseLayout.svelte rename to src/assets/views/templates/BaseTemplate.svelte diff --git a/src/assets/views/errors/Error.svelte b/src/assets/views/templates/ErrorTemplate.svelte similarity index 100% rename from src/assets/views/errors/Error.svelte rename to src/assets/views/templates/ErrorTemplate.svelte diff --git a/src/assets/views/layouts/base/BaseFooter.svelte b/src/assets/views/templates/base/BaseFooter.svelte similarity index 100% rename from src/assets/views/layouts/base/BaseFooter.svelte rename to src/assets/views/templates/base/BaseFooter.svelte diff --git a/src/assets/views/layouts/base/BaseHeader.svelte b/src/assets/views/templates/base/BaseHeader.svelte similarity index 100% rename from src/assets/views/layouts/base/BaseHeader.svelte rename to src/assets/views/templates/base/BaseHeader.svelte diff --git a/src/assets/views/layouts/base/BaseHeaderLogo.svelte b/src/assets/views/templates/base/BaseHeaderLogo.svelte similarity index 100% rename from src/assets/views/layouts/base/BaseHeaderLogo.svelte rename to src/assets/views/templates/base/BaseHeaderLogo.svelte diff --git a/src/assets/views/layouts/base/BaseNavMenuAuth.svelte b/src/assets/views/templates/base/BaseNavMenuAuth.svelte similarity index 100% rename from src/assets/views/layouts/base/BaseNavMenuAuth.svelte rename to src/assets/views/templates/base/BaseNavMenuAuth.svelte diff --git a/src/assets/views/layouts/base/BaseNavMenuLinks.svelte b/src/assets/views/templates/base/BaseNavMenuLinks.svelte similarity index 100% rename from src/assets/views/layouts/base/BaseNavMenuLinks.svelte rename to src/assets/views/templates/base/BaseNavMenuLinks.svelte diff --git a/src/assets/views/layouts/svelte_layout.html b/src/assets/views/templates/svelte_template.html similarity index 100% rename from src/assets/views/layouts/svelte_layout.html rename to src/assets/views/templates/svelte_template.html diff --git a/src/frontend/SvelteViewEngine.ts b/src/frontend/SvelteViewEngine.ts index 58bda91..e267b90 100644 --- a/src/frontend/SvelteViewEngine.ts +++ b/src/frontend/SvelteViewEngine.ts @@ -64,7 +64,7 @@ export default class SvelteViewEngine extends ViewEngine { const view = await this.fileCache.get(actualFile, !config.get('view.cache')); // Root template - const templateFile = await this.resolveFileFromCanonicalNameOrFail('layouts/svelte_layout.html'); + const templateFile = await this.resolveFileFromCanonicalNameOrFail('templates/svelte_template.html'); const rawOutput = await this.fileCache.get(templateFile, !config.get('view.cache')); // Pre-compiled parts diff --git a/test/assets/views/design.svelte b/test/assets/views/design.svelte index 7986e35..f672b3a 100644 --- a/test/assets/views/design.svelte +++ b/test/assets/views/design.svelte @@ -1,6 +1,6 @@ - +
@@ -114,6 +114,6 @@ {link: route('design'), title: 'self'}, ]}/>
-
+ diff --git a/test/assets/views/tests.svelte b/test/assets/views/tests.svelte index a2821f4..705f159 100644 --- a/test/assets/views/tests.svelte +++ b/test/assets/views/tests.svelte @@ -1,6 +1,6 @@