forked from lineofflight/the-placeholder-site
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
140 lines (133 loc) · 5.73 KB
/
Copy pathindex.html
File metadata and controls
140 lines (133 loc) · 5.73 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>The placeholder site</title>
<link rel="stylesheet" href="https://fonts.xz.style/serve/inter.css" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@exampledev/new.css@latest/new.min.css"
/>
<style>
.spinning-logo {
display: inline-block;
}
.spinning-logo.spin {
animation: spin 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
<script>
document.addEventListener("DOMContentLoaded", function () {
const domain = window.location.hostname || "example.com";
// Populate Escrow.com form with domain
document.getElementById("escrow-domain").value = domain;
document.getElementById("escrow-title").value = domain;
// Fetch price from config.json, default to 1 if not found
fetch("config.json")
.then((response) => response.json())
.then((config) => {
document.getElementById("escrow-price").value =
config.price;
// Load Cloudflare Web Analytics if this fork has a token
if (config.analyticsToken) {
const beacon = document.createElement("script");
beacon.defer = true;
beacon.src =
"https://static.cloudflareinsights.com/beacon.min.js";
beacon.setAttribute(
"data-cf-beacon",
JSON.stringify({ token: config.analyticsToken })
);
document.head.appendChild(beacon);
}
// Show a per-domain tagline if this fork has one
if (config.tagline) {
const tagline = document.createElement("p");
const em = document.createElement("em");
em.textContent = config.tagline;
tagline.appendChild(em);
document
.getElementById("placeholder-text")
.before(tagline);
}
});
// Handle buy link click
const buyLink = document.getElementById("buy-domain");
buyLink.addEventListener("click", function (e) {
e.preventDefault();
document.getElementById("escrow-form").submit();
});
// Handle spinning logo - only once
const logo = document.querySelector(".spinning-logo");
let hasSpun = false;
logo.addEventListener("mouseenter", function () {
if (!hasSpun) {
hasSpun = true;
logo.classList.add("spin");
}
});
});
</script>
</head>
<body>
<header>
<h1>The placeholder site</h1>
<nav>
<a href="https://github.com/lineofflight/the-placeholder-site"
>GitHub</a
>
</nav>
</header>
<p id="placeholder-text">This is a placeholder for a future project.</p>
<p>
Have another idea?
<a href="mailto:company@lineofflig.ht">Get in touch</a> or
<a href="#" id="buy-domain">buy the domain</a>.
</p>
<form
id="escrow-form"
action="https://www.escrow.com/checkout"
method="post"
target="_blank"
style="display: none"
>
<input type="hidden" name="type" value="domain_name" />
<input
type="hidden"
name="non_initiator_email"
value="company@lineofflig.ht"
/>
<input type="hidden" name="non_initiator_id" value="1364448" />
<input type="hidden" name="non_initiator_role" value="seller" />
<input type="hidden" id="escrow-title" name="title" value="title" />
<input type="hidden" name="currency" value="USD" />
<input type="hidden" id="escrow-domain" name="domain" value="" />
<input type="hidden" id="escrow-price" name="price" value="1" />
<input type="hidden" name="concierge" value="true" />
<input type="hidden" name="with_content" value="false" />
<input type="hidden" name="inspection_period" value="7" />
<input type="hidden" name="fee_payer" value="buyer" />
<input type="hidden" name="return_url" value="" />
<input type="hidden" name="button_types" value="buy_now" />
<input type="hidden" name="auto_accept" value="" />
<input type="hidden" name="auto_reject" value="" />
<input type="hidden" name="item_key" value="undefined" />
</form>
<a href="https://lineofflig.ht"
><img
class="spinning-logo"
src="lineofflight.jpg?v={{ site.time | date: '%s' }}"
alt="Line of Flight"
width="60"
/></a>
</body>
</html>