update gui

This commit is contained in:
2026-07-28 21:20:38 -05:00
parent 444dc140b2
commit 64ee9da494
7 changed files with 41 additions and 0 deletions
+29
View File
@@ -8,6 +8,35 @@ import (
"time"
)
func TestEveryPageUsesStandaloneLogoMarkAsFavicon(t *testing.T) {
t.Parallel()
for _, file := range []string{
"templates/audit.html",
"templates/hosts.html",
"templates/login.html",
"templates/packages.html",
"templates/portal.html",
} {
content, err := webFiles.ReadFile(file)
if err != nil {
t.Fatal(err)
}
if !strings.Contains(
string(content),
`<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">`,
) {
t.Errorf("%s does not reference the standalone logo favicon", file)
}
}
mark, err := webFiles.ReadFile("static/ta-mark.svg")
if err != nil {
t.Fatal(err)
}
if bytes.Count(mark, []byte("<polygon")) != 4 {
t.Fatal("standalone logo favicon does not contain the four original mark polygons")
}
}
func TestPortalTemplateExecutes(t *testing.T) {
t.Parallel()
templates, err := parseTemplates(time.UTC)
+7
View File
@@ -0,0 +1,7 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-6 -6 175.5 119.7">
<title>Technology Architects</title>
<polygon fill="#333f49" points="67.6 107.7 82.1 93.2 96.7 107.7 67.6 107.7"/>
<polygon fill="#333f49" points="0 0 74.9 0 74.9 34.1 54.5 54.5 54.5 20.4 20.4 20.4 0 0"/>
<polygon fill="#333f49" points="163.5 0 88.6 0 88.6 34.1 109 54.5 109 20.4 143.1 20.4 163.5 0"/>
<polygon fill="#699141" points="115.8 107.7 143.1 107.7 81.7 46.4 20.4 107.7 47.7 107.7 81.7 74 115.8 107.7"/>
</svg>

After

Width:  |  Height:  |  Size: 499 B

+1
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · TAPM</title>
<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">
<link rel="stylesheet" href="/static/app.css">
</head>
<body>
+1
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · TAPM</title>
<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">
<link rel="stylesheet" href="/static/app.css">
</head>
<body>
+1
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}}</title>
<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">
<link rel="stylesheet" href="/static/app.css">
</head>
<body class="login-page">
+1
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · TAPM</title>
<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">
<link rel="stylesheet" href="/static/app.css">
<script src="/static/app.js" defer></script>
</head>
+1
View File
@@ -5,6 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}} · TAPM</title>
<link rel="icon" type="image/svg+xml" href="/static/ta-mark.svg">
<link rel="stylesheet" href="/static/app.css">
<script src="/static/app.js" defer></script>
</head>