Merge pull request #380 from alphagov/svg-images-tour

Use SVG images for tour
This commit is contained in:
Chris Hill-Scott
2016-04-05 10:28:26 +01:00
9 changed files with 51 additions and 14 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 74 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 73 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 251 KiB

View File

@@ -131,7 +131,8 @@
} }
img { img,
source {
max-width: 100%; max-width: 100%;
display: block; display: block;
} }

View File

@@ -4,11 +4,20 @@ from flask_login import login_required
from app.main import main from app.main import main
headings = [
'Trial mode',
'Start with templates',
'Add recipients',
'Send your messages',
]
@main.route("/services/<service_id>/tour/<int:page>") @main.route("/services/<service_id>/tour/<int:page>")
@login_required @login_required
def tour(service_id, page): def tour(service_id, page):
return render_template( return render_template(
'views/tour/{}.html'.format(page), 'views/tour/{}.html'.format(page),
current_page=page, current_page=page,
next_page=(page + 1) next_page=(page + 1),
heading=headings[page - 1]
) )

View File

@@ -10,7 +10,7 @@
{% block maincolumn_content %} {% block maincolumn_content %}
{% call banner_wrapper(type='tour') %} {% call banner_wrapper(type='tour') %}
<h2 class="heading-large">Trial mode</h2> <h2 class="heading-large">{{ heading }}</h2>
<p> <p>
To start off with, you can only send messages to yourself. To start off with, you can only send messages to yourself.
</p> </p>

View File

@@ -10,16 +10,24 @@
{% block maincolumn_content %} {% block maincolumn_content %}
{% call banner_wrapper(type='tour') %} {% call banner_wrapper(type='tour') %}
<h2 class="heading-large">Start with templates</h2> <h2 class="heading-large">{{ heading }}</h2>
<p> <p>
Set up a template like this: Set up a template like this:
</p> </p>
<p> <p>
<img <picture>
<source
type="image/svg+xml"
srcset="/static/images/tour/{{ current_page }}.svg"
alt="A template for a text message with placeholders for the recipients name, document and date"
width="554" height="97"
>
<img
src="/static/images/tour/{{ current_page }}.png" src="/static/images/tour/{{ current_page }}.png"
width="554" height="97" width="554" height="97"
alt="A template for a text message with placeholders for the recipients name, document and date" alt="A screenshot of a spreadsheet containing data about three people"
> >
</picture>
</p> </p>
<a href='{{ url_for('.tour', service_id=service_id, page=next_page) }}'> <a href='{{ url_for('.tour', service_id=service_id, page=next_page) }}'>
Next Next

View File

@@ -10,16 +10,24 @@
{% block maincolumn_content %} {% block maincolumn_content %}
{% call banner_wrapper(type='tour') %} {% call banner_wrapper(type='tour') %}
<h2 class="heading-large">Add recipients</h2> <h2 class="heading-large">{{ heading }}</h2>
<p> <p>
Add recipients by uploading a .csv spreadsheet: Add recipients by uploading a .csv spreadsheet:
</p> </p>
<p> <p>
<img <picture>
<source
type="image/svg+xml"
srcset="/static/images/tour/{{ current_page }}.svg"
alt="A screenshot of a spreadsheet containing data about three people"
width="554" height="118"
>
<img
src="/static/images/tour/{{ current_page }}.png" src="/static/images/tour/{{ current_page }}.png"
width="554" height="118" width="554" height="118"
alt="A screenshot of a spreadsheet containing data about three people" alt="A screenshot of a spreadsheet containing data about three people"
> >
</picture>
</p> </p>
<p> <p>
Developers, you can add data automatically using an API Developers, you can add data automatically using an API

View File

@@ -4,25 +4,33 @@
{% from "components/banner.html" import banner_wrapper %} {% from "components/banner.html" import banner_wrapper %}
{% block page_title %} {% block page_title %}
{{heading}} GOV.UK Notify {{ heading }} GOV.UK Notify
{% endblock %} {% endblock %}
{% block maincolumn_content %} {% block maincolumn_content %}
{% call banner_wrapper(type='tour') %} {% call banner_wrapper(type='tour') %}
<h2 class="heading-large">Send your messages</h2> <h2 class="heading-large">{{ heading }}</h2>
<p> <p>
Notify merges your data with the template and sends the messages Notify merges your data with the template and sends the messages
</p> </p>
<a href="{{ url_for('.service_dashboard', service_id=service_id) }}"> <a href="{{ url_for('.service_dashboard', service_id=service_id) }}">
Next Next
</a> </a>
<img <picture class="banner-tour-image-flush-bottom">
<source
type="image/svg+xml"
srcset="/static/images/tour/{{ current_page }}.svg"
alt="Three mobiles phones, each showing a text message personalised with data about the recipient"
width="840" height="290"
>
<img
src="/static/images/tour/{{ current_page }}.png" src="/static/images/tour/{{ current_page }}.png"
class="banner-tour-image-flush-bottom" class="banner-tour-image-flush-bottom"
width="840" height="290" width="840" height="290"
alt="Three mobiles phones, each showing a text message personalised with data about the recipient" alt="Three mobiles phones, each showing a text message personalised with data about the recipient"
> >
</picture>
{% endcall %} {% endcall %}
{% endblock %} {% endblock %}