Skip to content

Commit d642774

Browse files
authored
refactor: use new page templates
1 parent 1644904 commit d642774

File tree

8 files changed

+762
-759
lines changed

8 files changed

+762
-759
lines changed

web/html/common/head.html

Lines changed: 0 additions & 31 deletions
This file was deleted.

web/html/common/js.html

Lines changed: 0 additions & 14 deletions
This file was deleted.

web/html/common/page.html

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{{ define "page/head_start" }}
2+
<!DOCTYPE html>
3+
<html>
4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="renderer" content="webkit">
7+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8+
<meta name="robots" content="noindex,nofollow">
9+
<link rel="stylesheet" href="{{ .base_path }}assets/ant-design-vue/antd.min.css">
10+
<link rel="stylesheet" href="{{ .base_path }}assets/css/custom.min.css?{{ .cur_ver }}">
11+
<style>
12+
[v-cloak] {
13+
display: none;
14+
}
15+
/* vazirmatn-regular - arabic_latin_latin-ext */
16+
@font-face {
17+
font-display: swap;
18+
font-family: 'Vazirmatn';
19+
font-style: normal;
20+
font-weight: 400;
21+
src: url('{{ .base_path }}assets/Vazirmatn-UI-NL-Regular.woff2') format('woff2');
22+
unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC, U+0030-0039;
23+
}
24+
body {
25+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Vazirmatn', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
26+
}
27+
</style>
28+
<title>{{ .host }} – {{ i18n .title}}</title>
29+
{{ end }}
30+
31+
{{ define "page/head_end" }}
32+
</head>
33+
{{ end }}
34+
35+
{{ define "page/body_start" }}
36+
<body>
37+
<div id="message"></div>
38+
{{ end }}
39+
40+
{{ define "page/body_scripts" }}
41+
<script src="{{ .base_path }}assets/vue/vue.min.js?{{ .cur_ver }}"></script>
42+
<script src="{{ .base_path }}assets/moment/moment.min.js"></script>
43+
<script src="{{ .base_path }}assets/ant-design-vue/antd.min.js"></script>
44+
<script src="{{ .base_path }}assets/axios/axios.min.js?{{ .cur_ver }}"></script>
45+
<script src="{{ .base_path }}assets/qs/qs.min.js"></script>
46+
<script src="{{ .base_path }}assets/js/axios-init.js?{{ .cur_ver }}"></script>
47+
<script src="{{ .base_path }}assets/js/util/date-util.js?{{ .cur_ver }}"></script>
48+
<script src="{{ .base_path }}assets/js/util/index.js?{{ .cur_ver }}"></script>
49+
<script>
50+
const basePath = '{{ .base_path }}';
51+
axios.defaults.baseURL = basePath;
52+
</script>
53+
{{ end }}
54+
55+
{{ define "page/body_end" }}
56+
</body>
57+
</html>
58+
{{ end }}

web/html/inbounds.html

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<!DOCTYPE html>
2-
<html lang="en">
3-
{{template "head" .}}
1+
{{ template "page/head_start" .}}
42
<style>
53
.ant-table:not(.ant-table-expanded-row .ant-table) {
64
outline: 1px solid #f0f0f0;
@@ -143,8 +141,9 @@
143141
padding: 12px 2px;
144142
}
145143
</style>
144+
{{ template "page/head_end" .}}
146145

147-
<body>
146+
{{ template "page/body_start" .}}
148147
<a-layout id="app" v-cloak :class="themeSwitcher.currentTheme">
149148
<a-sidebar></a-sidebar>
150149
<a-layout id="content-layout">
@@ -657,7 +656,7 @@
657656
</a-layout-content>
658657
</a-layout>
659658
</a-layout>
660-
{{template "js" .}}
659+
{{template "page/body_scripts" .}}
661660
<script src="{{ .base_path }}assets/qrcode/qrious2.min.js?{{ .cur_ver }}"></script>
662661
<script src="{{ .base_path }}assets/uri/URI.min.js?{{ .cur_ver }}"></script>
663662
<script src="{{ .base_path }}assets/js/model/inbound.js?{{ .cur_ver }}"></script>
@@ -666,6 +665,13 @@
666665
{{template "component/aThemeSwitch" .}}
667666
{{template "component/aCustomStatistic" .}}
668667
{{template "component/aPersianDatepicker" .}}
668+
{{template "modals/inboundModal"}}
669+
{{template "modals/promptModal"}}
670+
{{template "modals/qrcodeModal"}}
671+
{{template "modals/textModal"}}
672+
{{template "modals/inboundInfoModal"}}
673+
{{template "modals/clientsModal"}}
674+
{{template "modals/clientsBulkModal"}}
669675
<script>
670676
const columns = [{
671677
title: "ID",
@@ -1607,13 +1613,4 @@
16071613
},
16081614
});
16091615
</script>
1610-
1611-
{{template "modals/inboundModal"}}
1612-
{{template "modals/promptModal"}}
1613-
{{template "modals/qrcodeModal"}}
1614-
{{template "modals/textModal"}}
1615-
{{template "modals/inboundInfoModal"}}
1616-
{{template "modals/clientsModal"}}
1617-
{{template "modals/clientsBulkModal"}}
1618-
</body>
1619-
</html>
1616+
{{ template "page/body_end" .}}

0 commit comments

Comments
 (0)