diff --git a/src/main/resources/templates/about.ftl b/src/main/resources/templates/about.ftl index bfab9d7a152d2669f3b37ee8d429372a3a4a4069..5753b500a4ffbff861738f4b3c9f90d91a5036cc 100644 --- a/src/main/resources/templates/about.ftl +++ b/src/main/resources/templates/about.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -46,8 +46,7 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/accounts/accounts.ftl b/src/main/resources/templates/accounts/accounts.ftl index dc63922b2e9a7b9d230f9c753969f9669c69b90e..c7562c089b9410a1f96c9573481fdaf88415183b 100644 --- a/src/main/resources/templates/accounts/accounts.ftl +++ b/src/main/resources/templates/accounts/accounts.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -49,9 +49,8 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/categories.js"></script> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/accounts/newAccount.ftl b/src/main/resources/templates/accounts/newAccount.ftl index a34bdbe002b2d917131a18e5b316437f27fb1932..7087f1a26d61ed3e26158c541c8d192141217f3d 100644 --- a/src/main/resources/templates/accounts/newAccount.ftl +++ b/src/main/resources/templates/accounts/newAccount.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -61,8 +61,7 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/categories/categories.ftl b/src/main/resources/templates/categories/categories.ftl index e07b4b307c1c10e6284dfe67bf9e62ec2a6a92d7..f1bc836e751767141659ac402092ee1051b7fd6d 100644 --- a/src/main/resources/templates/categories/categories.ftl +++ b/src/main/resources/templates/categories/categories.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <link type="text/css" rel="stylesheet" href="/css/categories.css"/> <#assign locale = static["tools.Localization"]> </head> @@ -59,9 +59,8 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/categories.js"></script> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/categories/newCategory.ftl b/src/main/resources/templates/categories/newCategory.ftl index ad1b803080cf2154db874e9c07f3acea8733ee88..a0994f4641d88d83e7001281cfe512b755750c84 100644 --- a/src/main/resources/templates/categories/newCategory.ftl +++ b/src/main/resources/templates/categories/newCategory.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <link type="text/css" rel="stylesheet" href="/css/spectrum.css"/> <link type="text/css" rel="stylesheet" href="/css/categories.css"/> <#assign locale = static["tools.Localization"]> @@ -89,9 +89,8 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/spectrum.js"></script> <script src="/js/categories.js"></script> </body> diff --git a/src/main/resources/templates/emptyPage.ftl b/src/main/resources/templates/emptyPage.ftl index 76c4182ebcef6e6315413076c9cece8bb27a369c..7ccc7abc31d7ad21938da435d71111bfa3707640 100644 --- a/src/main/resources/templates/emptyPage.ftl +++ b/src/main/resources/templates/emptyPage.ftl @@ -1,18 +1,15 @@ <html> <head> <#import "header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> <#import "navbar.ftl" as navbar> <@navbar.navbar active/> - - <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/error/403.ftl b/src/main/resources/templates/error/403.ftl index cefacac2c186805089d4ded90db183f1f2df31db..58254fee36c08fd06365fd287a0fd7df0d67da69 100644 --- a/src/main/resources/templates/error/403.ftl +++ b/src/main/resources/templates/error/403.ftl @@ -1,14 +1,9 @@ <html> <head> - <title>BudgetMaster - 403</title> - <meta charset="UTF-8"/> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.css"> - <link type="text/css" rel="stylesheet" href="/css/style.css"/> - <link type="text/css" rel="stylesheet" href="/css/login.css"/> - - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> - <#assign locale = static["tools.Localization"]> + <#import "../header.ftl" as header> + <@header.header "BudgetMaster - 403"/> + <link type="text/css" rel="stylesheet" href="/css/login.css"/> + <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> <main> diff --git a/src/main/resources/templates/error/404.ftl b/src/main/resources/templates/error/404.ftl index 2eeb00b88bee84529ea51bde7f8b917f1dd639db..be8bfa8f0dc9def106e50e424bddfeb11ae3eb28 100644 --- a/src/main/resources/templates/error/404.ftl +++ b/src/main/resources/templates/error/404.ftl @@ -1,13 +1,8 @@ <html> <head> - <title>BudgetMaster - 404</title> - <meta charset="UTF-8"/> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.css"> - <link type="text/css" rel="stylesheet" href="/css/style.css"/> + <#import "../header.ftl" as header> + <@header.header "BudgetMaster - 404"/> <link type="text/css" rel="stylesheet" href="/css/login.css"/> - - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> diff --git a/src/main/resources/templates/error/418.ftl b/src/main/resources/templates/error/418.ftl index 4d323d4c795fa09b0e7d20507868e21b38491cfd..f85deb1b6bf1749409cf2fe60d443cc8723c4896 100644 --- a/src/main/resources/templates/error/418.ftl +++ b/src/main/resources/templates/error/418.ftl @@ -1,13 +1,8 @@ <html> <head> - <title>BudgetMaster - 418</title> - <meta charset="UTF-8"/> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.css"> - <link type="text/css" rel="stylesheet" href="/css/style.css"/> + <#import "../header.ftl" as header> + <@header.header "BudgetMaster - 418"> <link type="text/css" rel="stylesheet" href="/css/login.css"/> - - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -36,9 +31,8 @@ </div> </main> - <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <!-- Scripts--> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/error/500.ftl b/src/main/resources/templates/error/500.ftl index 47e4c823daaca038109e68d9b54eda95709a025f..fac409b8b7a4f367237f3a695abfeeeb1226753d 100644 --- a/src/main/resources/templates/error/500.ftl +++ b/src/main/resources/templates/error/500.ftl @@ -1,13 +1,8 @@ <html> <head> - <title>BudgetMaster - 500</title> - <meta charset="UTF-8"/> - <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> - <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.css"> - <link type="text/css" rel="stylesheet" href="/css/style.css"/> + <#import "../header.ftl" as header> + <@header.header "BudgetMaster - 500"/> <link type="text/css" rel="stylesheet" href="/css/login.css"/> - - <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -34,9 +29,8 @@ </div> </main> - <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <!-- Scripts--> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/header.ftl b/src/main/resources/templates/header.ftl index ac41e140dc6afa650b6215593568e475fc8b6d83..15eaa2eb868a2a45464b6ad68ee0f69f7fb8145e 100644 --- a/src/main/resources/templates/header.ftl +++ b/src/main/resources/templates/header.ftl @@ -1,5 +1,5 @@ -<#macro header> - <title>BudgetMaster</title> +<#macro header title> + <title>${title}</title> <meta charset="UTF-8"/> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.css"> diff --git a/src/main/resources/templates/index.ftl b/src/main/resources/templates/index.ftl index 7949d22b1cf48377cc402f04111457e76e56f8bf..6aa96315904b6ca1fcc1bf970621753b2d959afc 100644 --- a/src/main/resources/templates/index.ftl +++ b/src/main/resources/templates/index.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> </head> <body class="budgetmaster-blue-light"> <#import "navbar.ftl" as navbar> @@ -55,9 +55,8 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/datePicker.js"></script> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/login.ftl b/src/main/resources/templates/login.ftl index 5e0d09a907265d34db84d1635466e005374a03a9..3dd3d36e114dc1cdf4edf0e585c973295eff6c9f 100644 --- a/src/main/resources/templates/login.ftl +++ b/src/main/resources/templates/login.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <link type="text/css" rel="stylesheet" href="/css/login.css"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> @@ -30,9 +30,8 @@ </div> </main> - <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <!-- Scripts--> + <#import "scripts.ftl" as scripts> + <@scripts.scripts/> </body> </html> \ No newline at end of file diff --git a/src/main/resources/templates/payments/newPayment.ftl b/src/main/resources/templates/payments/newPayment.ftl index a459b91ee12a5b7842be5061e17512a9840ecd2e..bc1864dc5b760b54061b96a5661992ae4cef7edf 100644 --- a/src/main/resources/templates/payments/newPayment.ftl +++ b/src/main/resources/templates/payments/newPayment.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <#assign locale = static["tools.Localization"]> </head> <body class="budgetmaster-blue-light"> @@ -177,9 +177,8 @@ </script> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/spectrum.js"></script> <script src="/js/payments.js"></script> </body> diff --git a/src/main/resources/templates/payments/payments.ftl b/src/main/resources/templates/payments/payments.ftl index 08a70379326f1abf9fd6108db747c4e03c04693e..a7a721cfe9620d65c0251c2769fa37ce8bf27899 100644 --- a/src/main/resources/templates/payments/payments.ftl +++ b/src/main/resources/templates/payments/payments.ftl @@ -1,7 +1,7 @@ <html> <head> <#import "../header.ftl" as header> - <@header.header/> + <@header.header "BudgetMaster"/> <link type="text/css" rel="stylesheet" href="/css/categories.css"/> <#assign locale = static["tools.Localization"]> </head> @@ -72,9 +72,8 @@ </main> <!-- Scripts--> - <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> - <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> - <script src="/js/main.js"></script> + <#import "../scripts.ftl" as scripts> + <@scripts.scripts/> <script src="/js/payments.js"></script> <script src="/js/datePicker.js"></script> <script>document.cookie = "currentDate=${helpers.getDateString(currentDate)}";</script> diff --git a/src/main/resources/templates/scripts.ftl b/src/main/resources/templates/scripts.ftl new file mode 100644 index 0000000000000000000000000000000000000000..eb9d7698f54a38d325c64655b1aa976ff7132540 --- /dev/null +++ b/src/main/resources/templates/scripts.ftl @@ -0,0 +1,5 @@ +<#macro scripts> +<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> +<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script> +<script src="/js/main.js"></script> +</#macro> \ No newline at end of file