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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
<!DOCTYPE html> <html lang="en-HK" prefix="og: http://ogp.me/ns#">
<head> <title>Event - 慧妍雅集, WAI YIN ASSOCIATION</title>
<meta name="description" content="In 1980,a group of former Miss Hong Kong Beauty Pageant titleholders and finalists talked about their dreams for Hong Kong and what they could do to touch the lives of those less fortunate."> <!-- css --> <?php include 'inc/headlinks.php'; ?> <!-- js --> <?php include 'inc/link-js.php'; ?> </head>
<body>
<!-- header --> <?php include 'inc/navbar.php'; ?> <!-- end of header-->
<!-- breadcrumb -->
<div class="breadcrumb" style="background-image:url(../../assets/images/breadcrumbbg.jpg);">
<div class="breadcrumbWrapper text-center">
<p class="breadcrumbTitle mb-2 pt-4 h3 text-uppercase whiteFont"> </p>
<div class="breadcrumbLink whiteFont">
<a href="index.php" class="whiteFont"> Home</a> / <a href="event_list.php" class="whiteFont"> Events </a> /<span class="whiteFont newsTitle"> </span>
</div>
</div>
</div>
<section class="mainWrap"> <div class="container"> <div class="row"> <div class="col-lg-9 mb-4"> <div class="contentHearder"> <h1 class="contentTitle"><span class="newsTitle"></span></h1>
<p class="newsDate">Event Date: <span class="newsDateDetail"></span> | <span class="newsTag"></span></p> </div> <div class="newsContent">
</div>
<button class="btn btn-outline-gray w-100 boxshardow" onclick="location.href='event_list.php';">Back To List</button>
</div> <div class="col-lg-3 mb-4"> <div class="sticky-top"> <h4 class="blod">Other Events</h4> <div class="otherEventsWrap">
</div>
</div> </div> </div>
</div>
</section>
<!-- end #section -->
<!-- footer --> <?php include 'inc/footer.php'; ?> <script> $(function() {
let link = window.location.href;
link = link.split("?");
let pageid = link[1];
$.ajax({ url: "../../assets/json/event_detail.json", type: "get",
data: {}, contentType: "application/json; charset=utf-8", dataType: "json", cache: false,
success: function(result) { let data = result.en;
let pageData = data.find(function(item) { return item.id == pageid; });
$(".newsContent").html(pageData.detail); $(".newsTitle").append(pageData.title); $(".breadcrumbTitle").append(pageData.title); $(".newsDateDetail").append(pageData.date); $(".newsTag").append(pageData.tag);
}, error: function(xhr, status, errorThrown) { console.log(errorThrown + "\n" + status + "\n" + xhr.statusTex); }, });
$.ajax({ url: "../../assets/json/event_list.json", type: "get",
data: {}, contentType: "application/json; charset=utf-8", dataType: "json", cache: false,
success: function(result) { let data = result.en;
$.each(data.slice(0, 3), function(index, item) { $(`<div class="mb-2"> <a class="card newsCard" href="${item.link}"> <div class="cardImgWrap"> <div class="cardImg">
<img src="${item.img}" alt="${item.title}" class="cardImgOver" title="mian0">
</div> <span class="tag ${item.class}">${item.tag}</span> </div> <div class="card-body"> <p class="small grayFont mb-2">${item.date}</p> <p class="card-text">${item.title}</p> </div> </a>
</div>`).appendTo('.otherEventsWrap');
});
}, error: function(xhr, status, errorThrown) { console.log(errorThrown + "\n" + status + "\n" + xhr.statusTex); }, });
}); </script>
</body>
</html>
|