feat: add two fonts (Title and Content)
This commit was merged in pull request #50.
This commit is contained in:
@@ -16,6 +16,7 @@ func SecurityHeaders(serverSettings *types.Settings) func(http.Handler) http.Han
|
|||||||
w.Header().Set("Content-Security-Policy",
|
w.Header().Set("Content-Security-Policy",
|
||||||
"default-src 'none'; "+
|
"default-src 'none'; "+
|
||||||
"script-src 'self'; "+
|
"script-src 'self'; "+
|
||||||
|
"font-src 'self'; "+
|
||||||
"connect-src 'self'; "+
|
"connect-src 'self'; "+
|
||||||
"img-src 'self'; "+
|
"img-src 'self'; "+
|
||||||
"style-src 'self'; "+
|
"style-src 'self'; "+
|
||||||
|
|||||||
19
input.css
19
input.css
@@ -3,9 +3,15 @@
|
|||||||
@source './static/**/*.js';
|
@source './static/**/*.js';
|
||||||
@source './template/**/*.templ';
|
@source './template/**/*.templ';
|
||||||
|
|
||||||
@theme {
|
body {
|
||||||
--animate-fade: fadeOut 0.25s ease-in;
|
@apply font-shippori
|
||||||
|
}
|
||||||
|
|
||||||
|
@theme {
|
||||||
|
--font-pirata: "Pirata One", sans-serif;
|
||||||
|
--font-shippori: "Shippori Mincho", sans-serif;
|
||||||
|
|
||||||
|
--animate-fade: fadeOut 0.25s ease-in;
|
||||||
@keyframes fadeOut {
|
@keyframes fadeOut {
|
||||||
0% {
|
0% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
@@ -16,3 +22,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Pirata One";
|
||||||
|
src: url("/static/font/pirata_one/PirataOne-Regular.ttf") format("truetype");
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: "Shippori Mincho";
|
||||||
|
src: url("/static/font/shippori_mincho/ShipporiMincho-Medium.ttf") format("truetype");
|
||||||
|
}
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ func TestIntegrationSecurityHeader(t *testing.T) {
|
|||||||
value = resp.Header.Get("Content-Security-Policy")
|
value = resp.Header.Get("Content-Security-Policy")
|
||||||
assert.Equal(t, "default-src 'none'; "+
|
assert.Equal(t, "default-src 'none'; "+
|
||||||
"script-src 'self'; "+
|
"script-src 'self'; "+
|
||||||
|
"font-src 'self'; "+
|
||||||
"connect-src 'self'; "+
|
"connect-src 'self'; "+
|
||||||
"img-src 'self'; "+
|
"img-src 'self'; "+
|
||||||
"style-src 'self'; "+
|
"style-src 'self'; "+
|
||||||
|
|||||||
BIN
static/font/pirata_one/PirataOne-Regular.ttf
Normal file
BIN
static/font/pirata_one/PirataOne-Regular.ttf
Normal file
Binary file not shown.
BIN
static/font/shippori_mincho/ShipporiMincho-Bold.ttf
Normal file
BIN
static/font/shippori_mincho/ShipporiMincho-Bold.ttf
Normal file
Binary file not shown.
BIN
static/font/shippori_mincho/ShipporiMincho-ExtraBold.ttf
Normal file
BIN
static/font/shippori_mincho/ShipporiMincho-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
static/font/shippori_mincho/ShipporiMincho-Medium.ttf
Normal file
BIN
static/font/shippori_mincho/ShipporiMincho-Medium.ttf
Normal file
Binary file not shown.
BIN
static/font/shippori_mincho/ShipporiMincho-Regular.ttf
Normal file
BIN
static/font/shippori_mincho/ShipporiMincho-Regular.ttf
Normal file
Binary file not shown.
BIN
static/font/shippori_mincho/ShipporiMincho-SemiBold.ttf
Normal file
BIN
static/font/shippori_mincho/ShipporiMincho-SemiBold.ttf
Normal file
Binary file not shown.
@@ -1,45 +1,45 @@
|
|||||||
package template
|
package template
|
||||||
|
|
||||||
templ Layout(slot templ.Component, user templ.Component) {
|
templ Layout(slot templ.Component, user templ.Component) {
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
|
||||||
<meta charset="utf-8"/>
|
<head>
|
||||||
<title>spend-sparrow</title>
|
<meta charset="utf-8" />
|
||||||
<link rel="icon" href="/static/favicon.svg"/>
|
<title>SpendSparrow</title>
|
||||||
<link rel="stylesheet" href="/static/css/tailwind.css"/>
|
<link rel="icon" href="/static/favicon.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
<link rel="stylesheet" href="/static/css/tailwind.css" />
|
||||||
<meta
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
name="htmx-config"
|
<meta name="htmx-config" content='{
|
||||||
content='{
|
|
||||||
"includeIndicatorStyles": false,
|
"includeIndicatorStyles": false,
|
||||||
"selfRequestsOnly": true,
|
"selfRequestsOnly": true,
|
||||||
"allowScriptTags": false
|
"allowScriptTags": false
|
||||||
}'
|
}' />
|
||||||
/>
|
<script src="/static/js/htmx.min.js"></script>
|
||||||
<script src="/static/js/htmx.min.js"></script>
|
<script src="/static/js/toast.js"></script>
|
||||||
<script src="/static/js/toast.js"></script>
|
</head>
|
||||||
</head>
|
|
||||||
<body hx-headers='{"csrf-token": "CSRF_TOKEN"}'>
|
<body hx-headers='{"csrf-token": "CSRF_TOKEN"}'>
|
||||||
<div class="h-screen flex flex-col">
|
<div class="h-screen flex flex-col">
|
||||||
<div class="flex justify-end items-center gap-2 py-1 px-2 h-12 md:gap-10 md:px-10 md:py-2 shadow-sm">
|
<div class="flex justify-end items-center gap-2 py-1 px-2 h-12 md:gap-10 md:px-10 md:py-2 shadow-sm">
|
||||||
<a href="/" class="flex-1 flex gap-2">
|
<a href="/" class="flex-1 flex gap-2">
|
||||||
<img class="w-6" src="/static/favicon.svg" alt="Spend Sparrow logo"/>
|
<img class="w-6" src="/static/favicon.svg" alt="SpendSparrow logo" />
|
||||||
<span class="text-xl font-bold">SpendSparrow</span>
|
<span class="text-4xl font-bold font-pirata">SpendSparrow</span>
|
||||||
</a>
|
</a>
|
||||||
@user
|
@user
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
if slot != nil {
|
if slot != nil {
|
||||||
@slot
|
@slot
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="" id="toasts">
|
<div class="" id="toasts">
|
||||||
<div class="hidden" id="toast">
|
<div class="hidden" id="toast">
|
||||||
New message arrived.
|
New message arrived.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
|
||||||
|
</html>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user