add footer, fix proxy, start with nav

This commit is contained in:
MiniDigger 2021-01-21 20:47:58 +01:00
parent 20bea623ec
commit 0a0180a20a
7 changed files with 152 additions and 8 deletions

View File

@ -1 +0,0 @@
BACKEND_URL="backendurl.com"

View File

@ -0,0 +1,96 @@
<template>
<v-footer dark padless>
<v-container>
<v-row align="center" justify="center">
<v-col cols="12" class="d-flex justify-center">
By using this site you're accepting our <a href="#"> Terms of Service</a
><!-- todo tos link -->
</v-col>
</v-row>
<v-row align="center" justify="center">
<v-col cols="12" sm="2" class="d-flex justify-center">
<div>
<h5>Hangar API</h5>
<v-btn color="primary" to="/api">API</v-btn>
</div>
</v-col>
<v-col cols="12" sm="2" class="d-flex justify-center">
<div>
<h5>Help Needed?</h5>
<v-btn color="primary" href="https://papermc.io/forums">Forum</v-btn>
</div>
</v-col>
<v-col cols="12" sm="4" class="d-flex justify-center">
<a href="https://papermc.io">
<img src="https://paper.readthedocs.io/en/latest/_images/papermc_logomark_500.png" alt="Paper Logo" />
</a>
</v-col>
<v-col cols="12" sm="2" class="d-flex justify-center">
<div>
<h5>Found an Issue?</h5>
<v-btn color="primary" href="https://github.com/PaperMC/Hangar/issues" target="_blank" rel="noopener">Issues</v-btn>
</div>
</v-col>
<v-col cols="12" sm="2" class="d-flex justify-center">
<div>
<h5>Our Sponsors</h5>
<v-btn color="primary" href="https://papermc.io/sponsors">Sponsors</v-btn>
</div>
</v-col>
</v-row>
<v-row align="center" justify="center">
<v-col cols="12" class="d-flex justify-center">Copyright © <a href="https://papermc.io">PaperMC</a> 2016 - {{ new Date().getFullYear() }} </v-col>
</v-row>
</v-container>
</v-footer>
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';
import Discuss from '~/pages/_author/_slug/discuss.vue';
@Component({
components: { Discuss },
})
export default class Footer extends Vue {}
</script>
<style lang="scss" scoped>
img {
height: 60px;
width: 60px;
@media (min-width: 768px) {
height: 74px;
width: 74px;
&:hover {
animation-name: bounce;
animation-duration: 0.5s;
animation-fill-mode: both;
animation-iteration-count: infinite;
}
@keyframes bounce {
0%,
100% {
transform: rotateZ(0);
}
33% {
transform: rotateZ(-5deg);
}
50% {
transform: rotateZ(0);
}
76% {
transform: rotateZ(5deg);
}
}
}
}
</style>

View File

@ -0,0 +1,32 @@
<template>
<v-app-bar fixed app>
<v-menu offset-y open-on-hover transition="slide-y-transition">
<template #activator="{ on, attrs }">
<NuxtLink to="/">
<img src="https://papermc.io/images/logo-marker.svg" alt="Paper logo" v-bind="attrs" v-on="on" />
</NuxtLink>
</template>
<v-list>
<v-list-item>
<v-list-item-icon><v-icon color="white">mdi-home</v-icon></v-list-item-icon>
<v-list-item-content>
<v-list-item-title>Home</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
</v-menu>
</v-app-bar>
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';
@Component
export default class NewPage extends Vue {}
</script>
<style lang="scss" scoped>
img {
width: 100%;
}
</style>

View File

@ -1,17 +1,12 @@
<template>
<v-app>
<v-app-bar fixed app>
<v-toolbar-title v-text="title" />
<v-spacer />
</v-app-bar>
<Header />
<v-main>
<v-container>
<nuxt />
</v-container>
</v-main>
<v-footer absolute app>
<span>&copy; {{ new Date().getFullYear() }}</span>
</v-footer>
<Footer />
</v-app>
</template>

View File

@ -40,11 +40,13 @@ export default {
// https://go.nuxtjs.dev/pwa
'@nuxtjs/pwa',
'cookie-universal-nuxt',
'@nuxtjs/proxy',
],
// Axios module configuration: https://go.nuxtjs.dev/config-axios
axios: {
baseURL: process.env.BACKEND_URL || 'http://localhost:8080',
browserBaseURL: '/',
},
// PWA module configuration: https://go.nuxtjs.dev/pwa
@ -77,4 +79,11 @@ export default {
build: {
transpile: ['vuex-module-decorators'],
},
proxy: ['http://localhost:8080/api'],
server: {
port: 3000,
host: 'localhost',
},
};

View File

@ -21,6 +21,7 @@
"dependencies": {
"@nuxt/typescript-runtime": "^2.0.1",
"@nuxtjs/axios": "^5.12.5",
"@nuxtjs/proxy": "^2.1.0",
"@nuxtjs/pwa": "^3.3.4",
"cookie-universal-nuxt": "^2.1.4",
"core-js": "^3.8.2",

12
frontend/pages/api.vue Normal file
View File

@ -0,0 +1,12 @@
<template>
<div>{{ $nuxt.$route.name }}</div>
</template>
<script lang="ts">
import { Component, Vue } from 'nuxt-property-decorator';
@Component
export default class ApiPage extends Vue {}
</script>
<style lang="scss" scoped></style>