-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoplevelser.html
executable file
·190 lines (182 loc) · 7.5 KB
/
oplevelser.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="stylesheet.css">
<link rel="stylesheet" href="menu.css">
<link rel="stylesheet" href="footer.css">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>OPLEVELSER</title>
<template id="oplevelseTemplate">
<section class="oplevelserWrapper">
<article class="oplevelseArticle">
<div class="line"> </div>
<h2 class="oplevelseHeadline"></h2>
<p class="oplevelseBody"></p> <img class="oplevelseImg"> </article>
</section>
</template>
<style>
body {
margin: 0;
background: linear-gradient(to right, rgba(207, 49, 0, .5) 0%, rgba(125, 185, 232, 0) 100%), url("imgs/bucketsBG.jpg") 100vw !important;
background-size: cover;
}
.oplevelserWrapper {
background-color: rgba(0, 0, 0, 0.6);
display: grid;
width: 80vw;
height: 100%;
/* max-height: 100vh;*/
background-color: rgba(0, 0, 0, 0.6);
margin: 15vw 10vw;
margin-bottom: 5vh;
}
.oplevelseImg {
max-width: 90%;
height: auto;
padding-left: 5%;
padding-right: 5%;
padding-bottom: 5%;
}
.oplevelseBody {
padding: 5vw;
margin-top: 0;
}
.oplevelseHeadline {
padding-left: 5vw;
margin-bottom: 0;
font-size: 1.9em;
padding-top: 1.5vw;
}
@media screen and (min-width: 1024px) {
body {
/* margin-top*/
}
.oplevelserWrapper:nth-child(even) .oplevelseArticle {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-areas: "overskrift overskrift" "venstre hojre";
}
#contentContainer {
/* border: red 30px solid;*/
}
.oplevelserWrapper {
width: 70vw;
margin: 8vw 15vw -3vw;
}
.oplevelseBody {
grid-area: venstre;
margin-top: -3vw;
}
.oplevelseImg {
grid-area: hojre;
padding: 0%;
}
.oplevelseHeadline {
grid-area: overskrift;
font-size: 2em;
}
footer {
position: relative !important;
}
.oplevelserWrapper:nth-child(odd) {
margin-top: 2vw;
}
.oplevelserWrapper:nth-child(odd) .oplevelseArticle {
/* border: solid red 5px;*/
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-areas: "ingenting headline" "billede tekst";
}
.oplevelserWrapper:nth-child(odd) .oplevelseArticle .oplevelseHeadline {
grid-area: headline;
}
.oplevelserWrapper:nth-child(odd) .oplevelseArticle .oplevelseImg {
grid-area: billede;
padding-left: 3.5vw;
padding-top: 3vw;
}
.oplevelserWrapper:nth-child(odd) .oplevelseArticle .oplevelseBody {
grid-area: tekst;
}
.oplevelserWrapper:nth-child(even) {
margin-bottom: 5vw;
margin-top: 9vw;
}
}
</style>
</head>
<body>
<nav>
<button class="burger">
<div class="menu">
<div class="bar1"></div>
<div class="bar2"></div>
<div class="bar3"></div>
</div>
<h2 id="navn">anders raad glas</h2> </button>
<div id="logoWrapper">
<a href="index.html" id="logoLink"> <img id="logo" src="imgs/andersRaadGlasLogo.png"> </a>
</div>
<ul id="menuContainer">
<li class="menuItems"><a href="galleri.html">Galleri</a></li>
<li class="menuItems"><a href="oplevelser.html">Oplevelser</a></li>
<li class="menuItems"><a href="produktudvikling.html">Produktudvikling</a></li>
<li class="menuItems"><a href="om.html">Om</a></li>
<li class="menuItems"><a href="kontakt.html">Kontakt</a></li>
<li id="instaItem">
<a href="https://www.instagram.com/raadglas/" id="instaLink"> <img id="instagram" src="imgs/instagramLogo.png"> </a>
</li>
</ul>
</nav>
<!-- *************************************************************************************************************** BG VIDEO-->
<!-- *************************************************************************************************************** ARTICLES-->
<!-- <div id="articleContainer"> </div>-->
<div id="contentContainer">
<div id="articleContainer"><img class="bgPicture"></div>
</div>
<footer>
<div id=footerInfo>
<p id="adresseText">Anders Raad
<br>Traverbanevej 12
<br>2920 Charlottenlund</p>
<p id="telefonText">+45 20 32 48 84
<br>[email protected]</p>
</div>
<div id="footerNews">
<h3 id="nyhedsbrev">Nyhedsbrev</h3>
<div id="nyhedsbrevBox"></div>
<button id="tilmeld">Tilmeld</button>
<a href="https://www.instagram.com/raadglas/" target="_blank"><img id="instagramLink" src="imgs/instagram_pic.png" alt=""></a>
</div>
<div id="footerMap">
<a href="https://www.google.dk/maps/place/Traverbanevej+12,+2920+Charlottenlund/@55.7535324,12.5830732,17z/data=!3m1!4b1!4m5!3m4!1s0x46524d9c2cb2964f:0x4fab685e79891bfc!8m2!3d55.7535294!4d12.5852672?dcr=0" target="_blank"><img id="mapsLink" src="imgs/maps-icon-25.png" alt=""></a>
<a href="https://www.google.dk/maps/place/Traverbanevej+12,+2920+Charlottenlund/@55.7535324,12.5830732,17z/data=!3m1!4b1!4m5!3m4!1s0x46524d9c2cb2964f:0x4fab685e79891bfc!8m2!3d55.7535294!4d12.5852672?dcr=0" target="_blank">
<p id="mapsText">Find vej</p>
</a>
</div>
</footer>
<!-- *************************************************************************************************************** OPLEVELSE-JS-->
<script>
async function loadOplevelser() {
let template = document.querySelector("#oplevelseTemplate");
let parent = document.querySelector("#articleContainer");
let oplevelserObj = await fetch("http://rearrangingly.com/KEA/raad/wp-json/wp/v2/oplevelser");
let oplevelser = await oplevelserObj.json();
console.log(oplevelser);
oplevelser.forEach(function (oplevelse) {
let clone = template.cloneNode(true).content;
clone.querySelector(".oplevelseImg").setAttribute("src", oplevelse.acf.billede.url);
clone.querySelector(".oplevelseHeadline").textContent = oplevelse.title.rendered.replace(/<(?:.|\n)*?>/gm, '');
clone.querySelector(".oplevelseBody").textContent = oplevelse.content.rendered.replace(/<(?:.|\n)*?>/gm, '');
parent.appendChild(clone);
});
}
loadOplevelser();
</script>
<script src="burger.js"></script>
</body>
</html>