Skip to content

Commit

Permalink
Add sponsors section with vagabond adventures
Browse files Browse the repository at this point in the history
  • Loading branch information
kellpossible committed Jan 19, 2024
1 parent 290a41f commit 3b4f7d7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 25 deletions.
1 change: 1 addition & 0 deletions i18n/en-UK/avalanche_report.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -282,3 +282,4 @@ about-description =
welcome! Feel free to contact the team there if you wish to deploy
something similar for your forecast region.
wind-unit-label = Wind Unit:
sponsors-title = Sponsors
73 changes: 48 additions & 25 deletions src/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,21 @@ <h2 class="text-4xl font-bold">{{ fl("no-current-forecast-heading") }}</h2>
</div>
{% endmacro %}
{% macro forecast_archive_block(forecast, emphasize=false) %}
<p class="py-0.5">
<a class="text-xl font-bold text-blue-600 hover:text-blue-800 visited:text-purple-600 {% if emphasize %}text-xl font-bold{% endif %}"
href="/forecasts/{{ forecast.file.file.name | urlencode }}">
<span class="inline-flex items-baseline">
{% if forecast.forecast %}
{% set hazard_rating = forecast.forecast.hazard_ratings.overall.value %}
<img src="/static/images/icons/hazard-rating/{{ hazard_rating }}.png"
class="self-center h-8 mx-1"/>
{% endif %}
<span>{{ forecast.details.formatted_time }}</span>
</span>
</a>
</p>
<tr>
<td>
{% if forecast.forecast %}
{% set hazard_rating = forecast.forecast.hazard_ratings.overall.value %}
<img src="/static/images/icons/hazard-rating/{{ hazard_rating }}.png"
class="self-center h-8 mx-1"/>
{% endif %}
</td>
<td>
<a class="text-xl font-bold text-blue-600 hover:text-blue-800 visited:text-purple-600 {% if emphasize %}text-xl font-bold{% endif %}"
href="/forecasts/{{ forecast.file.file.name | urlencode }}">
{{ forecast.details.formatted_time }}
</a>
</td>
</tr>
{% endmacro %}
{% set page_title = fl("gudauri-avalanche-forecast-heading") %}
{% block title %}
Expand Down Expand Up @@ -74,18 +76,39 @@ <h2 class="text-2xl font-bold py-2">{{ fl("about-title") }}</h2>
</div>
</div>
{{ divider() }}
<div class="py-5 text-slate-500">
<h2 class="text-2xl font-bold py-2">{{ fl("forecast-archive-heading") }}</h2>
{% for forecast in forecasts %}{{ forecast_archive_block(forecast=forecast) }}{% endfor %}
<div class="py-5">
<h2 class="text-2xl font-bold py-2">{{ fl("sponsors-title") }}</h2>
<div class="grid md:grid-cols-5 sm:grid-cols-1 pb-2 pt-4">
<div class="md:col-span-1 flex justify-center items-center">
<a href="https://vagabondadventures.ge/">
<img class="py-4 max-h-32"
src="/static/images/logos/vagabond_logo.png"
alt="Vagabond Logo"/>
</a>
</div>
<div class="md:col-span-4 md:text-justify pl-4 prose leading-normal">
<a href="https://vagabondadventures.ge/">Vagabond Adventures</a> are the premier English-speaking (& German, Czech, French et al!) provider of ski/snowboard lessons, ski holiday packages & off-piste guiding at Gudauri, Georgia. With their intimate local knowledge, they also organise fantastic ski safari tours throughout the country, combining resort, off-piste & snowcat skiing with the incredible Georgian culture.
</div>
</p>
</div>
{% endif %}
{% if (errors | length) != 0 %}
<h2 class="text-2xl font-bold text-rose-600">Errors Reading Forecast Files</h2>
{% for error in errors %}
<h3 class="text-xl font-bold text-rose-600">Error {{ loop.index }}</h3>
<pre>{{ ansi_to_html(error) }}</pre>
{% endfor %}
{% endif %}
</div>
</div>
{{ divider() }}
<div class="py-5 text-slate-500">
<h2 class="text-2xl font-bold py-2">{{ fl("forecast-archive-heading") }}</h2>
<div class="flex justify-center">
<table>
{% for forecast in forecasts %}{{ forecast_archive_block(forecast=forecast) }}{% endfor %}
</table>
</div>
</div>
{% endif %}
{% if (errors | length) != 0 %}
<h2 class="text-2xl font-bold text-rose-600">Errors Reading Forecast Files</h2>
{% for error in errors %}
<h3 class="text-xl font-bold text-rose-600">Error {{ loop.index }}</h3>
<pre>{{ ansi_to_html(error) }}</pre>
{% endfor %}
{% endif %}
</div>
</div>
{% endblock body %}
Binary file added static/images/logos/vagabond_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b4f7d7

Please sign in to comment.