145 lines
2.6 KiB
Vue
145 lines
2.6 KiB
Vue
<script setup lang="ts">
|
|
import { useData } from "vitepress";
|
|
import { computed } from "vue";
|
|
|
|
import { data as index } from "../composables/index.data.js";
|
|
|
|
import ThemeToggle from "./ThemeToggle.vue";
|
|
|
|
const { site, theme } = useData();
|
|
|
|
const socialLinks = computed(() => {
|
|
return theme.value.socialLinks ?? [];
|
|
});
|
|
|
|
const indexList = computed(() => {
|
|
return index;
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<div class="TopBar">
|
|
<div class="ProfileImageContainer">
|
|
<img src="/images/me.jpeg" alt="Simon Einzinger" class="ProfileImage" />
|
|
</div>
|
|
|
|
<h1 class="title">{{ site.title }}</h1>
|
|
<p class="subtitle">{{ site.description }}</p>
|
|
|
|
<div class="RightSideTop">
|
|
<ThemeToggle />
|
|
</div>
|
|
|
|
<div class="RightSideBottom">
|
|
<div class="social-icons">
|
|
<a
|
|
v-for="(icon, index) in socialLinks"
|
|
:key="index"
|
|
:href="icon.link"
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
>
|
|
<img :src="icon.icon" :alt="icon.label" class="social-icon" />
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="Separator"></div>
|
|
<ul class="IndexList">
|
|
<li v-for="{ title, url } of indexList" :key="title">
|
|
<a :href="url">#{{ title }}</a>
|
|
</li>
|
|
</ul>
|
|
</template>
|
|
|
|
<style>
|
|
.TopBar {
|
|
display: grid;
|
|
grid-template-columns: 100px 1fr auto;
|
|
grid-template-rows: auto auto;
|
|
gap: 0 2em;
|
|
align-items: center;
|
|
padding: 1em;
|
|
}
|
|
|
|
.ProfileImageContainer {
|
|
grid-row: 1 / 3;
|
|
grid-column: 1;
|
|
width: 100px;
|
|
height: 100px;
|
|
margin: auto;
|
|
overflow: hidden;
|
|
border: 2px solid var(--outline-color);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.ProfileImage {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.title {
|
|
grid-column: 2;
|
|
grid-row: 1;
|
|
margin: 0.75em 0 0;
|
|
font-size: 2.5em;
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
.subtitle {
|
|
grid-column: 2;
|
|
grid-row: 2;
|
|
margin: 0.25em 0 0;
|
|
font-size: 1.5em;
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.RightSideTop {
|
|
grid-column: 3;
|
|
grid-row: 1;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.RightSideBottom {
|
|
grid-column: 3;
|
|
grid-row: 2;
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
}
|
|
|
|
.social-icons {
|
|
display: flex;
|
|
margin-left: 1em;
|
|
filter: var(--icon-filter);
|
|
}
|
|
|
|
.social-icon {
|
|
width: 24px;
|
|
height: 24px;
|
|
margin: 0 0.4em;
|
|
}
|
|
|
|
.Separator {
|
|
border-bottom: 1px solid var(--outline-color);
|
|
margin: 0.5em 1em;
|
|
}
|
|
|
|
.IndexList {
|
|
list-style: none;
|
|
margin: 1em 0;
|
|
padding: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 1.5em;
|
|
}
|
|
|
|
.IndexList li a {
|
|
text-decoration: none;
|
|
color: var(--text-color);
|
|
padding: 0 0.75em;
|
|
}
|
|
</style>
|