"""HTML views for the source-grounded ioby offline experience."""
from __future__ import annotations
from html import escape
from typing import Any, Iterable, Mapping
from urllib.parse import quote
PROJECT = {
"slug": "make-block-bloom",
"title": "Make the Block Bloom",
"summary": "Rebuilding our green spaces, healing our connections with each other and with the land",
"leader": "Kofi Thomas",
"location": "50 Goodwin Place Brooklyn, NY 11207",
"raised": "$32,161.00",
"goal": "$32,086.00",
}
def money(cents: int) -> str:
return f"${cents / 100:,.2f}"
def _account_links(account: Mapping[str, Any] | None) -> str:
if account:
name = escape(str(account.get("display_name") or "Local account"))
return (
'
{footer()}"""
return layout("Crowdfunding for community-led change", body, account)
def _project_cards() -> str:
projects = (
(
"crystal-gardens.jpg",
"Ended 03/16/2024",
"p5",
"$6,133.63",
"$6,433.63",
"The Crystal Gardens: An Immersive Healing Art Exhibition",
"Focusing on the mental health in our community while providing access to positive coping mechanisms.",
"Cleveland, OH",
"/project/crystal-gardens-immersive-healing-art-exhibition/",
),
(
"resource-center.jpg",
"77 days left",
"p2",
"$12,240.00",
"$12,500.00",
"10th Street Neighborhood Resource Center",
"Help us raise funds for the planning, organizing, and art space open for residents of the Historic 10th Street District!",
"Dallas, TX",
"/project/10th-street-neighborhood-resource-center/",
),
(
"lemonade-stand.jpg",
"Ended 07/31/2024",
"p71",
"$1,191.63",
"$4,081.63",
"Sweet & Sassy Girls - Lemonade Stand",
"The Sweet & Sassy girls will raise money at the annual lemonade stand to purchase school uniforms for children in need.",
"Brooklyn, NY",
"/project/sweet-sassy-girls-lemonade-stand/",
),
)
result: list[str] = []
for image, ended, progress, needed, goal, title, summary, location, href in projects:
result.append(
f"""
{count} results | Page {'0' if no_results else '1'} out of {pages}
{empty}{footer()}"""
return layout("Find a project to support", body, account)
def new_york(account: Mapping[str, Any] | None = None) -> str:
body = f"""
‹ PLACES
New York
ioby was founded in Brooklyn, New York over fifteen years ago as a tool to address the climate crisis. Top down solutions were not meeting the urgent needs of neighbors, who felt compelled to take action for a more sustainable planet. From there, ioby bloomed to support a vast array of social impact projects that focused on racial equity, queer liberation, immigrant justice, and so much more.
Given our Brooklyn roots, New York remains one of the primary hubs of ioby’s work. Since 2008, leaders have raised almost $9M on ioby across the state.
This project was eligible for matching funds through 2021 NYC COVID-19 Just Recovery Match Fund
{PROJECT['title']}
{PROJECT['summary']}
Leader
{PROJECT['leader']}
Location
{PROJECT['location']}
{notice_html}
About this project
Make the Block Bloom brought neighbors together to rebuild green spaces, grow food, and strengthen connections to the land. The archived project was led by Kofi Thomas in Brooklyn, New York.
Why this matters
Healthy public green space supports learning, wellbeing, and lasting relationships between neighbors.
Project updates
Thank you, neighbors
The campaign reached its goal. This offline record preserves the public impact story.
Budget
Garden materials, neighborhood workshops, plants, tools, and project coordination.
Donor recognition
Supporters could choose public recognition or remain anonymous.
WebsiteBench local simulation
The source campaign is closed. The button below starts a local-only donation journey; no money is moved and no message is sent.
"
def match_programs(account: Mapping[str, Any] | None = None) -> str:
items = (
("Past program", "2020 Cuyahoga Arts & Culture Match Fund", "/match/2020-cuyahoga-arts-culture/"),
("Past program", "2020 Doors Open Pittsburgh Match Challenge", "/match/2020-doors-open-pittsburgh/"),
("Past program", "2020 Healthy Neighborhoods Challenge", "/match/2020-healthy-neighborhoods/"),
("Past program", "2021 Con Edison Power Up Neighborhood Match", "/match/2021-con-edison-power-up/"),
("Past program", "2021 Cuyahoga Arts & Culture Match Fund", "/match/2021-cuyahoga-arts-culture/"),
("Past program", "2021 Detroit Match Program", "/match/2021-detroit/"),
)
body = f"""
COMMUNITY FUNDS GO FURTHER
Match Programs
ioby partnered with local organizations to match donations to eligible neighborhood projects.
How match funding worked at ioby
Match programs brought flexible funding and one-on-one support to resident-led work. Explore a selection of the programs preserved in the public archive.
ioby gave neighborhood leaders the tools and support to plan, fund, and carry out positive change.
About Our Services
Leaders received fiscal sponsorship, coaching, fundraising tools, and access to match opportunities throughout their campaigns.
{_reference_cards(items, kind="service-cards")}{footer()}"""
return layout("How It Worked", body, account, body_class="how-page")
def about(account: Mapping[str, Any] | None = None) -> str:
links = (
("MORE ABOUT US", "Reports", "/about/reports/"),
("MORE ABOUT US", "Transparency", "/about/transparency/"),
("POLICIES", "Privacy Policy", "/about/privacy/"),
("POLICIES", "Terms & Conditions", "/about/terms/"),
)
values = (
("Neighborhood wisdom", "Residents understand their communities and should lead the change they want to see."),
("Racial equity", "Community investment works best when resources and decisions stay close to neighbors."),
("Collective power", "Small donations, practical tools, and shared effort can build lasting local impact."),
)
value_html = "".join(f'
{escape(title)}
{escape(copy)}
' for title, copy in values)
body = f"""
More than just crowdfunding. Community-led positive change.
Our Mission
ioby mobilized neighbors who had good ideas to become powerful civic leaders who planned, funded, and made positive change in their own neighborhoods.
Featured in
Public radio · Local news · National community and nonprofit publications
Our Values
{value_html}
More about us
{_reference_cards(links, kind="about-cards")}{footer()}"""
return layout("About", body, account, body_class="about-page")
def resources(account: Mapping[str, Any] | None = None) -> str:
items = (
("Guides", "Making It Rain", "/resources/making-it-rain/"),
("Guides", "Recipes For Change", "/resources/recipes-for-change/"),
("Guides", "Leader Toolkit", "/resources/leader-toolkit/"),
("Announcement", "Closing Our Doors", "/resources/closing/"),
("Ideas", "Report from The Field: The Northwest Arkansas Neighborhood Match Program", "/resources/report-from-the-field-the-northwest-arkansas-neighborhood-match-program/"),
("Leader Stories", "10 Climate-Conscious Projects We Love", "/resources/10-climate-conscious-projects-we-love/"),
("Guides", "ioby’s Comprehensive Guide to End-of-Year Fundraising", "/resources/iobys-comprehensive-guide-to-end-of-year-fundraising/"),
("Guides", "Active Transit Toolkit", "/resources/active-transit-toolkit/"),
("Ideas", "Sustaining Justice in our Neighborhoods, Block by Block", "/resources/sustaining-justice-in-our-neighborhoods-block-by-block/"),
)
body = f"""
Resources
Guides, ideas, and stories from community leaders.