commit 0ca9098e19f6fdb5be8aa55b164de6cfd65a0221 Author: lesion Date: Mon Jan 23 12:29:24 2023 +0100 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7bf522f --- /dev/null +++ b/.gitignore @@ -0,0 +1,42 @@ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env + +# Misc +.DS_Store +Thumbs.db + + + + + +# Production build +www/ diff --git a/assets-src/apple-touch-icon.png b/assets-src/apple-touch-icon.png new file mode 100644 index 0000000..2ad4ce1 Binary files /dev/null and b/assets-src/apple-touch-icon.png differ diff --git a/assets-src/web-icon.png b/assets-src/web-icon.png new file mode 100644 index 0000000..76adb03 Binary files /dev/null and b/assets-src/web-icon.png differ diff --git a/framework7.json b/framework7.json new file mode 100644 index 0000000..9c3c74d --- /dev/null +++ b/framework7.json @@ -0,0 +1,19 @@ +{ + "cwd": "/home/les/dev/plaid2", + "type": [ + "web" + ], + "name": "plaid", + "framework": "vue", + "template": "single-view", + "bundler": "vite", + "cssPreProcessor": false, + "theming": { + "customColor": false, + "color": "#007aff", + "darkTheme": false, + "iconFonts": true, + "fillBars": true + }, + "customBuild": false +} \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..44ef39a --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "plaid", + "private": true, + "version": "1.0.0", + "description": "plaid", + "repository": "", + "license": "UNLICENSED", + "scripts": { + "start": "npm run dev", + "dev": "cross-env NODE_ENV=development vite", + "build": "cross-env NODE_ENV=production vite build", + "postinstall": "cpy --flat ./node_modules/framework7-icons/fonts/*.* ./src/fonts/ && cpy --flat ./node_modules/material-icons/iconfont/*.* ./src/fonts/" + }, + "browserslist": [ + "IOS >= 13", + "Safari >= 13", + "last 5 Chrome versions", + "last 5 Firefox versions", + "Samsung >= 12" + ], + "dependencies": { + "dom7": "^4.0.4", + "framework7": "^7.1.2", + "framework7-icons": "^5.0.5", + "framework7-vue": "^7.1.2", + "howler": "^2.2.3", + "material-icons": "^1.13.1", + "skeleton-elements": "^4.0.1", + "swiper": "^8.4.6", + "tailwindcss": "^3.2.4", + "vue": "^3.2.45" + }, + "devDependencies": { + "@vitejs/plugin-vue": "^4.0.0", + "@vue/compiler-sfc": "^3.2.45", + "cpy-cli": "^4.2.0", + "cross-env": "^7.0.3", + "postcss-preset-env": "^7.8.3", + "vite": "^4.0.4" + } +} diff --git a/public/icons/128x128.png b/public/icons/128x128.png new file mode 100644 index 0000000..adbe8b4 Binary files /dev/null and b/public/icons/128x128.png differ diff --git a/public/icons/144x144.png b/public/icons/144x144.png new file mode 100644 index 0000000..e4fb430 Binary files /dev/null and b/public/icons/144x144.png differ diff --git a/public/icons/152x152.png b/public/icons/152x152.png new file mode 100644 index 0000000..d3c46c6 Binary files /dev/null and b/public/icons/152x152.png differ diff --git a/public/icons/192x192.png b/public/icons/192x192.png new file mode 100644 index 0000000..a1a3c27 Binary files /dev/null and b/public/icons/192x192.png differ diff --git a/public/icons/256x256.png b/public/icons/256x256.png new file mode 100644 index 0000000..c1c442c Binary files /dev/null and b/public/icons/256x256.png differ diff --git a/public/icons/512x512.png b/public/icons/512x512.png new file mode 100644 index 0000000..76adb03 Binary files /dev/null and b/public/icons/512x512.png differ diff --git a/public/icons/apple-touch-icon.png b/public/icons/apple-touch-icon.png new file mode 100644 index 0000000..2ad4ce1 Binary files /dev/null and b/public/icons/apple-touch-icon.png differ diff --git a/public/icons/favicon.png b/public/icons/favicon.png new file mode 100644 index 0000000..adbe8b4 Binary files /dev/null and b/public/icons/favicon.png differ diff --git a/src/components/Button.vue b/src/components/Button.vue new file mode 100644 index 0000000..caadd43 --- /dev/null +++ b/src/components/Button.vue @@ -0,0 +1,88 @@ + + + + diff --git a/src/components/Player.vue b/src/components/Player.vue new file mode 100644 index 0000000..c4d9e47 --- /dev/null +++ b/src/components/Player.vue @@ -0,0 +1,66 @@ + + + + diff --git a/src/components/app.vue b/src/components/app.vue new file mode 100644 index 0000000..0fd6031 --- /dev/null +++ b/src/components/app.vue @@ -0,0 +1,40 @@ + + diff --git a/src/css/app.css b/src/css/app.css new file mode 100644 index 0000000..f227db4 --- /dev/null +++ b/src/css/app.css @@ -0,0 +1,53 @@ +/* Your app custom styles here */ +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* Invert navigation bars to fill style */ +:root, +:root.dark, +:root .dark { + --f7-bars-bg-color: var(--f7-theme-color); + --f7-bars-bg-color-rgb: var(--f7-theme-color-rgb); + --f7-bars-translucent-opacity: 0.9; + --f7-bars-text-color: #fff; + --f7-bars-link-color: #fff; + --f7-navbar-subtitle-text-color: rgba(255,255,255,0.85); + --f7-bars-border-color: transparent; + --f7-tabbar-link-active-color: #fff; + --f7-tabbar-link-inactive-color: rgba(255,255,255,0.54); + --f7-sheet-border-color: transparent; + --f7-tabbar-link-active-border-color: #fff; +} +.appbar, +.navbar, +.toolbar, +.subnavbar, +.calendar-header, +.calendar-footer { + --f7-touch-ripple-color: var(--f7-touch-ripple-white); + --f7-link-highlight-color: var(--f7-link-highlight-white); + --f7-link-touch-ripple-color: var(--f7-touch-ripple-white); + --f7-button-text-color: #fff; + --f7-button-pressed-bg-color: rgba(255,255,255,0.1); +} +.navbar-large-transparent, +.navbar-large.navbar-transparent { + --f7-navbar-large-title-text-color: #000; + + --r: 0; + --g: 122; + --b: 255; + --progress: var(--f7-navbar-large-collapse-progress); + --f7-bars-link-color: rgb( + calc(var(--r) + (255 - var(--r)) * var(--progress)), + calc(var(--g) + (255 - var(--g)) * var(--progress)), + calc(var(--b) + (255 - var(--b)) * var(--progress)) + ); +} +.dark .navbar-large-transparent, +.dark .navbar-large.navbar-transparent { + --f7-navbar-large-title-text-color: #fff; +} + +/* Your app custom styles here */ \ No newline at end of file diff --git a/src/css/app.less b/src/css/app.less new file mode 100644 index 0000000..aaae8c6 --- /dev/null +++ b/src/css/app.less @@ -0,0 +1,4 @@ +/* Your app custom styles here */ +@tailwind base; +@tailwind components; +@tailwind utilities; \ No newline at end of file diff --git a/src/css/icons.css b/src/css/icons.css new file mode 100644 index 0000000..95a036a --- /dev/null +++ b/src/css/icons.css @@ -0,0 +1,56 @@ +/* Material Icons Font (for MD theme) */ +@font-face { + font-family: 'Material Icons'; + font-style: normal; + font-weight: 400; + src: local('Material Icons'), local('MaterialIcons-Regular'), + url(../fonts/material-icons.woff2) format('woff2'), + url(../fonts/material-icons.woff) format('woff'); +} +.material-icons { + font-family: 'Material Icons'; + font-weight: normal; + font-style: normal; + font-size: 24px; + display: inline-block; + line-height: 1; + text-transform: none; + letter-spacing: normal; + word-wrap: normal; + white-space: nowrap; + direction: ltr; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + font-feature-settings: 'liga'; +} + +/* Framework7 Icons Font (for iOS theme) */ +@font-face { + font-family: 'Framework7 Icons'; + font-style: normal; + font-weight: 400; + src: url('../fonts/Framework7Icons-Regular.woff2') format('woff2'), + url('../fonts/Framework7Icons-Regular.woff') format('woff'); +} +.f7-icons { + font-family: 'Framework7 Icons'; + font-weight: normal; + font-style: normal; + font-size: 28px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + text-rendering: optimizeLegibility; + -moz-osx-font-smoothing: grayscale; + -webkit-font-feature-settings: 'liga'; + -moz-font-feature-settings: 'liga=1'; + -moz-font-feature-settings: 'liga'; + font-feature-settings: 'liga'; + text-align: center; +} diff --git a/src/fonts/Framework7Icons-Regular.ttf b/src/fonts/Framework7Icons-Regular.ttf new file mode 100644 index 0000000..b9831c0 Binary files /dev/null and b/src/fonts/Framework7Icons-Regular.ttf differ diff --git a/src/fonts/Framework7Icons-Regular.woff b/src/fonts/Framework7Icons-Regular.woff new file mode 100644 index 0000000..88719b1 Binary files /dev/null and b/src/fonts/Framework7Icons-Regular.woff differ diff --git a/src/fonts/Framework7Icons-Regular.woff2 b/src/fonts/Framework7Icons-Regular.woff2 new file mode 100644 index 0000000..91890bf Binary files /dev/null and b/src/fonts/Framework7Icons-Regular.woff2 differ diff --git a/src/fonts/_mixins.scss b/src/fonts/_mixins.scss new file mode 100644 index 0000000..ee33f89 --- /dev/null +++ b/src/fonts/_mixins.scss @@ -0,0 +1,55 @@ +// @see https://github.com/twbs/bootstrap/blob/main/scss/_functions.scss +@function material-icons-str-replace($string, $search, $replace: '') { + $index: str-index($string, $search); + @if $index { + @return str-slice($string, 1, $index - 1) + $replace + + material-icons-str-replace( + str-slice($string, $index + str-length($search)), + $search, + $replace + ); + } + @return $string; +} + +@mixin material-icons-font-class($font-family) { + font-family: $font-family; + font-weight: normal; + font-style: normal; + font-size: $material-icons-font-size; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; // Support for all WebKit browsers + -moz-osx-font-smoothing: grayscale; // Support for Firefox + text-rendering: optimizeLegibility; // Support for Safari and Chrome + font-feature-settings: 'liga'; // Support for IE +} + +@mixin material-icons-font($font-family) { + $class-name: to-lower-case($font-family); + $class-name: material-icons-str-replace($class-name, ' ', '-'); + $font-file: $material-icons-font-path + $class-name; + + @font-face { + font-family: $font-family; + font-style: normal; + font-weight: 400; + font-display: $material-icons-font-display; + src: url('#{$font-file}.woff2') format('woff2'), + url('#{$font-file}.woff') format('woff'); + } + + .#{$class-name} { + @include material-icons-font-class($font-family); + } +} + +@mixin material-icons() { + @warn "material-icons() Sass mixin has been deprecated as of 1.0. Use '@extend .material-icons;' instead of '@include material-icons();'."; + @include material-icons-font-class('Material Icons'); +} diff --git a/src/fonts/_variables.scss b/src/fonts/_variables.scss new file mode 100644 index 0000000..40bc19f --- /dev/null +++ b/src/fonts/_variables.scss @@ -0,0 +1,3 @@ +$material-icons-font-path: './' !default; +$material-icons-font-size: 24px !default; +$material-icons-font-display: block !default; diff --git a/src/fonts/filled.css b/src/fonts/filled.css new file mode 100644 index 0000000..75e83a8 --- /dev/null +++ b/src/fonts/filled.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "Material Icons"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons.woff2") format("woff2"), url("./material-icons.woff") format("woff"); +} +.material-icons { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/filled.scss b/src/fonts/filled.scss new file mode 100644 index 0000000..e1b258c --- /dev/null +++ b/src/fonts/filled.scss @@ -0,0 +1,4 @@ +@import 'variables'; +@import 'mixins'; + +@include material-icons-font('Material Icons'); diff --git a/src/fonts/material-icons-outlined.woff b/src/fonts/material-icons-outlined.woff new file mode 100644 index 0000000..edeb9df Binary files /dev/null and b/src/fonts/material-icons-outlined.woff differ diff --git a/src/fonts/material-icons-outlined.woff2 b/src/fonts/material-icons-outlined.woff2 new file mode 100644 index 0000000..d44b948 Binary files /dev/null and b/src/fonts/material-icons-outlined.woff2 differ diff --git a/src/fonts/material-icons-round.woff b/src/fonts/material-icons-round.woff new file mode 100644 index 0000000..bc0002b Binary files /dev/null and b/src/fonts/material-icons-round.woff differ diff --git a/src/fonts/material-icons-round.woff2 b/src/fonts/material-icons-round.woff2 new file mode 100644 index 0000000..e9e305f Binary files /dev/null and b/src/fonts/material-icons-round.woff2 differ diff --git a/src/fonts/material-icons-sharp.woff b/src/fonts/material-icons-sharp.woff new file mode 100644 index 0000000..80d8c99 Binary files /dev/null and b/src/fonts/material-icons-sharp.woff differ diff --git a/src/fonts/material-icons-sharp.woff2 b/src/fonts/material-icons-sharp.woff2 new file mode 100644 index 0000000..4062685 Binary files /dev/null and b/src/fonts/material-icons-sharp.woff2 differ diff --git a/src/fonts/material-icons-two-tone.woff b/src/fonts/material-icons-two-tone.woff new file mode 100644 index 0000000..ddf106c Binary files /dev/null and b/src/fonts/material-icons-two-tone.woff differ diff --git a/src/fonts/material-icons-two-tone.woff2 b/src/fonts/material-icons-two-tone.woff2 new file mode 100644 index 0000000..8f79990 Binary files /dev/null and b/src/fonts/material-icons-two-tone.woff2 differ diff --git a/src/fonts/material-icons.css b/src/fonts/material-icons.css new file mode 100644 index 0000000..3cd7aab --- /dev/null +++ b/src/fonts/material-icons.css @@ -0,0 +1,124 @@ +@font-face { + font-family: "Material Icons"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons.woff2") format("woff2"), url("./material-icons.woff") format("woff"); +} +.material-icons { + font-family: "Material Icons"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Outlined"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-outlined.woff2") format("woff2"), url("./material-icons-outlined.woff") format("woff"); +} +.material-icons-outlined { + font-family: "Material Icons Outlined"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Round"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-round.woff2") format("woff2"), url("./material-icons-round.woff") format("woff"); +} +.material-icons-round { + font-family: "Material Icons Round"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Sharp"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-sharp.woff2") format("woff2"), url("./material-icons-sharp.woff") format("woff"); +} +.material-icons-sharp { + font-family: "Material Icons Sharp"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} + +@font-face { + font-family: "Material Icons Two Tone"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-two-tone.woff2") format("woff2"), url("./material-icons-two-tone.woff") format("woff"); +} +.material-icons-two-tone { + font-family: "Material Icons Two Tone"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/material-icons.scss b/src/fonts/material-icons.scss new file mode 100644 index 0000000..3a09427 --- /dev/null +++ b/src/fonts/material-icons.scss @@ -0,0 +1,5 @@ +@import 'filled'; +@import 'outlined'; +@import 'round'; +@import 'sharp'; +@import 'two-tone'; diff --git a/src/fonts/material-icons.woff b/src/fonts/material-icons.woff new file mode 100644 index 0000000..88fdf4d Binary files /dev/null and b/src/fonts/material-icons.woff differ diff --git a/src/fonts/material-icons.woff2 b/src/fonts/material-icons.woff2 new file mode 100644 index 0000000..5492a6e Binary files /dev/null and b/src/fonts/material-icons.woff2 differ diff --git a/src/fonts/outlined.css b/src/fonts/outlined.css new file mode 100644 index 0000000..f359e2a --- /dev/null +++ b/src/fonts/outlined.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "Material Icons Outlined"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-outlined.woff2") format("woff2"), url("./material-icons-outlined.woff") format("woff"); +} +.material-icons-outlined { + font-family: "Material Icons Outlined"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/outlined.scss b/src/fonts/outlined.scss new file mode 100644 index 0000000..cabbac0 --- /dev/null +++ b/src/fonts/outlined.scss @@ -0,0 +1,4 @@ +@import 'variables'; +@import 'mixins'; + +@include material-icons-font('Material Icons Outlined'); diff --git a/src/fonts/round.css b/src/fonts/round.css new file mode 100644 index 0000000..c0b13ba --- /dev/null +++ b/src/fonts/round.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "Material Icons Round"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-round.woff2") format("woff2"), url("./material-icons-round.woff") format("woff"); +} +.material-icons-round { + font-family: "Material Icons Round"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/round.scss b/src/fonts/round.scss new file mode 100644 index 0000000..ba3260c --- /dev/null +++ b/src/fonts/round.scss @@ -0,0 +1,4 @@ +@import 'variables'; +@import 'mixins'; + +@include material-icons-font('Material Icons Round'); diff --git a/src/fonts/sharp.css b/src/fonts/sharp.css new file mode 100644 index 0000000..18e9149 --- /dev/null +++ b/src/fonts/sharp.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "Material Icons Sharp"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-sharp.woff2") format("woff2"), url("./material-icons-sharp.woff") format("woff"); +} +.material-icons-sharp { + font-family: "Material Icons Sharp"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/sharp.scss b/src/fonts/sharp.scss new file mode 100644 index 0000000..cb60161 --- /dev/null +++ b/src/fonts/sharp.scss @@ -0,0 +1,4 @@ +@import 'variables'; +@import 'mixins'; + +@include material-icons-font('Material Icons Sharp'); diff --git a/src/fonts/two-tone.css b/src/fonts/two-tone.css new file mode 100644 index 0000000..fb9b4c9 --- /dev/null +++ b/src/fonts/two-tone.css @@ -0,0 +1,24 @@ +@font-face { + font-family: "Material Icons Two Tone"; + font-style: normal; + font-weight: 400; + font-display: block; + src: url("./material-icons-two-tone.woff2") format("woff2"), url("./material-icons-two-tone.woff") format("woff"); +} +.material-icons-two-tone { + font-family: "Material Icons Two Tone"; + font-weight: normal; + font-style: normal; + font-size: 24px; + line-height: 1; + letter-spacing: normal; + text-transform: none; + display: inline-block; + white-space: nowrap; + word-wrap: normal; + direction: ltr; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-rendering: optimizeLegibility; + font-feature-settings: "liga"; +} diff --git a/src/fonts/two-tone.scss b/src/fonts/two-tone.scss new file mode 100644 index 0000000..110f7b6 --- /dev/null +++ b/src/fonts/two-tone.scss @@ -0,0 +1,4 @@ +@import 'variables'; +@import 'mixins'; + +@include material-icons-font('Material Icons Two Tone'); diff --git a/src/index.html b/src/index.html new file mode 100644 index 0000000..cf3ea10 --- /dev/null +++ b/src/index.html @@ -0,0 +1,34 @@ + + + + + + + + + + + + plaid + + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/src/js/app.js b/src/js/app.js new file mode 100644 index 0000000..37ef7b9 --- /dev/null +++ b/src/js/app.js @@ -0,0 +1,30 @@ +// Import Vue +import { createApp } from 'vue'; + +// Import Framework7 +import Framework7 from 'framework7/lite-bundle'; + +// Import Framework7-Vue Plugin +import Framework7Vue, { registerComponents } from 'framework7-vue/bundle'; + +// Import Framework7 Styles +import 'framework7/css/bundle'; + +// Import Icons and App Custom Styles +import '../css/icons.css'; +import '../css/app.css'; + +// Import App Component +import App from '../components/app.vue'; + +// Init Framework7-Vue Plugin +Framework7.use(Framework7Vue); + +// Init App +const app = createApp(App); + +// Register Framework7 Vue components +registerComponents(app); + +// Mount the app +app.mount('#app'); \ No newline at end of file diff --git a/src/js/radiomanifest.js b/src/js/radiomanifest.js new file mode 100644 index 0000000..218fa5f --- /dev/null +++ b/src/js/radiomanifest.js @@ -0,0 +1,32 @@ +import radiomanifest from 'radiomanifest' + +const cachedRadiomanifest = {} + + +const RM = { + + radio: { + 'ROR': { name: 'Radio Onda Rossa', description: 'un segnale che disturba', url: 'https://www.ondarossa.info' }, + 'Spore': { name: 'Radio Spore', description: 'una voce senza padrone', url: 'https://radiospore.oziosi.org' }, + // 'RBO': { } + }, + + currentRadio : null, + + async get (id) { + // check if this radio id exists + if (!RM.radio[id]) { + throw new Error('This radio id does not exists!') + } + + // check if is cached, load it otherwise + if (!cachedRadiomanifest[id]) { + const radio = RM.radio[id] + cachedRadiomanifest[id] = await radiomanifest.get(radio.url) + } + this.currentRadio = cachedRadiomanifest[id] + return cachedRadiomanifest[id] + } +} + +export default RM \ No newline at end of file diff --git a/src/js/routes.js b/src/js/routes.js new file mode 100644 index 0000000..1745887 --- /dev/null +++ b/src/js/routes.js @@ -0,0 +1,27 @@ + +import HomePage from '../pages/home.vue' +import RadioPage from '../pages/Radio.vue' +import ShowPage from '../pages/Show.vue' +import NotFoundPage from '../pages/404.vue' + +var routes = [ + { + path: '/', + master: true, + component: HomePage, + detailRoutes: [{ + path: '/radio/:radioName', + component: RadioPage, + }, + { + path: '/radio/:radioName/:showName', + component: ShowPage + }], + }, + { + path: '(.*)', + component: NotFoundPage, + }, +] + +export default routes diff --git a/src/js/store.js b/src/js/store.js new file mode 100644 index 0000000..ecc2c8b --- /dev/null +++ b/src/js/store.js @@ -0,0 +1,14 @@ + +import { createStore } from 'framework7/lite' + +const store = createStore({ + state: { + radios: [ + { id: 1, name: 'Radio Onda Rossa', description: 'un segnale che disturba', url: 'https://www.ondarossa.info' }, + { id: 2, name: 'Radio Spore', description: 'una voce senza padrone', url: 'https://radiospore.oziosi.org' }, + ], + }, + actions: { + }, +}) +export default store; diff --git a/src/pages/404.vue b/src/pages/404.vue new file mode 100644 index 0000000..7d472d6 --- /dev/null +++ b/src/pages/404.vue @@ -0,0 +1,12 @@ + + \ No newline at end of file diff --git a/src/pages/Radio.vue b/src/pages/Radio.vue new file mode 100644 index 0000000..8068b20 --- /dev/null +++ b/src/pages/Radio.vue @@ -0,0 +1,46 @@ + + + + \ No newline at end of file diff --git a/src/pages/Show.vue b/src/pages/Show.vue new file mode 100644 index 0000000..7a43d34 --- /dev/null +++ b/src/pages/Show.vue @@ -0,0 +1,19 @@ + + + \ No newline at end of file diff --git a/src/pages/home.vue b/src/pages/home.vue new file mode 100644 index 0000000..92067f1 --- /dev/null +++ b/src/pages/home.vue @@ -0,0 +1,16 @@ + + \ No newline at end of file diff --git a/tailwind.config.js b/tailwind.config.js new file mode 100644 index 0000000..990e8c4 --- /dev/null +++ b/tailwind.config.js @@ -0,0 +1,6 @@ +module.exports = { + purge: { + content: ['./src/index.html', './src/**/*.{vue,svelte,js,ts}'], + }, + plugins: [], + } \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..53262d7 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,34 @@ + +import path from 'path'; +import vue from '@vitejs/plugin-vue'; + +const SRC_DIR = path.resolve(__dirname, './src'); +const PUBLIC_DIR = path.resolve(__dirname, './public'); +const BUILD_DIR = path.resolve(__dirname, './www',); + +export default { + plugins: [ + vue(), + + ], + root: SRC_DIR, + base: '', + publicDir: PUBLIC_DIR, + build: { + outDir: BUILD_DIR, + assetsInlineLimit: 0, + emptyOutDir: true, + rollupOptions: { + treeshake: false, + }, + }, + resolve: { + alias: { + '@': SRC_DIR, + }, + }, + server: { + host: true, + }, + +};