web/_includes/datetime.html
Cotes Chung d9e1d84f08
refactor(deps): upgrade bootstrap from v4.6 to v5.2
- update class name of the spacing, font style, cards and toasts
- update attribute names &  tooltip usage
- remove custom smooth scroll
- syntax colors
2023-05-13 02:05:33 +08:00

19 lines
631 B
HTML

<!--
Date format snippet
See: ${JS_ROOT}/utils/locale-dateime.js
-->
{% assign wrap_elem = include.wrap | default: 'em' %}
{% assign df_strftime = site.data.locales[include.lang].df.post.strftime | default: '%d/%m/%Y' %}
{% assign df_dayjs = site.data.locales[include.lang].df.post.dayjs | default: 'DD/MM/YYYY' %}
<{{ wrap_elem }}
class="{% if include.class %}{{ include.class }}{% endif %}"
data-ts="{{ include.date | date: '%s' }}"
data-df="{{ df_dayjs }}"
{% if include.tooltip %}
data-bs-toggle="tooltip" data-bs-placement="bottom"
{% endif %}
>
{{ include.date | date: df_strftime }}
</{{ wrap_elem }}>