-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
145 lines (135 loc) · 7.35 KB
/
index.html
File metadata and controls
145 lines (135 loc) · 7.35 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
141
142
143
144
145
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>UNDER DESTRUCTION — Shreyash Srivastva — Download</title>
<meta name="description" content="Download and preview 'UNDER DESTRUCTION' by Shreyash Srivastva. Clean reading page, fast download, mobile-friendly." />
<meta property="og:title" content="UNDER DESTRUCTION — Shreyash Srivastva" />
<meta property="og:description" content="Preview and download the poetry book 'UNDER DESTRUCTION' by Shreyash Srivastva." />
<meta property="og:type" content="website" />
<meta name="theme-color" content="#0f172a" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Merriweather:wght@300;700&display=swap" rel="stylesheet">
<style>
:root{--bg:#0b1220;--card:#0f172a;--accent:#f97316;--muted:#9aa6b2;--glass:rgba(255,255,255,0.04)}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Inter,system-ui,Segoe UI,Roboto,Arial;color:#e6eef6;background:linear-gradient(180deg,#071325 0%, #041121 60%);-webkit-font-smoothing:antialiased}
.wrap{max-width:480px;margin:auto;padding:auto;align-items: center;}
.grid{display:grid;grid-template-columns:400px 1fr;gap:28px;align-items:start}
.card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));border-radius:14px;padding:20px;box-shadow:0 6px 30px rgba(2,6,23,0.6);border:1px solid rgba(255,255,255,0.03)}
.cover{height:100%;border-radius:10px;overflow:hidden;display:flex;flex-direction:column;}
.cover img{width:100%;height:100%;object-fit:cover;display:block}
h1{font-family:Merriweather,serif;margin:0 0 6px 0;font-size:22px}
.author{color:var(--muted);font-size:14px;margin-bottom:12px}
.cta{display:flex;gap:12px;flex-wrap:wrap}
.btn{background:linear-gradient(90deg,var(--accent),#ffb86b);border:none;padding:12px 18px;border-radius:10px;color:#071325;font-weight:700;cursor:pointer;font-size:15px;text-decoration:none}
.btn.secondary{background:transparent;border:1px solid rgba(255,255,255,0.06);color:#cfe6ff}
.meta{margin-top:14px;color:var(--muted);font-size:14px}
.preview {border-radius: 10px;overflow: hidden;background: var(--glass);display: flex;flex-direction: column;height: auto; width:90%}
.pdf-frame {width: 100%;height: 100%;border: none;}
.desc{line-height:1.4;color:#cfe6ff}
.badge{display:inline-block;background:rgba(255,255,255,0.03);color:#dbeffd;border-radius:999px;padding:6px 10px;font-size:12px}
.download-count{font-weight:700;color:#fff;margin-left:8px}
.actions{display:flex;gap:8px;justify-content:center;margin-top:12px;}
@media (max-width:1000px){.grid{grid-template-columns:1fr;}.cover{height: 100%}.preview{min-height:80vh}}
</style>
</head>
<body>
<main class="wrap">
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px"></div>
<section class="card">
<div class="cover" aria-hidden="false">
<img src="1.png" alt="Under Destruction cover preview (if available)" onerror="this.style.display='none'">
<div style="padding:14px">
<h1>UNDER DESTRUCTION</h1>
<div class="author">Poetry / Short pieces — Shreyash Srivastva</div>
<div class="desc">A raw, unfiltered collection of poems and short pieces exploring isolation, defiance, dark humor and longing. Designed for readers who prefer honesty over prettiness.</div>
<div class="cta" style="margin-top:16px">
<a class="btn" id="downloadBtn" href="underDestruction.pdf" download="UNDER_DESTRUCTION-Shreyash_Srivastva.pdf">Download PDF</a>
<a class="btn secondary" id="openInNew" href="underDestruction.pdf">Open Preview</a>
</div>
<div class="meta">Instant download. No sign-up. No nonsense.<!--<span id="dlCount" class="download-count">0</span> downloads recorded. --></div>
<div style="margin-top:16px;font-size:13px;color:var(--muted)">
<strong>Tip:</strong> Read it with a free mind. Will take 10-15 minutes only.
</div>
<div style="font-size:13px;color:var(--muted)"><strong>Pages:</strong> 29 pages</div>
<div style="font-size:13px;color:var(--muted)">© <span id="year"></span> Shreyash Srivastva</div>
<div style="font-size:13px;color:var(--muted)">Connect on: <a href="https://x.com/iamsrivastva" target="_blank" rel="noopener" style="color:inherit;text-decoration:underline">X</a></div>
</div>
</div>
</section>
</div>
</main>
<script>
const dlCountEl = document.getElementById('dlCount');
const downloadBtn = document.getElementById('downloadBtn');
const openBtn = document.getElementById('openBtn');
const openInNew = document.getElementById('openInNew');
async function fetchGlobalCount() {
try {
const res = await fetch("https://under-destruction.vercel.app/api/downloads.js");
const data = await res.json();
dlCountEl.textContent = data.value;
} catch (e) {
dlCountEl.textContent = "⚠";
}
}
fetchGlobalCount();
downloadBtn.addEventListener("click", async () => {
try {
await fetch("https://under-destruction.vercel.app/api/downloads.js");
} catch (e) {}
fetchGlobalCount();
downloadBtn.textContent = "Downloading...";
setTimeout(() => (downloadBtn.textContent = "Download PDF"), 1200);
});
openBtn.addEventListener('click', (e)=>{
e.preventDefault(); document.getElementById('preview').scrollIntoView({behavior:'smooth'});
});
openInNew.addEventListener('click', ()=>{
window.open('underDestruction.pdf','_blank');
});
document.getElementById('year').textContent = new Date().getFullYear();
</script>
<!-- Code injected by live-server -->
<script>
// <![CDATA[ <-- For SVG support
if ('WebSocket' in window) {
(function () {
function refreshCSS() {
var sheets = [].slice.call(document.getElementsByTagName("link"));
var head = document.getElementsByTagName("head")[0];
for (var i = 0; i < sheets.length; ++i) {
var elem = sheets[i];
var parent = elem.parentElement || head;
parent.removeChild(elem);
var rel = elem.rel;
if (elem.href && typeof rel != "string" || rel.length == 0 || rel.toLowerCase() == "stylesheet") {
var url = elem.href.replace(/(&|\?)_cacheOverride=\d+/, '');
elem.href = url + (url.indexOf('?') >= 0 ? '&' : '?') + '_cacheOverride=' + (new Date().valueOf());
}
parent.appendChild(elem);
}
}
var protocol = window.location.protocol === 'http:' ? 'ws://' : 'wss://';
var address = protocol + window.location.host + window.location.pathname + '/ws';
var socket = new WebSocket(address);
socket.onmessage = function (msg) {
if (msg.data == 'reload') window.location.reload();
else if (msg.data == 'refreshcss') refreshCSS();
};
if (sessionStorage && !sessionStorage.getItem('IsThisFirstTime_Log_From_LiveServer')) {
console.log('Live reload enabled.');
sessionStorage.setItem('IsThisFirstTime_Log_From_LiveServer', true);
}
})();
}
else {
console.error('Upgrade your browser. This Browser is NOT supported WebSocket for Live-Reloading.');
}
// ]]>
</script>
</body>
</html>