Skip to content

Commit

Permalink
feat: fix broken links in sidenav and add sponsor link
Browse files Browse the repository at this point in the history
  • Loading branch information
DonnieBLT committed Jul 31, 2024
1 parent e411e6f commit 472107b
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 123 deletions.
4 changes: 2 additions & 2 deletions website/templates/blt_tomato.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ <h2 class="text-4xl font-semibold my-8 p-5 text-white rounded-md bg-[#d9534f]">
<ul class="text-2xl">
{% for project in projects %}
<li type="1" class=" my-2 py-2 px-4 shadow">
<p href="{{ item.repo_url }}"
class="text-primary underline inline-block">{{ project.project_name }}</p>
<a href="{{ item.repo_url }}"
class="text-primary underline inline-block">{{ project.project_name }}</a>
<button class="bg-[#d9534f] ml-4 inline-block py-1 px-2 rounded text-white">
<a href="{{ project.funding_hyperlinks }}" target="_blank">
<span class="text-white">Donate</span>
Expand Down
9 changes: 9 additions & 0 deletions website/templates/includes/sidenav.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
<span>Companies</span>
</a>
</li>
<li class="{% if request.path == '/sponsor/' %}bg-gray-200{% endif %}">
<a href="{% url 'sponsor' %}"
class="flex items-center w-full text-black no-underline p-2">
<div class="w-8 mr-4">
<i class="fa fa-handshake"></i>
</div>
<span>Sponsor</span>
</a>
</li>
<li class="{% if request.path == '/scoreboard/' %}bg-gray-200{% endif %}">
<a href="{% url 'scoreboard' %}"
class="flex items-center w-full text-black no-underline p-2">
Expand Down
263 changes: 142 additions & 121 deletions website/templates/sponsor.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,134 +5,155 @@
Sponsors
{% endblock title %}
{% block content %}
<div class="min-h-screen flex flex-col mx-4">
<h1 class="text-4xl font-semibold my-8 mx-auto">Sponsor a Monthly Prize on BLT</h1>
<div class="flex flex-col items-center border border-black rounded-xl mx-auto py-6 px-10 w-[40vh] lg:w-[60vh]">
<span class="text-[1.72rem] font-semibold">Bitcoin Cash (BCH) Donation Address</span>
<div class="flex flex-row my-10">
<img src="https://api.qrserver.com/v1/create-qr-code/?data=bitcoincash:qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc"
alt="bch qr"
class="w-1/2 h-1/2 mx-5"
width="50%"
height="50%" />
<div class="w-full">
<img src="../static/images/bch gold block.png"
{% include "includes/sidenav.html" %}
<div class="min-h-screen flex flex-col lg:flex-row mx-4">
<!-- Sponsorship Plans Section -->
<div class="flex flex-col items-center lg:w-1/3 mb-10 lg:mb-0 lg:mr-10">
<h2 class="text-3xl font-semibold my-8">Sponsorship Plans</h2>
<div class="grid grid-cols-1 gap-4">
<a href="https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool#sponsor"
class="bg-gray-200 p-6 rounded-lg text-center">
<div class="bg-gray-200 p-6 rounded-lg text-center">
<p class="text-xl font-bold">{% trans "Flea Plan" %}</p>
<p class="text-2xl">$10.00 / {% trans "Month" %}</p>
</div>
</a>
<a href="https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool#sponsor"
class="bg-gray-200 p-6 rounded-lg text-center">
<div class="bg-gray-200 p-6 rounded-lg text-center">
<p class="text-xl font-bold">{% trans "Ant Plan" %}</p>
<p class="text-2xl">$25.00 / {% trans "Month" %}</p>
</div>
</a>
<a href="https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool#sponsor"
class="bg-gray-200 p-6 rounded-lg text-center">
<div class="bg-gray-200 p-6 rounded-lg text-center">
<p class="text-xl font-bold">{% trans "Wasp Plan" %}</p>
<p class="text-2xl">$50.00 / {% trans "Month" %}</p>
</div>
</a>
<a href="https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool#sponsor"
class="bg-gray-200 p-6 rounded-lg text-center">
<div class="bg-gray-200 p-6 rounded-lg text-center">
<p class="text-xl font-bold">{% trans "Scorpion Plan" %}</p>
<p class="text-2xl">$100.00 / {% trans "Month" %}</p>
</div>
</a>
<a href="https://owasp.org/donate/?reponame=www-project-bug-logging-tool&title=OWASP+Bug+logging+tool#sponsor"
class="bg-gray-200 p-6 rounded-lg text-center">
<div class="bg-gray-200 p-6 rounded-lg text-center">
<p class="text-xl font-bold">{% trans "Custom Amount" %}</p>
<p class="text-2xl">{% trans "Choose your own amount" %}</p>
</div>
</a>
</div>
</div>
<!-- Main Content Section -->
<div class="flex flex-col lg:w-2/3">
<h1 class="text-4xl font-semibold my-8 mx-auto">Sponsor a Monthly Prize on BLT</h1>
<div class="flex flex-col items-center border border-black rounded-xl mx-auto py-6 px-10 w-[40vh] lg:w-[60vh]">
<span class="text-[1.72rem] font-semibold">Bitcoin Cash (BCH) Donation Address</span>
<div class="flex flex-row my-10">
<img src="https://api.qrserver.com/v1/create-qr-code/?data=bitcoincash:qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc"
alt="bch qr"
class="w-2/3 mx-5"
width="66%"
height="66%" />
<div class="flex flex-col font-semibold">
<span id="balanceDisplay">Current Balance: {{ balance }}</span>
class="w-1/2 h-1/2 mx-5"
width="50%"
height="50%" />
<div class="w-full">
<img src="../static/images/bch gold block.png"
alt="bch qr"
class="w-2/3 mx-5"
width="66%"
height="66%" />
<div class="flex flex-col font-semibold">
<span id="balanceDisplay">Current Balance: {{ balance }}</span>
</div>
</div>
</div>
<span class="text-2xl font-semibold break-words w-96 lg:w-auto"
id="walletAddress">
<a href="https://explorer.btc.com/bch/address/qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc"
target="_blank">qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc</a></span>
</div>
<span class="text-2xl font-semibold break-words w-96 lg:w-auto"
id="walletAddress">
<a href="https://explorer.btc.com/bch/address/qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc"
target="_blank">qr5yccf7j4dpjekyz3vpawgaarl352n7yv5d5mtzzc</a></span>
<h2 class="text-[1.72rem] my-5 font-semibold ">How Does Sponsoring Work?</h2>
<p class=" text-2xl">
Our bug tracking platform, BLT, stands tall due to the dedication and hard work of our
community. One of
the pillars that bolsters this enthusiasm is the monthly prizes for our top bug finders. When you sponsor these
prizes, you don't just uplift the platform; you celebrate and empower the brilliant minds behind the bug
findings.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Donate to the Monthly Prize Pool</h2>
<p class=" text-2xl">
Elevate the efforts of the BLT community by contributing to our monthly prize pool. Your
donation
directly rewards the top performers, fostering a culture of excellence.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Process to Sponsor a Prize:</h2>
<ol class="list-decimal text-2xl">
<li>
Choose Your Donation Amount: Whether you want to give a modest token of appreciation or a substantial prize,
all contributions make a difference.
</li>
<li>Send the Donation: Utilize the provided BCH address above to transfer your chosen donation.</li>
<li>
Recognition & Confirmation: Upon receipt, we will both confirm and give due recognition to your contribution
on our leaderboard.
</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Determining the Winner:</h2>
<ol class="list-decimal text-2xl">
<li>
Monthly Assessment: Bug finders continuously submit their findings throughout the month. Each discovery gets
scored based on parameters like severity, rarity, and report accuracy.
</li>
<li>
Leaderboard Dynamics: At month-end, all participants are ranked on our leaderboard using their cumulative
scores.
</li>
<li>
Rewarding Excellence: The top bug finder, leading the leaderboard, receives the entirety of the month's
prize pool on the first day of the subsequent month.
</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Transparent Operations & Genuine Trust:</h2>
<p class=" text-2xl">
Every cent of your donation serves its intended purpose. We ensure full transparency by making
all
transaction records accessible to the community.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Why Your Sponsorship Matters:</h2>
<ol class="list-decimal text-2xl">
<li>
Enhancing Quality: Monetary incentives drive bug finders to outdo their previous bests, leading to
higher-quality findings.
</li>
<li>
Community Engagement: Regular contributions indicate a thriving BLT community that appreciates and values
its members.
</li>
<li>Branding Opportunity: As a sponsor, gain favorable visibility and goodwill among a dedicated community.</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Let’s Make a Difference Together!</h2>
<p class=" text-2xl">
Your backing is instrumental in sculpting BLT's success. By choosing to contribute, you're
endorsing quality,
commitment, and collaborative growth. For any assistance or further information, please [contact our team].
</p>
<p>Thank you for championing the spirit of excellence on BLT!</p>
</div>
<h2 class="text-[1.72rem] my-5 font-semibold ">How Does Sponsoring Work?</h2>
<p class=" text-2xl">
Our bug tracking platform, BLT, stands tall due to the dedication and hard work of our
community. One of
the pillars that bolsters this enthusiasm is the monthly prizes for our top bug finders. When you sponsor these
prizes, you don't just uplift the platform; you celebrate and empower the brilliant minds behind the bug
findings.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Donate to the Monthly Prize Pool</h2>
<p class=" text-2xl">
Elevate the efforts of the BLT community by contributing to our monthly prize pool. Your
donation
directly rewards the top performers, fostering a colture of excellence.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Process to Sponsor a Prize:</h2>
<ol class="list-decimal text-2xl">
<li>
Choose Your Donation Amount: Whether you want to give a modest token of appreciation or a substantial prize,
all contributions make a difference.
</li>
<li>Send the Donation: Utilize the provided BCH address above to transfer your chosen donation.</li>
<li>
Recognition & Confirmation: Upon receipt, we will both confirm and give due recognition to your contribution
on our leaderboard.
</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Determining the Winner:</h2>
<ol class="list-decimal text-2xl">
<li>
Monthly Assessment: Bug finders continuously submit their findings throughout the month. Each discovery gets
scored based on parameters like severity, rarity, and report accuracy.
</li>
<li>
Leaderboard Dynamics: At month-end, all participants are ranked on our leaderboard using their cumolative
scores.
</li>
<li>
Rewarding Excellence: The top bug finder, leading the leaderboard, receives the entirety of the month's
prize pool on the first day of the subsequent month.
</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Transparent Operations & Genuine Trust:</h2>
<p class=" text-2xl">
Every cent of your donation serves its intended purpose. We ensure foll transparency by making
all
transaction records accessible to the community.
</p>
<h2 class="text-[1.72rem] my-5 font-semibold ">Why Your Sponsorship Matters:</h2>
<ol class="list-decimal text-2xl">
<li>
Enhancing Quality: Monetary incentives drive bug finders to outdo their previous bests, leading to
higher-quality findings.
</li>
<li>
Community Engagement: Regolar contributions indicate a thriving BLT community that appreciates and values
its members.
</li>
<li>Branding Opportunity: As a sponsor, gain favorable visibility and goodwill among a dedicated community.</li>
</ol>
<h2 class="text-[1.72rem] my-5 font-semibold ">Let’s Make a Difference Together!</h2>
<p class=" text-2xl">
Your backing is instrumental in scolpting BLT's success. By choosing to contribute, you're
endorsing quality,
commitment, and collaborative growth. For any assistance or further information, please [contact our team].
</p>
<p>Thank you for championing the spirit of excellence on BLT!</p>
</div>
<script>
async function getBCHPriceInUSD() {
const apiUrl = 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin-cash&vs_currencies=usd';
try {
let response = await fetch(apiUrl);
let data = await response.json();
return data["bitcoin-cash"].usd;
} catch (error) {
console.error("Error fetching BCH price:", error);
return null;
}
async function getBCHPriceInUSD() {
const apiUrl = 'https://api.coingecko.com/api/v3/simple/price?ids=bitcoin-cash&vs_currencies=usd';
try {
let response = await fetch(apiUrl);
let data = await response.json();
return data["bitcoin-cash"].usd;
} catch (error) {
console.error("Error fetching BCH price:", error);
return null;
}

// async function getBCHBalance() {
// const walletAddress = document.getElementById("walletAddress").innerHTML;
// const apiUrl = `https://api.blockchair.com/bitcoin-cash/dashboards/address/${walletAddress}`;

// try {
// let [response, bchPrice] = await Promise.all([fetch(apiUrl), getBCHPriceInUSD()]);

// let data = await response.json();

// const balance = data.data[walletAddress].address.balance / 1e8; // Convert satoshis to BCH

// if (bchPrice) {
// const usdBalance = balance * bchPrice;
// document.getElementById("balanceDisplay").innerText = `Balance: ${balance} BCH (~$${usdBalance.toFixed(2)} USD)`;
// } else {
// document.getElementById("balanceDisplay").innerText = `Balance: ${balance} BCH (Failed to fetch USD conversion)`;
// }
// } catch (error) {
// console.error("Error fetching balance:", error);
// document.getElementById("balanceDisplay").innerText = "Error fetching balance.";
// }
// }
// getBCHBalance();
}
</script>
{% endblock content %}

0 comments on commit 472107b

Please sign in to comment.