-
Notifications
You must be signed in to change notification settings - Fork 0
Style fixes #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style fixes #18
Changes from all commits
ef61f3d
670ba3f
bb2ca38
a15b120
29530b2
f1568c7
c835c06
0cfb7e2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,24 @@ document.querySelectorAll('pre code').forEach((el) => { | |
| hljs.highlightElement(el as HTMLElement); | ||
| }); | ||
|
|
||
| // Move meta info (date and author) directly under the first heading | ||
| window.addEventListener('DOMContentLoaded', () => { | ||
| const container = document.querySelector('.container'); | ||
| const heading = container?.querySelector('h1'); | ||
| const dateEl = document.getElementById('date'); | ||
| const authorEl = document.getElementById('author-top'); | ||
|
|
||
| if (container && heading && dateEl && authorEl) { | ||
| const metaWrap = document.createElement('div'); | ||
| metaWrap.className = 'post-meta'; | ||
|
||
|
|
||
| metaWrap.appendChild(dateEl); | ||
| metaWrap.appendChild(authorEl); | ||
|
|
||
| heading.insertAdjacentElement('afterend', metaWrap); | ||
| } | ||
| }); | ||
|
|
||
| const READING_WPM = 200; | ||
| function calculateReadingTime(): number { | ||
| const container = document.querySelector('.container'); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The '#author' selector is defined but is no longer used since the author paragraph has been removed from the footer. Consider removing this unused CSS rule.