-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: avoid the layout shift for post datetime
- Loading branch information
Showing
20 changed files
with
87 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!-- | ||
Date format snippet | ||
See: ${JS_ROOT}/utils/locale-dateime.js | ||
--> | ||
|
||
{% assign wrap_elem = include.wrap | default: 'em' %} | ||
|
||
{% if site.prefer_datetime_locale == 'en' or lang == 'en' %} | ||
{% assign df_strftime = '%b %e, %Y' %} | ||
{% assign df_dayjs = 'll' %} | ||
{% else %} | ||
{% assign df_strftime = '%F' %} | ||
{% assign df_dayjs = 'YYYY-MM-DD' %} | ||
{% endif %} | ||
|
||
<{{ wrap_elem }} class="{% if include.class %}{{ include.class }}{% endif %}" | ||
data-ts="{{ include.date | date: '%s' }}" | ||
data-df="{{ df_dayjs }}" | ||
{% if include.tooltip %}data-toggle="tooltip" data-placement="bottom"{% endif %}> | ||
{{ include.date | date: df_strftime }} | ||
</{{ wrap_elem }}> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.