diff --git a/admin/Admin.vue b/admin/Admin.vue new file mode 100644 index 0000000..f25f27d --- /dev/null +++ b/admin/Admin.vue @@ -0,0 +1,26 @@ + + + + + diff --git a/admin/components/EventEditor.vue b/admin/components/EventEditor.vue new file mode 100644 index 0000000..e6b993b --- /dev/null +++ b/admin/components/EventEditor.vue @@ -0,0 +1,359 @@ + + + + + diff --git a/admin/components/LinkEditor.vue b/admin/components/LinkEditor.vue new file mode 100644 index 0000000..1a64f0a --- /dev/null +++ b/admin/components/LinkEditor.vue @@ -0,0 +1,363 @@ + + + + + diff --git a/admin/components/PlaylistEditor.vue b/admin/components/PlaylistEditor.vue new file mode 100644 index 0000000..5845f4f --- /dev/null +++ b/admin/components/PlaylistEditor.vue @@ -0,0 +1,352 @@ + + + + + diff --git a/admin/favicon.svg b/admin/favicon.svg new file mode 100644 index 0000000..b396f5f --- /dev/null +++ b/admin/favicon.svg @@ -0,0 +1,76 @@ + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/admin/index.html b/admin/index.html new file mode 100644 index 0000000..2cbd105 --- /dev/null +++ b/admin/index.html @@ -0,0 +1,72 @@ + + + + + + LOL : admin + + + + +
+

+ Bienvenue sur la page admin du LOL !
+ Ici tu peux éditer le contenu visible sur le site, dans les sections évènements & liens utiles, et aussi ajouter de la musique dans le player.
+ On précise quand même (au cas où), que les auteurices des sons qu'on poste doivent avoir donné leur accord explicite avant que ça soit posté ! +

+
+
+
+ +
+
+
+
+

+ Évènements affichés : +

+ +
+
+
+
+
+
+ +
+
+

+ Playlist : +

