diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-08-23 11:32:57 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-09-28 12:54:52 +0200 |
commit | 6c35f796c659a6a3d839d4176b833db361f5678d (patch) | |
tree | c5a3628baf89fcee1b86fc136b014be439e69c7a | |
parent | 1864fc0aaf7d6dba2e730cf74a5e154df4e6d18d (diff) | |
download | haketilo-hydrilla-6c35f796c659a6a3d839d4176b833db361f5678d.tar.gz haketilo-hydrilla-6c35f796c659a6a3d839d4176b833db361f5678d.zip |
add styling to buttons and file input
4 files changed, 38 insertions, 9 deletions
diff --git a/src/hydrilla/proxy/web_ui/templates/base.html.jinja b/src/hydrilla/proxy/web_ui/templates/base.html.jinja index eb9680f..b41a106 100644 --- a/src/hydrilla/proxy/web_ui/templates/base.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/base.html.jinja @@ -56,6 +56,22 @@ in a proprietary work, I am not going to enforce this in court. background-color: #fcc; } + .green-button { + background-color: #4caf50; + border: none; + border-radius: 2px; + color: white; + text-align: center; + text-decoration: none; + display: inline-block; + padding: 5px 10px; + -moz-user-select: none; + user-select: none; + cursor: pointer; + font: 400 0.9em sans-serif; + margin: 2px; + } + .hide { display: none !important; } @@ -70,7 +86,7 @@ in a proprietary work, I am not going to enforce this in court. ul#nav > li { list-style-type: none; - background-color: #70AF70; + background-color: #70af70; font-size: 115%; padding: 10px; display: inline-block; diff --git a/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja b/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja index 0eb5149..1f3c246 100644 --- a/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/packages__load_from_disk.html.jinja @@ -21,19 +21,30 @@ in a proprietary work, I am not going to enforce this in court. #} {%- extends "base.html.jinja" %} {% block title %} {{ _('web_ui.packages.load_from_disk.title') }} {% endblock %} +{% block style %} + {{ super() }} + + input[type="file"]::-webkit-file-selector-button, + input[type="file"]::file-selector-button { + display: none; + } +{% endblock %} {% block main %} + <h3>{{ _('web_ui.packages.load_from_disk.heading') }}</h3> <form method="POST" enctype="multipart/form-data"> <div> - <label for="packages_zipfile"> - {{ _('web_ui.packages.load_from_disk.select_malcontent_zipfile') }} - </label> + <input id="packages_zipfile" name="packages_zipfile" type="file" + accept=".zip,application/zip" required=""> </div> <div> - <input id="packages_zipfile" name="packages_zipfile" type="file" - required=""> + <label class="green-button" for="packages_zipfile"> + {{ _('web_ui.packages.load_from_disk.choose_zipfile_button') }} + </label> </div> <div> - <button>{{ _('web_ui.packages.load_from_disk.install_button') }}</button> + <button class="green-button"> + {{ _('web_ui.packages.load_from_disk.install_button') }} + </button> </div> </form> {%- endblock %} diff --git a/src/hydrilla/proxy/web_ui/templates/repos.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos.html.jinja index 05c948e..3e61a83 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos.html.jinja @@ -29,7 +29,7 @@ in a proprietary work, I am not going to enforce this in court. {% block main %} <h3>{{ _('web_ui.repos.heading') }}</h3> <div> - <a href="{{ url_for('.add_repo_get') }}" class="button"> + <a href="{{ url_for('.add_repo_get') }}" class="green-button"> {{ _('web_ui.repos.add_repo_button') }} </a> </div> diff --git a/src/hydrilla/proxy/web_ui/templates/repos__add.html.jinja b/src/hydrilla/proxy/web_ui/templates/repos__add.html.jinja index cbe7105..3fdcbd3 100644 --- a/src/hydrilla/proxy/web_ui/templates/repos__add.html.jinja +++ b/src/hydrilla/proxy/web_ui/templates/repos__add.html.jinja @@ -56,7 +56,9 @@ in a proprietary work, I am not going to enforce this in court. <input id="url_field" name="url" required=""> </div> <div> - <button class="button">{{ _('web_ui.repos.add.submit_button') }}</button> + <button class="green-button"> + {{ _('web_ui.repos.add.submit_button') }} + </button> </div> </form> {% endblock %} |