first commit

This commit is contained in:
mahdahar 2025-12-16 15:28:43 +07:00
commit 9732d965fc
9 changed files with 2011 additions and 0 deletions

13
.eleventy.js Normal file
View File

@ -0,0 +1,13 @@
module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/css");
eleventyConfig.addWatchTarget("src/css");
return {
dir: {
input: "src",
output: "_site",
includes: "_includes",
layouts: "_layouts"
}
};
};

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
node_modules/
_site/
.DS_Store
*.log

1712
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

16
package.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "5panda.11ty",
"version": "1.0.0",
"main": "index.js",
"scripts": {
"start": "eleventy --serve",
"build": "eleventy"
},
"keywords": [],
"author": "",
"license": "ISC",
"description": "",
"devDependencies": {
"@11ty/eleventy": "^3.1.2"
}
}

31
src/_layouts/base.njk Normal file
View File

@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ title | default("Dev Log & Portfolio") }}</title>
<link rel="stylesheet" href="/css/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
</head>
<body>
<header>
<a href="/" class="logo">5Panda</a>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about/">About</a></li>
</ul>
</nav>
</header>
<main>
{{ content | safe }}
</main>
<footer>
<p>&copy; {% if year %}{{ year }}{% else %}2025{% endif %} 5Panda Dev Log. Built with 11ty.</p>
</footer>
</body>
</html>

10
src/about.md Normal file
View File

@ -0,0 +1,10 @@
---
layout: base.njk
title: About Me
---
# About Me
I am a developer who loves to build things.
This portfolio is a reflection of my work and my passion for technology.

178
src/css/style.css Normal file
View File

@ -0,0 +1,178 @@
:root {
--bg-color: #0f172a;
--text-color: #e2e8f0;
--primary-color: #38bdf8;
--secondary-color: #818cf8;
--accent-color: #f472b6;
--card-bg: #1e293b;
--font-main: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-main);
line-height: 1.6;
margin: 0;
padding: 0;
}
header {
padding: 2rem 5%;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
background: rgba(15, 23, 42, 0.9);
backdrop-filter: blur(10px);
position: sticky;
top: 0;
z-index: 100;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
background: linear-gradient(to right, var(--primary-color), var(--accent-color));
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-decoration: none;
}
nav ul {
list-style: none;
display: flex;
gap: 2rem;
padding: 0;
margin: 0;
}
nav a {
color: var(--text-color);
text-decoration: none;
font-weight: 500;
transition: color 0.3s;
}
nav a:hover {
color: var(--primary-color);
}
main {
max-width: 800px;
margin: 4rem auto;
padding: 0 1rem;
}
h1,
h2,
h3 {
color: #fff;
}
.hero {
text-align: center;
margin-bottom: 4rem;
}
.hero h1 {
font-size: 3.5rem;
margin-bottom: 1rem;
line-height: 1.2;
}
.hero p {
font-size: 1.2rem;
color: #94a3b8;
max-width: 600px;
margin: 0 auto;
}
.post-list {
list-style: none;
padding: 0;
display: grid;
gap: 2rem;
}
.post-card {
background: var(--card-bg);
padding: 2rem;
border-radius: 1rem;
transition: transform 0.3s, box-shadow 0.3s;
border: 1px solid rgba(255, 255, 255, 0.05);
}
.post-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
border-color: var(--primary-color);
}
.post-card h2 {
margin-top: 0;
font-size: 1.8rem;
}
.post-card a {
text-decoration: none;
color: inherit;
}
.post-meta {
font-size: 0.9rem;
color: #94a3b8;
margin-bottom: 1rem;
display: block;
}
footer {
text-align: center;
padding: 2rem;
margin-top: 4rem;
color: #64748b;
border-top: 1px solid rgba(255, 255, 255, 0.05);
}
/* Typography polish */
p {
margin-bottom: 1.5rem;
}
article {
font-size: 1.1rem;
}
code {
background: #334155;
padding: 0.2em 0.4em;
border-radius: 0.3em;
font-size: 0.9em;
color: #e2e8f0;
}
pre {
background: #1e293b;
padding: 1.5rem;
border-radius: 0.5rem;
overflow-x: auto;
border: 1px solid rgba(255, 255, 255, 0.05);
}
/* Animations */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
main {
animation: fadeIn 0.6s ease-out;
}

22
src/index.njk Normal file
View File

@ -0,0 +1,22 @@
---
layout: base.njk
title: Home - 5Panda
---
<div class="hero">
<h1>Building the Future,<br>One Line at a Time.</h1>
<p>Welcome to my digital garden. Here I document my journey, share learnings, and showcase my projects.</p>
</div>
<h2>Latest Posts</h2>
<ul class="post-list">
{%- for post in collections.post | reverse -%}
<li class="post-card">
<a href="{{ post.url }}">
<span class="post-meta">{{ post.date.toDateString() }}</span>
<h2>{{ post.data.title }}</h2>
<p>{{ post.data.description }}</p>
</a>
</li>
{%- endfor -%}
</ul>

25
src/posts/hello-world.md Normal file
View File

@ -0,0 +1,25 @@
---
layout: base.njk
title: Hello World
date: 2025-12-16
tags: post
description: The first post of many. Setting up the environment.
---
# Hello World!
Welcome to my new blog. This is a starter post to verify that **11ty** is working correctly.
## Why 11ty?
* Static Site Generation
* Fast build times
* Flexible
Here is a code snippet:
```javascript
console.log("Hello, 5Panda!");
```
Enjoy the stay!