Project

General

Profile

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

haketilo / html / item_preview.html @ 1f9ccef9

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

    
6
    Show preview of a resource/mapping.
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
#LOADCSS html/reset.css
38
#LOADCSS html/base.css
39
#LOADCSS html/grid.css
40
<style>
41
  .item_preview_main_div {
42
      padding: 1.3em 0.8em 1em 0.8em;
43
      display: grid;
44
      grid-template-columns: auto;
45
      max-width: 800px;
46
  }
47

    
48
  .item_preview_main_div > * {
49
      margin-top: 1.5em;
50
      margin-left: 1.8em;
51
      margin-right: 1em;
52
  }
53
  .item_preview_main_div > label {
54
      margin-left: 1em;
55
  }
56

    
57
  .item_preview_main_div h3 {
58
      text-align: center;
59

    
60
      margin-left: 1.8em;
61
  }
62

    
63
  .item_preview_main_div a, .item_preview_payload {
64
      word-break: break-word;
65
  }
66

    
67
  .item_preview_payload_id {
68
      margin: 0.1em 0 0.2em 1em;
69
  }
70
</style>
71
<template>
72
  <div id="resource_preview" data-template="main_div"
73
       class="item_preview_main_div">
74
    <h3>resource preview</h3>
75
    <label>conforms to:</label>
76
    <span data-template="conforms_to">...</span>
77
    <label>identifier:</label>
78
    <span data-template="identifier">...</span>
79
    <label>long name:</label>
80
    <span data-template="long_name">...</span>
81
    <label>UUID:</label>
82
    <span data-template="uuid">...</span>
83
    <label>version:</label>
84
    <span data-template="version">...</span>
85
    <label>description:</label>
86
    <span data-template="description">...</span>
87
    <label>dependencies:</label>
88
    <span><ul data-template="dependencies"></ul></span>
89
    <label>scripts:</label>
90
    <span><ul data-template="scripts"></ul></span>
91
    <label>source name:</label>
92
    <span data-template="source_name">...</span>
93
    <label>copyright:</label>
94
    <span><ul data-template="copyright"></ul></span>
95
  </div>
96
  <div id="mapping_preview" data-template="main_div"
97
       class="item_preview_main_div">
98
    <h3>mapping preview</h3>
99
    <label>conforms to:</label>
100
    <span data-template="conforms_to">...</span>
101
    <label>identifier:</label>
102
    <span data-template="identifier">...</span>
103
    <label>long name:</label>
104
    <span data-template="long_name">...</span>
105
    <label>UUID:</label>
106
    <span data-template="uuid">...</span>
107
    <label>version:</label>
108
    <span data-template="version">...</span>
109
    <label>description:</label>
110
    <span data-template="description">...</span>
111
    <label>payloads:</label>
112
    <div data-template="payloads" class="item_preview_payload"></div>
113
    <label>source name:</label>
114
    <span data-template="source_name">...</span>
115
    <label>copyright:</label>
116
    <span><ul data-template="copyright"></ul></span>
117
  </div>
118
  <div id="pattern_payload_entry" data-template="main_div">
119
    <span data-template="pattern"></span>
120
    &#8594;
121
    <div data-template="payload" class="item_preview_payload_id"></div>
122
  </div>
123
</template>
124
#ENDIF
(14-14/28)