From a77750f6f1ffb08457394529b6c7b8a6f6bb9bf3 Mon Sep 17 00:00:00 2001 From: kevinkace Date: Tue, 13 Mar 2018 20:25:03 -0700 Subject: [PATCH] Shuffle files --- src/{ => components}/error/index.css | 2 +- src/{ => components}/error/index.js | 2 +- src/{ => components}/header/index.css | 6 +++--- src/{ => components}/header/index.js | 4 ++-- src/{ => components}/home/index.css | 8 ++++---- src/{ => components}/home/index.js | 2 +- src/{ => components}/icons/github.svg | 0 src/{ => components}/icons/lyrite-logo.svg | 0 src/{ => components}/icons/quill.svg | 0 src/{ => components}/layout/index.css | 2 +- src/{ => components}/layout/index.js | 2 +- src/{ => components}/lyrics/edit.css | 2 +- src/{ => components}/lyrics/edit.js | 4 ++-- src/{ => components}/lyrics/index.css | 4 ++-- src/{ => components}/lyrics/index.js | 2 +- src/{ => components}/modal/index.css | 4 ++-- src/{ => components}/modal/index.js | 4 ++-- src/{ => components}/modal/title.css | 6 +++--- src/{ => components}/modal/title.js | 2 +- src/{ => components}/tools/index.css | 6 +++--- src/{ => components}/tools/index.js | 2 +- src/{ => components}/tools/tooltip.css | 2 +- src/lib/animResolve.js | 1 + src/routes.js | 8 ++++---- src/state/song.js | 1 + 25 files changed, 39 insertions(+), 37 deletions(-) rename src/{ => components}/error/index.css (77%) rename src/{ => components}/error/index.js (91%) rename src/{ => components}/header/index.css (87%) rename src/{ => components}/header/index.js (90%) rename src/{ => components}/home/index.css (90%) rename src/{ => components}/home/index.js (98%) rename src/{ => components}/icons/github.svg (100%) rename src/{ => components}/icons/lyrite-logo.svg (100%) rename src/{ => components}/icons/quill.svg (100%) rename src/{ => components}/layout/index.css (83%) rename src/{ => components}/layout/index.js (94%) rename src/{ => components}/lyrics/edit.css (93%) rename src/{ => components}/lyrics/edit.js (86%) rename src/{ => components}/lyrics/index.css (90%) rename src/{ => components}/lyrics/index.js (97%) rename src/{ => components}/modal/index.css (94%) rename src/{ => components}/modal/index.js (92%) rename src/{ => components}/modal/title.css (71%) rename src/{ => components}/modal/title.js (97%) rename src/{ => components}/tools/index.css (94%) rename src/{ => components}/tools/index.js (99%) rename src/{ => components}/tools/tooltip.css (91%) diff --git a/src/error/index.css b/src/components/error/index.css similarity index 77% rename from src/error/index.css rename to src/components/error/index.css index 9b0b7db..30c2687 100644 --- a/src/error/index.css +++ b/src/components/error/index.css @@ -1,4 +1,4 @@ -@value fontSerif from "../index.css"; +@value fontSerif from "../../index.css"; .error { margin: 1em 0; diff --git a/src/error/index.js b/src/components/error/index.js similarity index 91% rename from src/error/index.js rename to src/components/error/index.js index c5e7d0c..d4d937e 100644 --- a/src/error/index.js +++ b/src/components/error/index.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; diff --git a/src/header/index.css b/src/components/header/index.css similarity index 87% rename from src/header/index.css rename to src/components/header/index.css index c4d7267..7de1008 100644 --- a/src/header/index.css +++ b/src/components/header/index.css @@ -1,5 +1,5 @@ -@value * as colors from "../palette.css"; -@value animDur from "../index.css"; +@value * as colors from "../../palette.css"; +@value animDur from "../../index.css"; .header { position: relative; @@ -62,5 +62,5 @@ } .title { - composes: title from "../index.css"; + composes: title from "../../index.css"; } diff --git a/src/header/index.js b/src/components/header/index.js similarity index 90% rename from src/header/index.js rename to src/components/header/index.js index 4f04ae3..20f2593 100644 --- a/src/header/index.js +++ b/src/components/header/index.js @@ -1,13 +1,13 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; import tools from "../tools"; import logo from "../icons/lyrite-logo.svg"; -import animResolve from "../lib/animResolve"; +import animResolve from "../../lib/animResolve"; export default { oncreate : (vnode) => { diff --git a/src/home/index.css b/src/components/home/index.css similarity index 90% rename from src/home/index.css rename to src/components/home/index.css index d8d90b4..f8fa377 100644 --- a/src/home/index.css +++ b/src/components/home/index.css @@ -1,5 +1,5 @@ -@value * as colors from "../palette.css"; -@value fontSans, fontSerif, animDur from "../index.css"; +@value * as colors from "../../palette.css"; +@value fontSans, fontSerif, animDur from "../../index.css"; .home { padding: 1em 0.5em 0; @@ -22,7 +22,7 @@ } .title { - composes: title from "../index.css"; + composes: title from "../../index.css"; font-size: 3em; font-weight: bold; @@ -91,7 +91,7 @@ } .loadBtn { - composes: button from "../index.css"; + composes: button from "../../index.css"; color: #fff !important; --color: colors.cta; diff --git a/src/home/index.js b/src/components/home/index.js similarity index 98% rename from src/home/index.js rename to src/components/home/index.js index ab691fd..fb3d9bc 100644 --- a/src/home/index.js +++ b/src/components/home/index.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; diff --git a/src/icons/github.svg b/src/components/icons/github.svg similarity index 100% rename from src/icons/github.svg rename to src/components/icons/github.svg diff --git a/src/icons/lyrite-logo.svg b/src/components/icons/lyrite-logo.svg similarity index 100% rename from src/icons/lyrite-logo.svg rename to src/components/icons/lyrite-logo.svg diff --git a/src/icons/quill.svg b/src/components/icons/quill.svg similarity index 100% rename from src/icons/quill.svg rename to src/components/icons/quill.svg diff --git a/src/layout/index.css b/src/components/layout/index.css similarity index 83% rename from src/layout/index.css rename to src/components/layout/index.css index adf18bb..71224b2 100644 --- a/src/layout/index.css +++ b/src/components/layout/index.css @@ -1,4 +1,4 @@ -@value animDur from "../index.css"; +@value animDur from "../../index.css"; .github { display: block; diff --git a/src/layout/index.js b/src/components/layout/index.js similarity index 94% rename from src/layout/index.js rename to src/components/layout/index.js index 4857a46..43351db 100644 --- a/src/layout/index.js +++ b/src/components/layout/index.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; import header from "../header"; diff --git a/src/lyrics/edit.css b/src/components/lyrics/edit.css similarity index 93% rename from src/lyrics/edit.css rename to src/components/lyrics/edit.css index ca1679d..a2e0711 100644 --- a/src/lyrics/edit.css +++ b/src/components/lyrics/edit.css @@ -1,4 +1,4 @@ -@value animDur from "../index.css"; +@value animDur from "../../index.css"; .edit { position: absolute; diff --git a/src/lyrics/edit.js b/src/components/lyrics/edit.js similarity index 86% rename from src/lyrics/edit.js rename to src/components/lyrics/edit.js index f00b4ee..b141807 100644 --- a/src/lyrics/edit.js +++ b/src/components/lyrics/edit.js @@ -1,9 +1,9 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./edit.css"; -import animResolve from "../lib/animResolve"; +import animResolve from "../../lib/animResolve"; export default { onbeforeremove : (vnode) => diff --git a/src/lyrics/index.css b/src/components/lyrics/index.css similarity index 90% rename from src/lyrics/index.css rename to src/components/lyrics/index.css index d0d1d88..c2ab462 100644 --- a/src/lyrics/index.css +++ b/src/components/lyrics/index.css @@ -1,5 +1,5 @@ -@value * as colors from "../palette.css"; -@value animDur from "../index.css"; +@value * as colors from "../../palette.css"; +@value animDur from "../../index.css"; .lyredit { position: relative; diff --git a/src/lyrics/index.js b/src/components/lyrics/index.js similarity index 97% rename from src/lyrics/index.js rename to src/components/lyrics/index.js index 2d0782b..7960ff3 100644 --- a/src/lyrics/index.js +++ b/src/components/lyrics/index.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; import edit from "./edit"; diff --git a/src/modal/index.css b/src/components/modal/index.css similarity index 94% rename from src/modal/index.css rename to src/components/modal/index.css index 76bb341..88b85e2 100644 --- a/src/modal/index.css +++ b/src/components/modal/index.css @@ -1,5 +1,5 @@ -@value * as colors from "../palette.css"; -@value animDur from "../index.css"; +@value * as colors from "../../palette.css"; +@value animDur from "../../index.css"; .modal { position: fixed; diff --git a/src/modal/index.js b/src/components/modal/index.js similarity index 92% rename from src/modal/index.js rename to src/components/modal/index.js index 79955d7..021ba53 100644 --- a/src/modal/index.js +++ b/src/components/modal/index.js @@ -1,7 +1,7 @@ import m from "mithril"; -import state from "../state"; -import animResolve from "../lib/animResolve"; +import state from "../../state"; +import animResolve from "../../lib/animResolve"; import css from "./index.css"; import title from "./title"; diff --git a/src/modal/title.css b/src/components/modal/title.css similarity index 71% rename from src/modal/title.css rename to src/components/modal/title.css index 54f2331..f2c688c 100644 --- a/src/modal/title.css +++ b/src/components/modal/title.css @@ -1,4 +1,4 @@ -@value * as colors from "../palette.css"; +@value * as colors from "../../palette.css"; .label { display: block; @@ -19,13 +19,13 @@ } .add { - composes: button from "../index.css"; + composes: button from "../../index.css"; --color: colors.cta; color: #fff; } .cancel { - composes: button from "../index.css"; + composes: button from "../../index.css"; color: #999; } \ No newline at end of file diff --git a/src/modal/title.js b/src/components/modal/title.js similarity index 97% rename from src/modal/title.js rename to src/components/modal/title.js index 82127bf..21656ae 100644 --- a/src/modal/title.js +++ b/src/components/modal/title.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./title.css"; diff --git a/src/tools/index.css b/src/components/tools/index.css similarity index 94% rename from src/tools/index.css rename to src/components/tools/index.css index be9f461..816484b 100644 --- a/src/tools/index.css +++ b/src/components/tools/index.css @@ -1,5 +1,5 @@ -@value * as colors from "../palette.css"; -@value animDur from "../index.css"; +@value * as colors from "../../palette.css"; +@value animDur from "../../index.css"; .tools { position: absolute; @@ -64,7 +64,7 @@ } .button { - composes: button from "../index.css"; + composes: button from "../../index.css"; font-family: monospace; } diff --git a/src/tools/index.js b/src/components/tools/index.js similarity index 99% rename from src/tools/index.js rename to src/components/tools/index.js index debd3bf..2074ed9 100644 --- a/src/tools/index.js +++ b/src/components/tools/index.js @@ -1,6 +1,6 @@ import m from "mithril"; -import state from "../state"; +import state from "../../state"; import css from "./index.css"; import tooltipCss from "./tooltip.css"; diff --git a/src/tools/tooltip.css b/src/components/tools/tooltip.css similarity index 91% rename from src/tools/tooltip.css rename to src/components/tools/tooltip.css index 6773f8f..47ef78e 100644 --- a/src/tools/tooltip.css +++ b/src/components/tools/tooltip.css @@ -1,4 +1,4 @@ -@value * as colors from "../palette.css"; +@value * as colors from "../../palette.css"; .tooltip { position: fixed; diff --git a/src/lib/animResolve.js b/src/lib/animResolve.js index 5e1e16f..6ed8f74 100644 --- a/src/lib/animResolve.js +++ b/src/lib/animResolve.js @@ -11,6 +11,7 @@ export default function(dom, className) { resd = true; rej(false); + console.log("anim resolve timeout"); }, MAX_TIMEOUT); dom.addEventListener("animationend", () => { diff --git a/src/routes.js b/src/routes.js index 2610102..1812fd2 100644 --- a/src/routes.js +++ b/src/routes.js @@ -4,10 +4,10 @@ import m from "mithril"; import state from "./state"; -import layout from "./layout"; -import lyrics from "./lyrics"; -import error from "./error"; -import home from "./home"; +import layout from "./components/layout"; +import lyrics from "./components/lyrics"; +import error from "./components/error"; +import home from "./components/home"; export default { "/" : { diff --git a/src/state/song.js b/src/state/song.js index 9468f74..524a4d0 100644 --- a/src/state/song.js +++ b/src/state/song.js @@ -4,6 +4,7 @@ import slugify from "slugify"; const titleSplit = "\n\n---\n\n"; +// todo: why require const songs = [ require("../songs/smells-like-teen-spirit.txt"), require("../songs/judy-is-a-punk.txt"),