<template>
    <header :class="[darkMode ? 'header-darkmode' : 'header-lightmode']">
        <img id="header-logo" loading="lazy" src="/tüit-logo.svg.png" />
        <div class="profile">
            <pre :class="['username', darkMode ? 'username-darkmode' : 'username-lightmode']" id='uname'>username</pre>
            <div :class="['picture', darkMode ? 'picture-darkmode' : 'picture-lightmode']">
                <img id="picture" loading="lazy" src="" />
            </div>
        </div>
    </header>
</template>


<script setup>
import { ref } from 'vue';

const darkMode = ref(true)
const username = ref('username');

</script>


<script>

export default {
  name: "PageHeader",
}
</script>



<style scoped>
* {
    box-sizing: border-box;
}

header {
    display: flex;
    flex-direction: row;
    position: sticky;
    top: 0;
    width: 100%;
    height: 3.125rem;
    align-self: stretch;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 1.875rem;
}

.header-darkmode {
    background-color: #212121;
    border-bottom: 0.125em solid #000000;
}

.header-lightmode {
    background-color: #ebebeb;
    border-bottom: 0.125em solid #8e8e8e;
}

#header-logo {
    object-fit: contain;
    object-position: center;
    width: 4rem;
    height: 2rem;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.profile {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 0.625rem;
    padding: 0 0.375rem;
}

.username {
    align-self: center;
    text-align: right;
    font: 200 0.75rem/1.25rem Overpass, sans-serif;
    letter-spacing: 0.01rem;
}

.username-darkmode {
    color: #ffffff;
}

.username-lightmode {
    color: #000000;
}

.picture {
    display: flex;
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
}

.picture-darkmode {
    background-color: #ffffff;
}

.picture-lightmode {
    background-color: #000000;
}
</style>