From b48f2d6079740c446b59d8f70c115213046c4732 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 24 Apr 2020 14:18:21 +0300 Subject: Update .gitignore file --- .gitignore | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.gitignore b/.gitignore index 8e8c01b..5707130 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,18 @@ *.py~ + +# Distribution / packaging build/ +__pycache__/ +eggs/ +.eggs/ +*.egg-info/ +*.egg + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ \ No newline at end of file -- cgit v1.2.3 From 73d36d4b91cd0ac7b2112f20eb7d88acd981827a Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Fri, 24 Apr 2020 14:18:48 +0300 Subject: Make package data accessible from `setup.py` Based off: https://stackoverflow.com/a/39024947/3668255 --- bh20simplewebuploader/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 bh20simplewebuploader/__init__.py diff --git a/bh20simplewebuploader/__init__.py b/bh20simplewebuploader/__init__.py new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 8e8df40378244daf71edb8d3a469d7cbe59ddcdc Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Sat, 25 Apr 2020 19:28:52 +0300 Subject: Wrap extra flags to cater for non-bash terminals `pip install -e .[web]` does not work on zsh. Wrapping `.web` in quotes makes the command in all terminals --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b0b22ff..8b78ebd 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,7 @@ To run it locally: ``` virtualenv --python python3 venv . venv/bin/activate -pip install -e .[web] +pip install -e ".[web]" env FLASK_APP=bh20simplewebuploader/main.py flask run ``` -- cgit v1.2.3 From 8ea8f7c2ed50bb089df26ae497e9d274c04705c8 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Sat, 25 Apr 2020 19:34:55 +0300 Subject: Put CSS code into it's own separate CSS file --- bh20simplewebuploader/static/main.css | 155 ++++++++++++++++++++++++++++++ bh20simplewebuploader/templates/form.html | 145 +--------------------------- 2 files changed, 156 insertions(+), 144 deletions(-) create mode 100644 bh20simplewebuploader/static/main.css diff --git a/bh20simplewebuploader/static/main.css b/bh20simplewebuploader/static/main.css new file mode 100644 index 0000000..30b1d04 --- /dev/null +++ b/bh20simplewebuploader/static/main.css @@ -0,0 +1,155 @@ +hr { + margin: auto 0; +} + +body { + color: #101010; + background-color: #F9EDE1; + margin: 0; +} + +h1, h2, h3, h4 { + font-family: 'Roboto Slab', serif; + color: darkblue; +} + +h1 { + text-align: center; +} + +p { + color: #505050; + font-style: italic; +} +.header { + background-color: white; + margin: 0 auto; + padding: 20px; + text-align: center; + height: 150px; +} + +.logo { + float: right; +} + +p, form, .about, .footer { + font-family: 'Raleway', sans-serif; + line-height: 1.5; +} + +form h4 { + text-transform: 'uppercase'; +} + +.intro, form { + padding: 20px; +} + +.intro { + background-color: lightgrey; + margin: 0 auto; + padding: 20px; +} + +.about { + background-color: lightgrey; + margin: 0 auto; + padding: 20px; +} +.footer { + background-color: white; + margin: 0 auto; +} + +span.dropt {border-bottom: thin dotted; background: #ffeedd;} +span.dropt:hover {text-decoration: none; background: #ffffff; z-index: 6; } + +.grid-container { + display: grid; + grid-template-columns: repeat(4, 1fr); + grid-template-rows: auto; + row-gap:5px; + grid-template-areas: + "a a b b" + "a a c c" + "a a d d" + "e e e e" + "f f f f"; + grid-auto-flow: column; +} + +.intro { + grid-area: a; +} + +.fasta-file-select { + padding: 1em; + grid-area: b; +} + +.metadata { + padding: 1em; + grid-area: c; +} +.metadata_upload_form { + padding: 1em; + grid-area: c; +} + +#metadata_upload_form_spot { + grid-area: d; +} + +#metadata_fill_form_spot { + grid-area: e; +} + +#metadata_fill_form { + column-count: 4; + margin-top: 0.5em; + column-width: 250px; +} + +.record { + display: flex; + flex-direction: column; + border: solid 1px #808080; + padding: 1em; + background: #F8F8F8; + margin-bottom: 1em; + -webkit-column-break-inside: avoid; /* Chrome, Safari, Opera */ + page-break-inside: avoid; /* Firefox */ + break-inside: avoid; +} + +.record label { + font-size: small; + margin-top: 10px; +} + +.submit { + grid-area: f; + width: 17em; + justify-self: center; +} + +footer { + display: block; + width: 100%; +} + +.sponsors { + width: inherit; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: space-around; +} + +@media only screen and (max-device-width: 480px) { + .grid-container { + display: flex; + flex-direction: column; + } +} diff --git a/bh20simplewebuploader/templates/form.html b/bh20simplewebuploader/templates/form.html index 02ae84d..f24af0e 100644 --- a/bh20simplewebuploader/templates/form.html +++ b/bh20simplewebuploader/templates/form.html @@ -1,152 +1,9 @@ - -
+