mirror of
https://github.com/calofmijuck/blog.git
synced 2025-12-06 22:53:51 +00:00
fix: added _includes
This commit is contained in:
19
_includes/datetime.html
Normal file
19
_includes/datetime.html
Normal file
@@ -0,0 +1,19 @@
|
||||
<!--
|
||||
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 }}>
|
||||
Reference in New Issue
Block a user