-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
182 lines (168 loc) · 9.5 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Repeating Linear Gradient</title>
<!-- BOOSTRAP CDN CSS-->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<!-- MAVO CDNs -->
<link rel="stylesheet" href="https://get.mavo.io/mavo.css" />
<script src="https://get.mavo.io/mavo.js"></script>
<!-- SWEET ALERT -->
<script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- MY STYLES -->
<link rel="stylesheet" href="./style.css">
</head>
<body mv-app="replineargradient" mv-storage="local" mv-bar="save" mv-mode="edit">
<div class="page">
<div class="page-content">
<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<span class="navbar-text">
REPEATING LINEAR GRADIENT GENERATOR
</span>
</div>
</nav>
<main class="container mt-3">
<header>
<h2>Instructions</h2>
</header>
<h4>Repeating Linear Gradient Syntax</h4>
<br>
<pre>
selector {
background: repeating-linear-gradient(direction, color-stop1, color-stop2, ...);
}
</pre>
<div class="accordion accordion-flush" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button" type="button" data-bs-toggle="collapse"
data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<b>See Examples</b>
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse"
data-bs-parent="#accordionExample">
<div class="accordion-body">
<dl>
<dd>background: repeating-linear-gradient(#e66465, #e66465 20px, #9198e5 20px, #9198e5 25px);</dd>
<dd>background: repeating-linear-gradient( 45deg, #3f87a6 , #ebf8e1 15%, #f69d3c 20% );</dd>
<dd>background: repeating-linear-gradient(transparent, #4d9f0c 40px),
repeating-linear-gradient(0.25turn, transparent, #3f87a6 20px);</dd>
</dl>
</div>
</div>
</div>
</div>
<div class="mt-3 mb-4">Your Gradient CSS: <code id="code">background-image:<span property="code" >
[gradient];
</span>
</code> <button onclick="copyCSS()">Copy text</button></div>
<div class="d-flex flex-wrap row flex-row">
<section class="setup-area col-lg-6 p-2" mv-list>
<div class="linear-gradient-setup col-12 mt-3" mv-list-item property="LinearGradient">
<div class="col-12">
<header>
<h4>Linear Gradient</h4>
</header>
<input hidden property="gradient" value="repeating-linear-gradient(
[
if(direction == 'general', general_value,
if(direction == 'precision',
if(degrees == '' and position1 == '' and position2 == '', '',
if(position1 == '' and position2 == '',
if(degrees == '', '0', degrees) & 'deg, '
, if(degrees == '', '0', degrees) & 'deg at ' & position1 & ' ' & position2 & ', '))
)
)
]
[
if(color_value == '', 'COLOR ', color_value & ' ') &
if(value_amount <= 0, '', value_amount & value_type)
]
)" />
<div class="direction-options d-flex flex-row flex-wrap">
<label class="me-2">Direction: </label>
<div class="direction me-2">
<select name="direction-select" id="direction-select" onchange="showDetails()"
property="direction">
<option value="general" selected>General</option>
<option value="precision">Precision</option>
</select>
</div>
<div id="general-details" class="col-lg-3"
style="display: [if(direction == 'precision', 'none', '')];">
<select name="general-details" id="general-details-select" class="w-100"
property="general_value">
<option value="to top, ">to top</option>
<option value="to bottom, ">to bottom</option>
<option value="to left, ">to left</option>
<option value="to right, ">to right</option>
</select>
</div>
<div id="precision-details" class="col-lg-7"
style="display: [if(direction == 'general', 'none', '')];">
<input type="text" property="degrees" placeholder="00">deg at <input type="text"
property="position1" placeholder="00px/%"> <input type="text"
property="position2" placeholder="00px/%">
</div>
</div>
</div>
<div class="d-flex row gap-2 colorlist" mv-list>
<div class="mv-add-color d-flex flex-column mt-2 col-lg-4 col-sm-12 col-md-4 border border-primary py-2"
mv-list-item property="color">
<div class="d-flex align-items-center">
<label class="me-1">Color: </label>
<input type="text" placeholder="Hexcolor or rgb()" property="color_value">
</div>
<div class="select-metric d-flex align-items-center">
<div class="me-1">
<select property="value_type" name="value-type">
<option value="px" selected>pixels</option>
<option value="%">percent</option>
</select>
</div>
<div class="">
<input type="range" class="w-100" placeholder="value"
property="value_amount" title="[value_amount]" min="0" max="100">
</div>
</div>
</div>
</div>
</div>
</section>
<section class="demo-area col-lg-6 d-flex justify-content-center align-items-center p-5">
<div class="demo" style="background: [code];">
</div>
</section>
</div>
</main>
</div>
</div>
<footer>
Made By Tadeo Bennett | 2023
</footer>
</body>
<!-- BOOSTRAP CDN JS -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
<script>
function copyCSS() {
var text = document.getElementById("code").innerText;
console.log(text)
navigator.clipboard.writeText(text)
Swal.fire({
icon: 'success',
title: 'Your css is copied',
text: text,
showConfirmButton: false,
timer: 1000
})
}
</script>
</html>