beeware.github.io/templates/home.html
2022-04-06 12:14:14 +08:00

212 lines
8.2 KiB
HTML

{% extends "layout.html" %}
{% from "macros/sponsor.html" import sponsorship_level %}
{% from "macros/translation.html" import transbag %}
{% set t_projects = transbag('translate', this.alt, 'projects') %}
{% set t_latest_news = transbag('translate', this.alt, 'latest_news') %}
{% set t_previous = transbag('translate', this.alt, 'previous') %}
{% set t_next = transbag('translate', this.alt, 'next') %}
{% set t_meet_team = transbag('translate', this.alt, 'meet_team') %}
{% set t_keynoting = transbag('translate', this.alt, 'keynoting') %}
{% set t_speaking = transbag('translate', this.alt, 'speaking') %}
{% set t_tutorial = transbag('translate', this.alt, 'tutorial') %}
{% set t_come_see_us = transbag('translate', this.alt, 'come_see_us') %}
{% set t_sprinting = transbag('translate', this.alt, 'sprinting') %}
{% set t_ad_hoc_sponsor = transbag('translate', this.alt, 'ad_hoc_sponsor') %}
{% block title %}{{ this.title }}{% endblock %}
{% block preamble %}
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="hidden-xl-down col-xl-4">
<img class="beeware-logo float-sm-left" src="{{ '/static/images/brutus-270.png'|asseturl }}">
</div>
<div class="col-sm-12 col-md-8">
<h1 class="display-1">BeeWare</h1>
<h2 class="display-2">{{ this.title }}</h2>
<p>{{ this.description }}</p>
<p class="jumbotron-buttons">
{% for blk in this.header.blocks %}
{{ blk }}
{% endfor %}
</p>
</div>
</div>
</div>
</div>
{% endblock %}
{% block body %}
<!-- MD and Larger Project List -->
<div class="row">
<div class="col-sm-7 mr-auto">
{% for blk in this.body.blocks %}
{% if blk._flowblock == 'button-block' %}
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
{{ blk }}
</div>
</div>
{% else %}
<div>
{{ blk }}
</div>
{% endif %}
{% endfor %}
</div><!-- / main content -->
<div class="d-none d-sm-block col-sm-4">
<div class="sidebar-module sidebar-module-inset gutter">
{#
Mar 30 2019: Removed the sponsors block because there's no current sponsors.
However, any site redesign needs to keep a place for it.
{{ this.gutter_top }}
<div id="carousel-members" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-members" data-slide-to="0" class="active"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<p><a href="{{ '/community/members/revsys/'|url(alt=this.alt) }}"><img class="img-fluid" src="/community/members/revsys/revsys-large.png"></a></p>
<p>{{ t_ad_hoc_sponsor }}</p>
</div>
</div>
</div>
<hr/>
#}
<h3><a href="{{ '/news/buzz/'|url(alt=this.alt) }}">{{ t_latest_news }}</a></h3>
{% set blog = site.query('/news/buzz', alt=this.alt).all() %}
<p><a href="{{ blog[0]|url(alt=this.alt) }}">{{ blog[0].pub_date.strftime("%d %b")}}: {{ blog[0].title }}</a></p>
<hr/>
{% set events = site.query('/news/events', alt=this.alt).filter(F.upcoming==True) %}
{% if events %}
<h3><a href="{{ '/news/events/'|url(alt=this.alt) }}">{{ t_meet_team }}</a></h3>
<div id="carousel-events" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{% for event in events %}
<li data-target="#carousel-events" data-slide-to="{{ loop.index0 }} "{% if loop.index0 == 0 %} class="active"{% endif %}></li>
{% endfor %}
</ol>
<div class="carousel-inner" role="listbox">
{% for event in events %}
<div class="carousel-item{% if loop.index0 == 0 %} active{% endif %}">
<h4><a href="{{ event|url(alt=this.alt) }}">{{ event.title }}</a></h4>
{% if event.event_type == "keynote" %}
{{ event.speaker[0] }} {{ t_keynoting }}
{% elif event.event_type == "talk" %}
{{ event.speaker[0] }} {{ t_speaking }}
{% elif event.event_type == "tutorial" %}
{{ event.speaker[0] }} {{ t_tutorial }}
{% elif event.event_type == "booth" %}
{{ t_come_see_us }}
{% elif event.event_type == "sprint" %}
{{ t_sprinting }}
{% else %} <br>
{% endif %}
<p>{{ event.date.strftime("%d %B %Y") }}</p>
</div>
{% endfor %}
</div>
</div>
<hr/>
{% endif %}
<h2><a href="{{ '/project/projects/'|url(alt=this.alt) }}">{{ t_projects }}</a></h2>
{% set project_types = site.query('/project/projects', alt=this.alt) %}
{% for project_type in project_types %}
{% for project in site.query(project_type.path, alt=this.alt).filter(F.showcase==True) %}
<div>
<h4><a href="{{ project|url(alt=this.alt) }}"><img src="{{ site.get(project.path, alt='_primary')|url }}{{ project.image }}" height="32px" alt="{{ project.name }}"> {{ project.name }}</h4></a>
{{ project.short_description|safe }}
</div>
{% endfor %}
{% endfor %}
{{ this.gutter_bottom }}
</div>
</div>
</div>
<!-- SM Project List -->
<div class="row" style="background-color: #e9ecef;">
<div class="col-sm-12 d-block d-sm-none gutter">
{{ this.gutter_top }}
{#
Mar 30 2019: Removed the sponsors block because there's no current sponsors.
However, any site redesign needs to keep a place for it.
<div id="carousel-members" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-members" data-slide-to="0" class="active"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<p><a href="{{ '/community/members/revsys/'|url(alt=this.alt) }}"><img class="img-fluid" src="/community/members/revsys/revsys-large.png"></a></p>
<p>{{ t_ad_hoc_sponsor }}</p>
</div>
</div>
</div>
<hr/>
#}
<h3><a href="{{ '/news/buzz/'|url(alt=this.alt) }}">{{ t_latest_news }}</a></h3>
{% set blog = site.query('/news/buzz', alt=this.alt).all() %}
<p><a href="{{ blog[0]|url(alt=this.alt) }}">{{ blog[0].pub_date.strftime("%d %b")}}: {{ blog[0].title }}</a></p>
<hr/>
{% set events = site.query('/news/events', alt=this.alt).filter(F.upcoming==True) %}
{% if events %}
<h3><a href="{{ '/news/events/'|url(alt=this.alt) }}">{{ t_meet_team }}</a></h3>
<div id="carousel-events" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
{% for event in events %}
<li data-target="#carousel-events" data-slide-to="{{ loop.index0 }} "{% if loop.index0 == 0 %} class="active"{% endif %}></li>
{% endfor %}
</ol>
<div class="carousel-inner" role="listbox">
{% for event in events %}
<div class="carousel-item{% if loop.index0 == 0 %} active{% endif %}">
<h4><a href="{{ event|url(alt=this.alt) }}">{{ event.title }}</a></h4>
{% if event.event_type == "keynote" %}
{{ event.speaker[0] }} {{ t_keynoting }}
{% elif event.event_type == "talk" %}
{{ event.speaker[0] }} {{ t_speaking }}
{% elif event.event_type == "tutorial" %}
{{ event.speaker[0] }} {{ t_tutorial }}
{% elif event.event_type == "booth" %}
{{ t_come_see_us }}
{% elif event.event_type == "sprint" %}
{{ t_sprinting }}
{% else %} <br>
{% endif %}
<p>{{ event.date.strftime("%d %B %Y") }}</p>
</div>
{% endfor %}
</div>
</div>
<hr/>
{% endif %}
<h2><a href="{{ '/project/projects/'|url(alt=this.alt) }}">{{ t_projects }}</a></h2>
{% set project_types = site.query('/project/projects', alt=this.alt) %}
{% for project_type in project_types %}
{% for project in site.query(project_type.path, alt=this.alt).filter(F.showcase==True) %}
<div>
<h4><a href="{{ project|url(alt=this.alt) }}"><img src="{{ site.get(project.path, alt='_primary')|url }}{{ project.image }}" height="32px" alt="{{ project.name }}"> {{ project.name }}</h4></a>
{{ project.short_description|safe }}
</div>
{% endfor %}
{% endfor %}
{{ this.gutter_bottom }}
</div>
</div>
{% endblock %}