Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI
- name: Install Templ
run: go install github.com/a-h/templ/cmd/templ@latest
run: go install github.com/a-h/templ/cmd/templ@v0.3.819

- name: Setup node
uses: actions/setup-node@v4
Expand All @@ -40,7 +40,7 @@ jobs:
with:
fetch-depth: 0
- name: Install Templ
run: go install github.com/a-h/templ/cmd/templ@latest
run: go install github.com/a-h/templ/cmd/templ@v0.3.819

- name: lint
run: |
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI
- name: Install Templ
run: go install github.com/a-h/templ/cmd/templ@latest
run: go install github.com/a-h/templ/cmd/templ@v0.3.819
timeout-minutes: 12
- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/development-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI
- name: Install Templ
run: go install github.com/a-h/templ/cmd/templ@latest
run: go install github.com/a-h/templ/cmd/templ@v0.3.819

- name: Setup node
uses: actions/setup-node@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA-GUI/SOARCA-GUI
- name: Install Templ
run: go install github.com/a-h/templ/cmd/templ@latest
run: go install github.com/a-h/templ/cmd/templ@v0.3.819

- name: Setup node
uses: actions/setup-node@v4
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Build and sbom
run: |
go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/a-h/templ/cmd/templ@v0.3.819
make sbom
zip -r bin/sbom.zip bin

Expand Down
5 changes: 5 additions & 0 deletions public/public/vendor/alpine.min.js

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions public/public/vendor/feather.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/public/vendor/flowbite.min.css

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions public/public/vendor/flowbite.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/public/vendor/htmx.min.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion public/public/vendor/htmx@2.0.2.js

This file was deleted.

10 changes: 6 additions & 4 deletions views/layouts/base_layout.templ
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ templ Head(title string, description string, content string) {
<meta name="msapplication-TileColor" content="#da532c"/>
<meta name="theme-color" content="#ffffff"/>
<link rel="stylesheet" href="/public/styles.css"/>
<link rel="stylesheet" href="/public/template.css"/>
<link rel="stylesheet" href="/public/vendor/flowbite.min.css"/>
<link rel="stylesheet" href="/public/vendor/prism.css"/>
<script src="/public/vendor/htmx@2.0.2.js" defer></script>
<script src="/public/alpine@3.13.3.js" defer></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="/public/vendor/htmx.min.js" defer></script>
<script src="/public/vendor/alpine.min.js" defer></script>
<script src="/public/vendor/feather.min.js"></script>
<script src="/public/vendor/flowbite.min.js"></script>
<script src="/public/vendor/prism.js"></script>
</head>
}

Expand Down
67 changes: 32 additions & 35 deletions views/layouts/dashboard_layout.templ
Original file line number Diff line number Diff line change
Expand Up @@ -76,48 +76,45 @@ templ DashboardLayout() {
</div>
</main>
</div>
<script src="https://cdn.jsdelivr.net/npm/flowbite@2.4.1/dist/flowbite.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
<script src="/public/vendor/prism.js"></script>
@icons.LoadIcons()
<script>
// Get the theme toggle icons
var themeToggleDarkIcon = document.getElementById("theme-toggle-dark-icon");
var themeToggleLightIcon = document.getElementById("theme-toggle-light-icon");
// Get the theme toggle icons
var themeToggleDarkIcon = document.getElementById("theme-toggle-dark-icon");
var themeToggleLightIcon = document.getElementById("theme-toggle-light-icon");

// Check and apply the theme based on local storage or system preference
if (
localStorage.getItem("color-theme") === "dark" ||
(!localStorage.getItem("color-theme") && window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
document.documentElement.classList.add("dark");
themeToggleLightIcon.classList.remove("hidden");
themeToggleDarkIcon.classList.add("hidden");
} else {
document.documentElement.classList.remove("dark");
themeToggleLightIcon.classList.add("hidden");
themeToggleDarkIcon.classList.remove("hidden");
}
// Check and apply the theme based on local storage or system preference
if (
localStorage.getItem("color-theme") === "dark" ||
(!localStorage.getItem("color-theme") && window.matchMedia("(prefers-color-scheme: dark)").matches)
) {
document.documentElement.classList.add("dark");
themeToggleLightIcon.classList.remove("hidden");
themeToggleDarkIcon.classList.add("hidden");
} else {
document.documentElement.classList.remove("dark");
themeToggleLightIcon.classList.add("hidden");
themeToggleDarkIcon.classList.remove("hidden");
}

// Toggle the theme when the button is clicked
var themeToggleBtn = document.getElementById("theme-toggle");
// Toggle the theme when the button is clicked
var themeToggleBtn = document.getElementById("theme-toggle");

themeToggleBtn.addEventListener("click", function () {
// Toggle the icons
themeToggleDarkIcon.classList.toggle("hidden");
themeToggleLightIcon.classList.toggle("hidden");
themeToggleBtn.addEventListener("click", function () {
// Toggle the icons
themeToggleDarkIcon.classList.toggle("hidden");
themeToggleLightIcon.classList.toggle("hidden");

// Toggle the dark class and update local storage
if (document.documentElement.classList.contains("dark")) {
document.documentElement.classList.remove("dark");
localStorage.setItem("color-theme", "light");
} else {
document.documentElement.classList.add("dark");
localStorage.setItem("color-theme", "dark");
}
});
// Toggle the dark class and update local storage
if (document.documentElement.classList.contains("dark")) {
document.documentElement.classList.remove("dark");
localStorage.setItem("color-theme", "light");
} else {
document.documentElement.classList.add("dark");
localStorage.setItem("color-theme", "dark");
}
});

</script>
</script>
</body>
}
}
Loading