@andatoshiki/fuki
Version:
π³ A lovely self-hosted yet serverless link shortener service via CloudFlare Workers!
264 lines (259 loc) β’ 6.66 kB
HTML
<html>
<head>
<meta http-equiv="content-type" content="txt/html; charset=utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<link
rel="stylesheet"
href="https://jsd.toshiki.dev/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css"
integrity="sha256-L/W5Wfqfa0sdBNIKN9cG6QA5F2qx4qICmU2VgLruv9Y="
crossorigin="anonymous"
/>
<script>
if (window.screen.width <= 420)
document.getElementsByTagName('meta')['viewport'].content =
'initial-scale=0.4, maximum-scale=1.0, minimum-scale=0.4, user-scalable=no'
else if (window.screen.width <= 769)
document.getElementsByTagName('meta')['viewport'].content =
'initial-scale=0.6, maximum-scale=1.0, minimum-scale=0.6, user-scalable=no'
</script>
<link
rel="stylesheet"
href="https://jsd.toshiki.dev/gh/andatoshiki/toshiki-cdn@master/fa6pro/css/all.min.css"
/>
<link rel="shortcut icon" href="https://r2.toshiki.dev/favicon.ico" type="image/x-icon" />
<title>Fuki δΈζ | Your lovely URL shortener</title>
<style>
* {
margin: 0;
padding: 0;
cursor: default;
}
html,
body {
height: 100%;
}
body {
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
vertical-align: center;
flex-wrap: wrap;
align-content: center;
color: #2a2b2c;
background: linear-gradient(180deg, #658fff 0%, #3670ff 100%);
overflow: hidden;
}
.card {
width: 830px;
height: 420px;
background: #231d34;
box-shadow: 0px 2px 20px 0px rgba(0, 0, 0, 0.22);
border-radius: 44px;
border-width: 0;
overflow: hidden;
}
.card-body {
padding: 0;
z-index: 1;
}
.card .bigtitle {
width: 409px;
height: 36px;
font-size: 36px;
font-family: DOUYU-Font, DOUYU;
font-weight: normal;
color: #ffffff;
line-height: 40px;
margin: 62px 0 0 100px;
}
.dot1 {
position: absolute;
display: block;
left: 65px;
top: 87px;
width: 132px;
height: 21px;
background: #765cf2;
border-radius: 11px;
z-index: 1;
}
.dot2 {
position: absolute;
display: block;
top: 345px;
left: 500px;
width: 378px;
height: 378px;
background: linear-gradient(180deg, #f6327f 0%, #f9796d 100%);
z-index: 1;
border-radius: 200px;
}
.dot3 {
position: absolute;
display: block;
top: 317px;
left: 590px;
width: 378px;
height: 378px;
background: linear-gradient(180deg, #ffea00 0%, #ffd100 100%);
border-radius: 11px;
z-index: 1;
border-radius: 200px;
}
.card-title {
display: block;
font-size: 28px;
font-family: MyriadPro-Regular, MyriadPro;
font-weight: 400;
color: #ffffff;
line-height: 34px;
margin: 53px 0 0 71px;
}
.formm {
width: 100%;
height: 70px;
display: block;
position: absolute;
margin-top: 13px;
}
.form-control {
position: absolute;
cursor: auto;
width: 700px;
height: 60px;
background: #ffffff;
box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.5);
border-radius: 30px;
margin-left: 65px;
border-width: 0;
margin-top: 5px;
}
.btn-cus {
position: absolute;
width: 177px;
height: 70px;
background: #644def;
box-shadow: 0px 2px 10px 0px #0e0061;
border-width: 0;
border-radius: 40px;
color: #ffffff;
font-size: 28px;
font-family: MyriadPro-Semibold, MyriadPro;
font-weight: 600;
line-height: 34px;
right: 65px;
}
.card-text {
position: absolute;
width: 100%;
bottom: 20px;
margin: 0 auto;
text-align: center;
font-size: 18px;
color: #3f76ff;
}
.card-text > a {
text-decoration: none;
color: #3f76ff;
}
.card-text > a {
cursor: pointer;
}
@media (max-width: 769px) {
.card {
width: 80%;
}
}
@media (max-width: 420px) {
.card {
width: 95%;
}
}
/* @media (prefers-color-scheme: dark) {
body {
color: #d9d9d9;
background: #1b1b1b;
}
.card {
background-color: #252d38;
}
} */
</style>
</head>
<body>
<div class="card">
<span class="dot1"></span>
<span class="dot3"></span>
<span class="dot2"></span>
<div class="card-body">
<h5 class="bigtitle">Shorten your URLs !</h5>
<h5 class="card-title">Please enter the long URL to be shortened :</h5>
<div class="formm">
<input type="text" class="form-control" placeholder="Example: https://example.com/" id="text" />
<button class="btn-cus" type="button" onclick="shorturl()" id="searchbtn">Shorten it</button>
</div>
<div class="card-text">
Powered by
<a href="https://github.com/toshikidev/fuki" target="_self">fuki</a>
</div>
<p id="notice"></p>
</div>
</div>
<div
class="modal fade"
id="exampleModal"
tabindex="-1"
role="dialog"
aria-labelledby="exampleModalLabel"
aria-hidden="true"
>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Result</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="result">No Result</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-primary"
onclick='copyurl("result")'
data-toggle="popover"
data-placement="bottom"
data-content="Copied!"
>
Copy
</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script
src="https://jsd.toshiki.dev/npm/jquery@3.4.1/dist/jquery.slim.min.js"
integrity="sha256-pasqAKBDmFT4eHoN2ndd6lN370kFiGUFyTiUHWhU7k8="
crossorigin="anonymous"
></script>
<script
src="https://jsd.toshiki.dev/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"
></script>
<script
src="https://jsd.toshiki.dev/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js"
integrity="sha256-WqU1JavFxSAMcLP2WIOI+GB2zWmShMI82mTpLDcqFUg="
crossorigin="anonymous"
></script>
<script src="https://jsd.toshiki.dev/npm/@andatoshiki/fuki@0.0.1/main.js" crossorigin="anonymous"></script>
</body>
</html>