creating index for portfolio sites

This commit is contained in:
2025-11-17 23:13:11 -07:00
commit e4cd0735ef
6 changed files with 652 additions and 0 deletions

348
assets/css/styles.css Normal file
View File

@@ -0,0 +1,348 @@
:root {
color-scheme: light dark;
--bg: #0f1117;
--card: rgba(255, 255, 255, 0.03);
--card-border: rgba(255, 255, 255, 0.08);
--text: #f5f7fa;
--muted: rgba(245, 247, 250, 0.7);
--accent: #7dd3fc;
--accent-strong: #0ea5e9;
--ipv4: #f97316;
--ipv6: #22c55e;
font-size: 16px;
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont,
"Segoe UI", sans-serif;
background: radial-gradient(circle at top left, #1f2937, #0f172a 50%, #020617);
color: var(--text);
min-height: 100vh;
padding: clamp(1.5rem, 3vw, 3rem);
}
.page-shell {
max-width: 1100px;
margin: 0 auto;
display: flex;
flex-direction: column;
gap: 2.5rem;
}
.hero {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 1.5rem;
border: 1px solid var(--card-border);
background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
border-radius: 24px;
padding: clamp(1.5rem, 4vw, 2.75rem);
}
.hero h1 {
font-size: clamp(2.2rem, 6vw, 3.1rem);
letter-spacing: -0.02em;
}
.hero .eyebrow {
text-transform: uppercase;
letter-spacing: 0.2em;
font-size: 0.75rem;
color: var(--muted);
margin-bottom: 0.5rem;
}
.hero .lede {
margin-top: 0.75rem;
max-width: 550px;
color: var(--muted);
line-height: 1.6;
}
.hero .tagline {
align-self: flex-end;
font-size: 0.95rem;
color: var(--muted);
}
.table-card {
background: var(--card);
border: 1px solid var(--card-border);
border-radius: 24px;
padding: clamp(1rem, 3vw, 2rem);
backdrop-filter: blur(12px);
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}
.notes-card {
background: rgba(15, 23, 42, 0.65);
border: 1px solid rgba(125, 211, 252, 0.15);
border-radius: 24px;
padding: clamp(1.25rem, 3vw, 2.5rem);
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
display: flex;
flex-direction: column;
gap: 1.5rem;
line-height: 1.7;
}
.notes-card__header {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.notes-card__header h2 {
font-size: 1.25rem;
}
.notes-card__hint {
color: var(--muted);
font-size: 0.95rem;
}
.notes-card__body ul {
margin-top: 0.5rem;
padding-left: 1.2rem;
color: var(--muted);
display: flex;
flex-direction: column;
gap: 0.4rem;
}
.notes-card__body strong {
color: var(--text);
}
.visual-card {
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 28px;
padding: clamp(1.5rem, 3vw, 2.75rem);
background: linear-gradient(120deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.15));
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.visual-card__content {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
gap: 2rem;
align-items: center;
}
.visual-card__lede {
color: var(--muted);
margin-top: 0.75rem;
line-height: 1.7;
}
.visual-card__controls {
margin-top: 1.25rem;
display: flex;
flex-wrap: wrap;
gap: 0.75rem;
align-items: center;
font-size: 0.9rem;
color: var(--muted);
}
.visual-card__control-buttons {
display: inline-flex;
gap: 0.5rem;
}
.photo-size__button {
border: 1px solid rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.05);
color: var(--text);
padding: 0.35rem 0.9rem;
border-radius: 999px;
font-size: 0.85rem;
cursor: pointer;
transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.photo-size__button:hover {
border-color: var(--accent);
}
.photo-size__button.is-active {
background: rgba(125, 211, 252, 0.15);
border-color: var(--accent);
color: var(--accent);
}
.visual-card__media {
display: flex;
justify-content: center;
}
.visual-card__figure {
margin: 0;
border-radius: 20px;
overflow: hidden;
border: 1px solid rgba(255, 255, 255, 0.15);
background: rgba(0, 0, 0, 0.25);
max-width: 100%;
transition: max-width 0.3s ease, max-height 0.3s ease;
}
.visual-card__figure img {
display: block;
width: 100%;
height: auto;
object-fit: cover;
max-height: 420px;
}
.visual-card__figure figcaption {
font-size: 0.85rem;
padding: 0.6rem 0.9rem;
color: var(--muted);
background: rgba(2, 6, 23, 0.65);
}
.visual-card[data-photo-size="compact"] .visual-card__figure {
max-width: 280px;
}
.visual-card[data-photo-size="compact"] .visual-card__figure img {
max-height: 240px;
}
.visual-card[data-photo-size="standard"] .visual-card__figure {
max-width: 420px;
}
.visual-card[data-photo-size="standard"] .visual-card__figure img {
max-height: 320px;
}
.visual-card[data-photo-size="full"] .visual-card__figure {
max-width: 100%;
}
.visual-card[data-photo-size="full"] .visual-card__figure img {
max-height: 520px;
}
.table-card__header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1rem;
}
.table-card__header h2 {
font-size: 1.3rem;
}
.table-wrapper {
overflow-x: auto;
border-radius: 16px;
border: 1px solid var(--card-border);
}
table {
width: 100%;
border-collapse: collapse;
min-width: 600px;
}
thead {
background: rgba(255, 255, 255, 0.04);
}
thead th {
text-align: left;
padding: 0.85rem 1.25rem;
font-size: 0.9rem;
color: var(--muted);
}
tbody tr {
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
transition: background 200ms ease, transform 200ms ease;
}
tbody tr:hover {
background: rgba(125, 211, 252, 0.08);
transform: translateX(4px);
}
td {
padding: 1rem 1.25rem;
vertical-align: top;
line-height: 1.5;
}
td:first-child a {
color: var(--accent);
font-weight: 500;
text-decoration: none;
}
td:first-child a:hover {
color: var(--accent-strong);
}
.ip-list {
display: flex;
flex-wrap: wrap;
gap: 0.35rem;
}
.pill {
display: inline-flex;
align-items: center;
gap: 0.25rem;
border-radius: 999px;
padding: 0.3rem 0.75rem;
font-size: 0.78rem;
font-weight: 500;
background: rgba(255, 255, 255, 0.08);
}
.pill--ipv4 {
color: var(--ipv4);
}
.pill--ipv6 {
color: var(--ipv6);
}
.remarks {
color: var(--muted);
}
.footnote {
margin-top: 1rem;
font-size: 0.85rem;
color: var(--muted);
}
.noscript {
text-align: center;
margin-top: 1rem;
color: #ef4444;
}
@media (max-width: 640px) {
body {
padding: 1.5rem 1rem;
}
.hero {
flex-direction: column;
}
table {
min-width: 100%;
}
}

40
assets/js/data.js Normal file
View File

@@ -0,0 +1,40 @@
const sitesDirectory = [
{
label: "portfolio beta",
url: "https://beta.portfolio.dheerajg.me",
ipv6: ["IPV6 only site"],
remarks: "I'm not a frontend developer but I sometimes use AI for frontend tasks and I dont want to break whats working hence this.",
},
{
label: "portfolio",
url: "https://portfolio.dheerajg.me",
ipv6: ["IPV6 only site"],
remarks: "This is the stable version of my portfolio site.",
},
{
label: "git",
url: "https://git.dheerajg.me",
ipv6: ["IPV6 only site"],
remarks: "well I don't know what to write here apart from its my own git hosting service.",
},
{
label: "resume",
url: "https://resume.dheerajg.me",
ipv4: ["This runs dual stack"],
remarks: "turns out lot of folks still run just IPV4, so made cloudflare tunnel.",
},
{
label: "project documentation",
url: "https://projectdoc.dheerajg.me",
ipv6: ["IPV6 only site"],
remarks: "This is the documentation for my projects, I try to keep it updated I'll try to put some in public .",
},
{
label: "portfolio minimal",
url: "https://v6.min.portfolio.dheerajg.me",
ipv6: ["IPV6 only site"],
remarks: "I have an 15 year old device that isnt able to render modern website so I decided to make a minimal version of my portfolio",
}
];
window.sitesDirectory = sitesDirectory;

88
assets/js/main.js Normal file
View File

@@ -0,0 +1,88 @@
(() => {
const tbody = document.getElementById("sitesBody");
const lastUpdatedEl = document.getElementById("lastUpdated");
const formatTimestamp = () => {
const formatter = new Intl.DateTimeFormat("en", {
dateStyle: "medium",
timeStyle: "short",
});
lastUpdatedEl.textContent = formatter.format(new Date());
};
const renderRows = () => {
if (!Array.isArray(window.sitesDirectory) || !window.sitesDirectory.length) {
tbody.innerHTML = `
<tr>
<td colspan="3">No entries yet. Update assets/js/data.js to get started.</td>
</tr>`;
return;
}
const rows = window.sitesDirectory
.map((site) => {
const {
label = "Site",
url = "#",
ipv4 = [],
ipv6 = [],
remarks = "",
} = site;
const ipv4Badges = ipv4
.map((ip) => `<span class="pill pill--ipv4">${ip}</span>`)
.join("");
const ipv6Badges = ipv6
.map((ip) => `<span class="pill pill--ipv6">${ip}</span>`)
.join("");
const ipMarkup =
ipv4.length || ipv6.length
? `<div class="ip-list">${ipv4Badges}${ipv6Badges}</div>`
: `<span class="remarks">—</span>`;
return `
<tr>
<td>
<a href="${url}" target="_blank" rel="noopener noreferrer">
${label}
</a>
<div class="remarks">${url.replace(/^https?:\/\//, "")}</div>
</td>
<td>${ipMarkup}</td>
<td class="remarks">${remarks}</td>
</tr>`;
})
.join("");
tbody.innerHTML = rows;
};
const initPhotoSizeControls = () => {
const card = document.querySelector(".visual-card");
if (!card) return;
const buttons = card.querySelectorAll("[data-photo-size-option]");
if (!buttons.length) return;
const setSize = (size) => {
card.setAttribute("data-photo-size", size);
buttons.forEach((btn) => {
btn.classList.toggle("is-active", btn.dataset.photoSizeOption === size);
});
};
const initial = card.getAttribute("data-photo-size") || "standard";
setSize(initial);
buttons.forEach((button) => {
button.addEventListener("click", () => {
const size = button.dataset.photoSizeOption;
setSize(size);
});
});
};
formatTimestamp();
renderRows();
initPhotoSizeControls();
})();