-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
134 lines (133 loc) · 3.17 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Shopify Product Selector</title>
<link rel="stylesheet" href="custom-element.css" />
<style>
body {
overflow: hidden;
margin: 0;
padding: 8px;
}
.content .title {
display: flex;
align-items: center;
}
.title .text {
margin-right: 8px;
color: #ccc;
}
.title .text--is-selected {
color: #000;
}
.searchform {
display: flex;
align-items: center;
}
.searchterm {
min-width: auto;
margin-right: 8px;
}
.tile {
display: inline-block;
width: 200px;
overflow: hidden;
margin: 10px;
border: solid 1px transparent;
position: relative;
text-align: center;
}
.tile:hover {
border: solid 1px #ccc;
}
.tile .title {
overflow: hidden;
text-overflow: ellipsis;
padding: 5px;
white-space: nowrap;
text-align: left;
}
.tile .id {
text-align: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: #ccc;
padding: 5px;
padding-top: 0;
}
.tile .noimage {
display: inline-block;
width: 150px;
height: 150px;
color: #ccc;
background-color: #f8f8f8;
line-height: 150px;
margin: 5px;
}
img.preview {
cursor: pointer;
max-width: 150px;
max-height: 150px;
margin: 5px;
}
img.preview:active {
outline: none;
}
.selected .tile {
width: 400px;
margin: 0;
}
.selected .tile:hover {
border: solid 1px transparent;
}
.results {
margin-top: 16px;
}
.logo {
width: 100px;
height: 28px;
margin: 8px;
margin-left: 24px;
}
</style>
<!-- Kentico Custom elements API-->
<script src="https://app.kontent.ai/js-api/custom-element/v1/custom-element.min.js"></script>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="product-selector.js"></script>
</head>
<body>
<!-- Custom element HTML -->
<div class="content">
<h4 class="title">
<span class="text">Loading ...</span
><span class="clear"
><button
class="btn btn--secondary btn--xs clearbtn"
style="display: none;"
>
Clear
</button></span
>
</h4>
<div class="selected"></div>
</div>
<div class="search" style="display: none;">
<form class="searchform">
<input class="searchterm text-field__input" /><button
class="btn btn--primary searchbtn"
>
Search</button
><button class="btn btn--secondary clearsearchbtn">Clear search</button
><img
class="logo"
src="shopify_logo_whitebg.svg"
alt="Shopify"
title="Shopify"
/>
</form>
<div class="results" style="display: none;"></div>
</div>
</body>
</html>