2019-12-05 06:46:19 -05:00
|
|
|
<template>
|
|
|
|
<nav class="site-nav">
|
|
|
|
<div class="site-nav-left">
|
|
|
|
<div v-if="logo">
|
2019-12-18 08:54:46 -05:00
|
|
|
<a v-if="$static.metadata.ghost.logo"
|
|
|
|
class="site-nav-logo"
|
2020-04-26 12:45:47 -04:00
|
|
|
:href="$static.metadata.siteUrl||$static.metadata.ghost.url">
|
2019-12-18 08:54:46 -05:00
|
|
|
<img :src="$static.metadata.ghost.logo"
|
2019-12-18 09:06:28 -05:00
|
|
|
:alt="$static.metadata.siteName||$static.metadata.ghost.title">
|
2019-12-18 08:54:46 -05:00
|
|
|
</a>
|
|
|
|
<a v-else class="site-nav-logo"
|
2019-12-18 09:06:28 -05:00
|
|
|
:href="$static.metadata.siteUrl||$static.metadata.ghost.url">
|
|
|
|
{{ $static.metadata.siteName.title||$static.metadata.ghost.title }}
|
2019-12-05 06:46:19 -05:00
|
|
|
</a>
|
|
|
|
</div>
|
2019-12-18 08:54:46 -05:00
|
|
|
<Navigation v-if="$static.metadata.ghost.navigation"/>
|
2019-12-05 06:46:19 -05:00
|
|
|
</div>
|
|
|
|
<div class="site-nav-right">
|
|
|
|
<div class="social-links">
|
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.patreon"
|
|
|
|
class="social-link social-link-p"
|
|
|
|
:href="'https://www.patreon.com/' + Admin.social_media.patreon"
|
|
|
|
title="Become My Patron"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Patreon/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.facebook"
|
|
|
|
class="social-link social-link-fb"
|
|
|
|
:href="'https://facebook.com/' + Admin.social_media.facebook"
|
|
|
|
title="Facebook"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Facebook/>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.twitter"
|
|
|
|
class="social-link social-link-tw"
|
|
|
|
:href="'https://twitter.com/' + Admin.social_media.twitter"
|
|
|
|
title="Twitter"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Twitter/>
|
|
|
|
</a>
|
2020-03-15 04:01:03 -04:00
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.mastodon"
|
|
|
|
class="social-link social-link-lp"
|
|
|
|
:href="Admin.social_media.mastodon"
|
|
|
|
title="Mastodon"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Mastodon/>
|
|
|
|
</a>
|
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.instagram"
|
|
|
|
class="social-link social-link-lp"
|
|
|
|
:href="'https://instagram.com/' + Admin.social_media.instagram"
|
|
|
|
title="Instagram"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Instagram/>
|
|
|
|
</a>
|
|
|
|
<a
|
|
|
|
v-if="Admin.social_media.liberapay"
|
|
|
|
class="social-link social-link-lp"
|
|
|
|
:href="'https://liberapay.com/' + Admin.social_media.liberapay"
|
|
|
|
title="Liberapay"
|
|
|
|
target="_blank"
|
|
|
|
rel="noopener"
|
|
|
|
>
|
|
|
|
<Liberapay/>
|
|
|
|
</a>
|
2019-12-05 06:46:19 -05:00
|
|
|
</div>
|
2020-03-15 05:00:15 -04:00
|
|
|
<a v-if="Admin.site.subscribers" class="subscribe-button" href="/subscribe">Subscribe</a>
|
2019-12-05 06:46:19 -05:00
|
|
|
<a v-else class="rss-button" href="/feed.xml" title="RSS" target="_blank" rel="noopener">
|
|
|
|
<RSS/>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</nav>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Admin from "../../data/admin.yml";
|
|
|
|
import Navigation from "./Navigation";
|
|
|
|
|
|
|
|
// Icons
|
|
|
|
import Facebook from "./icons/Facebook";
|
|
|
|
import Twitter from "./icons/Twitter";
|
|
|
|
import Patreon from "./icons/Patreon";
|
2020-03-15 04:01:03 -04:00
|
|
|
import Mastodon from "./icons/Mastodon";
|
|
|
|
import Instagram from "./icons/Instagram";
|
|
|
|
import Liberapay from "./icons/Liberapay";
|
2019-12-05 06:46:19 -05:00
|
|
|
import RSS from "./icons/RSS";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
logo: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
Navigation,
|
|
|
|
Patreon,
|
|
|
|
Facebook,
|
|
|
|
Twitter,
|
2020-03-15 04:01:03 -04:00
|
|
|
Mastodon,
|
|
|
|
Instagram,
|
|
|
|
Liberapay,
|
2019-12-05 06:46:19 -05:00
|
|
|
RSS
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
Admin() {
|
|
|
|
return Admin;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="sass">
|
|
|
|
.social-link > svg
|
|
|
|
width: 1.8rem
|
|
|
|
</style>
|
2019-12-18 08:54:46 -05:00
|
|
|
|
|
|
|
<static-query>
|
|
|
|
query Admin {
|
|
|
|
metadata {
|
|
|
|
siteName
|
|
|
|
siteDescription
|
|
|
|
siteUrl
|
|
|
|
ghost {
|
|
|
|
title
|
|
|
|
url
|
|
|
|
logo
|
|
|
|
description
|
|
|
|
navigation {
|
|
|
|
url
|
|
|
|
label
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</static-query>
|