Skip to content

Commit

Permalink
Added TED Hotspot
Browse files Browse the repository at this point in the history
  • Loading branch information
rgaudin committed Aug 15, 2024
1 parent 7627762 commit 84dfde5
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
11 changes: 10 additions & 1 deletion scheduler/src/routes/stripe.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,31 @@
LANG_STRINGS = {
"en": {
"product_wikipedia": "Wikipedia Hotspot English",
"product_ted": "TED Hotspot",
"product_preppers": "Preppers Hotspot",
"product_computer": "Computer Hotspot",
"product_access_1m": "One month Imager Access",
"product_access_1y": "Annual Imager Access",
},
"de": {
"product_wikipedia": "Wikipedia Hotspot auf Deutsch",
"product_ted": "TED Hotspot",
"product_preppers": "Preppers Hotspot",
"product_computer": "Computer Hotspot",
"product_access_1m": "One month Imager Access",
"product_access_1y": "Annual Imager Access",
},
"es": {
"product_wikipedia": "Wikipedia Hotspot en español",
"product_ted": "TED Hotspot",
"product_preppers": "Preppers Hotspot",
"product_computer": "Computer Hotspot",
"product_access_1m": "One month Imager Access",
"product_access_1y": "Annual Imager Access",
},
"fr": {
"product_wikipedia": "Wikipedia Hotspot Français",
"product_ted": "TED Hotspot",
"product_preppers": "Preppers Hotspot",
"product_computer": "Computer Hotspot",
"product_access_1m": "Accès Imager 1 mois",
Expand Down Expand Up @@ -270,6 +274,11 @@ def handle_access_order(session, customer):
os.getenv("STRIPE_PRICE_PP"),
handle_image_order,
),
"ted": (
os.getenv("STRIPE_METHOD_TED"),
os.getenv("STRIPE_PRICE_TED"),
handle_image_order,
),
"computer": (
os.getenv("STRIPE_METHOD_CS"),
os.getenv("STRIPE_PRICE_CS"),
Expand Down Expand Up @@ -419,7 +428,7 @@ def success():

context = {"customer": customer, "session": session, "shop_url": SHOP_PUBLIC_URL}
product = session.metadata.get("product")
if product.startswith("wikipedia-") or product in ("preppers", "computer"):
if product.startswith("wikipedia-") or product in ("preppers", "computer", "ted"):
kind = "image"
http_url, torrent_url, _ = get_links_for(product)
context.update({"http_url": http_url, "torrent_url": torrent_url})
Expand Down
37 changes: 29 additions & 8 deletions scheduler/src/templates/stripe/shop.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,20 @@ <h2>Wikipedia package</h2>

<div class="offer">
<header>
<h2>Preppers package</h2>
<p>For all your SHTF needs</p>
<h2>TED Talks</h2>
<p>Tech, Entertainment & Design</p>
</header>
<section class="price"><span class="amount">$25</span></section>
<section class="description">
<ul>
<li>Dozens of resources on homesteading, water treatment, military and emergency medicine, <em>etc.</em></li>
<li>WikiHow, iFixit, and other repair resources</li>
<li>The entire Wikipedia</li>
<li>TrailSense and Survival apps for Android, ready to download</li>
<li>Fits on a 256 GB microSD card</li>
<li>More than 6,600 videos sorted by topics</li>
<li>From A like Astrobiology or AI to B like Business, M like Medicine... all the way to W like work-life balance</li>
<li>About 91 consecutive days of watching!</li>
<li>Requires a 1 TB microSD card</li>
</ul>
</section>
<form class="button-holder">
<input type="hidden" name="product" value="preppers">
<input type="hidden" name="product" value="ted">
<button class="btn btn-outline-secondary">Purchase</button>
<div class="loader"><i class="spinner-border spinner-border-xl" role="status"></i></div>
</form>
Expand Down Expand Up @@ -306,6 +305,28 @@ <h2>Computer package</h2>

<div class="table-offer">

<div class="offer">
<header>
<h2>Preppers package</h2>
<p>For all your SHTF needs</p>
</header>
<section class="price"><span class="amount">$25</span></section>
<section class="description">
<ul>
<li>Dozens of resources on homesteading, water treatment, military and emergency medicine, <em>etc.</em></li>
<li>WikiHow, iFixit, and other repair resources</li>
<li>The entire Wikipedia</li>
<li>TrailSense and Survival apps for Android, ready to download</li>
<li>Fits on a 256 GB microSD card</li>
</ul>
</section>
<form class="button-holder">
<input type="hidden" name="product" value="preppers">
<button class="btn btn-outline-secondary">Purchase</button>
<div class="loader"><i class="spinner-border spinner-border-xl" role="status"></i></div>
</form>
</div>

<div class="offer">
<header>
<h2>Build your own</h2>
Expand Down

0 comments on commit 84dfde5

Please sign in to comment.