From ef78bc6a084f92b4794e987b5832240d85b6479e Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 22 Jul 2020 14:05:15 +0200 Subject: refactor app using babel module-resolver --- animism-align/frontend/common/app.css | 354 --------------------- .../common/copyToClipboardButton.component.js | 24 -- animism-align/frontend/common/fonts.css | 55 ---- animism-align/frontend/common/form.component.js | 222 ------------- animism-align/frontend/common/form.css | 327 ------------------- .../frontend/common/imageCrop.component.js | 41 --- animism-align/frontend/common/index.js | 31 -- animism-align/frontend/common/loader.css | 125 -------- .../frontend/common/menubutton.component.js | 133 -------- .../frontend/common/miscellaneous.component.js | 82 ----- animism-align/frontend/common/miscellaneous.css | 18 -- animism-align/frontend/common/modal.component.js | 9 - animism-align/frontend/common/modal.css | 20 -- animism-align/frontend/common/slider.component.js | 115 ------- animism-align/frontend/common/table.component.js | 128 -------- animism-align/frontend/common/table.css | 96 ------ .../frontend/common/tableIndex.component.js | 129 -------- animism-align/frontend/common/upload.css | 26 -- animism-align/frontend/common/upload.helpers.js | 192 ----------- .../frontend/common/uploadImage.component.js | 74 ----- 20 files changed, 2201 deletions(-) delete mode 100644 animism-align/frontend/common/app.css delete mode 100644 animism-align/frontend/common/copyToClipboardButton.component.js delete mode 100644 animism-align/frontend/common/fonts.css delete mode 100644 animism-align/frontend/common/form.component.js delete mode 100644 animism-align/frontend/common/form.css delete mode 100644 animism-align/frontend/common/imageCrop.component.js delete mode 100644 animism-align/frontend/common/index.js delete mode 100644 animism-align/frontend/common/loader.css delete mode 100644 animism-align/frontend/common/menubutton.component.js delete mode 100644 animism-align/frontend/common/miscellaneous.component.js delete mode 100644 animism-align/frontend/common/miscellaneous.css delete mode 100644 animism-align/frontend/common/modal.component.js delete mode 100644 animism-align/frontend/common/modal.css delete mode 100644 animism-align/frontend/common/slider.component.js delete mode 100644 animism-align/frontend/common/table.component.js delete mode 100644 animism-align/frontend/common/table.css delete mode 100644 animism-align/frontend/common/tableIndex.component.js delete mode 100644 animism-align/frontend/common/upload.css delete mode 100644 animism-align/frontend/common/upload.helpers.js delete mode 100644 animism-align/frontend/common/uploadImage.component.js (limited to 'animism-align/frontend/common') diff --git a/animism-align/frontend/common/app.css b/animism-align/frontend/common/app.css deleted file mode 100644 index 362b933..0000000 --- a/animism-align/frontend/common/app.css +++ /dev/null @@ -1,354 +0,0 @@ -* { box-sizing: border-box; } -html, body { - margin: 0; - padding: 0; - width: 100%; - height: 100%; -} -body { - background: #000; - color: #ddd; - overflow: hidden; - font-family: 'Roboto', sans-serif; - font-size: 0.875rem; - height: 100%; - width: 100%; -} -.gray { - color: #888; -} - -/* layout */ - -.container { - height: 100%; - width: 100%; -} -.app { - /*display: flex;*/ - height: 100%; - width: 100%; -} -.app > div { - display: flex; - flex-direction: column; - height: 100%; - width: 100%; -} -.app .body { - display: flex; - flex-direction: row; - flex-grow: 1; - position: relative; - height: 100%; - width: 100%; -} - -.row { - display: flex; - flex-direction: row; - justify-content: flex-start; - align-items: flex-start; -} -.row > div { - margin-right: 1.5rem; -} -.row > div:last-child { - margin-right: 0; -} - - -.row.menubar { - background: #324; - padding: 0.5rem; - justify-content: flex-end; - margin-bottom: 1rem; -} -.menubar > :first-child { - flex: 1; -} - -/* lists */ - -ul { - margin: 0.75rem 0; -} -li { - line-height: 1.5; -} - -/* headings */ - -h1 { - color: #eee; - margin-bottom: 1.25rem; - font-size: 1.5rem; - font-weight: normal; -} -div:first-child > h1:first-child, -.menuButtons + div > h1:first-child { - margin-top: 0; -} -h2 { - color: #eee; - font-size: 1.25rem; - font-weight: normal; -} -h3 { - color: #eee; - margin-top: 0; - margin-bottom: 1.25rem; - font-size: 1.0rem; - font-weight: normal; -} -p { - margin: 1.25rem 0; - line-height: 1.5; -} -.byline { - color: #888; - font-size: 0.75rem; - margin-top: 0.25rem; - margin-bottom: 1.25rem; -} - -/* links */ - -b { - color: #fff; -} -a { - text-decoration: underline; - color: #8df; -} - -/* menu button */ - -.menuButtons { - width: 3.5rem; - min-height: 18rem; - padding: 0 1.0rem 0 1.0rem; -} -.menuButton { - position: relative; - text-align: center; - text-transform: uppercase; - font-size: 0.625rem; - color: #ddd; - text-decoration: none; - cursor: pointer; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - width: 2.5rem; - margin-bottom: 0.75rem; -} -.menuButton .icon { - background-color: #101; - width: 2.5rem; - height: 2.5rem; - border: 1px solid; - border-color: #888; - margin-bottom: 0.3rem; - display: flex; - justify-content: center; - align-items: center; - transition: border-color 0.1s; - border-radius: 0.125rem; -} -.menuButton svg { - width: 80%; - fill: #888; -} -.menuButton:hover .icon { - background-color: #000; - border-color: #fff; -} -.menuButton:hover svg { - fill: #fff; -} - -.menuButton.small { - width: 2.0rem; - margin-bottom: 0; - margin-right: 0.1875rem; -} -.menuButton.small .icon { - border: 0; - border-color: #888; - margin-bottom: 0; - width: 2.0rem; - height: 2.0rem; - border-radius: 0.0625rem; -} -.menuButton.small svg { - fill: #888; - width: 1.75rem; - height: 1.75rem; -} -.menuButton.small .icon:hover { - border-color: #11f; - background-color: #11f; -} -.menuButton.small:hover svg { - fill: #fff; -} -.results.th .menuButton.small { - width: 1.5rem; -} -.results.th .menuButton.small .icon { - width: 1.5rem; - height: 1.5rem; -} -.results.th .menuButton.small svg { - width: 1.25rem; - height: 1.25rem; -} - -.menuButton.small.active .icon { - border-color: #11f; - background-color: #11f; -} -.menuButton.small.active svg { - fill: #fff; -} -.menuButton.small.active:hover .icon { - border-color: #fff; - background-color: #11f; -} -.menuButton.small.active:hover svg { - fill: #fff; -} - -/* rows - like a table */ - -.rows { - width: 100%; -} -.rows .row { - width: 100%; -} -.rows .row:nth-of-type(2n+1) { - background: #f8f8f8; -} -.rows .row:nth-of-type(2n+2) { - background: #eeeeee; -} -.rows .row:hover { - background: #d8d8d8; -} -.rows .row > div, -.rows .row a > div { - padding: 0.75rem; - overflow: hidden; - text-overflow: ellipsis; - margin: 0; -} -.rows .row div.title { - width: 10rem; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} -.rows .row div.string, -.rows .row div.str { - min-width: 6rem; -} -.rows .row div.bool { - width: 4rem; - overflow: visible; - text-align: center; -} -.rows .row div.color { - width: 4rem; - overflow: visible; - text-align: center; -} -.rows .row div.date { - min-width: 10rem; -} -.rows .row div.int, -.rows .row div.float { - text-align: right; - min-width: 6rem; -} -.rows .row.heading div.int, -.rows .row.heading div.float { - text-align: center; -} -.rows .row div.text { - flex: 1; - max-width: 20rem; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.rows .row.heading div { - text-transform: capitalize; - font-weight: bold; - background: #f8f8f8; -} -.rows .row.heading:hover { - background: #f8f8f8; -} - -/* misc ui */ - -pre, code, .license { - font-family: Menlo, monospace; - font-size: 0.75rem; - line-height: 2; -} -.swatch { - display: inline-block; - width: 0.75rem; - height: 0.75rem; - border: 1px solid #333; -} -.dot { - display: inline-block; - width: 0.5rem; - height: 0.5rem; - border-radius: 50%; -} -.light { - color: #888; -} -.pill { - display: inline-block; - padding: 0.125rem; - width: 2.5rem; - text-align: center; - border-radius: 0.5rem; - font-size: 0.75rem; - text-transform: uppercase; - font-weight: bold; -} -.pill.yes { - background: #11f; - color: #fff; -} -.pill.no { - color: #ccc; - border: 1px solid; -} - -/* columns (of tags) */ - -.form .columnCells { - padding-top: 0.25rem -} -.columnCells .column { - margin-top: 0.25rem; -} -.columnCells .column > div { - max-width: 100%; - padding: 0 0.375rem 0.375rem 0; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.columnCells .selected { - color: #11f; -} \ No newline at end of file diff --git a/animism-align/frontend/common/copyToClipboardButton.component.js b/animism-align/frontend/common/copyToClipboardButton.component.js deleted file mode 100644 index cfe7103..0000000 --- a/animism-align/frontend/common/copyToClipboardButton.component.js +++ /dev/null @@ -1,24 +0,0 @@ -import React, { Component } from 'react'; -import { writeToClipboard } from '../util' - -export default class CopyToClipboardButton extends Component { - state = { - copied: false, - } - - handleClick() { - writeToClipboard(this.props.data) - this.setState({ copied: true }) - } - - render() { - return ( - - ) - } -} diff --git a/animism-align/frontend/common/fonts.css b/animism-align/frontend/common/fonts.css deleted file mode 100644 index c782885..0000000 --- a/animism-align/frontend/common/fonts.css +++ /dev/null @@ -1,55 +0,0 @@ -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Bold.ttf') format('truetype'); - font-weight: bold; -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-BoldItalic.ttf') format('truetype'); - font-weight: bold; - font-style: italic; -} -/* -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Light.ttf') format('truetype'); - font-weight: 100; -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-LightItalic.ttf') format('truetype'); - font-weight: 100; -} -*/ -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Medium.ttf') format('truetype'); - font-weight: 300; -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-MediumItalic.ttf') format('truetype'); - font-style: italic; - font-weight: 300; -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Regular.ttf') format('truetype'); -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Italic.ttf') format('truetype'); - font-style: italic; -} -/* -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-Thin.ttf') format('truetype'); - font-weight: 100; -} -@font-face { - font-family: 'Roboto'; - src: url('/static/fonts/Roboto-ThinItalic.ttf') format('truetype'); - font-weight: 100; -} -*/ \ No newline at end of file diff --git a/animism-align/frontend/common/form.component.js b/animism-align/frontend/common/form.component.js deleted file mode 100644 index c38a299..0000000 --- a/animism-align/frontend/common/form.component.js +++ /dev/null @@ -1,222 +0,0 @@ -import React, { Component } from 'react'; -import { courtesyS } from '../util' - -export const TextInput = props => ( - -) - -export const LabelDescription = props => ( - -) - -export const NumberInput = props => ( - -) - -export const ColorInput = props => ( - -) - -export const TextArea = props => ( -