Added a donation page

This commit is contained in:
xemeds
2020-07-23 18:26:18 +00:00
parent 0fad841ee6
commit d1ad9ace3e
7 changed files with 46 additions and 6 deletions
+4
View File
@@ -44,6 +44,10 @@ def short_url(token):
# Redirect to the url of the token # Redirect to the url of the token
return redirect(query.url) return redirect(query.url)
# Donate route
@app.route("/donate")
def donate():
return render_template("donate.html")
# Error handling routes # Error handling routes
@app.errorhandler(404) @app.errorhandler(404)
+16
View File
@@ -99,6 +99,17 @@ body {
margin: 40vh auto 0 auto; margin: 40vh auto 0 auto;
} }
.donation {
position: absolute;
left: 0;
right: 0;
color: #ffffff;
list-style: none;
text-align: center;
margin: 40vh auto 0 auto;
}
.page-container { .page-container {
position: relative; position: relative;
min-height: 100vh; min-height: 100vh;
@@ -123,6 +134,7 @@ footer {
.footer-list li { .footer-list li {
color: #ffffff; color: #ffffff;
display: inline;
} }
.footer-list li a:link { .footer-list li a:link {
@@ -130,6 +142,10 @@ footer {
text-decoration: none; text-decoration: none;
} }
.footer-list li a:visited {
color: #bb86fc;
}
.footer-list li a:hover { .footer-list li a:hover {
color: #7b59a5; color: #7b59a5;
} }
+15
View File
@@ -0,0 +1,15 @@
{% extends "layout.html" %}
{% block body %}
<body>
<div class="headers">
<a class="title" href="{{ url_for('index') }}">tiny0</a>
<h1 class="desc">Custom URL Shortener</h1>
</div>
<ul class="donation">
<li><h1>Bitcoin Address</h1></li>
<li><h1>1Mg55rPVuQ2P8zKsCcLdsmgqH24uLXfLbR</h1></li>
</ul>
</body>
{% endblock %}
+1
View File
@@ -6,6 +6,7 @@
<a class="title" href="{{ url_for('index') }}">tiny0</a> <a class="title" href="{{ url_for('index') }}">tiny0</a>
<h1 class="desc">Custom URL Shortener</h1> <h1 class="desc">Custom URL Shortener</h1>
</div> </div>
<div class="error-message"> <div class="error-message">
<h1>{{ error_message }}</h1> <h1>{{ error_message }}</h1>
</div> </div>
+1
View File
@@ -14,6 +14,7 @@
<h1 id="desc" class="desc"></h1> <h1 id="desc" class="desc"></h1>
</div> </div>
{% endif %} {% endif %}
<div class="container"> <div class="container">
<form method="POST" action=""> <form method="POST" action="">
{{ form.hidden_tag() }} {{ form.hidden_tag() }}
+4 -1
View File
@@ -18,7 +18,10 @@
<footer> <footer>
<ul class="footer-list"> <ul class="footer-list">
<li>&#169; 2020 Muhammed Ali Dilek</li> <li>&#169; 2020 Muhammed Ali Dilek</li>
<li><a href="https://github.com/xemeds" target="_blank">GitHub</a></p></li> <ul>
<li><a href="{{ url_for('donate') }}">Donate</a></li>
<li><a href="https://github.com/xemeds" target="_blank">GitHub</a></li>
</ul>
</ul> </ul>
</footer> </footer>
</html> </html>
+5 -5
View File
@@ -7,12 +7,12 @@
<h1 class="desc">Custom URL Shortener</h1> <h1 class="desc">Custom URL Shortener</h1>
</div> </div>
<div class="container"> <div class="container">
<div class="inputs"> <div class="inputs">
<input type="text" value="{{ url }}" id="url" class="url" readonly> <input type="text" value="{{ url }}" id="url" class="url" readonly>
<button onclick="copyURL()" class="button">Copy</button> <button onclick="copyURL()" class="button">Copy</button>
</div>
</div> </div>
</div>
<script> <script>
function copyURL() { function copyURL() {