$def with (stats=None, blog_posts=None, monthly_reads=None, test=False) $ _x = ctx.setdefault('cssfile', 'home') $var title: $_("Welcome to Open Library") $ meta_description = "Open Library is an open, editable library catalog, building towards a web page for every book ever published." $ meta_image_url = "https://openlibrary.org/static/images/ol-banner.png" $add_metatag(property="og:title", content="OpenLibrary.org") $add_metatag(property="og:description", content=meta_description) $add_metatag(property="og:image", content=meta_image_url) $add_metatag(property="og:url", content="https://openlibrary.org") $add_metatag(property="og:site_name", content="Open Library") $add_metatag(name="twitter:image:alt", content="Open Library Logo") $add_metatag(name="twitter:card", content="homepage_summary")
$:render_template("home/welcome", test=test) $:render_template("books/custom_carousel", books=readonline_carousel(), title=_('Classic Books'), url="/read", key="public_domain", test=test) $if monthly_reads and not test: $:macros.QueryCarousel(query=monthly_reads['query'], title=monthly_reads['title'], key="monthly_reads", url=monthly_reads['url'], sort='random.hourly') $:render_template("home/custom_ia_carousel", title=_('Books We Love'), key="staff_picks", query='languageSorter:("English")', subject="openlibrary_staff_picks", sorts=["lending___last_browse desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title=_('Recently Returned'), key="recently_returned", sorts=["lending___last_browse desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title=_('Romance'), key="romance", query="subject:(romance)", sorts=["lending___last_browse desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title=_('Kids'), key="children", query="subject:(Juvenile Fiction)", sorts=["lending___last_browse desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title=_('Thrillers'), key="thrillers", query="preset:thrillers", sorts=["downloads desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title=_('Textbooks'), key="textbooks", subject="textbooks", sorts=["lending___last_browse desc"], limit=18, test=test) $:render_template("home/custom_ia_carousel", title="Authors Alliance & MIT Press", key="authorsalliance_mit_press", query="preset:authorsalliance_mitpress", limit=18, test=test) $:render_template("home/categories", test=test) $:render_template("home/stats", stats) $:render_template("home/about", blog_posts)