Skip to content

Commit e5bda65

Browse files
committed
WIP: allow overriding "get started" jinja header with blocks
1 parent de02d95 commit e5bda65

File tree

1 file changed

+29
-51
lines changed
  • invenio_vcs/templates/semantic-ui/invenio_vcs/settings

1 file changed

+29
-51
lines changed

invenio_vcs/templates/semantic-ui/invenio_vcs/settings/index.html

Lines changed: 29 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -33,67 +33,45 @@
3333
<div class="ui segment">
3434
<div class="ui grid">
3535
<div class="sixteen wide centered column">
36-
<h3 class="ui large header mt-10">
37-
<i class="{{ vocabulary["icon"] }} icon" aria-hidden="true"></i>{{ _("Get started") }}
38-
</h3>
36+
{%- block get_started_heading %}
37+
<h3 class="ui large header mt-10">
38+
<i class="{{ vocabulary["icon"] }} icon" aria-hidden="true"></i>{{ _("Get started") }}
39+
</h3>
40+
{%- endblock %}
3941
</div>
4042

4143
<div class="three column stackable tablet-mobile row">
4244
<div class="column">
43-
<h4 class="ui medium header">1 {{ _("Flip the switch") }}</h4>
44-
<div class="ui divider"></div>
45-
<p>
46-
{{ _('Select the repository you want to preserve, and toggle
47-
the switch below to turn on automatic preservation of your software.') }}
48-
</p>
49-
50-
<div class="text-align-center rel-mt-1">
51-
<div class="ui toggle on-off checkbox">
52-
<input
53-
id="example-switch"
54-
name="example-switch"
55-
type="checkbox"
56-
checked
57-
>
58-
<label for="example-switch">
59-
<small class="text-muted ml-5">
60-
{{ _("(example)") }}
61-
</small>
62-
</label>
63-
</div>
64-
</div>
45+
{%- block get_started_1 %}
46+
<h4 class="ui medium header">1 {{ _("Flip the switch") }}</h4>
47+
<div class="ui divider"></div>
48+
<p>
49+
{{ _('Select the repository you want to preserve, and toggle
50+
the switch below to turn on automatic preservation of your software.') }}
51+
</p>
52+
{%- endblock %}
6553
</div>
6654

6755
<div class="column">
68-
<h4 class="ui medium header">2 {{ _("Create a release") }}</h4>
69-
<div class="ui divider"></div>
70-
<p>
71-
{{ _('Go to %(name)s and <a href="https://help.github.com/articles/creating-releases" target="_blank">create a release <i class="small icon external" aria-hidden="true"></i></a>. %(site_name)s will automatically download a .zip-ball of each new release and register a DOI.',
72-
name=vocabulary["name"], site_name=config.THEME_SITENAME | default('System')) }}
73-
</p>
56+
{%- block get_started_2 %}
57+
<h4 class="ui medium header">2 {{ _("Create a release") }}</h4>
58+
<div class="ui divider"></div>
59+
<p>
60+
{{ _('Go to %(name)s and <a href="https://help.github.com/articles/creating-releases" target="_blank">create a release <i class="small icon external" aria-hidden="true"></i></a>. %(site_name)s will automatically download a .zip-ball of each new release and register a DOI.',
61+
name=vocabulary["name"], site_name=config.THEME_SITENAME | default('System')) }}
62+
</p>
63+
{%- endblock %}
7464
</div>
7565

7666
<div class="column">
77-
<h4 class="ui medium header">3 {{ _("Get the badge") }}</h4>
78-
<div class="ui divider"></div>
79-
<p>
80-
{{ _('After your first release, a DOI badge that you can include in your %(name)s
81-
README will appear next to your repository below.', name=vocabulary["name"]) }}
82-
</p>
83-
84-
<div class="flex align-items-center justify-center rel-mt-1">
85-
{#- TODO remove hardcoding Zenodo stuff #}
86-
<a href="https://doi.org/10.5281/zenodo.8475">
87-
<img
88-
src="{{ url_for('invenio_formatter_badges.badge', title='doi', value='10.5281/zenodo.8475', ext='svg') }}"
89-
alt="{{ _('Example DOI:') }} 10.5281/zenodo.8475"
90-
class="mt-5 mr-5"
91-
>
92-
</a>
93-
<small class="text-muted">
94-
{{ _("(example)") }}
95-
</small>
96-
</div>
67+
{%- block get_started_3 %}
68+
<h4 class="ui medium header">3 {{ _("Get the badge") }}</h4>
69+
<div class="ui divider"></div>
70+
<p>
71+
{{ _('After your first release, a DOI badge that you can include in your %(name)s
72+
README will appear next to your repository below.', name=vocabulary["name"]) }}
73+
</p>
74+
{%- endblock %}
9775
</div>
9876
</div>
9977
</div>

0 commit comments

Comments
 (0)