-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
157 lines (150 loc) · 6.8 KB
/
index.html
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no" />
<title>G2Plot-Calendar</title>
<style>
body {
padding: 0;
margin: 0;
}
body,
body * {
font-family: Arial;
}
.container {
height: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
}
.container header {
padding: 0 16px;
height: 60px;
}
.container main {
flex: 1;
padding: 16px;
}
.container footer {
height: 40px;
padding: 4px 16px;
}
header h1 {
display: flex;
align-items: center;
}
header a {
color: #30a14e;
line-height: 1;
}
footer {
background: #000;
display: flex;
justify-content: center;
align-items: center;
color: hsla(0, 0%, 100%, 0.85);
}
footer .actions a {
color: #fff;
margin-right: 8px;
text-decoration: none;
background-color: transparent;
outline: none;
cursor: pointer;
transition: color 0.3s;
}
footer .actions a:hover {
color: #30a14e;
}
</style>
</head>
<body>
<div class="container">
<!-- header -->
<header class="header">
<h1>
<span
><a style="text-decoration:none" href="https://github.com/antvis/G2Plot" target="_blank" title="G2Plot repo"
>G2Plot</a
>
Calendar Generator</span
>
<a href="https://github.com/visiky/g2plot-calendar" style="text-decoration:none;margin-left:16px;" target="_blank" title="G2Plot-Calendar repo"
><span role="img" aria-label="github" class="anticon anticon-github github-icon action-link"
><svg
viewBox="64 64 896 896"
focusable="false"
data-icon="github"
width="1em"
height="1em"
fill="currentColor"
aria-hidden="true"
>
<path
d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"
></path></svg></span
></a>
</h1>
</header>
<main>
<div class="calendar" id="calendar-result"></div>
</main>
<footer>
<div class="">Made with ❤️ G2Plot</div>
<div class="actions" style="position:absolute;right:24px">
<a href="https://github.com/visiky/g2plot-calendar" style="text-decoration:none" target="_blank"
><span role="img" aria-label="github" class="anticon anticon-github github-icon action-link"
><svg
viewBox="64 64 896 896"
focusable="false"
data-icon="github"
width="1em"
height="1em"
fill="currentColor"
aria-hidden="true"
>
<path
d="M511.6 76.3C264.3 76.2 64 276.4 64 523.5 64 718.9 189.3 885 363.8 946c23.5 5.9 19.9-10.8 19.9-22.2v-77.5c-135.7 15.9-141.2-73.9-150.3-88.9C215 726 171.5 718 184.5 703c30.9-15.9 62.4 4 98.9 57.9 26.4 39.1 77.9 32.5 104 26 5.7-23.5 17.9-44.5 34.7-60.8-140.6-25.2-199.2-111-199.2-213 0-49.5 16.3-95 48.3-131.7-20.4-60.5 1.9-112.3 4.9-120 58.1-5.2 118.5 41.6 123.2 45.3 33-8.9 70.7-13.6 112.9-13.6 42.4 0 80.2 4.9 113.5 13.9 11.3-8.6 67.3-48.8 121.3-43.9 2.9 7.7 24.7 58.3 5.5 118 32.4 36.8 48.9 82.7 48.9 132.3 0 102.2-59 188.1-200 212.9a127.5 127.5 0 0138.1 91v112.5c.8 9 0 17.9 15 17.9 177.1-59.7 304.6-227 304.6-424.1 0-247.2-200.4-447.3-447.5-447.3z"
></path></svg></span></a
><a
href="https://gw.alipayobjects.com/zos/antfincdn/4NqKnYGSyO/wechart.JPG"
style="text-decoration:none"
target="_blank"
><span role="img" aria-label="wechat" class="anticon anticon-wechat wechat-icon action-link"
><svg
viewBox="64 64 896 896"
focusable="false"
data-icon="wechat"
width="1em"
height="1em"
fill="currentColor"
aria-hidden="true"
>
<path
d="M690.1 377.4c5.9 0 11.8.2 17.6.5-24.4-128.7-158.3-227.1-319.9-227.1C209 150.8 64 271.4 64 420.2c0 81.1 43.6 154.2 111.9 203.6a21.5 21.5 0 019.1 17.6c0 2.4-.5 4.6-1.1 6.9-5.5 20.3-14.2 52.8-14.6 54.3-.7 2.6-1.7 5.2-1.7 7.9 0 5.9 4.8 10.8 10.8 10.8 2.3 0 4.2-.9 6.2-2l70.9-40.9c5.3-3.1 11-5 17.2-5 3.2 0 6.4.5 9.5 1.4 33.1 9.5 68.8 14.8 105.7 14.8 6 0 11.9-.1 17.8-.4-7.1-21-10.9-43.1-10.9-66 0-135.8 132.2-245.8 295.3-245.8zm-194.3-86.5c23.8 0 43.2 19.3 43.2 43.1s-19.3 43.1-43.2 43.1c-23.8 0-43.2-19.3-43.2-43.1s19.4-43.1 43.2-43.1zm-215.9 86.2c-23.8 0-43.2-19.3-43.2-43.1s19.3-43.1 43.2-43.1 43.2 19.3 43.2 43.1-19.4 43.1-43.2 43.1zm586.8 415.6c56.9-41.2 93.2-102 93.2-169.7 0-124-120.8-224.5-269.9-224.5-149 0-269.9 100.5-269.9 224.5S540.9 847.5 690 847.5c30.8 0 60.6-4.4 88.1-12.3 2.6-.8 5.2-1.2 7.9-1.2 5.2 0 9.9 1.6 14.3 4.1l59.1 34c1.7 1 3.3 1.7 5.2 1.7a9 9 0 006.4-2.6 9 9 0 002.6-6.4c0-2.2-.9-4.4-1.4-6.6-.3-1.2-7.6-28.3-12.2-45.3-.5-1.9-.9-3.8-.9-5.7.1-5.9 3.1-11.2 7.6-14.5zM600.2 587.2c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9c0 19.8-16.2 35.9-36 35.9zm179.9 0c-19.9 0-36-16.1-36-35.9 0-19.8 16.1-35.9 36-35.9s36 16.1 36 35.9a36.08 36.08 0 01-36 35.9z"
></path></svg></span
></a>
</div>
</footer>
</div>
<script src="https://unpkg.com/@antv/g2plot@2"></script>
<script src="https://unpkg.com/g2plot-calendar@1"></script>
<!-- <script src="./dist/g2plot-calendar.min.js"></script> -->
<script>
fetch('https://gw.alipayobjects.com/os/antfincdn/nvYn7dOQB9/result.json')
.then((data) => data.json())
.then((data) => {
// 第一次默认渲染
var calendarPlot = new G2Plot.P('calendar-result', {}, G2PlotCalendar.adaptor, {
...G2PlotCalendar.defaultOptions,
width: 240,
height: 240,
data,
});
calendarPlot.render();
});
</script>
</body>
</html>