52 lines
2.7 KiB
PHP
52 lines
2.7 KiB
PHP
<?php
|
|
$menu = isset($menu) && is_array($menu) ? $menu : FM_NAV;
|
|
$backgrounds = isset($backgrounds) && is_array($backgrounds) ? $backgrounds : FM_BGS;
|
|
$baseUrl = empty($external) ? '' : '//' . $_SERVER['HTTP_HOST'];
|
|
?>
|
|
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8"/>
|
|
<title><?=($title ?? 'flash.moe');?></title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
|
|
<link href="<?=$baseUrl;?>/assets/2020v2.css" type="text/css" rel="stylesheet"/>
|
|
<link href="//flash.moe/css/electrolize/style.css" type="text/css" rel="stylesheet"/>
|
|
<?php if(isset($styles) && is_array($styles)) foreach($styles as $style): ?>
|
|
<link href="<?=$style;?>" type="text/css" rel="stylesheet"/>
|
|
<?php endforeach;?>
|
|
</head>
|
|
<body class="<?php if(isset($is_index)) { echo 'index';} if(isset($do_fullscreen_header)) { echo 'fullscreen-header';} ?>">
|
|
<div class="header">
|
|
<div class="header-background">
|
|
<img src="<?=($backgrounds[array_rand($backgrounds)]);?>" alt=""/>
|
|
</div>
|
|
<div class="header-foreground"<?php if(isset($offset) && $offset > 0) echo " style=\"padding-bottom: {$offset}px\""; ?>>
|
|
<a class="header-logo" href="/">
|
|
<div class="header-flash">flash</div>
|
|
<div class="header-wave">wave</div>
|
|
</a>
|
|
<?php if(!empty($is_index) || !empty($do_fullscreen_header)): ?>
|
|
<div class="header-now-playing header-now-playing-hidden">
|
|
<div class="header-now-playing-icon" title="Now listening to...">
|
|
<a href="/now-listening"><img src="https://mikoto.misaka.nl/i/1594148841-7yAS44p.png" alt=""/></a>
|
|
</div>
|
|
<div class="header-now-playing-cover">
|
|
<img src="//now.flash.moe/resources/no-cover.png" alt=""/>
|
|
</div>
|
|
<div class="header-now-playing-details">
|
|
<div class="header-now-playing-title"><a href="#" target="_blank" rel="noopener"></a></div>
|
|
<div class="header-now-playing-artist"><a href="#" target="_blank" rel="noopener"></a></div>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<div class="header-menu">
|
|
<?php foreach($menu as $link): ?>
|
|
<a href="<?=$link['link'];?>"><?=$link['title'];?></a>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
<?php if(empty($is_index) && empty($do_fullscreen_header)): ?>
|
|
<div class="container">
|
|
<?php endif; ?>
|