adds new logic for upcoming events, bases it off start date

This commit is contained in:
akcodez
2023-11-20 06:28:01 -08:00
7 changed files with 88 additions and 42 deletions

BIN
assets/XRPL_Brand_Kit.zip Normal file

Binary file not shown.

BIN
assets/img/events/paris.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 KiB

Binary file not shown.

View File

@@ -4945,6 +4945,21 @@ pages:
top_nav_grouping: 開発
targets:
- ja
- name: XRPL Brand Kit
html: https://xrpl.org/assets/XRPL_Brand_Kit.zip
parent: resources.html
blurb: Review guidelines for using XRPL design assets.
top_nav_grouping: Development
targets:
- en
- name: XRPLブランドキット
html: https://xrpl.org/assets/XRPL_Brand_Kit.zip
parent: resources.html
blurb: XRPLのデザインアセットのガイドラインを確認しましょう。
top_nav_grouping: 開発
targets:
- ja
- name: Ledger Explorer
html: https://livenet.xrpl.org/
@@ -5196,20 +5211,6 @@ pages:
targets:
- ja
- name: XRPL Brand Kit
html: https://github.com/XRPLF/xrpl-dev-portal/raw/master/content/XRPL_Logo_Kit.zip
parent: contribute.html
blurb: Review guidelines for using XRPL design assets.
targets:
- en
- name: XRPLブランドキット
html: https://github.com/XRPLF/xrpl-dev-portal/raw/master/content/XRPL_Logo_Kit.zip
parent: contribute.html
blurb: XRPLのデザインアセットのガイドラインを確認しましょう。
targets:
- ja
- md: contributing/report-a-scam.md
targets:
- en

View File

