-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfull-controll.html
164 lines (149 loc) · 6.45 KB
/
full-controll.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="description" content="Free fancy border radius generator">
<meta name="keywords" content="HTML, CSS, JavaScript, border radius generator">
<meta name="author" content="Souvik Das">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="fancy-logo.png" type="image/x-icon">
<title>Border-radius-Generator</title>
<link rel="stylesheet" href="fcmain.css">
<link rel="stylesheet" href="switch.css">
<!-- <link rel="stylesheet" href="styles.css"> -->
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Ubuntu&display=swap" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://kit.fontawesome.com/b4acdcaab8.js" crossorigin="anonymous"></script>
<script src="fcscript.js"></script>
<style>
:root {
--x: 50%;
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
position: absolute;
min-height: 100vh;
/* min-width: 100vw; */
min-width: 100%;
/* border: 2px solid red; */
/* background-color: rgba(0, 0, 0, .85); */
background-color: #202032;
/* font style */
font-family: 'Ubuntu', sans-serif;
/* align-items to center */
display: flex;
flex-direction: column;
flex-wrap: nowrap;
align-items: center;
justify-content: space-evenly;
flex-grow: 1;
}
</style>
</head>
<body>
<header>
<span id="prod_name"> FANCY-BORDER-RADIUS </span>
<hr>
<div id="header-links">
<a href="#"><i class="fas fa-quidditch"></i> About This</a>
<a href="https://github.com/SouvikDas-git/fancy-border-radius-generator"><i class="fab fa-github icn"></i>
View on Github </a>
<!-- <a href="#"><i class="fas fa-skull"></i> Full Controll </a> -->
</div>
</header>
<div id="generator">
<div id="box"></div>
<input type="range" name="" id="top-left" class="top slider" min="0" max="100" value="15" oninput="setborder()">
<input type="range" name="" id="top-right" class="top slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="bottom-left" class="bottom slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="bottom-right" class="bottom slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="left-top" class="left slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="left-bottom" class="left slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="right-top" class="right slider" min="0" max="100" value="15"
oninput="setborder()">
<input type="range" name="" id="right-bottom" class="right slider" min="0" max="100" value="15"
oninput="setborder()">
</div>
<div id="output">
<span id="output-text"></span>
<span id="copy-btn" onclick="copy()">COPY</span>
</div>
<span id="copy-popup-text"> Copied to Clipboard 👍 </span>
<div id="custom_size">
<div class="advanced__switch">
<span> Custom Size : </span>
<label class="switch">
<input type="checkbox" onclick="custom_mode()">
<span class="switch-slider"></span>
</label>
</div>
<div class="advanced__settings" id="dimension-input">
<span class="input-group">
<label for="height">Height:</label>
<input id="height" type="number" min="5" max="2000" value="470" size="5" oninput="custom_size()">
</span>
<span class="input-group">
<label for="width">Width:</label>
<input id="width" type="number" min="5" max="2000" value="470" size="5" oninput="custom_size()">
</span>
</div>
</div>
<script>
const generator = document.getElementById("generator");
const Box = document.getElementById("box");
const topleft = document.getElementById("top-left");
const topright = document.getElementById("top-right");
const bottomleft = document.getElementById("bottom-left");
const bottomright = document.getElementById("bottom-right");
const lefttop = document.getElementById("left-top");
const leftbottom = document.getElementById("left-bottom");
const righttop = document.getElementById("right-top");
const rightbottom = document.getElementById("right-bottom");
var rad;
var output_text = document.getElementById("output-text");
setborder();
function setborder() {
// rad = leftslider.value + '% ' + topslider.value + '% ' + rightslider.value + '% ' + bottomslider.value + '%';
rad = topleft.value + '% ' + topright.value + '% ' + bottomright.value + '% ' + bottomleft.value + '% ' + '/ ' + lefttop.value + '% ' + righttop.value + '% ' + rightbottom.value + '% ' + leftbottom.value + '%';
output_text.innerHTML = "border-radius: " + rad + ";";
// box.style.borderRadius = rad;
Box.style.borderRadius = rad;
}
copy = () => {
navigator.clipboard.writeText(output_text.innerHTML);
}
$(document).ready(function () {
$("#copy-btn").click(function () {
$("#copy-popup-text").fadeIn(700);
setTimeout(() => {
$("#copy-popup-text").fadeOut(700);
}, 1800);
});
});
</script>
<footer> Made with <span> ❤ </span> by Souvik</footer>
</body>
</html>