aboutsummaryrefslogtreecommitdiff
path: root/html/repo_query.html
diff options
context:
space:
mode:
Diffstat (limited to 'html/repo_query.html')
-rw-r--r--html/repo_query.html148
1 files changed, 148 insertions, 0 deletions
diff --git a/html/repo_query.html b/html/repo_query.html
new file mode 100644
index 0000000..73b0f00
--- /dev/null
+++ b/html/repo_query.html
@@ -0,0 +1,148 @@
+#IF !REPO_QUERY_LOADED
+#DEFINE REPO_QUERY_LOADED
+<!--
+ SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
+
+ Show available repositories and allow querying them for resources.
+
+ 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.
+ -->
+
+#INCLUDE html/install.html
+
+#LOADCSS html/reset.css
+#LOADCSS html/base.css
+#LOADCSS html/grid.css
+<style>
+ .repo_query_top_text {
+ text-align: center;
+ margin: 0.4em;
+ }
+ .repo_queried_url {
+ text-decoration: underline;
+ }
+
+ .repo_query_repo_li {
+ margin: 0;
+ background-color:#dadada;
+ }
+ .repo_query_repo_li > .repo_query_entry {
+ padding: 0.2em;
+ }
+ .repo_query_repo_li > .repo_query_results_list {
+ background-color: #f0f0f0;
+ }
+
+ .repo_query_result_li {
+ margin: 0;
+ padding: 0.2em;
+ }
+ .repo_query_result_li:nth-child(2n) {
+ background-color:#dadada;
+ }
+
+ .repo_query_entry {
+ display: flex;
+ align-items: center;
+ }
+ .repo_query_entry_info {
+ display: grid;
+ grid-template-columns: auto;
+ flex: 1 1 auto;
+ min-width: 0;
+ }
+ .repo_query_entry_info > * {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .repo_query_entry button {
+ white-space: nowrap;
+ }
+
+ .repo_query_mapping_id {
+ font-size: 80%;
+ font-style: italic;
+ }
+
+ .repo_query_bottom_buttons {
+ margin: 1em;
+ text-align: center;
+ }
+</style>
+<template>
+ <div id="repo_query" data-template="main_div"
+ class="grid_1 repo_query_main_div">
+ <div data-template="repos_list_container">
+ <div class="repo_query_top_text">
+ Browsing custom resources for
+ <span data-template="url_span" class="repo_queried_url"></span>.
+ </div>
+ <ul data-template="repos_list"></ul>
+ <div class="repo_query_bottom_buttons">
+ <button data-template="cancel_but">Cancel</button>
+ </div>
+ </div>
+ <div data-template="install_view_container" class="hide">
+ <!-- Install view will be dynamically inserted here. -->
+ </div>
+ </div>
+
+ <li id="repo_query_single_repo" data-template="main_li"
+ class="repo_query_repo_li">
+ <div class="top_line"></div>
+ <div class="repo_query_entry">
+ <div class="repo_query_entry_info">
+ <label data-template="repo_url_label"></label>
+ </div>
+ <span class="repo_query_buttons">
+ <button data-template="show_results_but">
+ Show results
+ </button>
+ <button data-template="hide_results_but" class="hide">
+ Hide results
+ </button>
+ </span>
+ </div>
+ <div data-template="list_container" class="hide repo_query_results_list">
+ <span data-template="info_span">Querying repository...</span>
+ <ul data-template="results_list" class="hide"></ul>
+ </div>
+ </li>
+
+ <li id="repo_query_single_result" data-template="main_li"
+ class="repo_query_entry repo_query_result_li">
+ <div class="repo_query_entry_info">
+ <span data-template="mapping_name"></span>
+ <span data-template="mapping_id" class="repo_query_mapping_id"></span>
+ </div>
+ <span><button data-template="install_but">Install preview</button></span>
+ </li>
+</template>
+#ENDIF