initial commit i watched a youtube video essay on this guy and was so inspired to make this, copied over some files from another webpage i test made

This commit is contained in:
2026-02-23 20:30:09 -06:00
parent 0a0be9ca9c
commit 5f5d710613
8 changed files with 200098 additions and 0 deletions

2
.gitattributes copy Normal file
View File

@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

1
README.md Normal file
View File

@@ -0,0 +1 @@
# picsmics4

199794
docs/comments.json Normal file

File diff suppressed because one or more lines are too long

84
docs/commentsLoader.js Normal file
View File

@@ -0,0 +1,84 @@
async function loadComments() {
try {
const response = await fetch("comments.json");
const allComments = await response.json();
renderComments(allComments);
} catch (error) {
console.error("Error loading comments:", error);
document.getElementById("comments-list").innerHTML =
'<li style="color: red; padding: 1rem;">Error loading comments. Please check if comments.json exists.</li>';
}
}
/**
* Likes get formatted, every 1000 likes is a K, every 1,000,000 is a M
* @param {*} count
* @returns
*/
function formatLikes(count) {
if (count >= 1000) {
return (count / 1000).toFixed(count >= 10000 ? 0 : 1) + "K";
}
if (count >= 1000000000) {
return (count / 1000000000).toFixed(count >= 10000 ? 0 : 1) + "M";
}
return count.toString();
}
function createCommentHTML(comment) {
const badges = [];
if (comment.is_pinned) {
badges.push('<span class="stat-badge pinned-badge">📌 Pinned</span>');
}
// if (comment.is_favorited) {
// badges.push('<span class="stat-badge favorited-badge">❤️ Favorited</span>');
// }
return `
<div class="comment">
<div class="avatar">
<a href="${comment.author_url}" target="_blank" rel="noopener noreferrer">
<img src="${comment.author_thumbnail}" alt="${comment.author}">
</a>
</div>
<div class="comment__wrapper">
<div class="comment__body">
<a href="${comment.author_url}" target="_blank" rel="noopener noreferrer" class="comment__author">${comment.author}</a>
<p class="comment__text" dir="auto">${comment.text}</p>
</div>
<div class="comment__stats">
${badges.join("")}
</div>
<div class="comment__meta">
<span class="comment__likes">👍 ${formatLikes(comment.like_count)}</span>
<span class="comment__time">${comment._time_text}</span>
</div>
</div>
</div>
`;
}
// <div class="comment__actions">
// <a href="#">Like</a>
// <a href="#">Reply</a>
// </div>
/**
* Render the comments into the HTML
* @param {} comments
*/
function renderComments(comments) {
const commentsList = document.getElementById("comments-list");
commentsList.innerHTML = "";
comments.forEach((comment) => {
const li = document.createElement("li");
li.innerHTML = createCommentHTML(comment);
commentsList.appendChild(li);
});
}
document.addEventListener("DOMContentLoaded", loadComments);

24
docs/index.html Normal file
View File

@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DerexXD - DVD Logo Hitting Corner Comments | Michie Stadium</title>
<meta name="description" content="Website showing database of all comments from viral DVD logo hitting corner video at Michie Stadium. Comment on the video and become part of internet history forever." />
<meta name="keywords" content="DerexXD, DVD logo, hitting corner, Michie Stadium, comments, viral video, satisfying, leave your legacy, internet history" />
<meta name="author" content="DerexXD" />
<meta property="og:title" content="DerexXD - DVD Logo Hitting Corner Comments" />
<meta property="og:description" content="Database of all comments from the viral DVD logo hitting corner video at Michie Stadium. Comment and become part of internet history." />
<meta property="og:type" content="website" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="DerexXD - DVD Logo Hitting Corner Comments" />
<meta name="twitter:description" content="Database of all comments from the iconic DVD logo moment. Comment and become part of internet history." />
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<div class="container">
<ul id="comments-list"></ul>
</div>
<script src="commentsLoader.js"></script>
</body>
</html>

178
docs/styles.css Normal file
View File

@@ -0,0 +1,178 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
background: #f5f5f5;
padding: 2rem;
}
.container {
max-width: 800px;
margin: 0 auto;
}
h1 {
margin-bottom: 2rem;
color: #1a1a1a;
}
ul {
list-style: none;
padding: 0;
margin: 0;
}
li[style*="--nested: true"] {
padding-left: 3rem;
}
@supports (container-type: inline-size) {
@container style(--nested: true) {
li.main {
display: grid;
grid-template-columns: 3rem 3rem 1fr;
}
li.main .comment {
grid-column: 1 / -1;
}
}
}
.comment {
--size: 2.5rem;
display: flex;
gap: 0.75rem;
margin-bottom: 1rem;
position: relative;
}
.avatar {
flex: 0 0 var(--size);
width: var(--size);
height: var(--size);
border-radius: 50%;
background: #ddd;
overflow: hidden;
}
.avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.comment__wrapper {
flex: 1;
min-width: 0;
}
.comment__body {
background: #fff;
border-radius: 18px;
padding: 0.75rem 1rem;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}
.comment__author {
font-weight: 600;
color: #1a1a1a;
font-size: 0.9rem;
margin-bottom: 0.25rem;
display: block;
}
.comment__text {
color: #1a1a1a;
font-size: 0.95rem;
margin: 0;
word-wrap: break-word;
}
.comment__meta {
display: flex;
gap: 1rem;
padding: 0.25rem 0.5rem;
font-size: 0.85rem;
color: #65676b;
align-items: center;
}
.comment__likes {
font-weight: 600;
}
.comment__time {
color: #8a8d91;
}
.comment__actions {
display: flex;
gap: 1rem;
padding: 0.25rem 0.5rem;
font-size: 0.85rem;
}
.comment__actions a {
color: #65676b;
text-decoration: none;
font-weight: 600;
transition: color 0.2s;
}
.comment__actions a:hover {
color: #1a1a1a;
text-decoration: underline;
}
.comment-replies {
margin-top: 0.5rem;
}
.comment-replies .comment {
--size: 2rem;
}
@supports (selector(:has(ul))) {
li:has(ul) > .comment::before {
content: "";
position: absolute;
left: calc(var(--size) / 2);
top: calc(var(--size) + 0.5rem);
bottom: 0;
width: 2px;
background: #e0e0e0;
}
}
.comment__stats {
display: flex;
gap: 0.5rem;
align-items: center;
padding: 0.25rem 0.5rem;
font-size: 0.85rem;
}
.stat-badge {
background: #e7f3ff;
color: #1876f2;
padding: 0.125rem 0.5rem;
border-radius: 12px;
font-weight: 600;
font-size: 0.8rem;
}
.pinned-badge {
background: #fff3cd;
color: #856404;
}
.favorited-badge {
background: #ffe7e7;
color: #c41e3a;
}

14
extract_comments.py Normal file
View File

@@ -0,0 +1,14 @@
import json
from yt_dlp import YoutubeDL
url = "https://www.youtube.com/watch?v=lW7vWfRI5oI"
with YoutubeDL({"skip_download": True, "getcomments": True}) as derexXD:
info = derexXD.extract_info(url, download=False)
comments = sorted(info.get("comments", []), key=lambda x: x.get("timestamp", 0))
with open("docs/comments.json", "w") as file:
json.dump(comments, file, indent=2)
print(f"Done\nExtracted {len(comments)} comments from el video (sorted oldest to newest)")

1
requirements.txt Normal file
View File

@@ -0,0 +1 @@
yt-dlp