-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
912 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const autoprefixer = require('autoprefixer') | ||
const tailwindcss = require('tailwindcss') | ||
|
||
module.exports = { | ||
plugins: [ | ||
tailwindcss('./tailwind.config.js'), | ||
autoprefixer | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<template lang="pug"> | ||
.file-preview.w-full | ||
a(v-if="file.type === 'file'" :href="getUri()" target="_blank" ) | ||
FileEntryContent(:file="file") | ||
router-link(v-else :to="getUri()") | ||
FileEntryContent(:file="file") | ||
</template> | ||
|
||
<script> | ||
import FileEntryContent from './FileEntryContent' | ||
export default { | ||
props: [ 'file' ], | ||
components: { | ||
FileEntryContent | ||
}, | ||
data: () => ({ | ||
uri: undefined | ||
}), | ||
mounted() { | ||
this.uri = this.$route.params['qualifier'] | ||
if (this.uri.length > 0) { | ||
this.uri += '/' | ||
} | ||
}, | ||
methods: { | ||
getUri() { | ||
return '/' + this.uri + this.file.name | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="stylus"> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<template lang="pug"> | ||
.py-2.px-6.border.flex | ||
.pr-5 | ||
i(v-if="file.type === 'directory'").fas.fa-folder | ||
i(v-if="file.type === 'file'").fas.fa-file | ||
.flex.justify-between.w-full | ||
h1(v-if="file.type === 'file'") {{ file.name }} | ||
h1(v-else).font-bold {{ file.name }} | ||
p(v-if="file.type === 'file'") {{ (file.contentLength) }} bytes | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: [ 'file' ] | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<template lang="pug"> | ||
svg.w-full.h-264.lg_h-168(viewBox="0 0 1080 640" preserveAspectRatio="none") | ||
path( | ||
fill="#009890" | ||
fill-opacity="1" | ||
d=" \ | ||
M 0,260 \ | ||
C 640,330 650,0 1080,170 \ | ||
L 1440 0 \ | ||
L 0,0 \ | ||
Z \ | ||
") | ||
path( | ||
fill="#212121" | ||
fill-opacity="1" | ||
d=" \ | ||
M 0,230 \ | ||
C 620,310 650,50 1080,150 \ | ||
L 1440 0 \ | ||
L 0,0 \ | ||
Z \ | ||
") | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import Vue from 'vue' | ||
import Router from 'vue-router' | ||
import Index from './views/Index.vue' | ||
|
||
Vue.use(Router) | ||
|
||
export default new Router({ | ||
mode: 'history', | ||
base: process.env.BASE_URL, | ||
routes: [ | ||
{ | ||
path: '/:qualifier(.*)', | ||
name: 'Index', | ||
component: Index | ||
} | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<template lang="pug"> | ||
#app | ||
header | ||
Wave.absolute.w-full | ||
.flex.text-white.h-56.flex-col.justify-center.px-8.container.mx-auto | ||
.w-full | ||
h1.text-5xl.segoe.text-grey.font-bold.pt-1 #onlypanda | ||
.w-full | ||
p.text-lg.w-96.md_w-full | ||
| Public Maven repository hosted through the Reposilite | ||
main.mt-64.lg_mt-24 | ||
.container.mx-auto | ||
.mx-4 | ||
.flex.justify-between.py-4 | ||
h1.text-xl Index of {{ this.qualifier }} | ||
router-link( | ||
v-if="this.qualifier != undefined && this.qualifier.length > 1" | ||
:to='getParentPath()' | ||
) ← Back | ||
FileEntry( | ||
v-if="response.files != undefined" | ||
v-for="file in response.files" | ||
:key="file.name" | ||
:file="file" | ||
) | ||
h1(v-else) {{window.REPOSILITE_MESSAGE}} | ||
|
||
</template> | ||
|
||
<script> | ||
import Wave from '../components/Wave' | ||
import FileEntry from '../components/FileEntry' | ||
export default { | ||
data: () => ({ | ||
qualifier: undefined, | ||
response: [] | ||
}), | ||
components: { | ||
Wave, | ||
FileEntry | ||
}, | ||
mounted() { | ||
this.updateEntities() | ||
}, | ||
watch: { | ||
$route() { | ||
this.updateEntities() | ||
} | ||
}, | ||
methods: { | ||
updateEntities() { | ||
this.qualifier = this.$route.params['qualifier'] | ||
console.log('/api/' + this.qualifier) | ||
const server = (process.env.NODE_ENV == 'production') ? '/' : 'http://localhost:80/' | ||
this.$http | ||
.get(server + 'api/' + this.qualifier) | ||
.then(response => (this.response = response.data)) | ||
}, | ||
getParentPath() { | ||
const elements = ('/' + this.qualifier).split('/') | ||
elements.pop() | ||
const path = elements.join('/') | ||
return path.length == 0 ? '/' : path | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="stylus"> | ||
html | ||
background-color: #f8f8f8 | ||
#app | ||
font-family 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif | ||
-webkit-font-smoothing antialiased | ||
-moz-osx-font-smoothing grayscale | ||
color #2c3e50 | ||
height 100% | ||
width 100% | ||
.blue | ||
background-color #0077dd | ||
svg | ||
z-index -1 | ||
.segoe | ||
font-family 'Segoe UI' | ||
</style> |
Oops, something went wrong.