From f10ed68763fc88ab0a00a7011b14cfae8581bc2d Mon Sep 17 00:00:00 2001 From: RemiSaurel Date: Mon, 1 Aug 2022 23:32:30 +0200 Subject: [PATCH 1/2] fix style + ytb player --- deploy.sh | 14 ++++++ package.json | 3 +- src/App.vue | 96 ++++++------------------------------- src/components/ToDoList.vue | 12 ++--- vue.config.js | 3 ++ 5 files changed, 37 insertions(+), 91 deletions(-) create mode 100755 deploy.sh create mode 100644 vue.config.js diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..9cb8ebd --- /dev/null +++ b/deploy.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +set -e + +npm run build + +cd dist + +git init +git add -A +git commit -m 'deploy' +git push -f git@github.com:remisaurel/todoapp.git master:gh-pages + +cd - \ No newline at end of file diff --git a/package.json b/package.json index 480c4ce..c0d6066 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", - "lint": "vue-cli-service lint" + "lint": "vue-cli-service lint", + "deploy": "sh deploy.sh" }, "dependencies": { "core-js": "^3.6.5", diff --git a/src/App.vue b/src/App.vue index 169a251..93958f2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -5,19 +5,13 @@

-
- -
- + @@ -47,14 +41,12 @@ window.addEventListener("load", () => { // get time components const hours = today.getHours(); const minutes = today.getMinutes(); - const seconds = today.getSeconds(); //add '0' to hour, minute & second when they are less 10 const hour = hours < 10 ? "0" + hours : hours; const minute = minutes < 10 ? "0" + minutes : minutes; - const second = seconds < 10 ? "0" + seconds : seconds; - const time = hour + ":" + minute + ":" + second; + const time = hour + ":" + minute; document.getElementById("time").innerHTML = time; setTimeout(clock, 1000); @@ -76,13 +68,24 @@ a { } body { - background-color: #FFF5DE; + background: -webkit-linear-gradient( 0deg, rgba(255, 253, 226, 1) 0%, rgba(255, 228, 164, 1) 50%, rgba(255, 217, 153, 1) 100%); } .ytb { text-align: center; margin-top: 16px; user-select: none; + position: relative; + padding-bottom: 56.25%; /* 16:9, for an aspect ratio of 1:1 change to this value to 100% */ +} + +iframe{ + position: absolute; + top: 5%; + left: 20%; + width: 60%; + height: 60%; + border-radius: 16px; } header { @@ -130,75 +133,4 @@ footer { transform-origin: bottom left; } -/* SWITCH */ -#switch_youtube { - display: flex; - justify-content: flex-end; - align-items: flex-end; - margin-top: 16px; - margin-right: 10vw; -} - -.switch { - position: absolute; - justify-content: flex-end; - display: inline-block; - width: 40px; - height: 24px; -} - -/* Hide default HTML checkbox */ -.switch input { - opacity: 0; - width: 0; - height: 0; -} - -/* The slider */ -.slider { - position: absolute; - cursor: pointer; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ccc; - -webkit-transition: .4s; - transition: .4s; -} - -.slider:before { - position: absolute; - content: ""; - height: 18px; - width: 18px; - left: 2px; - bottom: 3px; - background-color: white; - -webkit-transition: .4s; - transition: .4s; -} - -input:checked + .slider { - background-color: #79624c; -} - -input:focus + .slider { - box-shadow: 0 0 1px #79624c; -} - -input:checked + .slider:before { - -webkit-transform: translateX(17px); - -ms-transform: translateX(17px); - transform: translateX(17px); -} - -/* Rounded sliders */ -.slider.round { - border-radius: 16px; -} - -.slider.round:before { - border-radius: 50%; -} diff --git a/src/components/ToDoList.vue b/src/components/ToDoList.vue index 1b93630..6b75155 100644 --- a/src/components/ToDoList.vue +++ b/src/components/ToDoList.vue @@ -1,7 +1,7 @@