@@ -95,7 +95,7 @@
<div class="num-separator"></div>
<h5 id="upcoming-event-name" class="event-name">{% trans %}XRPL Warsaw Meetup 2023{% endtrans %}</h5>
<p class="mb-2 event-details d-flex icon"> <span class="icon-location"> </span><span id="upcoming-event-date">September 08-09, 2023</span></p>
<p class="event-location d-flex icon"> <span class="icon-date" id="upcoming-event-location"> </span>Warsaw, Poland</p>
<p class="event-location d-flex icon"> <span class="icon-date" id="upcoming-event-location"> </span><span id="location-tag"> Warsaw, Poland </span></p>
</div>
<a target="_blank" class="cd-none-lg btn btn-primary btn-arrow view-all-events-btn" href="events.html">{% trans %}View All Events{% endtrans %}</a>
</section>
@@ -255,6 +255,38 @@
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
const events = [
{ "name": "New Horizon: Innovate Without Limits: New Horizons Await",
"description": "Join our EVM-compatible chain launch for a chance to win $50,000 in prizes! Unleash your creativity in DeFi and NFTs, with judging criteria focused on novelty, impact, and community engagement.",
"type": "hackathon",
"link": "https://newhorizon.devpost.com/",
"location": "Virtual",
"date": "October 19, 2023 - December 22, 2023",
"image": "Hackathons.png",
"end_date": "December 22, 2023",
"start_date": "October 19, 2023"
},
{
"name": "XRPL Community Report Launch Party",
"description": "Celebrate the XRPL Community Report launch at 7pm! Join blockchain enthusiasts, connect with experts, and discover opportunities in the XRP Ledger ecosystem. Limited space available, so register now for a night of celebration and networking!",
"type": "meetup",
"link": "https://www.eventbrite.fr/e/billets-xrpl-community-report-launch-party-753788370307",
"location": "Paris, France",
"date": "November 28, 7pm - 9pm",
"image": "paris.png",
"end_date": "November 28, 2023",
"start_date": "November 28, 2023"
},
{
"name": "XRPL Toronto Meetup Community - Celebrate with Us!",
"description": "To connect the blockchain community, showcase campus ambassador projects, and celebrate the year's progress with a holiday theme.",
"type": "meetup",
"link": "https://www.meetup.com/xrpl-toronto-community-meetup/events/294766059",
"location": "Downtown, Toronto",
"date": "December 7th, 6pm - 9pm",
"image": "event-meetup-toronto@2x.jpg",
"end_date": "December 7, 2023",
"start_date": "December 7, 2023"
},
{
name: "XRPL Grants Info Session: Decentralized Exchange (DEX) Focused",
description:
@@ -265,6 +297,7 @@ const events = [
date: "September 06, 2023",
image: "InfoSessions.png",
end_date: "September 06, 2023",
start_date: "September 06, 2023",
},
{
name: "APEX 2024: The XRPL Developer Summit",
@@ -276,6 +309,7 @@ const events = [
date: "June 11 - 13, 2024",
image: "Conference.png",
end_date: "June 13, 2024",
start_date: "June 11, 2024",
},
{
name: "XRPL Developers Reddit AMA: Real World Assets",
@@ -287,17 +321,8 @@ const events = [
date: "October 17, 2023",
image: "AMAs.png",
end_date: "October 17, 2023",
},
{
name: "New Horizon: Innovate Without Limits: New Horizons Await",
description:
"Join us to kickstart the ecosystem of the upcoming EVM-compatible chain, opening new possibilities for developers to explore the limitless potential of our platform.",
type: "hackathon",
link: "https://newhorizon.devpost.com/",
location: "Virtual",
date: "October 19, 2023 - December 22, 2023",
image: "Hackathons.png",
end_date: "December 22, 2023",
start_date: "October 17, 2023",
},
];
// Function to convert string date to Date object
@@ -320,7 +345,7 @@ const parseDate = (dateString) => {
let minDaysDiff = Infinity;
events.forEach(event => {
const eventEndDate = parseDate(event.end_date);
const eventEndDate = parseDate(event.start_date);
const diffTime = eventEndDate - today;
const diffDays = Math.ceil(diffTime / (1000 * 60 * 60 * 24));
@@ -334,7 +359,7 @@ const parseDate = (dateString) => {
document.getElementById('days-count').textContent = `${minDaysDiff}`;
document.getElementById('upcoming-event-name').textContent = closestEvent.name;
document.getElementById('upcoming-event-date').textContent = closestEvent.date;
document.getElementById('upcoming-event-location').textContent = closestEvent.location;
document.getElementById('location-tag').textContent = closestEvent.location;
} else {
console.log('No upcoming events found. Hiding upcoming events section');
document.getElementById('upcoming-events-section').style = 'display:none'

View File

@@ -1,6 +1,7 @@
from datetime import datetime
events = [
{ "name": "Hackathon: 2021",
{
"name": "Hackathon: 2021",
"description": "Explore the exciting project submissions from the fall 2021 XRPL Hackathon that focused on the NFT and Hooks smart contract functionalities on the ledger.",
"type": "hackathon",
"link": "https://xrpl-hackathon-2021.devpost.com/project-gallery",
@@ -8,8 +9,7 @@ events = [
"date": "September 13-October 6, 2021",
"image": "Hackathons.png",
"end_date": "October 6, 2021",
},
},
{ "name": "XRPL Community Meetup: San Diego",
"description": "The first official Meetup hosted by the XRPL Community. Community members in Southern California gathered around a firepit and shared their experiences with the XRPL.",
"type": "meetup",
@@ -396,15 +396,6 @@ events = [
"image": "AMAs.png",
"end_date": "October 17, 2023"
},
{ "name": "XRPL Accelerator Demo Day",
"description": "Join us for XRPL Accelerator Demo Day in Singapore! Explore pitches from 11 promising startups building on the XRP Ledger, network with founders and investors, and kickstart the Singapore FinTech Festival. Webinar link coming soon!",
"type": "meetup",
"link": "https://www.eventbrite.co.uk/e/xrpl-demo-day-tickets-740650023157?aff=oddtdtcreator",
"location": "Hybrid Singapore/Virtual Webinar",
"date": "November 14, 2023",
"image": "SouthKoreaMeetup.png",
"end_date": "November 14, 2023"
},
{ "name": "XRPL Blockhack Hackathon",
"description": "Join us at George Brown College's Waterfront Campus for workshops and talks on promoting growth for blockchain projects and ventures. We are supporting a for the most innovative application built on XRPL.",
"type": "hackathon",
@@ -414,9 +405,17 @@ events = [
"image": "Hackathons.png",
"end_date": "October 22, 2023"
},
{ "name": "XRPL Accelerator Demo Day",
"description": "Join us for XRPL Accelerator Demo Day in Singapore! Explore pitches from 11 promising startups building on the XRP Ledger, network with founders and investors, and kickstart the Singapore FinTech Festival. Webinar link coming soon!",
"type": "meetup",
"link": "https://www.eventbrite.co.uk/e/xrpl-demo-day-tickets-740650023157?aff=oddtdtcreator",
"location": "Hybrid Singapore/Virtual Webinar",
"date": "November 14, 2023",
"image": "singapore.png",
"end_date": "November 14, 2023"
},
{ "name": "New Horizon: Innovate Without Limits: New Horizons Await",
"description": "Join us to kickstart the ecosystem of the upcoming EVM-compatible chain, opening new possibilities for developers to explore the limitless potential of our platform.",
"description": "Join our EVM-compatible chain launch for a chance to win $50,000 in prizes! Unleash your creativity in DeFi and NFTs, with judging criteria focused on novelty, impact, and community engagement.",
"type": "hackathon",
"link": "https://newhorizon.devpost.com/",
"location": "Virtual",
@@ -424,6 +423,27 @@ events = [
"image": "Hackathons.png",
"end_date": "December 22, 2023"
},
{
"name": "XRPL Community Report Launch Party",
"description": "Celebrate the XRPL Community Report launch at 7pm! Join blockchain enthusiasts, connect with experts, and discover opportunities in the XRP Ledger ecosystem. Limited space available, so register now for a night of celebration and networking!",
"type": "meetup",
"link": "https://www.eventbrite.fr/e/billets-xrpl-community-report-launch-party-753788370307",
"location": "Paris, France",
"date": "November 28, 7pm - 9pm",
"image": "paris.png",
"end_date": "November 28, 2023"
},
{
"name": "XRPL Toronto Meetup Community - Celebrate with Us!",
"description": "To connect the blockchain community, showcase campus ambassador projects, and celebrate the year's progress with a holiday theme.",
"type": "meetup",
"link": "https://www.meetup.com/xrpl-toronto-community-meetup/events/294766059",
"location": "Downtown, Toronto",
"date": "December 7th, 6pm - 9pm",
"image": "event-meetup-toronto@2x.jpg",
"end_date": "December 7, 2023"
},
]
def categorize_dates():
past = []