fix: restructure env handling for better testing capabillities #181
All checks were successful
Build Docker Image / Explore-Gitea-Actions (push) Successful in 47s
Build and Push Docker Image / Explore-Gitea-Actions (push) Successful in 55s

This commit was merged in pull request #195.
This commit is contained in:
2024-09-29 23:51:23 +02:00
parent 25e82be339
commit a70138f2f7
15 changed files with 191 additions and 152 deletions

View File

@@ -1,8 +1,6 @@
package template
import "me-fit/utils"
templ Layout(slot templ.Component, user templ.Component) {
templ Layout(slot templ.Component, user templ.Component, environment string) {
<!DOCTYPE html>
<html lang="en">
<head>
@@ -11,7 +9,7 @@ templ Layout(slot templ.Component, user templ.Component) {
<link rel="icon" href="/static/favicon.svg"/>
<link rel="stylesheet" href="/static/css/tailwind.css"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
if utils.Environment == "prod" {
if environment == "prod" {
<script defer src="https://umami.me-fit.eu/script.js" data-website-id="3c8efb09-44e4-4372-8a1e-c3bc675cd89a"></script>
}
<script src="/static/js/htmx.min.js"></script>