Project

General

Profile

Download (4.21 KB) Statistics
| Branch: | Tag: | Revision:

haketilo / html / repo_query.html @ 4c6a2323

1
#IF !REPO_QUERY_LOADED
2
#DEFINE REPO_QUERY_LOADED
3
<!--
4
    SPDX-License-Identifier: GPL-3.0-or-later OR CC-BY-SA-4.0
5

    
6
    Show available repositories and allow querying them for resources.
7

    
8
    This file is part of Haketilo.
9

    
10
    Copyright (C) 2022 Wojtek Kosior <koszko@koszko.org>
11

    
12
    File is dual-licensed. You can choose either GPLv3+, CC BY-SA or both.
13

    
14
    This program is free software: you can redistribute it and/or modify
15
    it under the terms of the GNU General Public License as published by
16
    the Free Software Foundation, either version 3 of the License, or
17
    (at your option) any later version.
18

    
19
    This program is distributed in the hope that it will be useful,
20
    but WITHOUT ANY WARRANTY; without even the implied warranty of
21
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
    GNU General Public License for more details.
23

    
24
    You should have received a copy of the GNU General Public License
25
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
26

    
27
    I, Wojtek Kosior, thereby promise not to sue for violation of this file's
28
    licenses. Although I request that you do not make use of this code in a
29
    proprietary program, I am not going to enforce this in court.
30
  -->
31

    
32
<!--
33
    This is not a standalone page. This file is meant to be imported into other
34
    HTML code.
35
  -->
36

    
37
#INCLUDE html/install.html
38

    
39
#LOADCSS html/reset.css
40
#LOADCSS html/base.css
41
<style>
42
  .repo_query_top_text {
43
      text-align: center;
44
      padding: 0.4em;
45
      text-overflow: ellipsis;
46
      overflow: hidden;
47
  }
48
  .repo_queried_url {
49
      text-decoration: underline;
50
      white-space: nowrap;
51
  }
52

    
53
  .repo_query_repo_li {
54
      margin: 0;
55
      background-color:#dadada;
56
  }
57
  .repo_query_repo_li > .repo_query_entry {
58
      padding: 0.2em;
59
  }
60
  .repo_query_repo_li > .repo_query_results_list {
61
      background-color: #f0f0f0;
62
  }
63

    
64
  .repo_query_result_li {
65
      margin: 0;
66
      padding: 0.2em;
67
  }
68
  .repo_query_result_li:nth-child(2n) {
69
      background-color:#dadada;
70
  }
71

    
72
  .repo_query_entry {
73
      display: flex;
74
      align-items: center;
75
  }
76
  .repo_query_entry_info {
77
      display: grid;
78
      grid-template-columns: auto;
79
      flex: 1 1 auto;
80
      min-width: 0;
81
  }
82

    
83
  .repo_query_entry_info > * {
84
      white-space: nowrap;
85
      overflow: hidden;
86
      text-overflow: ellipsis;
87
      padding-bottom: 0.1em;
88
  }
89
  .repo_query_entry button {
90
      white-space: nowrap;
91
  }
92

    
93
  .repo_query_mapping_id {
94
      font-size: 80%;
95
      font-style: italic;
96
  }
97

    
98
  .repo_query_bottom_buttons {
99
      margin: 1em;
100
      text-align: center;
101
  }
102
</style>
103
<template>
104
  <div id="repo_query" data-template="main_div" class="repo_query_main_div">
105
    <div data-template="repos_list_container">
106
      <div class="repo_query_top_text">
107
	Browsing custom resources for:
108
	<span data-template="url_span" class="repo_queried_url"></span>
109
      </div>
110
      <ul data-template="repos_list"></ul>
111
      <div class="repo_query_bottom_buttons">
112
	<button data-template="cancel_but">Cancel</button>
113
      </div>
114
    </div>
115
    <div data-template="install_view_container" class="hide">
116
      <!-- Install view will be dynamically inserted here. -->
117
    </div>
118
  </div>
119

    
120
  <li id="repo_query_single_repo" data-template="main_li"
121
      class="repo_query_repo_li">
122
    <div class="top_line"></div>
123
    <div class="repo_query_entry">
124
      <div class="repo_query_entry_info">
125
	<label data-template="repo_url_label"></label>
126
      </div>
127
      <span class="repo_query_buttons">
128
	<button data-template="show_results_but">
129
	  Show results
130
	</button>
131
	<button data-template="hide_results_but" class="hide">
132
	  Hide results
133
	</button>
134
      </span>
135
    </div>
136
    <div data-template="list_container" class="hide repo_query_results_list">
137
      <span data-template="info_span">Querying repository...</span>
138
      <ul data-template="results_list" class="hide"></ul>
139
    </div>
140
  </li>
141

    
142
  <li id="repo_query_single_result" data-template="main_li"
143
      class="repo_query_entry repo_query_result_li">
144
    <div class="repo_query_entry_info">
145
      <span data-template="mapping_name"></span>
146
      <span data-template="mapping_id" class="repo_query_mapping_id"></span>
147
    </div>
148
    <span><button data-template="install_but">Install preview</button></span>
149
  </li>
150
</template>
151
#ENDIF
(18-18/24)