aboutsummaryrefslogtreecommitdiff
path: root/html/dialog.html
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-08 14:47:39 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-08 14:48:12 +0100
commit448820a11634de6ec356c77b8c7c0cf4937b344c (patch)
tree06147c3d40475ba863ccea9904ba4cdfe1d66db0 /html/dialog.html
parent372d24ea3a52e376f953deeffeb7847d008b81c9 (diff)
downloadbrowser-extension-448820a11634de6ec356c77b8c7c0cf4937b344c.tar.gz
browser-extension-448820a11634de6ec356c77b8c7c0cf4937b344c.zip
work on UI components
This commit introduces some HTML and javascript (and tests for it) to use in constructing the new UI. This is partial work that is not yet finished.
Diffstat (limited to 'html/dialog.html')
-rw-r--r--html/dialog.html72
1 files changed, 72 insertions, 0 deletions
diff --git a/html/dialog.html b/html/dialog.html
new file mode 100644
index 0000000..d4e69b9
--- /dev/null
+++ b/html/dialog.html
@@ -0,0 +1,72 @@
+#IF !DIALOG_LOADED
+#DEFINE DIALOG_LOADED
+<!--
+ SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+ Show an error/info/question dalog.
+
+ This file is part of Haketilo.
+
+ Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
+
+ File is dual-licensed. You can choose either GPLv3+, CC BY-SA or both.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+ I, Wojtek Kosior, thereby promise not to sue for violation of this file's
+ licenses. Although I request that you do not make use of this code in a
+ proprietary program, I am not going to enforce this in court.
+ -->
+
+<!--
+ This is not a standalone page. This file is meant to be imported into other
+ HTML code.
+ -->
+
+#LOADCSS html/reset.css
+#LOADCSS html/base.css
+<style>
+ .left_space {
+ margin-left: 3em;
+ }
+ .right_space {
+ margin-right: 3em;
+ }
+ .dialog_buts {
+ margin-right: auto;
+ margin-left: auto;
+ max-width: -moz-fit-content;
+ max-width: fit-content;
+ }
+ .dialog_msg {
+ margin-bottom: 2em;
+ text-align: center;
+ }
+ .dialog_main_div {
+ margin: 1.4em;
+ }
+</style>
+<template>
+ <div id="dialog" data-template="main_div" class="dialog_main_div">
+ <div data-template="msg" class="dialog_msg"></div>
+ <div data-template="ask_buts" class="dialog_buts">
+ <button data-template="yes_but" class="right_space">Yes</button>
+ <button data-template="no_but" class="left_space">No</button>
+ </div>
+ <div data-template="conf_buts" class="dialog_buts">
+ <button data-template="ok_but">Ok</button>
+ </div>
+ </div>
+</template>
+#ENDIF