2024-04-15 16:00:49 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The header for our theme
|
|
|
|
*
|
|
|
|
* This is the template that displays the `head` element and everything up
|
|
|
|
* until the `#content` element.
|
|
|
|
*
|
|
|
|
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
|
|
|
|
*
|
|
|
|
* @package WowPress
|
|
|
|
*/
|
|
|
|
|
2024-04-22 15:38:22 +02:00
|
|
|
use WoWPress\Frontend\Icon;
|
|
|
|
|
|
|
|
global $user;
|
2024-04-15 16:00:49 +02:00
|
|
|
?>
|
|
|
|
<!doctype html>
|
|
|
|
<html <?php language_attributes(); ?>>
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="<?php bloginfo('charset'); ?>">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
<link rel="profile" href="https://gmpg.org/xfn/11">
|
|
|
|
<?php wp_head(); ?>
|
2024-04-17 22:10:17 +02:00
|
|
|
<style>
|
2024-04-22 15:38:22 +02:00
|
|
|
:root {
|
2024-04-17 22:10:17 +02:00
|
|
|
--color-background: var(--color-deepblue);
|
|
|
|
}
|
|
|
|
</style>
|
2024-04-15 16:00:49 +02:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body <?php body_class('dark'); ?>>
|
2024-04-22 15:38:22 +02:00
|
|
|
<?php if (get_sidebar_status('left')) : ?>
|
|
|
|
<template x-data x-teleport="#sidebar_left">
|
|
|
|
<div class="bg-glass shadow p-auto order-1">
|
|
|
|
<div class="flex flex-row justify-between">
|
2024-04-23 22:43:54 +02:00
|
|
|
<div>Hallo <?= $user->username ?></div>
|
2024-04-22 15:38:22 +02:00
|
|
|
<?php if (!$user->ID) : ?>
|
2024-04-23 22:43:54 +02:00
|
|
|
<div>Bitte <a href="/wp-login.php" class="text-alliance underline">einloggen</a> :)</div>
|
2024-04-22 15:38:22 +02:00
|
|
|
<?php else : ?>
|
|
|
|
<div><a href="/wp-login.php?action=logout" class="text-alliance underline"><?= Icon::get('o-power') ?></a></div>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php if ($user->ID) : ?>
|
|
|
|
<div>
|
|
|
|
<h5 class="text-center text-lg font-bold">Charakter-Liste</h5>
|
|
|
|
<div class="flex flex-col gap-2">
|
|
|
|
<?php
|
|
|
|
$chars = $user->characters;
|
|
|
|
if (!empty($chars)) {
|
|
|
|
foreach ($chars as $character) : ?>
|
|
|
|
<button class="btn btn-outline btn-<?= $character->color ?> w-full cursor-default">
|
|
|
|
<img src="<?= $character->classIcon ?>" class="h-8"><?= $character->name ?></button>
|
|
|
|
<?php endforeach;
|
|
|
|
} else {
|
|
|
|
?>
|
|
|
|
Keine Chataktere zugewiesen.
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<?php endif; ?>
|
2024-04-15 16:00:49 +02:00
|
|
|
|
|
|
|
<?php wp_body_open(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<?php get_template_part('template-parts/layout/header', 'content'); ?>
|
|
|
|
|
|
|
|
<div class="content-wrapper">
|
2024-04-22 15:38:22 +02:00
|
|
|
<?php if (is_active_sidebar('top-widgets') && get_sidebar_status('top')) : ?>
|
|
|
|
<div class="widget-wrapper top-widgets" id="sidebar_top">
|
2024-04-16 15:25:22 +02:00
|
|
|
<?php dynamic_sidebar('top-widgets'); ?>
|
2024-04-15 16:00:49 +02:00
|
|
|
</div>
|
2024-04-16 15:25:22 +02:00
|
|
|
<?php endif; ?>
|
|
|
|
<?php if (is_active_sidebar('left-widgets') && get_sidebar_status('left')) : ?>
|
2024-04-22 15:38:22 +02:00
|
|
|
<div class="widget-wrapper left-widgets" id="sidebar_left">
|
2024-04-16 15:25:22 +02:00
|
|
|
<?php dynamic_sidebar('left-widgets'); ?>
|
2024-04-15 16:00:49 +02:00
|
|
|
</div>
|
2024-04-16 15:25:22 +02:00
|
|
|
<?php endif; ?>
|
2024-04-15 16:00:49 +02:00
|
|
|
<div id="content" class="content">
|