+ +
+
+
+
+
+
+
+ + + diff --git a/admin/main.js b/admin/main.js new file mode 100644 index 0000000..f89566e --- /dev/null +++ b/admin/main.js @@ -0,0 +1,62 @@ +import { createApp } from 'vue' +// import css +import './style.css' +// import app racine pour page admin +import Admin from './Admin.vue' +// import composants +import EventEditor from './components/EventEditor.vue' +import LinkEditor from './components/LinkEditor.vue' +import PlaylistEditor from './components/PlaylistEditor.vue' + +// creation app +const app = createApp(Admin); +// Composants +app.component('eventEditor', EventEditor); +app.component('linkEditor', LinkEditor); +app.component('playlistEditor', PlaylistEditor) + +// montage dans div#adminContent +app.mount('#adminContent'); + +//import variables reactive +import { pannelStatusList } from './pannelStatus.js' + +document.documentElement.setAttribute('data-theme', 'main'); + +let eventBtn = document.querySelector('#eventBtn'); +let eventTarget = document.querySelector('#event .windowContent'); + +let linkBtn = document.querySelector('#linkBtn'); +let linkTarget = document.querySelector('#link .windowContent'); + +let playlistBtn = document.querySelector('#playlistBtn'); +let playlistTarget = document.querySelector('#playlist .windowContent'); + + +eventBtn.addEventListener('click', () => { + pannelStatusList.event = !pannelStatusList.event; + eventTarget.style.height = pannelStatusList.event ? '75vh' : 'auto'; + document.querySelector('#eventBtn .icon').style.transform = pannelStatusList.event ? 'rotate(45deg)' : 'rotate(0)' +}) + +linkBtn.addEventListener('click', () => { + pannelStatusList.link = !pannelStatusList.link; + if(pannelStatusList.link){ + pannelStatusList.playlist = false; + playlistTarget.style.height = 'auto'; + document.querySelector('#playlistBtn .icon').style.transform = 'rotate(45deg)' + } + linkTarget.style.height = pannelStatusList.link ? '64.5vh' : '0'; + document.querySelector('#linkBtn .icon').style.transform = pannelStatusList.link ? 'rotate(45deg)' : 'rotate(0)' +}) + +playlistBtn.addEventListener('click', () => { + pannelStatusList.playlist = !pannelStatusList.playlist; + if(pannelStatusList.playlist){ + pannelStatusList.link = false + linkTarget.style.height = 'auto'; + document.querySelector('#linkBtn .icon').style.transform = 'rotate(45deg)' + } + playlistTarget.style.height = pannelStatusList.playlist ? '64.5vh' : 'auto'; + document.querySelector('#playlistBtn .icon').style.transform = pannelStatusList.playlist ? 'rotate(45deg)' : 'rotate(0)' +}) diff --git a/admin/pannelStatus.js b/admin/pannelStatus.js new file mode 100644 index 0000000..5c403be --- /dev/null +++ b/admin/pannelStatus.js @@ -0,0 +1,7 @@ +import { reactive } from 'vue' + +export const pannelStatusList = reactive({ + event: false, + link: false, + playlist: false +}) diff --git a/admin/style.css b/admin/style.css new file mode 100644 index 0000000..85a228d --- /dev/null +++ b/admin/style.css @@ -0,0 +1,248 @@ +:root[data-theme="main"]{ + --back-color: #FFFF4D; + --main-color: #000000; +} + +/*====================Typo*/ +@font-face { + font-family: 'karrik'; + src: url('/typo/Karrik-Italic.woff2').format('woff2'); + font-style: italic; +} + +@font-face { + font-family: 'karrik'; + src: url('/typo/Karrik-Regular.woff2') format('woff2'); + font-style: normal; +} + +@font-face { + font-family: 'velvelyne'; + src: url('/typo/Velvelyne-Book.ttf') format('truetype'); + font-weight: normal; +} + +@font-face { + font-family: 'avara'; + src: url('/typo/Avara-Black.woff2') format('woff2'); +} + +@font-face { + font-family: 'pressStart2P'; + src: url('/typo/PressStart2P-Regular.ttf') format('truetype'); +} + +@font-face { + font-family: 'velvelyne'; + src:url('/typo/Velvelyne-Bold.ttf') format('truetype'); + font-weight: bold; +} + +/*=============Désact défault*/ +input { + -webkit-appearance: none !important; + appearance: none !important; +} + +a{ + text-decoration: none; + color: inherit; + cursor: alias; +} + +button{ + cursor: cell; +} + +a p{ + cursor:inherit; +} + +a button{ + cursor: inherit; +} + +p{ + cursor: inherit; + pointer-events: none !important; +} + +.dg{ + display: none !important; + height: 0; + overflow: hidden; +} + +/*====================BODY & BACKGROUND*/ +html, body{ + margin: 0; + padding: 0; + + background-color: var(--main-color); + width: 100%; + height:100%; + position: fixed; + inset: 0; + overflow-x: hidden; + overflow-y: scroll; + display: block; + scrollbar-color: var(--back-color) var(--main-color); + scrollbar-width: thin; + z-index: -33; + display: flex; + flex-direction: column; + +} + +/*=======================pseudo-Fenetres*/ +.windowStyle{ + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + background-color: var(--back-color); + border-style: solid; + border-width: thin; + border-radius: 16.1px; + border-color: var(--main-color); + overflow: hidden; + height: auto; + width: 95%; +} + +.windowTitle{ + width:100%; + height:44px; + background-color: var(--main-color); + border-radius: 0; + font-family: 'karrik'; + font-weight: normal; + text-transform: uppercase; + font-size: 16.1px; + color: var(--back-color); + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-between; + box-sizing: border-box; + padding-left: 10px; + padding-right: 10px; + cursor: move; +} + + +.windowTitleLower{ + font-family: 'velvelyne'; + font-weight: bold; + font-size: 13.12px; +} + +.toggleBtn{ + color: var(--back-color); + background-color: var(--main-color); + border-style: solid; + border-width: thin; + border-radius: 16.1px; + border-color: var(--back-color); + width: 27px; + height: 27px; + display: flex; + justify-content: space-around; + align-items: center; + transform: rotate(45deg); + cursor: copy; + padding: 0; +} + +.toggleBtn:hover{ + color: var(--main-color); + background-color: var(--back-color); +} + +.windowContent{ + height:77%; + width:100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; +} + +.icon{ + fill: currentColor; + height: 13.12px; + width: auto; + pointer-events: none; + padding: 0; + margin: 0; +} + +.textBtnStyle{ + font-family: 'karrik'; + font-size: 13.12px; + background-color: var(--back-color); + color: var(--main-color); + border-color: var(--main-color); + border-style: solid; + border-width: 1.75px; + border-radius: 16.1px; + display: flex; + flex-direction: row; + align-items: center; + justify-content: space-around; + width: 161px; + height: 77px; + align-self: flex-end; +} + +.textBtnStyle:hover{ + background-color: var(--main-color); + color: var(--back-color); + font-weight: bold; + +} + +/*==================INTERFACE*/ +#adminWelcome{ + width: 100%; + height: 13.12vh; + padding: 13.12px; + padding-top: 7.77px; + margin: 0; + box-sizing: border-box; + + p{ + font-family: 'velvelyne'; + font-weight: normal; + font-size: 13.12px; + color: var(--back-color); + margin: 0; + } + + strong{ + font-weight: bold; + } +} + +#adminContainer{ + width: 100%; + height: 90vh; + inset: 0; + overflow: hidden; + background-color: var(--back-color); + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: flex-start; +} + +.adminSection{ + width: 50%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + padding-top: 7.77px; + gap: 1vh; +} diff --git a/vite.config.js b/vite.config.js index b1c0264..c23da75 100644 --- a/vite.config.js +++ b/vite.config.js @@ -14,5 +14,13 @@ export default defineConfig({ alias: { '@': path.resolve(__dirname, './src') } + }, + build: { + rollupOptions: { + input: { + main: path.resolve(import.meta.dirname, 'index.html'), + admin: path.resolve(import.meta.dirname, 'admin/index.html'), + }, + }, } })