Skip to content

Commit

Permalink
Add blog author
Browse files Browse the repository at this point in the history
  • Loading branch information
herzog31 committed Nov 23, 2023
1 parent 5b25a3f commit c3fd5dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ function buildBlockPostPage(main) {
// Below h1
const h1 = main.querySelector('h1');
const socialMediaButtons = document.createRange().createContextualFragment('<div class="sharing">Sharing Block Placeholder</div>');
const author = document.createRange().createContextualFragment('<p class="author">By Maranda Elswick, DVM</p>');
if (h1) {
h1.parentElement.insertBefore(author, h1.nextSibling);
h1.parentElement.insertBefore(socialMediaButtons.cloneNode(true), h1.nextSibling);
}

Expand Down
6 changes: 6 additions & 0 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,12 @@ body.blog-post .default-content-wrapper {
padding: 0 0.9375rem;
}

body.blog-post .default-content-wrapper p.author {
font-family: var(--heading-font-family);
font-size: 1.3125rem;
font-weight: 300;
}

main .section.highlight p em {
display: block;
font-size: 2.5rem;
Expand Down

0 comments on commit c3fd5dd

Please sign in to comment.