Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add project navbar #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pages/projects/essx.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ layout: project

project:
authors:
- name: Essentials Team (formerly)
url: https://github.com/Essentials
- name: EssentialsX Team
url: https://github.com/EssentialsX
tagline: Essential plugins for essential essentials.
website: https://essentialsx.cf
source: https://github.com/EssentialsX/Essentials
downloads: https://essentialsx.cf/downloads.html
docs: https://essentialsx.cf/wiki/Home.html
patreon: https://patreon.com/essentialsx
---

<p class="has-text-centered">
Expand Down
42 changes: 42 additions & 0 deletions theme/components/ProjectNav.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<b-navbar type="is-secondary" transparent>
<template slot="start">
<b-navbar-item
v-if="project.website">
<a class="button is-outlined is-white" :href="project.website">
<b-icon pack="fab" size="is-small" icon="github"></b-icon><span> Website</span>
</a>
</b-navbar-item>
<b-navbar-item
v-if="project.source">
<a class="button is-outlined is-white" :href="project.source">
<b-icon pack="fab" size="is-small" icon="github"></b-icon><span> GitHub</span>
</a>
</b-navbar-item>
<b-navbar-item
v-if="project.downloads">
<a class="button is-outlined is-white" :href="project.downloads">
<b-icon pack="fab" size="is-small" icon="github"></b-icon><span> Downloads</span>
</a>
</b-navbar-item>
<b-navbar-item
v-if="project.docs">
<a class="button is-outlined is-white" :href="project.docs">
<b-icon pack="fab" size="is-small" icon="github"></b-icon><span> Docs</span>
</a>
</b-navbar-item>
<b-navbar-item
v-if="project.patreon">
<a class="button is-outlined is-white" :href="project.patreon">
<b-icon pack="fab" size="is-small" icon="patreon"></b-icon><span> Patreon</span>
</a>
</b-navbar-item>
</template>
</b-navbar>
</template>

<script>
export default {
props: ["project"]
}
</script>
7 changes: 5 additions & 2 deletions theme/layouts/project.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<div class="hero is-small is-secondary">
<div class="hero is-small is-secondary is-bold">
<div class="hero-head">
<Navbar hero/>
</div>
Expand All @@ -13,6 +13,7 @@
<a class="has-text-white" :href="author.url">{{ author.name }}</a>
</span>
</h5>
<project-nav :project="page.project"></project-nav>
</div>
</div>
<div class="section">
Expand All @@ -29,12 +30,14 @@
<script>
import Navbar from "../components/Navbar.vue";
import Footer from "../components/Footer.vue";
import ProjectNav from "../components/ProjectNav.vue";

export default {
props: ['page'],
components: {
Navbar,
Footer
Footer,
ProjectNav
},
head() {
return {
Expand Down
4 changes: 2 additions & 2 deletions theme/saber-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import "./style/main.scss";

import { library } from "@fortawesome/fontawesome-svg-core"
import { faSync, faExternalLinkSquareAlt, faClock } from "@fortawesome/free-solid-svg-icons";
import { faGithub, faDiscord } from "@fortawesome/free-brands-svg-icons";
import { faGithub, faDiscord, faPatreon } from "@fortawesome/free-brands-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";

import KonamiCode from "vue-konami-code";

import ExternalData from "./mixins/external-data";

library.add(faSync, faExternalLinkSquareAlt, faClock, faGithub, faDiscord);
library.add(faSync, faExternalLinkSquareAlt, faClock, faGithub, faDiscord, faPatreon);
Vue.component('vue-fontawesome', FontAwesomeIcon);

Vue.use(Buefy, {
Expand Down