Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _layouts/article.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
<div class="container">
{% if page.date %}
<p id="date">{{ page.date | date: "%B %d, %Y" }} • <span id="reading-time">-- min read</span></p>
<p id="author-top">Author: {{ page.author | default: "Aryan Kumar" }}</p>
{% endif %}
{{ content }}
</div>

<footer>
<p id="author">Author: {{ page.author | default: "Aryan Kumkar" }}</p>
<p id="thanks">Thanks ❤️</p>
<p>Let's get this 💪</p>
</footer>

<script src="/assets/js/article.js" type="module"></script>
Expand Down
24 changes: 10 additions & 14 deletions assets/css/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pre code {
a {
color: #3498db;
text-decoration: none;
word-break: break-word;
overflow-wrap: break-word;
}
a:hover {
text-decoration: underline;
Expand All @@ -80,38 +80,34 @@ tr:nth-child(even) {
#date {
color: #7f8c8d;
font-style: italic;
text-align: right;
float: right;
margin: 0 0 0.5em 1em;
margin: 0;
display: inline;
}
#author-top {
color: #7f8c8d;
font-size: 0.95em;
margin: 0;
}


footer {
margin-top: 2em;
padding-top: 1em;
border-top: 1px solid #ecf0f1;
color: #7f8c8d;
font-size: 0.9em;
display: flex;
justify-content: space-between;
align-items: center;
text-align: center;
}

#author {
margin: 0;
}

Comment on lines 99 to 102
Copy link

Copilot AI Dec 15, 2025

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.

Suggested change
#author {
margin: 0;
}

Copilot uses AI. Check for mistakes.
#thanks {
margin: 0;
}
#reading-time {
color: #7f8c8d;
font-size: 0.9em;
display: inline;
}
#scroll-progress {
position: fixed;
top: 0;
bottom: 0;
left: 0;
height: 3px;
background: #3498db;
Expand Down
14 changes: 14 additions & 0 deletions assets/js/article.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/js/article.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions assets/ts/article.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'post-meta' class is not defined in any CSS file in the repository. This will result in the meta wrapper div having no styling applied to it. Consider adding CSS styles for the .post-meta class or using an existing class name.

Copilot uses AI. Check for mistakes.

metaWrap.appendChild(dateEl);
metaWrap.appendChild(authorEl);

heading.insertAdjacentElement('afterend', metaWrap);
}
});

const READING_WPM = 200;
function calculateReadingTime(): number {
const container = document.querySelector('.container');
Expand Down
3 changes: 2 additions & 1 deletion assets/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"build": "tsc -p .",
"build:watch": "tsc -p . --watch"
},
"keywords": [],
"author": "",
Expand Down
7 changes: 3 additions & 4 deletions assets/ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// Environment Settings
// See also https://aka.ms/tsconfig/module
"module": "esnext",
"target": "esnext",
"target": "es2024",
"types": [],
// For nodejs:
// "lib": ["esnext"],
"lib": ["esnext", "DOM"],
// "types": ["node"],
// and npm install -D @types/node

Expand All @@ -34,11 +34,10 @@

// Recommended Options
"strict": true,
"jsx": "react-jsx",
"verbatimModuleSyntax": true,
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"moduleDetection": "force",
"skipLibCheck": true,
"skipLibCheck": true
}
}
6 changes: 6 additions & 0 deletions ts/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"name": "site-ts",
"private": true,
"scripts": {
"build": "tsc -p .",
"build:watch": "tsc -p . --watch"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@typescript-eslint/eslint-plugin": "^8.39.0",
Expand Down