mirror of
https://github.com/torproject/community.git
synced 2024-11-26 19:20:25 +00:00
Rename resource-detail template to be more correct
This commit is contained in:
parent
e79e0d3c83
commit
667e3345e2
@ -7,7 +7,7 @@ enabled = yes
|
||||
per_page = 10
|
||||
|
||||
[fields.html]
|
||||
default = resource-detail.html
|
||||
default = training-guide.html
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
|
@ -1,110 +0,0 @@
|
||||
{% set sidenav_items = this.parent.parent.children %}
|
||||
{% set resource_name = this.resource_name or this._path.split('/')[-1][:-('-guide'|length)] %}
|
||||
{% set resource = bag('community-training-materials', resource_name) %}
|
||||
<style>
|
||||
#sample-slides td:not(:first-child) {
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="row pt-5">
|
||||
{% include 'sidenav.html' %}
|
||||
<div class="col-sm-12 col-xs-12 ml-sm-auto col-md-9 col-lg-9 {{ bag('alternatives', this.alt, 'order') }}">
|
||||
<div>
|
||||
<img src="{{ resource['cover'] | url }}" class="image-thumb-200px mb-5" alt="{{ this.title }}">
|
||||
<h1 class="mb-5">{{ resource['name'] }}</h1>
|
||||
<div>
|
||||
<table class="resource-table mb-5">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Maintained by') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ resource['author'] }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Last updated') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ resource['date'] }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Estimated time') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ this.estimated_time or 'FIXME: NO TIME ESTIMATE' }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p class="mb-5">{{ resource['description'] }}</p>
|
||||
{% if this.objectives %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('Objectives') }}</h4>
|
||||
<ul>
|
||||
{% for objective in this.objectives %}
|
||||
<li>{{ objective }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if this.external_sources %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('External reading sources') }}</h4>
|
||||
<ul>
|
||||
{% for external_source in this.external_sources %}
|
||||
<li>{{ external_source }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if this.sample_slides %}
|
||||
<h4 class="mb-5">{{ _('Download sample slides') }}</h4>
|
||||
<table class="resource-table mb-5" id="sample-slides">
|
||||
{% for slide in this.sample_slides.blocks %}
|
||||
<tr class="h5 font-weight-600">
|
||||
<td>
|
||||
<span class="text-muted">{{ slide.language }}</span>
|
||||
</td>
|
||||
{% if slide.view_link %}
|
||||
<td>
|
||||
<a href="{{ slide.view_link }}"><button type="button" class="btn btn-sm btn-primary font-weight-600 h5">View</button></a>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if slide.pdf_link %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary font-weight-600 h5">PDF</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if slide.odp_link %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary font-weight-600 h5">ODP</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if this.topics %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('Topics') }}</h4>
|
||||
<p>
|
||||
{% for topic in this.topics %}
|
||||
<span>{{ topic }}</span>
|
||||
{%- if loop.index != this.topics|length -%}
|
||||
{{ ', ' }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex my-4">
|
||||
</div>
|
||||
<hr class="mb-5 mt-0">
|
||||
<h2 class="text-primary">{{ _('Join the Conversation') }}</h2>
|
||||
</div>
|
||||
</div>
|
111
templates/training-guide.html
Normal file
111
templates/training-guide.html
Normal file
@ -0,0 +1,111 @@
|
||||
{% set sidenav_items = this.parent.parent.children %}
|
||||
{% set resource_name = this.resource_name or this._path.split('/')[-1][:-('-guide'|length)] %}
|
||||
{% set resource = bag('community-training-materials', resource_name) %}
|
||||
<style>
|
||||
#sample-slides td:not(:first-child) {
|
||||
padding-right: 0;
|
||||
}
|
||||
</style>
|
||||
<div class="row pt-5">
|
||||
{% include 'sidenav.html' %}
|
||||
<div class="col-sm-12 col-xs-12 ml-sm-auto col-md-9 col-lg-9 {{ bag('alternatives', this.alt, 'order') }}">
|
||||
<div>
|
||||
<img src="{{ resource['cover'] | url }}" class="image-thumb-200px mb-5" alt="{{ this.title }}">
|
||||
<h1 class="mb-5">{{ resource['name'] }}</h1>
|
||||
<div>
|
||||
<table class="resource-table mb-5">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Maintained by') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ resource['author'] }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Last updated') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ resource['date'] }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="text-muted h5 font-weight-600">{{ _('Estimated time') }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="h5 font-weight-600">{{ this.estimated_time or 'FIXME: NO TIME ESTIMATE' }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p class="mb-5">{{ resource['description'] }}</p>
|
||||
{% if this.objectives %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('Objectives') }}</h4>
|
||||
<ul>
|
||||
{% for objective in this.objectives %}
|
||||
<li>{{ objective }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if this.external_sources %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('External reading sources') }}</h4>
|
||||
<ul>
|
||||
{% for external_source in this.external_sources %}
|
||||
<li>{{ external_source }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if this.sample_slides %}
|
||||
<h4 class="mb-5">{{ _('Download sample slides') }}</h4>
|
||||
<table class="resource-table mb-5" id="sample-slides">
|
||||
{% for slide in this.sample_slides.blocks %}
|
||||
<tr class="h5 font-weight-600">
|
||||
<td>
|
||||
<span class="text-muted">{{ slide.language }}</span>
|
||||
</td>
|
||||
{% if slide.view_link %}
|
||||
<td>
|
||||
<a href="{{ slide.view_link }}"><button type="button" class="btn btn-sm btn-primary font-weight-600 h5">View</button></a>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if slide.pdf_link %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary font-weight-600 h5">PDF</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
{% if slide.odp_link %}
|
||||
<td>
|
||||
<button type="button" class="btn btn-sm btn-outline-primary font-weight-600 h5">ODP</button>
|
||||
</td>
|
||||
{% endif %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
{% if this.topics %}
|
||||
<div class="mb-5">
|
||||
<h4>{{ _('Topics') }}</h4>
|
||||
<p>
|
||||
{% for topic in this.topics %}
|
||||
<span>{{ topic }}</span>
|
||||
{%- if loop.index != this.topics|length -%}
|
||||
{{ ', ' }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="d-flex my-4">
|
||||
</div>
|
||||
<hr class="mb-5 mt-0">
|
||||
<h2 class="text-primary">{{ _('Join the Conversation') }}</h2>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user