Skip to content

Commit

Permalink
adds new logic for upcoming events, bases it off start date
Browse files Browse the repository at this point in the history
  • Loading branch information
AKCodez committed Nov 20, 2023
2 parents b608d04 + f7a05c8 commit cb1b811
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 42 deletions.
Binary file added assets/XRPL_Brand_Kit.zip
Binary file not shown.
Binary file added assets/img/events/paris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/img/events/singapore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/XRPL_Logo_Kit.zip
Binary file not shown.
29 changes: 15 additions & 14 deletions dactyl-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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
Expand Down
53 changes: 39 additions & 14 deletions template/page-community.html.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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:
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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
Expand All @@ -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));
Expand All @@ -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'
Expand Down
48 changes: 34 additions & 14 deletions tool/filter_categorize_dates.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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",
"location": "Virtual",
"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",
Expand Down Expand Up @@ -396,15 +396,6 @@
"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",
Expand All @@ -414,16 +405,45 @@
"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",
"date": "October 19, 2023 - December 22, 2023",
"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 = []
Expand Down

0 comments on commit cb1b811

Please sign in to comment.