forked from caris-events/tunalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
entity.go
117 lines (111 loc) · 3.51 KB
/
entity.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package entity
import "html/template"
type Pagination struct {
CurrentPage int
TotalCount int
TotalPages int
Query template.URL
}
var Timezones = map[string]int{
"UTC-12:00": -60 * 60 * 12,
"UTC-11:30": -60 * 60 * 11.5,
"UTC-11:00": -60 * 60 * 11,
"UTC-10:30": -60 * 60 * 10.5,
"UTC-10:00": -60 * 60 * 10,
"UTC-09:30": -60 * 60 * 9.5,
"UTC-09:00": -60 * 60 * 9,
"UTC-08:30": -60 * 60 * 8.5,
"UTC-08:00": -60 * 60 * 8,
"UTC-07:30": -60 * 60 * 7.5,
"UTC-07:00": -60 * 60 * 7,
"UTC-06:30": -60 * 60 * 6.5,
"UTC-06:00": -60 * 60 * 6,
"UTC-05:30": -60 * 60 * 5.5,
"UTC-05:00": -60 * 60 * 5,
"UTC-04:30": -60 * 60 * 4.5,
"UTC-04:00": -60 * 60 * 4,
"UTC-03:30": -60 * 60 * 3.5,
"UTC-03:00": -60 * 60 * 3,
"UTC-02:30": -60 * 60 * 2.5,
"UTC-02:00": -60 * 60 * 2,
"UTC-01:30": -60 * 60 * 1.5,
"UTC-01:00": -60 * 60 * 1,
"UTC-00:30": -60 * 60 * 0.5,
"UTC+00:00": 0,
"UTC+00:30": +60 * 60 * 0.5,
"UTC+01:00": +60 * 60 * 1,
"UTC+01:30": +60 * 60 * 1.5,
"UTC+02:00": +60 * 60 * 2,
"UTC+02:30": +60 * 60 * 2.5,
"UTC+03:00": +60 * 60 * 3,
"UTC+03:30": +60 * 60 * 3.5,
"UTC+04:00": +60 * 60 * 4,
"UTC+04:30": +60 * 60 * 4.5,
"UTC+05:00": +60 * 60 * 5,
"UTC+05:30": +60 * 60 * 5.5,
"UTC+05:45": +60 * 60 * 5.75,
"UTC+06:00": +60 * 60 * 6,
"UTC+06:30": +60 * 60 * 6.5,
"UTC+07:00": +60 * 60 * 7,
"UTC+07:30": +60 * 60 * 7.5,
"UTC+08:00": +60 * 60 * 8,
"UTC+08:30": +60 * 60 * 8.5,
"UTC+08:45": +60 * 60 * 8.75,
"UTC+09:00": +60 * 60 * 9,
"UTC+09:30": +60 * 60 * 9.5,
"UTC+10:00": +60 * 60 * 10,
"UTC+10:30": +60 * 60 * 10.5,
"UTC+11:00": +60 * 60 * 11,
"UTC+11:30": +60 * 60 * 11.5,
"UTC+12:00": +60 * 60 * 12,
"UTC+12:45": +60 * 60 * 12.75,
"UTC+13:00": +60 * 60 * 13,
"UTC+13:45": +60 * 60 * 13.75,
"UTC+14:00": +60 * 60 * 14,
}
var Locales = map[string]string{
"台灣正體": "zh-tw",
"English": "en-us",
"简体中文": "zh-cn",
}
var PageTypes = map[string]string{
"/admin/users": "user",
"/admin/user/:id": "user",
"/admin/posts": "post",
"/admin/post/create": "post",
"/admin/post/:id": "post",
"/admin/tags": "tag",
"/admin/tag/:id": "tag",
"/admin/photos": "media",
"/admin/navigations": "navigation",
"/admin/settings": "settings",
"/admin/appearances": "appearances",
}
var RelativeRoots = map[string]string{
"/wizard": "../../",
"/login": "../../",
"/admin/users": "../../",
"/admin/navigations": "../../",
"/admin/tags": "../../",
"/admin/settings": "../../",
"/admin/appearances": "../../",
"/admin/posts": "../../",
"/admin/photos": "../../",
"/tag/:tag": "../../",
"/author/:author": "../../",
"/archive/:year": "../../",
"/post/:slug": "../../",
"/admin/user/:id": "../../../",
"/navigations/edit": "../../../",
"/admin/tag/:id": "../../../",
"/admin/appearances/injected": "../../../",
"/admin/post/create": "../../../",
"/admin/trashes/clear": "../../../",
"/admin/post/:id": "../../../",
"/archive/:year/:month": "../../../",
"/admin/tag/:id/delete": "../../../../",
"/admin/post/:id/delete": "../../../../",
"/admin/post/:id/trash": "../../../../",
"/admin/post/:id/untrash": "../../../../",
"/archive/:year/:month/:day": "../../../../",
}