Skip to content

Commit

Permalink
Added title-button feature and "Get JSON" button in actions page
Browse files Browse the repository at this point in the history
  • Loading branch information
pdavide committed Feb 2, 2018
1 parent 15bf74f commit 7d6ccfe
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
2 changes: 2 additions & 0 deletions _data/l10n.yml
Expand Up @@ -29,6 +29,7 @@ it:
actions_from: 'da '
actions_to: ' a '
actions_by: 'entro '
get_json: Scarica il JSON
months:
'01': gennaio
'02': febbraio
Expand Down Expand Up @@ -269,6 +270,7 @@ en:
actions_from: 'from '
actions_to: ' to '
actions_by: 'by '
get_json: Get JSON
months:
'01': january
'02': february
Expand Down
5 changes: 4 additions & 1 deletion _includes/page_title.html
@@ -1,7 +1,10 @@
<div class="Title u-layout-r-withGutter u-posRelative u-zindex-30 {% if include.bg-color %}u-background-{{ include.bg-color }}{% endif %}">
<h1 class="u-text-r-xl u-color-white u-margin-top-l u-lineHeight-l">
<span class="u-cf {% if include.color %}u-color-{{ include.color }}{% endif %}">
<strong class="u-textWeight-600">{{ page.title }}</strong>
<strong class="u-textWeight-600 u-alignMiddle">{{ page.title }}</strong>
{% if include.title_button %}
<a href="{{ include.title_button_url | relative_url }}" class="Button Button--title Button--round Button--shadow-dark u-alignMiddle">{{ t.[include.title_button_label] }}</a>
{% endif %}
<br />
{% if page.subtitle %}<span class="u-textWeight-300 u-text-r-s">{{ page.subtitle }}</span>{% endif %}
</span>
Expand Down
8 changes: 4 additions & 4 deletions _layouts/page.html
Expand Up @@ -5,23 +5,23 @@

<div class="Page-title u-background-transparent u-padding-top-xxl project-title-wrapper u-text{{ page.title-alignment | capitalize }}">
{% if page.separator == 'curved' %}
{% include page_title.html %}
{% include page_title.html title_button = page.title_button title_button_label = page.title_button.label title_button_url = page.title_button.url %}
<div class="Separator-curved">
<svg id="curveDown" xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" style="fill: #f6f9fc;" viewBox="0 0 100 25" preserveAspectRatio="none">
<path d="M100,50H0V0c1.9,2.5,19.4,25,50,25c3.1,0,31.6-0.5,50-25C100,16.7,100,33.3,100,50z"/>
</svg>
</div>
{% elsif page.separator == 'ascending' %}
{% include page_title.html %}
{% include page_title.html title_button = page.title_button title_button_label = page.title_button.label title_button_url = page.title_button.url %}
<hr class="Separator-room" />
<hr class="Separator Separator--up u-background-grey-15" />
{% elsif page.separator == 'descending' %}
<hr class="Separator-room" />
<hr class="Separator Separator--down u-background-grey-15" />
{% include page_title.html bg-color = 'grey-15' color = '50' %}
{% include page_title.html bg-color = 'grey-15' color = '50' title_button = page.title_button title_button_label = page.title_button.label title_button_url = page.title_button.url %}
{% else %}
<hr class="Separator-room" />
{% include page_title.html %}
{% include page_title.html title_button = page.title_button title_button_label = page.title_button.label title_button_url = page.title_button.url %}
{% endif %}
</div>
<div class="Content u-background-grey-15 u-layout-r-withGutter u-padding-top-xxl u-padding-bottom-xxl u-posRelative u-zindex-30">
Expand Down
4 changes: 4 additions & 0 deletions _pages/en/actions.json
@@ -0,0 +1,4 @@
---
permalink: en/actions/actions.json
---
{{ site.data.linee_azione.en | sort: "numero" | jsonify }}
3 changes: 3 additions & 0 deletions _pages/en/actions.md
@@ -1,5 +1,8 @@
---
title: Actions
title_button:
label: get_json
url: en/actions/actions.json
lang: en
layout: page
separator: ascending
Expand Down
3 changes: 3 additions & 0 deletions _pages/it/azioni.md
@@ -1,5 +1,8 @@
---
title: Le azioni
title_button:
label: get_json
url: azioni/azioni.json
lang: it
layout: page
separator: ascending
Expand Down
9 changes: 9 additions & 0 deletions _sass/_trasformazione-digitale.scss
Expand Up @@ -141,6 +141,15 @@ a.Button--default {
text-transform: none !important;
}

.Button--title {
background-color: #fff;
color: #00c5ca;
border-color: #fff;
padding: .2em .75em;
margin-left: 1em;
font-size: 1.4rem!important;
}

@media screen and (max-width: 767px) {
.ScrollTop {
display: none !important;
Expand Down

0 comments on commit 7d6ccfe

Please sign in to comment.