Skip to content

Commit 5453dbc

Browse files
committed
re-add missing font property
fixes #587
1 parent a2fcc46 commit 5453dbc

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

sqlpage/templates/shell.handlebars

+27
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@
1414
{{/if}}
1515
{{/each}}
1616

17+
{{#if font}}
18+
{{#if (starts_with font "/")}}
19+
<style>
20+
@font-face {
21+
font-family: 'LocalFont';
22+
src: url('{{font}}') format('woff2');
23+
font-weight: normal;
24+
font-style: normal;
25+
}
26+
:root {
27+
--tblr-font-sans-serif: 'LocalFont', Arial, sans-serif;
28+
}
29+
</style>
30+
{{else}}
31+
<link rel="preconnect" href="https://fonts.googleapis.com">
32+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
33+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family={{font}}&display=fallback">
34+
<style>
35+
:root {
36+
--tblr-font-sans-serif: '{{font}}',
37+
Arial,
38+
sans-serif;
39+
}
40+
</style>
41+
{{/if}}
42+
{{/if}}
43+
1744
<script src="{{static_path 'sqlpage.js'}}" defer nonce="{{@csp_nonce}}"></script>
1845
{{#each (to_array javascript)}}
1946
{{#if this}}

0 commit comments

Comments
 (0)