Post date and time with update.#17
Post date and time with update.#17Dubhghlas wants to merge 4 commits intocode-corps:developfrom Dubhghlas:patch-1
Conversation
Display the date and time a post was published just above the article's content. Checks if the article was modified and includes a date and time of the update if found.
|
Thanks for this PR! I'm a little crammed for time tonight before I get to pull this down and review this, so may not be til mid-week sadly. Will get to it ASAP. |
joshsmith
left a comment
There was a problem hiding this comment.
A couple minor comments here!
| <?php get_template_part('templates/parts/social-share'); ?> | ||
|
|
||
|
|
||
| <p style="font-style: italic;"> |
There was a problem hiding this comment.
Can we add a class here instead of the inline styling?
There was a problem hiding this comment.
That would be best, but I'm not seeing any WordPress CSS files that are accessed on the live site in the repository. I can either remove the styling or make use of the theme's style.css in the theme's root. I only see https://blog.codecorps.org/app/themes/codecorps/dist/styles/main-4aee62f95a.css referenced in the source.
| <strong>Posted</strong>: <?php the_date('F j, Y'); ?> at <?php the_time('g:i a'); ?> | ||
| <?php if (get_the_time() != get_the_modified_time()) | ||
| { ?> | ||
| <br><strong>Updated</strong>: <?php the_modified_date('F j, Y'); ?> at <?php the_modified_time('g:i a'); |
There was a problem hiding this comment.
Can we also perhaps make use of padding/margin instead of the br?
There was a problem hiding this comment.
Would also vote on both of these to do date-only.
Removed some formating. Posted and updated times in their own p-tag.
|
@Dubhghlas I believe this is what you're looking for https://github.com/code-corps/blog.codecorps.org-site/blob/develop/web/app/themes/codecorps/assets/styles/style.scss |
Added two styles for post dates.
Encapsulated the two date displays within a div to allow for beautification. Not yet tested.
Display the date and time a post was published just above the article's content. Checks if the article was modified and includes a date and time of the update if found.