-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
161 lines (144 loc) · 4.52 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
158
159
160
161
<!DOCTYPE html><html lang="ja"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width"><link rel="icon" href="data:">
<title>さばえ3大フェス 2024/9/21-22</title>
<meta property="og:title" content="さばえ3大フェス 2024/9/21-22">
<meta property="og:description" content="2024年9月21日-22日に開催される、さばえ3大フェスの紹介サイト(さばえ3大まつり、鯖江三大祭、鯖江3大フェス)">
<meta property="og:url" content="https://fes.sabae.cc/">
<link rel="apple-touch-icon" href="https://fes.sabae.cc/ogp.jpg">
<meta property="og:image" content="https://fes.sabae.cc/ogp.jpg">
<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:image" content="https://fes.sabae.cc/ogp.jpg">
<meta property="og:site_name" content="さばえ3大フェス 2024/9/21-22">
</head><body>
<h1>さばえ3大フェス</h1>
<div class=date>2024/9/21土-22日</div>
<div class=divimgs>
<a target=_blank href=https://www.instagram.com/sabae_sdgsfes/><img src=sdgsfes.jpg title=めがねのまちさばえSDGsフェス></a>
<a target=_blank href=https://www.instagram.com/sabaemonzenmatsuri/><img src=monzenfes.jpg title=さばえ門前まつり></a>
<a target=_blank href=https://www.instagram.com/meganefes/><img src=meganefes.jpg title=めがねフェス></a>
</div>
<div id=divselbooth></div>
<div id=divbooth></div>
<div class=footer>熱い、さばえの2日間</div>
<script type="module" src="https://js.sabae.cc/csv-map.js"></script>
<csv-map src="./index.csv" grayscale=true></csv-map><br>
<a href=https://www.instagram.com/p/C_uArmPBi2o/>3会場と駐車場(サンドーム福井)を結ぶシャトルバス(夕方5時まで)</a>
<!--
<script type="module" src="https://code4sabae.github.io/js/csv-viewer.js"></script>
<csv-viewer id=csvbooth></csv-viewer>
-->
<div class=codefor><div>さばえ3大フェスをPRしよう!</div>
<script type="module" src="https://js.sabae.cc/QRCode.js"></script>
<a href=https://fes.sabae.cc/><qr-code></qr-code></a><br>
<input value=https://fes.sabae.cc/ id=inurl><br>
website by <a href=https://github.com/code4sabae/fes.sabae.cc/>Code for Sabae</a>
</div>
<script type="module">
import { CSV } from "https://code4fukui.github.io/CSV/CSV.js";
import { shuffle } from "https://js.sabae.cc/shuffle.js";
import { ArrayUtil } from "https://js.sabae.cc/ArrayUtil.js";
import { cr } from "https://js.sabae.cc/cr.js";
const index = await CSV.fetchJSON("./index.csv");
const list = [];
for (const item of index) {
if (!item.booth) continue;
const booth = await CSV.fetchJSON(item.booth);
//console.log(booth, item);
booth.forEach(i => {
i.fes = item.name;
list.push(i)
});
const lbl = cr("label", divselbooth);
const inp = cr("input", lbl);
inp.type = "checkbox";
inp.checked = true;
cr("span", lbl).textContent = item.name;
item.chk = inp;
}
//csvbooth.value = list;
const show = () => {
divbooth.innerHTML = "";
const types = ArrayUtil.toUnique(list.map(i => i.type));
for (const type of types) {
const div = document.createElement("div");
divbooth.appendChild(div);
const h3 = document.createElement("h3");
h3.textContent = type;
div.appendChild(h3);
const list2 = list.filter(i => i.type == type).filter(i => index.find(j => j.name == i.fes).chk.checked);
shuffle(list2);
const div2 = document.createElement("div");
div2.innerHTML = list2.map(i => i.url ? `<a href=${i.url}>${i.name}</a>` : i.name).join(" / ");
div.appendChild(div2);
}
};
show();
index.filter(i => i.chk).forEach(i => i.chk.onchange = () => show());
inurl.onclick = () => {
inurl.select();
document.execCommand("copy");
};
</script>
<style>
@import url(http://fonts.googleapis.com/earlyaccess/notosansjp.css);
body {
margin: 1vh 0;
/* */
margin: 1vh;
padding: 0;
text-align: center;
background-color: #222;
color: #f0f0f0;
font-family: 'Noto Sans JP', sans-serif;
}
h1 {
font-size: 12vw;
margin: 0;
padding: 0;
}
.date {
font-size: 10vw;
margin: 0;
padding: 0;
}
.footer {
font-size: 9vw;
margin: 2vw;
padding: 0;
}
.divimgs {
display: inline-grid;
grid-template-columns: 1fr 1fr 1fr;
margin: 2vw 0;
}
.divimgs img {
width: 100%;
}
#divbooth {
margin: 2vw .5em;
}
#divselbooth {
margin: 2vw 0 0 1vw;
}
csv-map > div {
height: 50vw !important;
}
csv-map a {
color: black !important;
}
.codefor {
margin-top: 5vw;
}
.codefor > * {
margin: .5em;
}
.codefor input {
text-align: center;
padding: .3em;
font-size: 110%;
}
a {
color: white !important;
}
</style>
</body>
</html>