2021-05-20 04:27:23 +00:00
|
|
|
<template>
|
2021-06-12 04:38:16 +00:00
|
|
|
<div v-frag>
|
2021-05-22 20:29:06 +00:00
|
|
|
<div class="nav" v-if="useHeader">
|
|
|
|
<img v-if="banner" :src="banner" height="100%" :alt="title" />
|
|
|
|
<div v-else class="title">{{ title }}</div>
|
|
|
|
<div class="version" @click="openDialog('Changelog')">v{{ version }}</div>
|
|
|
|
<div style="flex-grow: 1"></div>
|
|
|
|
<div class="discord">
|
|
|
|
<img src="images/discord.png" @click="window.open(discordLink, 'mywindow')" />
|
|
|
|
<ul class="discord-links">
|
|
|
|
<li v-if="discordLink !== 'https://discord.gg/WzejVAx'">
|
|
|
|
<a :href="discordLink" target="_blank">{{ discordName }}</a>
|
|
|
|
</li>
|
|
|
|
<li><a href="https://discord.gg/WzejVAx" target="_blank">The Paper Pilot Community</a></li>
|
|
|
|
<li><a href="https://discord.gg/F3xveHV" target="_blank">The Modding Tree</a></li>
|
|
|
|
<li><a href="http://discord.gg/wwQfgPa" target="_blank">Jacorb's Games</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="info" @click="openDialog('Info')"><br/>i</div>
|
|
|
|
<img class="options" src="images/options_wheel.png" @click="openDialog('Options')" />
|
2021-05-20 04:27:23 +00:00
|
|
|
</div>
|
2021-05-22 20:29:06 +00:00
|
|
|
<div v-else>
|
|
|
|
<div class="discord overlay">
|
|
|
|
<img src="images/discord.png" @click="openDiscord" />
|
|
|
|
<ul class="discord-links">
|
|
|
|
<li v-if="discordLink !== 'https://discord.gg/WzejVAx'">
|
|
|
|
<a :href="discordLink" target="_blank">{{ discordName }}</a>
|
|
|
|
</li>
|
|
|
|
<li><a href="https://discord.gg/WzejVAx" target="_blank">The Paper Pilot Community</a></li>
|
|
|
|
<li><a href="https://discord.gg/F3xveHV" target="_blank">The Modding Tree</a></li>
|
|
|
|
<li><a href="http://discord.gg/wwQfgPa" target="_blank">Jacorb's Games</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="info overlay" @click="openDialog('Info')"><br/>i</div>
|
|
|
|
<img class="options overlay" src="images/options_wheel.png" @click="openDialog('Options')" />
|
|
|
|
<div class="version overlay" @click="openDialog('Changelog')">v{{ version }}</div>
|
2021-05-20 04:27:23 +00:00
|
|
|
</div>
|
2021-05-22 20:29:06 +00:00
|
|
|
<Info :show="showInfo" @openDialog="openDialog" @closeDialog="closeDialog" />
|
|
|
|
<Options :show="showOptions" @closeDialog="closeDialog" />
|
2021-05-20 04:27:23 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2021-05-26 01:57:02 +00:00
|
|
|
import modInfo from '../../data/modInfo';
|
2021-05-20 04:27:23 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'Nav',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
useHeader: modInfo.useHeader,
|
|
|
|
banner: modInfo.banner,
|
|
|
|
title: modInfo.title,
|
|
|
|
discordName: modInfo.discordName,
|
|
|
|
discordLink: modInfo.discordLink,
|
2021-05-22 20:29:06 +00:00
|
|
|
version: modInfo.versionNumber,
|
|
|
|
showInfo: false,
|
|
|
|
showOptions: false,
|
|
|
|
showChangelog: false
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
openDiscord() {
|
|
|
|
window.open(this.discordLink, 'mywindow');
|
|
|
|
},
|
2021-05-22 20:29:06 +00:00
|
|
|
openDialog(dialog) {
|
|
|
|
this[`show${dialog}`] = true;
|
|
|
|
},
|
|
|
|
closeDialog(dialog) {
|
|
|
|
this[`show${dialog}`] = false;
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
.nav {
|
2021-05-22 20:29:06 +00:00
|
|
|
background-color: var(--secondary-background);
|
2021-05-20 04:27:23 +00:00
|
|
|
display: flex;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
2021-06-12 04:38:16 +00:00
|
|
|
height: 46px;
|
2021-05-20 05:11:03 +00:00
|
|
|
width: 100%;
|
2021-06-12 04:38:16 +00:00
|
|
|
border-bottom: 4px solid var(--separator);
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
|
|
|
font-size: 36px;
|
|
|
|
text-align: left;
|
|
|
|
margin-left: 12px;
|
|
|
|
}
|
|
|
|
|
2021-05-22 20:29:06 +00:00
|
|
|
.overlay {
|
|
|
|
z-index: 100;
|
|
|
|
}
|
|
|
|
|
2021-05-20 04:27:23 +00:00
|
|
|
.discord {
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.discord.overlay {
|
|
|
|
position: absolute;
|
|
|
|
top: 120px;
|
|
|
|
left: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.discord img {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.discord-links {
|
|
|
|
position: fixed;
|
|
|
|
top: 45px;
|
2021-05-22 20:29:06 +00:00
|
|
|
padding: 20px;
|
2021-05-20 04:27:23 +00:00
|
|
|
right: -280px;
|
|
|
|
width: 200px;
|
|
|
|
transition: right .25s ease;
|
2021-05-22 20:29:06 +00:00
|
|
|
background: var(--secondary-background);
|
2021-05-20 04:27:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.discord.overlay .discord-links {
|
|
|
|
top: 160px;
|
|
|
|
right: unset;
|
|
|
|
left: -280px;
|
|
|
|
transition: left .25s ease;
|
|
|
|
}
|
|
|
|
|
2021-05-22 20:29:06 +00:00
|
|
|
.discord-links li {
|
|
|
|
margin-bottom: 4px;
|
|
|
|
}
|
|
|
|
|
2021-05-20 04:27:23 +00:00
|
|
|
.discord:not(.overlay):hover .discord-links {
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.discord.overlay:hover .discord-links {
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.info {
|
|
|
|
font-size: 20px;
|
|
|
|
color: var(--link);
|
|
|
|
line-height: 14px;
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.info.overlay {
|
|
|
|
position: absolute;
|
|
|
|
top: 60px;
|
|
|
|
left: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.info:hover {
|
|
|
|
transform: scale(1.2, 1.2);
|
|
|
|
text-shadow: 5px 0 10px var(--link),
|
|
|
|
-3px 0 12px var(--link);
|
|
|
|
}
|
|
|
|
|
|
|
|
.options {
|
|
|
|
height: 50px;
|
|
|
|
width: 50px;
|
|
|
|
cursor: pointer;
|
|
|
|
transition-duration: .5s;
|
|
|
|
}
|
|
|
|
|
|
|
|
.options.overlay {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.options:hover {
|
|
|
|
transform: rotate(360deg);
|
|
|
|
}
|
|
|
|
|
|
|
|
.version {
|
|
|
|
margin-left: 12px;
|
|
|
|
margin-right: 12px;
|
2021-06-13 08:56:42 +00:00
|
|
|
margin-bottom: 5px;
|
2021-05-20 04:27:23 +00:00
|
|
|
color: var(--points);
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.version.overlay {
|
|
|
|
position: absolute;
|
|
|
|
right: 4px;
|
|
|
|
top: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.version:hover {
|
|
|
|
transform: scale(1.2, 1.2);
|
|
|
|
text-shadow: 5px 0 10px var(--points), -3px 0 12px var(--points);
|
|
|
|
}
|
|
|
|
</style>
|