<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php wp_title(); ?></title>
    <?php wp_head(); ?>
    <link rel="stylesheet" href="<?php echo get_stylesheet_uri(); ?>">
</head>
<body <?php body_class(); ?>>

<div class="container" <?php if(!is_user_logged_in()) echo 'style="position: relative; top: 30px !important;"'; ?>>
    <header  class="header">
        <div>
            <img style="width:250px; height: 150px;" src="<?= get_template_directory_uri(); ?>/assets/logo.png" />
        </div>
        <div style="position: relative; top: 10px; width: 305px;">
            <?php
                if (is_user_logged_in()) {
                ?>

                    <a href="<?php echo esc_url(admin_url('users.php?page=mareike-profile')); ?>"  style="position: relative;" class="theme_mareike_mainpage_button">Profil</a>
            <a href="<?php echo get_site_url() . '/wp-login.php?action=logout'; ?>" style="position: relative;" class="button theme_mareike_mainpage_button">Abmelden</a>
	                <?php
                } else {
	                ?>
                    <a href="<?php echo get_site_url() . '/wp-login.php?action=register'; ?>" style="position: relative;" class="button theme_mareike_mainpage_button">Registrieren</a>
                    <a href="<?php echo get_site_url() . '/wp-login.php'; ?>" style="position: relative;" class="button theme_mareike_mainpage_button">Anmelden</a>
                    <?php
                }
            ?>

        </div>
    </header>
    <div class="flex-container">
    <nav class="navbar">
        <div class="navcontainer">
            <?php
            wp_nav_menu(array(
                'theme_location' => 'primary',
                'container' => false,
                'menu_class' => 'navbar-nav'
            ));
            ?>
        </div>
    </nav>


