-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
517 lines (401 loc) · 19.8 KB
/
header.php
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package Stoffu
*
* ,... ,...
* mm .d' "".d' ""
* MM dM` dM`
* ,pP"Ybd mmMMmm ,pW"Wq. mMMmm mMMmm
* 8I `" MM 6W' `Wb MM MM
* `YMMMa. MM 8M M8 MM MM
* L. I8 MM YA. ,A9 MM MM
* M9mmmP' `Mbmo`Ybmd9'.JMML..JMML.
*
*
* by Marcus Lauritsen 2017-18
*
*************************
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-62250971-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-62250971-1');
</script>
<!-- Google Analytics -->
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
<script async src="path/to/autotrack.js"></script>
<!-- End Google Analytics -->
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="/wp-content/themes/stoffu/style.css"></link>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<?php wp_head(); ?>
<meta property="og:title" content="STOFF" />
<meta property="og:description" content="Gratismagasin for unge i Bergen." />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://www.stoffmagasin.no/" />
<meta property="og:image" content="https://i0.wp.com/www.stoffmagasin.no/wp-content/uploads/2018/04/Stoff_ol.png?fit=900%2C900" />
</head>
<body>
<?php include( get_template_directory() . '/menu-fullscreen.php' ); ?>
<!-- PAPIRUTGAVE
<style type="text/css">
/*
::-webkit-scrollbar-thumb:horizontal, ::-webkit-scrollbar-button:horizontal {
color: red;
background-color: yellow;
}
*/
::-webkit-scrollbar:horizontal {
width: 10px;
height: 10px;
}
/*add a shadow to the scrollbar here*/
::-webkit-scrollbar-track:horizontal {
color: blue;
background-color: red;
}
/*this is the little scrolly dealio in the bar*/
::-webkit-scrollbar-thumb:horizontal {
border-radius: 10px;
background: yellow;
height: 3px;
}
</style>
<div class="papirutgave" style="width: 100vw; height: 100vh; background-color: black; display: flex; align-items: center; flex-direction: row; flex-wrap: no-wrap; overflow-y: scroll;">
<div style="height: 50%; width: auto; margin-left: 60px;">
<img style="display: flex; height: 100%; width: auto;" src="/wp-content/uploads/forsider/utgave21.jpg">
</div>
</div>
-->
<!-- Fullscreen search -->
<div id="fullscreenSearch" class="initiallyHidden" style="width: 100vw; height: 100vh; position: fixed; background-color: #f9f7f1; z-index: 1001;">
<div id="" class="hidden-md-down fixed-top bg-color-paper" style="width: 100vw; border-top: 0px solid black; border-bottom: 0px solid black; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px 0 20px; z-index: 1000;">
<div id="" class="cursor-pointer-hover" style="">
<!-- <a id="" class="papirutgave-knapp bg-color-paper" href="http://bit.ly/2J53DzA" target="_blank" style="background-color: #f9f7f1;
font-size: 16px;
font-family: 'Ludacrys', serif;
color: black; padding: 5px;">Les Nr. 23 3. årgang <i id="papirutgave-ikon" class="fa fa-chevron-down" style="font-weight: 100;" aria-hidden="true"></i></a> -->
</div>
<div class="" style="">
<a href="https://www.facebook.com/STOFFmagasin/" target="_blank">
<i class="fa fa-facebook topbar-icon" style="padding: 0 3px 0 3px; font-size: 1.3rem;
margin-top: 5px;" aria-hidden="true"></i>
</a>
<a href="https://www.instagram.com/stoffmagasin/" target="_blank">
<i class="fa fa-instagram topbar-icon" style="padding: 0 3px 0 3px; font-size: 1.3rem;
margin-top: 5px;" aria-hidden="true"></i>
</a>
<a href="https://twitter.com/stoffmagasin" target="_blank">
<i class="fa fa-twitter topbar-icon" style="padding: 0 15px 0 3px; font-size: 1.3rem;
margin-top: 5px;" aria-hidden="true"></i>
</a>
<a id="search-link" onclick="" class="" style="">
<i id="search-icon" class="cursor-pointer-hover fa fa-times topbar-icon" style="padding: 0 3px 0 3px; font-size: 1.3rem; margin-top: 5px;"></i>
</a>
</div>
</div>
<div id="" class="hidden-md-down" style="width: 100vw; height: 100vh; position: fixed; background-color: #f9f7f1;">
<div id="logo" class="mx-auto d-block" style="display: flex; width: 25vw; padding-top: 25px;">
<a href="/index.php"><img style="display: block;" src="/wp-content/uploads/2017/04/stoff.png" class="img-fluid mx-auto d-block logo"></a>
</div>
<div style="display: flex; justify-content: center; margin-top: 10%;">
<form method="get" id="search" action=" <?php echo get_site_url( '/' ) . '/'; ?> ">
<input id="input-search" autofocus style="background-color: transparent; border: none; height: 120px; width: auto; font-size: 90px; text-align: center; outline: none; font-family: 'Ludacrys', serif;" type="text" placeholder="Søk..." name="s" onfocus="this.value='';" onblur="this.value='';"
/>
<input type="hidden" id="searchsubmit" />
</form>
</div>
</div>
</div>
<script>
$(function() {
$('.fa-bars').click(function() {
$('#fullscreen-menu').fadeIn(200);
})
});
</script>
<!-- Top bar -->
<?php
if ( isset( $_GET['utgave'] ) ) {
$currentIssue = $_GET['utgave'];
} else {
$currentIssue = 24;
}
if ( $currentIssue < 7 ) {
$yearIssue = 1;
} elseif ( $currentIssue > 6 and $currentIssue < 17 ) {
$yearIssue = 2;
} elseif ( $currentIssue > 16 and $currentIssue < 28 ) {
$yearIssue = 3;
}
?>
<div id="topbar" class="hidden-md-down fixed-top" style="opacity: 0.98; width: 100vw; height: 50px; display: flex; align-items: center; justify-content: space-between; z-index: 1000; border-bottom: 1px solid transparent;">
<div id="" class="cursor-pointer-hover" style="margin-left: 20px; width: calc(13vw - 30px);">
<a href="/index.php" id="logo-link" class="initiallyHidden"><img id="headerLogo" src="/wp-content/uploads/2017/04/stoff.png" style="height: 35px; padding: 5px; filter: none; z-index: 1001;"></a>
<a id="papirutgave-klikk" class="papirutgave-knapp bg-color-paper" href="http://bit.ly/2JWtZ8n" target="_blank" style="padding: 5px;">Les papirutgaven
<!-- Les nr. <?php echo $currentIssue; ?> <?php echo $yearIssue; ?>. årgang -->
<!-- <i id="papirutgave-ikon" class="fa fa-chevron-down" style="font-weight: 100;" aria-hidden="true"></i>--></a>
</div>
<div id="topbar-categories" class="hide" style="width: 100vw; font-family: 'Roboto', sans-serif; display: flex; justify-content: center; flex-direction: row; font-size: 16px; text-transform: uppercase; font-weight: 400; margin: 30px auto 25px auto;">
<a class="topbar-cat" style="padding: 10px 15px 10px 15px;" href="/?page_id=6471">Debatt</a>
<a class="topbar-cat" style="padding: 10px 15px 10px 15px;" href="/kultur/?kategori=tre-kule-folk">Tre kule</a>
<a class="topbar-cat" style="padding: 10px 15px 10px 15px;" href="/samfunn/?kategori=quiz">Quiz</a>
<a class="topbar-cat" style="padding: 10px 15px 10px 15px;" href="/samfunn/?kategori=lost-gjenfortalt">Løst gjenfortalt</a>
<a class="topbar-cat" style="padding: 10px 15px 10px 15px;" href="/samfunn/?kategori=under-beltestedet">Under beltestedet</a>
</div>
<div class="" style="display: flex; flex-direction: row; margin-right: 20px;">
<!--<a href="https://www.facebook.com/STOFFmagasin/" target="_blank">
<i class="fa fa-facebook topbar-icon" style="padding: 0 3px 0 3px;" aria-hidden="true"></i>
</a>
<a href="https://www.instagram.com/stoffmagasin/" target="_blank">
<i class="fa fa-instagram topbar-icon" style="padding: 0 3px 0 3px;" " aria-hidden="true"></i>
</a>
<a href="https://twitter.com/stoffmagasin" target="_blank">
<i class="fa fa-twitter topbar-icon" style="padding: 0 15px 0 3px;" aria-hidden="true"></i>
</a> -->
<a id="" onclick="" class="" style="">
<i id="search-icon" class="cursor-pointer-hover fa fa-search topbar-icon" style="padding-right: 10px;"></i>
</a>
<a class="" style="">
<i id="hamburger-icon" class="fa fa-bars topbar-icon" style=""></i>
</a>
</div>
</div>
<script>
$(window).scroll(function() {
var top_of_logomenu = $("#logoMenu").offset().top;
var bottom_of_topbar = $("#topbar").offset().top + $("#topbar").outerHeight();
var bottom_of_screen = $(window).scrollTop() + window.innerHeight;
var top_of_screen = $(window).scrollTop();
if (top_of_logomenu < bottom_of_topbar) {
$('#topbar').addClass('topbar-border');
} else {
$('#topbar').removeClass('topbar-border');
}
});
</script>
<?php require( get_template_directory() . '/topbar-mobile.php' ); ?>
<script> // fade in logo after scroll down a bit
$(window).scroll(function(){
var elementoffset = $('#logoMenu').offset().top; //
// var interval = setInterval(function() {
if ($(this).scrollTop() > 1500) { // forbi siste saker
$('#logo-link').fadeIn('slow');
$('#papirutgave-klikk').addClass('initiallyHidden');
} else {
$('#logo-link').fadeOut(0); // mot toppen
$('#papirutgave-klikk').removeClass('initiallyHidden');
}
// }, 2000);
}); // EOF scroll
/* Hide navbar categories on scroll etc, modified from
http://jsfiddle.net/mariusc23/s6mLJ/31/ */
// Hide Header on scroll down
var didScroll;
var lastScrollTop = 0;
var delta = 50;
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
});
function hasScrolled() {
var st = $(this).scrollTop();
var top_of_logomenu = $("#logoMenu").offset().top;
var top_of_topbar = $("#topbar").offset().top;
// If they scrolled down and are past the navbar, add class .nav-up.
// This is necessary so you never see what is "behind" the navbar.
if (st > lastScrollTop || top_of_logomenu > top_of_topbar){
// Scroll Down
$('#topbar-categories').addClass('hide');
// Make sure they scroll more than delta
} else if (Math.abs(lastScrollTop - st) <= delta) {
return;
} else {
// Scroll Up
if(st + $(window).height() < $(document).height()) {
$('#topbar-categories').removeClass('hide');
}
}
lastScrollTop = st;
}
</script>
<!-- Logo -->
<div id="logo" class="mx-auto d-block hidden-md-down" style=" display: flex; width: 25vw; margin-top: 25px; padding-top: 25px;">
<a class="hidden-md-down" href="/index.php"><img style="display: block;" src="/wp-content/uploads/2017/04/stoff.png" class="hidden-md-down img-fluid mx-auto d-block logo" style=""></a>
</div>
<!-- Meny
border-top: 3px solid #808080 -->
<div id="logoMenu" class="hidden-md-down" style="width: 74vw; font-family: 'Roboto', sans-serif; display: flex; justify-content: center; flex-direction: row; font-size: /*calc(0.7em + 1vmin)*/ 16px; border-top: 3px solid black; text-transform: uppercase; font-weight: 400; margin: 30px auto 25px auto;">
<?php
if ( is_page( '6463' ) ) {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny-this" href="/?page_id=6463">Samfunn</a>';
} else {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny" href="/?page_id=6463">Samfunn</a>';
}
if ( is_page( '6468' ) ) {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny-this" href="/?page_id=6468">Kultur</a>';
} else {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny" href="/?page_id=6468">Kultur</a>';
}
if ( is_page( '6471' ) ) {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny-this" href="/?page_id=6471">Debatt</a>';
} else {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny" href="/?page_id=6471">Debatt</a>';
}
if ( is_page( '6473' ) ) {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny-this" href="/?page_id=6473">Bergensguide</a>';
} else {
echo '<a style="padding: 10px 15px 10px 15px;" class="meny" href="/?page_id=6473">Bergensguide</a>';
} ?>
<span style="cursor: pointer; padding: 10px 15px 10px 15px;" class="nav-item nav-link active meny om-oss-knapp">
Om oss
</span>
<!-- Meny forside: Samfunnstoff, kulturstoff, quiz, fotostoff, tegneserie, Bergensguide, Om oss -->
</div>
<br />
<!-- Om oss box
<div id="close-om-oss" class="hidden-md-down frontpage-margin bg-color-paper" style="display: none; position: absolute; left: 87vw; z-index: 1;">
<i class="fa fa-times" style="font-size: 40px;" aria-hidden="true"></i><br clear="all">
</div>
-->
<div id="om-oss-box" class=" hidden-md-down frontpage-margin bg-color-paper initiallyHidden" style="border: 2px solid black; position: relative; z-index: 1; margin-bottom: 100px; padding: 25px;">
<div id="om-oss-close" class="cursor-pointer-hover" style="position: absolute; top: 0; right: 3px; z-index: 1;">
<i class="fa fa-times" style="font-size: 40px;" aria-hidden="true"></i>
</div>
<div class="om-oss-text" style="display: flex; flex-wrap: nowrap;">
<div class="hidden-md-down col-6 " style="display: flex; flex-direction: column; text-align: justify; font-family: 'Arapey', serif; font-size: 18px; line-height: 30px; font-weight: 400;">
<p style="">Stoff <a class="underline" href="https://www.dn.no/etterBors/2015/03/10/2157/Medier/studentavisopprr-i-bergen" target="_blank">ble</a> <a class="underline" href="http://www.nattogdag.no/2015/03/stoff-magasin-pungshots-dekning-og-kvalitetsjournalistikk/" target="_blank">startet</a> <a class="underline" href="https://www.bt.no/nyheter/lokalt/i/kp8ev/Lager-avis-fra-hybelen" target="_blank">tidlig</a> i 2015 av en gjeng studenter som ønsket å lage en unik, uavhengig og uredd studentavis. Første utgave ble lansert 20.03.15. Avisen satser på dyptgående, modig og kreativ journalistikk innenfor kultur, økonomi og samfunn. Stoff består av studenter fra hele student-Bergen som jobber frivillig og ulønnet som journalister, fotografer og grafikere. Redaksjonen har erfaring fra andre store aviser som blant annet Dagens Næringsliv, Bergens Tidende, Aftenposten og Finansavisen.</p>
<p style="">
Stoff blir utgitt i fire papirutgaver i hvert akademiske semester, og blir distribuert i Bergen.
</p>
<p style="font-weight: 400;">Kontakt oss på <a class="underline" href="mailto:[email protected]">[email protected]</a>.</p>
<div style="font-family: 'Ludacrys', serif; font-size: 26px; padding: 15px; text-align: center; color: white !important; background-color: black !important; ">Ønsker du å annonsere i Stoff? Ta kontakt på <a href="mailto:[email protected]" style="color: white !important; "> [email protected]</a></div>
</div>
<div class="hidden-md-down col-6" style="font-family: 'Arapey', serif; font-size: 18px; line-height: 30px; font-weight: 400;">
<p>
<b>Ansvarlig redaktør</b> Ingrid Marie Vikhammer Sandvik <br />
<b>Daglig leder </b> <a class="underline" href="mailto:[email protected]">Hans Sebastian Haram</a><br />
<b>Samfunnsredaktør</b> Anne Aase Rokkan<br />
<b>Illustrasjonsansvarlig</b> Ida Neverdahl<br />
<b>Styreleder</b> Mathias Juell Johnsen<br />
<b>Utviklingsredaktør</b> Marcus Lauritsen<br />
<b>Nettredaktør</b> Joakim Knudsen<br />
<b>Art Director</b> Tove Huldén<br />
<b>Grafikere</b> Ida Woldsund og Frida Annette Helseth Strømme<br />
<b>Fotoredaktør</b> Henrik Follesø Egeland<br />
<b>Fotografer</b> Fredrik Geving Bedsvaag, Henrik Follesø Egeland, Petter Lysgaard<br />
<b>Redaksjon</b> Mathias Juell Johnsen, Olve Hagen Wold, Tellef Solbakk Raabe, Audun Brendbekken, Lisa Aase Rokkan, Mats Vederhus, Ingeborg Katie Åtland, Torbjørn Sandmo, Ola Olsen Lysgaard, Martin Hjelle, Tellef Raabe, Anna Eitrem, Camilla Iversen
</p>
</div>
</div>
</div>
<div id="hide-below-om-oss" style=""> <!-- wrap everything below om oss in this, add display: none when om oss shown. closed in footer -->
<script>
$(function() {
$('#topbar .fa-search').click(function(e) {
e.stopPropagation()
$('#fullscreenSearch').fadeIn('fast');
$('#search-icon').addClass('fa-times');
$('#search-icon').css({'font-size' : '30px', 'padding-right' : '25px', 'color' : 'black'});
$('#search-icon').removeClass('fa-search');
$('#input-search').focus();
});
});
$(function() {
$('#search-link').click(function(e) {
e.stopPropagation()
$('#fullscreenSearch').fadeOut('fast');
$('#search-icon').addClass('fa-search');
$('#search-icon').removeClass('fa-times');
});
});
$( document ).on( 'keydown', function ( e ) {
if ( e.keyCode === 27 ) { // ESC
$( '#fullscreenSearch' ).hide();
$('#search-icon').removeClass('fa-times');
$('#search-icon').addClass('fa-search');
//$('#s').off('focus');
}
});
$( document ).on( 'keydown', function ( e ) {
if ( e.keyCode === 27 ) { // ESC
$( '#om-oss-box' ).hide();
}
});
$(function() {
$('.om-oss-knapp').click(function () {
$('#om-oss-box').fadeToggle(10);
$('#hide-below-om-oss').toggleClass('initiallyHidden dummy');
$('.om-oss-knapp').toggleClass('meny meny-this');
});
$("#om-oss-close").click(function () {
$("#om-oss-box").fadeOut(10);
$('.om-oss-knapp').toggleClass('meny meny-this');
$('#hide-below-om-oss').removeClass('initiallyHidden');
});
});
/*
$(function() {
$('#om-oss-close').click(function () {
$('#om-oss-box').fadeOut(10);
// $('#om-oss-close').addClass('initiallyHidden');
});
});
// When click #om-oss, fade in #om-oss-box. Fade out when clicked a second time, i.e. its a toggle. Toggle class meny and meny this to add and remove bottom-border
$(function() {
$("#om-oss-knapp").click(function (e) {
e.stopPropagation() // need to stop propagation because of next paragraph with code. Otherwise it would hide when clicked on #om-oss
$('#om-oss-box').fadeToggle(10);
$('#om-oss').toggleClass('meny meny-this');
// $('#om-oss-close').addAttr('style').css("display","none");
});
});
$(function() {
$("#om-oss-close").click(function () {
$('#om-oss-box').fadeToggle(10);
$('#om-oss').toggleClass('meny meny-this');
$('#om-oss-close').addAttr('style').css("display","none");
});
});
*/
/*
$(document).click(function () {
$('#om-oss-box').fadeOut('fast');
$('#om-oss').removeClass('meny-this');
});
*/
// Better solution: https://stackoverflow.com/questions/152975/how-do-i-detect-a-click-outside-an-element/3028037#3028037
</script>
<!-- Search end -->
<div class="" id="content" style="position: relative;"> <!-- closed in footer fix to make footer stick to bottom, but can cause a real hell:
min-height: calc(100vh - 120px);
-->
<!-- MOBILE LOGO AND NAVBAR -->