diff --git a/_data/partnerships.json b/_data/partnerships.json new file mode 100644 index 00000000..9d71e304 --- /dev/null +++ b/_data/partnerships.json @@ -0,0 +1,23 @@ +[ + { + "name": "TalkPython Training", + "promo_code": "bpd-20pc-1c1da", + "description": "When you use the Black Python Devs landing page or use the promo code: bpd-20pc-1c1da at checkout, you will receive 10% off your course purchase. TalkPython Training will also donate 20% of the purchase to Black Python Devs.", + "url": "https://training.talkpython.fm/black-python-devs", + "logo": "/assets/images/talkpython.webp" + }, + { + "name": "O'Reilly Media", + "promo_code": "https://oreillymedia.pxf.io/c/5713155/2126973/15173", + "description": "Sign up with our promo code to receive a 30-day trial of O'Reilly's Learning Platform. If you sign up beyond the trial a percentage of your subscription will go to Black Python Devs.", + "url": "/2024-09-09-oreilly-partnership/", + "logo": "/assets/images/oreilly_logo_mark_red.svg" + }, + { + "name": "Books, Courses, and Trainings by Rodrigo Girão Serrão", + "promo_code": "BLACKPYTHONDEVS", + "description": "se the code BLACKPYTHONDEVS to get 10% off all ebooks, cheatsheets, and most courses, that I offer. When you use that code, you're also donating 20% of the value of your purchase to Black Python Devs", + "url": "https://mathspp.com/black-python-devs", + "logo": "assets/images/rodrigo.png" + } +] diff --git a/_data/partnerships.yml b/_data/partnerships.yml deleted file mode 100644 index 8805134d..00000000 --- a/_data/partnerships.yml +++ /dev/null @@ -1,11 +0,0 @@ -- name: "TalkPython Training" - promo_code: "bpd-20pc-1c1da" - description: 'When you use the Black Python Devs landing page or use the promo code: bpd-20pc-1c1da at checkout, you will receive 10% off your course purchase. TalkPython Training will also donate 20% of the purchase to Black Python Devs.' - url: "https://training.talkpython.fm/black-python-devs" - logo: "/assets/images/talkpython.webp" - -- name: "O'Reilly Media" - promo_code: "https://oreillymedia.pxf.io/c/5713155/2126973/15173" - description: 'Sign up with our promo code to receive a 30-day trial of O''Reilly''s Learning Platform. If you sign up beyond the trial a percentage of your subscription will go to Black Python Devs.' - url: "/2024-09-09-oreilly-partnership/" - logo: "/assets/images/oreilly_logo_mark_red.svg" diff --git a/_layouts/_includes/footer.html b/_layouts/_includes/footer.html index afdae25d..42b4394c 100644 --- a/_layouts/_includes/footer.html +++ b/_layouts/_includes/footer.html @@ -13,6 +13,7 @@

Quick link

  • About Us
  • BPD Events
  • Sponsored Events
  • +
  • Partnerships
  • Community
  • Support
  • diff --git a/_layouts/_includes/partnerships.html b/_layouts/_includes/partnerships.html deleted file mode 100644 index c4bb91bf..00000000 --- a/_layouts/_includes/partnerships.html +++ /dev/null @@ -1,22 +0,0 @@ -
    -

    Partnerships

    - -

    We're happy to share with you our proud sponsors who offer their products at discounted rates and a portion of proceeds go to support Black Python Devs!

    - -
    - {% for partner in partnerships %} - - {% endfor %} -
    -
    diff --git a/_layouts/index.html b/_layouts/index.html index 6a4e0939..3722d3d0 100644 --- a/_layouts/index.html +++ b/_layouts/index.html @@ -24,6 +24,5 @@

    Helping build communities for Black Pythonistas around the {% include "_includes/latest-posts.html" %} {% include "_includes/join_us.html" %} - {% include "_includes/partnerships.html" %} {% include "_includes/newsletter_form.html" %} {% endblock %} diff --git a/_layouts/partnerships.html b/_layouts/partnerships.html new file mode 100644 index 00000000..9066e10e --- /dev/null +++ b/_layouts/partnerships.html @@ -0,0 +1,24 @@ +{% extends "default.html" %} + +{% block content %} +
    +

    Partnerships

    + +

    We're happy to share with you our proud sponsors who offer their products at discounted rates and a portion of proceeds go to support Black Python Devs!

    + + {% for partner in data %} + + {% endfor %} +
    +{%endblock%} diff --git a/app.py b/app.py index 6463726c..4ed0b3ed 100644 --- a/app.py +++ b/app.py @@ -2,8 +2,6 @@ import json import pathlib -import yaml - from render_engine import Site, Page, Collection, Blog from render_engine_markdown import MarkdownPageParser @@ -18,6 +16,7 @@ "fa": "fa fa-handshake fa-fw", }, {"text": "Community", "url": "/community.html", "fa": "fa fa-users fa-fw"}, + {"text": "Discounts", "url": "/partnerships.html", "fa": "fa-regular fa-handshake"}, { "text": "Support Us", "url": "/support.html", @@ -43,7 +42,6 @@ class Index(Page): @app.page class About(Page): template = "about.html" - data = yaml.safe_load(pathlib.Path("_data/leadership.yaml").read_text()) @app.page @@ -62,6 +60,12 @@ class SponsoredEvents(Page): template_vars = {} +@app.page +class Partnerships(Page): + template = "partnerships.html" + data = json.loads(pathlib.Path("_data/partnerships.json").read_text()) + + @app.collection class Pages(Collection): Parser = MarkdownPageParser diff --git a/assets/images/rodrigo.png b/assets/images/rodrigo.png new file mode 100644 index 00000000..e8248a6c Binary files /dev/null and b/assets/images/rodrigo.png differ