From 93093a2131cc769a68870705531480b6294d3801 Mon Sep 17 00:00:00 2001 From: Dominik Hebeler <dominik@suma-ev.de> Date: Tue, 8 Nov 2022 10:22:25 +0100 Subject: [PATCH] fixed naming added possibility to include js scripts --- pass/public/{javascripts => js}/app.js | 0 pass/public/js/checkout.js | 0 pass/public/{stylesheets => styles}/base.css | 0 pass/public/{stylesheets => styles}/base.less | 0 pass/public/{stylesheets => styles}/checkout.css | 0 pass/public/{stylesheets => styles}/checkout.less | 0 pass/public/{stylesheets => styles}/index.css | 0 pass/public/{stylesheets => styles}/index.less | 0 pass/views/checkout/checkout.ejs | 2 +- pass/views/index.ejs | 2 +- pass/views/templates/page_header.ejs | 9 +++++++-- 11 files changed, 9 insertions(+), 4 deletions(-) rename pass/public/{javascripts => js}/app.js (100%) create mode 100644 pass/public/js/checkout.js rename pass/public/{stylesheets => styles}/base.css (100%) rename pass/public/{stylesheets => styles}/base.less (100%) rename pass/public/{stylesheets => styles}/checkout.css (100%) rename pass/public/{stylesheets => styles}/checkout.less (100%) rename pass/public/{stylesheets => styles}/index.css (100%) rename pass/public/{stylesheets => styles}/index.less (100%) diff --git a/pass/public/javascripts/app.js b/pass/public/js/app.js similarity index 100% rename from pass/public/javascripts/app.js rename to pass/public/js/app.js diff --git a/pass/public/js/checkout.js b/pass/public/js/checkout.js new file mode 100644 index 0000000..e69de29 diff --git a/pass/public/stylesheets/base.css b/pass/public/styles/base.css similarity index 100% rename from pass/public/stylesheets/base.css rename to pass/public/styles/base.css diff --git a/pass/public/stylesheets/base.less b/pass/public/styles/base.less similarity index 100% rename from pass/public/stylesheets/base.less rename to pass/public/styles/base.less diff --git a/pass/public/stylesheets/checkout.css b/pass/public/styles/checkout.css similarity index 100% rename from pass/public/stylesheets/checkout.css rename to pass/public/styles/checkout.css diff --git a/pass/public/stylesheets/checkout.less b/pass/public/styles/checkout.less similarity index 100% rename from pass/public/stylesheets/checkout.less rename to pass/public/styles/checkout.less diff --git a/pass/public/stylesheets/index.css b/pass/public/styles/index.css similarity index 100% rename from pass/public/stylesheets/index.css rename to pass/public/styles/index.css diff --git a/pass/public/stylesheets/index.less b/pass/public/styles/index.less similarity index 100% rename from pass/public/stylesheets/index.less rename to pass/public/styles/index.less diff --git a/pass/views/checkout/checkout.ejs b/pass/views/checkout/checkout.ejs index ca77a25..b6b4223 100644 --- a/pass/views/checkout/checkout.ejs +++ b/pass/views/checkout/checkout.ejs @@ -1,4 +1,4 @@ -<%- include('../templates/page_header', {css: ['/stylesheets/checkout.css']}); %> +<%- include('../templates/page_header', {css: ['/styles/checkout.css']}); %> <main> <div id="payment-container"> diff --git a/pass/views/index.ejs b/pass/views/index.ejs index 63dce96..814a4ec 100644 --- a/pass/views/index.ejs +++ b/pass/views/index.ejs @@ -1,4 +1,4 @@ -<%- include('templates/page_header', {css: ['/stylesheets/index.css']}); %> +<%- include('templates/page_header', {css: ['/styles/index.css']}); %> <p> Wählen Sie aus, wie viele Suchen Sie kaufen möchten. </p> diff --git a/pass/views/templates/page_header.ejs b/pass/views/templates/page_header.ejs index 8cea843..a6e888d 100644 --- a/pass/views/templates/page_header.ejs +++ b/pass/views/templates/page_header.ejs @@ -2,12 +2,17 @@ <html> <head> <title>MetaGer - Pass</title> - <link rel='stylesheet' href='/stylesheets/base.css' /> + <link rel='stylesheet' href='/styles/base.css' /> <%_ if (typeof css !== 'undefined') { -%> <%_ css.forEach(css_file => { -%> <link rel="stylesheet" href="<%- css_file %>"> <%_ }) _%> <%_ } _%> - <script src="/javascripts/app.js" defer></script> + <script src="/js/app.js" defer></script> + <%_ if (typeof js !== 'undefined') { -%> + <%_ js.forEach(js_file => { -%> + <script src="<%- js_file %>" defer></script> + <%_ }) _%> + <%_ } _%> </head> <body> \ No newline at end of file -- GitLab