Skip to content

Commit f706cc2

Browse files
committed
Adding thanks for tipping page.
1 parent 52cde0d commit f706cc2

5 files changed

+58
-0
lines changed

_layouts/thanks-for-tipping.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta name="viewport" content="width=device-width, initial-scale=1.0"></meta>
5+
<link href="https://fonts.googleapis.com/css2?family=Ubuntu&amp;display=swap" rel="stylesheet">
6+
<link rel="stylesheet" type="text/css" href="/assets/css/thanks-for-tipping.css">
7+
<title>theodore brockman - thanks for tipping!</title>
8+
{% seo %}
9+
</head>
10+
<body>
11+
{{content}}
12+
<script src='/assets/js/thanks-for-tipping.js'></script>
13+
</body>
14+
</html>

_sass/thanks-for-tipping.scss

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
html {
2+
width: 100%;
3+
height: 100%;
4+
}
5+
6+
body {
7+
font-family: 'Ubuntu', sans-serif;
8+
width: 100%;
9+
height: 100%;
10+
display: flex;
11+
align-items: center;
12+
justify-content: center;
13+
}
14+
15+
.container {
16+
display: flex;
17+
flex-direction: column;
18+
}

assets/css/thanks-for-tipping.scss

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
---
3+
@import "thanks-for-tipping";

assets/js/thanks-for-tipping.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const getTipAmount = () => {
2+
const search = new URLSearchParams(window.location.search)
3+
console.log(search)
4+
return search.get('tip')
5+
}
6+
7+
window.addEventListener('load', () => {
8+
const tip = getTipAmount()
9+
console.log(tip)
10+
const header = document.getElementById('tip-header')
11+
header.innerText = `🎉 thanks for your $${(tip / 100).toFixed(2)} tip!`
12+
})

prune/thanks-for-tipping.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
layout: thanks-for-tipping
3+
---
4+
<div class='container'>
5+
<h1 id='tip-header'>🎉 thanks for your $ tip!</h1>
6+
7+
<p style='margin: 0;'>any donation really helps keep me motivated to work on prune, thanks for the support!
8+
</p>
9+
<p>feel free to reach out to me at <a href='mailto:iam@theo.lol'>iam@theo.lol</a> if you have any comments, suggestions, or questions</p>
10+
<p>- theo</p>
11+
</div>

0 commit comments

Comments
 (0)