Skip to content
Snippets Groups Projects
Commit b835fb58 authored by m26lebla's avatar m26lebla
Browse files

Adjustments to the date-formats used in card - teaser patterns

parent 98a168d3
No related branches found
No related tags found
No related merge requests found
Showing
with 61 additions and 72 deletions
...@@ -1237,6 +1237,12 @@ svg:not(:root) { ...@@ -1237,6 +1237,12 @@ svg:not(:root) {
width: 1px; width: 1px;
word-wrap: normal; } word-wrap: normal; }
.uw-date-pl {
margin-bottom: 1.5rem; }
.uw-date-pl h4 {
margin-bottom: 0.5rem; }
.uw-date { .uw-date {
background-color: #000; background-color: #000;
clear: both; clear: both;
......
{% set date_modifier_classes -%}
uw-date uw-date--{{ date_format|replace({'-' : '_'})}} {{ date_modifier_classes }}
{%- endset %}
{% if is_demo %}
<div class='uw-date-pl'>
<h4> {{ date_format }}:</h4>
{% endif %}
{% if date %}
<span class="{{ date_modifier_classes }}" >{{ date }}</span>
{% endif %}
{% if is_demo %}
</div>
{% endif %}
\ No newline at end of file
...@@ -2,7 +2,12 @@ ...@@ -2,7 +2,12 @@
// Styles for Date formats. // Styles for Date formats.
$faculties: 'org-default', 'org-ahs', 'org-art', 'org-eng', 'org-env', 'org-mat', 'org-sci', 'org-school'; $faculties: 'org-default', 'org-ahs', 'org-art', 'org-eng', 'org-env', 'org-mat', 'org-sci', 'org-school';
.uw-date-pl{
margin-bottom: rem(gesso-spacing(md));
}
.uw-date-pl h4{
margin-bottom: rem(gesso-spacing(xs));
}
.uw-date{ .uw-date{
background-color:gesso-brand(org-default,uw-black,'primary'); background-color:gesso-brand(org-default,uw-black,'primary');
clear: both; clear: both;
......
---
title: Date Formats
---
{% for date_format in date_formats %}
{% include '@base/date-formats/_date-format.twig' with {
'date_format': date_format.date_format,
'date': date_format.date,
'is_demo': 'true'
}%}
{% endfor %}
--- ---
date_modifier_classes: '' date_modifier_classes: ''
\ No newline at end of file date_formats:
-
date_format: 'long-date'
date: 'Friday, September 18, 2020'
-
date_format: 'long-datetime'
date: 'Friday, September 18, 2020 - 4:20pm'
-
date_format: 'medium-date'
date: 'September 18, 2018'
-
date_format: 'medium-date-short-month'
date: 'Sep. 18, 2020'
-
date_format: 'medium-datetime'
date: 'September 18, 2020 - 4:20pm'
-
date_format: 'short-date'
date: '09-18-2020'
-
date_format: 'short-datetime'
date: '09-18-2020, - 4:20pm'
---
title: Long Date
---
{% set date_modifier_classes -%}
uw-date uw-date--long_date {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" >{{ weekday.long }}, {{ month.long }} {{ day.short }}, {{ year.long }}</span>
{% endif %}
---
title: Long Datetime
---
{% set date_modifier_classes -%}
uw-date uw-date--long_date_time {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" > {{ weekday.long }}, {{ month.long }} {{ day.short }}, {{ year.long }} &mdash; {{ hour.short }}:{{ minute.long }} {{ hour.ampm }}</span>
{% endif %}
---
title: Medium Date Short Month
---
{% set date_modifier_classes -%}
uw-date uw-date--medium-date-short-month {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" > {{ month.short }}. {{ day.short }}, {{ year.long }}</span>
{% endif %}
\ No newline at end of file
---
title: Medium Date
---
{% set date_modifier_classes -%}
uw-date uw-date--medium_date {{ modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" > {{ month.long }} {{ day.short }}, {{ year.long }}</span>
{% endif %}
---
title: Medium Datetime
---
{% set date_modifier_classes -%}
uw-date uw-date--medium_date_time {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" > {{ month.long }} {{ day.short }}, {{ year.long }} &mdash; {{ hour.short }}:{{ minute.long }} {{ hour.ampm }}</span>
{% endif %}
---
title: Short Date
---
{% set date_modifier_classes -%}
uw-date uw-date--short_date {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" >{{ month.digit }}-{{ day.long }}-{{ year.long }}</span>
{% endif %}
---
title: Short Datetime
---
{% set date_modifier_classes -%}
uw-date uw-date--short_date_time {{ date_modifier_classes }}
{%- endset %}
{% if year %}
<span class="{{ date_modifier_classes }}" > {{ month.digit }}-{{ day.long }}-{{ year.long }} {{ hour.short }}:{{ minute.long }} {{ hour.ampm }}</span>
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment