i hate js
This commit is contained in:
commit
e50ea8479c
15 changed files with 419 additions and 0 deletions
29
README.md
Normal file
29
README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# foundation-vue
|
||||||
|
|
||||||
|
This template should help get you started developing with Vue 3 in Vite.
|
||||||
|
|
||||||
|
## Recommended IDE Setup
|
||||||
|
|
||||||
|
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).
|
||||||
|
|
||||||
|
## Customize configuration
|
||||||
|
|
||||||
|
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
||||||
|
|
||||||
|
## Project Setup
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Hot-Reload for Development
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Compile and Minify for Production
|
||||||
|
|
||||||
|
```sh
|
||||||
|
npm run build
|
||||||
|
```
|
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"name": "foundation-vue",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@fortawesome/fontawesome-free": "^6.2.1",
|
||||||
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||||
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||||
|
"@fortawesome/vue-fontawesome": "^3.0.2",
|
||||||
|
"foundation-sites": "^6.7.5",
|
||||||
|
"vue": "^3.2.41"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^3.1.2",
|
||||||
|
"vite": "^3.1.8"
|
||||||
|
}
|
||||||
|
}
|
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
117
src/App.vue
Normal file
117
src/App.vue
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
<script setup>
|
||||||
|
import SearchTab from './components/SearchTab.vue'
|
||||||
|
import TabHeader from './components/TabHeader.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<div class="row" id="main-content">
|
||||||
|
<div class="splitter">
|
||||||
|
<div class="comp-column">
|
||||||
|
<div data-tabs class="tabs" id="main-tab">
|
||||||
|
<TabHeader active="true" link="#simplesearch" icon="fa-magnifying-glass" />
|
||||||
|
<TabHeader link="#queue-list" icon="fa-list" />
|
||||||
|
<TabHeader link="#recent-list" icon="fa-history" />
|
||||||
|
</div>
|
||||||
|
<div class="tabs-container" data-tabs-content="main-tab">
|
||||||
|
<SearchTab />
|
||||||
|
<div class="tabs-panel" id="queue-list">
|
||||||
|
<div class="vsplit">
|
||||||
|
<div id="queue-list-wrapper" class="results">
|
||||||
|
<ul id="queue" class="vertical menu">
|
||||||
|
<li rv-if="queue.current" id="current">
|
||||||
|
{% if admin == True -%}
|
||||||
|
<div class="row">
|
||||||
|
<div class="columns small-9">
|
||||||
|
{%- endif %}
|
||||||
|
<div class="row">
|
||||||
|
<span class="artist">{ queue.current.artist }</span>
|
||||||
|
<span class="title">{ queue.current.title }</span>
|
||||||
|
<span class="album">{ queue.current.album }</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span class="singer">{ queue.current.performer }</span>
|
||||||
|
</div>
|
||||||
|
{% if admin == True -%}
|
||||||
|
</div>
|
||||||
|
<div class="columns small-3">
|
||||||
|
<div class="button-group">
|
||||||
|
<button class="button alert fright" rv-on-click="queue.abort"><i class="fa fa-step-forward"></i></button>
|
||||||
|
<button class="button alert fright" rv-on-click="queue.kill"><i class="fa fa-times"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
</li>
|
||||||
|
<li rv-each-entry="queue.queue">
|
||||||
|
{% if admin == True -%}
|
||||||
|
<div class="row">
|
||||||
|
<div class="columns small-9">
|
||||||
|
{%- endif %}
|
||||||
|
<div class="row">
|
||||||
|
<span class="artist">{ entry.artist }</span>
|
||||||
|
<span class="title">{ entry.title }</span>
|
||||||
|
<span class="album">{ entry.album }</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span class="singer">{ entry.performer }</span>
|
||||||
|
<span class="eta">{ entry.etamin }</span>
|
||||||
|
</div>
|
||||||
|
{% if admin == True -%}
|
||||||
|
</div>
|
||||||
|
<div class="columns small-3">
|
||||||
|
<button class="button alert fright" rv-on-click="queue.deleteFromQueue"><i class="fa fa-minus"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{%- endif %}
|
||||||
|
</li>
|
||||||
|
{% if admin == True %}
|
||||||
|
<li>
|
||||||
|
<div class="row">
|
||||||
|
<div class="columns small-12">
|
||||||
|
<a class="button" download="queue.json" rv-href="queue.data">Save</a>
|
||||||
|
<label for="small-bulk-upload" class="button bulk-upload-label">Bulk Append</label>
|
||||||
|
<input type="file" id="small-bulk-upload" rv-on-change="queue.bulk_append" class="show-for-sr">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="tabs-panel" id="recent-list">
|
||||||
|
<div class="vsplit">
|
||||||
|
<div id="recent-list-wrapper" class="results">
|
||||||
|
<ol id="last10" class="vertical menu">
|
||||||
|
<li rv-each-entry="queue.last10">
|
||||||
|
<div class="row">
|
||||||
|
<span class="artist">{ entry.artist }</span>
|
||||||
|
<span class="title">{ entry.title }</span>
|
||||||
|
<span class="album">{ entry.album }</span>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span class="singer">{ entry.performer }</span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
#app {
|
||||||
|
background: url(../syng.png) fixed;
|
||||||
|
background-color: #8a8a8a;
|
||||||
|
background-size: auto 50%;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
}
|
||||||
|
</style>
|
74
src/assets/base.css
Normal file
74
src/assets/base.css
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
/* color palette from <https://github.com/vuejs/theme> */
|
||||||
|
:root {
|
||||||
|
--vt-c-white: #ffffff;
|
||||||
|
--vt-c-white-soft: #f8f8f8;
|
||||||
|
--vt-c-white-mute: #f2f2f2;
|
||||||
|
|
||||||
|
--vt-c-black: #181818;
|
||||||
|
--vt-c-black-soft: #222222;
|
||||||
|
--vt-c-black-mute: #282828;
|
||||||
|
|
||||||
|
--vt-c-indigo: #2c3e50;
|
||||||
|
|
||||||
|
--vt-c-divider-light-1: rgba(60, 60, 60, 0.29);
|
||||||
|
--vt-c-divider-light-2: rgba(60, 60, 60, 0.12);
|
||||||
|
--vt-c-divider-dark-1: rgba(84, 84, 84, 0.65);
|
||||||
|
--vt-c-divider-dark-2: rgba(84, 84, 84, 0.48);
|
||||||
|
|
||||||
|
--vt-c-text-light-1: var(--vt-c-indigo);
|
||||||
|
--vt-c-text-light-2: rgba(60, 60, 60, 0.66);
|
||||||
|
--vt-c-text-dark-1: var(--vt-c-white);
|
||||||
|
--vt-c-text-dark-2: rgba(235, 235, 235, 0.64);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* semantic color variables for this project */
|
||||||
|
:root {
|
||||||
|
--color-background: var(--vt-c-white);
|
||||||
|
--color-background-soft: var(--vt-c-white-soft);
|
||||||
|
--color-background-mute: var(--vt-c-white-mute);
|
||||||
|
|
||||||
|
--color-border: var(--vt-c-divider-light-2);
|
||||||
|
--color-border-hover: var(--vt-c-divider-light-1);
|
||||||
|
|
||||||
|
--color-heading: var(--vt-c-text-light-1);
|
||||||
|
--color-text: var(--vt-c-text-light-1);
|
||||||
|
|
||||||
|
--section-gap: 160px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
:root {
|
||||||
|
--color-background: var(--vt-c-black);
|
||||||
|
--color-background-soft: var(--vt-c-black-soft);
|
||||||
|
--color-background-mute: var(--vt-c-black-mute);
|
||||||
|
|
||||||
|
--color-border: var(--vt-c-divider-dark-2);
|
||||||
|
--color-border-hover: var(--vt-c-divider-dark-1);
|
||||||
|
|
||||||
|
--color-heading: var(--vt-c-text-dark-1);
|
||||||
|
--color-text: var(--vt-c-text-dark-2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
position: relative;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
color: var(--color-text);
|
||||||
|
background: var(--color-background);
|
||||||
|
transition: color 0.5s, background-color 0.5s;
|
||||||
|
line-height: 1.6;
|
||||||
|
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
|
||||||
|
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
|
||||||
|
font-size: 15px;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
1
src/assets/logo.svg
Normal file
1
src/assets/logo.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 261.76 226.69" xmlns:v="https://vecta.io/nano"><path d="M161.096.001l-30.225 52.351L100.647.001H-.005l130.877 226.688L261.749.001z" fill="#41b883"/><path d="M161.096.001l-30.225 52.351L100.647.001H52.346l78.526 136.01L209.398.001z" fill="#34495e"/></svg>
|
After Width: | Height: | Size: 308 B |
35
src/assets/main.css
Normal file
35
src/assets/main.css
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
@import './base.css';
|
||||||
|
|
||||||
|
#app {
|
||||||
|
max-width: 1280px;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 2rem;
|
||||||
|
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
a,
|
||||||
|
.green {
|
||||||
|
text-decoration: none;
|
||||||
|
color: hsla(160, 100%, 37%, 1);
|
||||||
|
transition: 0.4s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (hover: hover) {
|
||||||
|
a:hover {
|
||||||
|
background-color: hsla(160, 100%, 37%, 0.2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
body {
|
||||||
|
display: flex;
|
||||||
|
place-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
}
|
9
src/components/FoundationTest.vue
Normal file
9
src/components/FoundationTest.vue
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
<script setup>
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<button type="button" class="alert button">Delete</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
36
src/components/Result.vue
Normal file
36
src/components/Result.vue
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ['artist', 'title', 'album']
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="columns small-10">
|
||||||
|
<span class="artist">{{artist}}</span>
|
||||||
|
<span class="title">{{title}}</span>
|
||||||
|
<span class="album">{{album}}</span>
|
||||||
|
</div>
|
||||||
|
<div class="columns small-2">
|
||||||
|
<button class="button alert fright">
|
||||||
|
<i class="fa fa-play"></i>
|
||||||
|
</button>
|
||||||
|
<button class="button fright">
|
||||||
|
<i class="fa fa-plus"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<style scope>
|
||||||
|
.artist::after{
|
||||||
|
content: " - ";
|
||||||
|
}
|
||||||
|
|
||||||
|
.album::before {
|
||||||
|
content: " [";
|
||||||
|
}
|
||||||
|
.album::after {
|
||||||
|
content: "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
10
src/components/SearchBar.vue
Normal file
10
src/components/SearchBar.vue
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<template>
|
||||||
|
<form id="simple-search-form" class="form">
|
||||||
|
<div class="input-group">
|
||||||
|
<input id="search-query" class="input-group-field" type="search" placeholder="Search term or YouTube link (https://www.youtube.com/watch?v=...)" name="q" />
|
||||||
|
<div class="input-group-button">
|
||||||
|
<button class="button" type="submit"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</template>
|
30
src/components/SearchResults.vue
Normal file
30
src/components/SearchResults.vue
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<script setup>
|
||||||
|
import Result from './Result.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div id="search-results" class="results">
|
||||||
|
<ul class="vertical menu">
|
||||||
|
<li> <Result artist="Linkin Park" title="In The End" album="Hybrid Theory"/> </li>
|
||||||
|
<li> <Result artist="ZSK" title="Herz für die Sache" album="Herz für die Sache"/> </li>
|
||||||
|
<li> <Result artist="Die Kassierer" title="Das Schlimmste" album="irgendwas mit Bier"/> </li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.results {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
.menu li {
|
||||||
|
padding: 0.4em;
|
||||||
|
}
|
||||||
|
.menu li:nth-child(odd) {
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.menu li:nth-child(even) {
|
||||||
|
background-color: #f6f6f6;
|
||||||
|
}
|
||||||
|
</style>
|
13
src/components/SearchTab.vue
Normal file
13
src/components/SearchTab.vue
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
<script setup>
|
||||||
|
import SearchResults from './SearchResults.vue'
|
||||||
|
import SearchBar from './SearchBar.vue'
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="tabs-panel is-active" id="simplesearch">
|
||||||
|
<div class="vsplit">
|
||||||
|
<SearchBar />
|
||||||
|
<SearchResults />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
10
src/components/TabHeader.vue
Normal file
10
src/components/TabHeader.vue
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ['active', 'icon', 'link', 'variant']
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="tabs-title" :class="{ 'is-active': active }"><a :href="link">
|
||||||
|
<font-awesome-icon :icon="[variant, icon]" />
|
||||||
|
</a></div>
|
||||||
|
</template>
|
20
src/main.js
Normal file
20
src/main.js
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
import { createApp } from 'vue'
|
||||||
|
import $ from 'jquery'
|
||||||
|
import Foundation from 'foundation-sites'
|
||||||
|
import App from './App.vue'
|
||||||
|
import { library } from '@fortawesome/fontawesome-svg-core'
|
||||||
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
|
||||||
|
import { faMagnifyingGlass, faList, faHistory } from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
|
import './assets/main.css'
|
||||||
|
import 'foundation-sites/dist/css/foundation.min.css'
|
||||||
|
|
||||||
|
library.add(faMagnifyingGlass)
|
||||||
|
library.add(faList)
|
||||||
|
library.add(faHistory)
|
||||||
|
|
||||||
|
createApp(App)
|
||||||
|
.component('font-awesome-icon', FontAwesomeIcon)
|
||||||
|
.mount('#app')
|
||||||
|
|
||||||
|
$(document).foundation();
|
14
vite.config.js
Normal file
14
vite.config.js
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import { fileURLToPath, URL } from 'node:url'
|
||||||
|
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
|
||||||
|
// https://vitejs.dev/config/
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': fileURLToPath(new URL('./src', import.meta.url))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
Loading…
Add table
Reference in a new issue