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
44 changes: 44 additions & 0 deletions projects/devfolio-ai/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DevFolio AI</title>

<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>

<div class="app">

<div class="builder">

<h1>DevFolio AI</h1>

<input type="text" id="nameInput" placeholder="Your Name">
<textarea id="bioInput" placeholder="Short Bio"></textarea>
<input type="text" id="skillsInput" placeholder="Skills (comma separated)">
<textarea id="projectsInput" placeholder="Projects (one per line)"></textarea>

<select id="themeSelect">
<option value="dark">Dark</option>
<option value="light">Light</option>
<option value="gradient">Gradient</option>
</select>

<button id="generateBtn">Generate Portfolio</button>
<button id="downloadBtn">Download HTML</button>

</div>

<div class="preview" id="preview">
<h2>Live Preview</h2>
<div id="portfolioOutput"></div>
</div>

</div>

<script src="script.js"></script>
</body>
</html>
81 changes: 81 additions & 0 deletions projects/devfolio-ai/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
const nameInput = document.getElementById("nameInput");
const bioInput = document.getElementById("bioInput");
const skillsInput = document.getElementById("skillsInput");
const projectsInput = document.getElementById("projectsInput");
const themeSelect = document.getElementById("themeSelect");
const generateBtn = document.getElementById("generateBtn");
const downloadBtn = document.getElementById("downloadBtn");
const portfolioOutput = document.getElementById("portfolioOutput");

/* =============================
GENERATE PORTFOLIO
============================= */

generateBtn.addEventListener("click", generatePortfolio);

function generatePortfolio(){

const name = nameInput.value;
const bio = bioInput.value;
const skills = skillsInput.value.split(",");
const projects = projectsInput.value.split("\n");
const theme = themeSelect.value;

let skillsHTML = "";
skills.forEach(skill=>{
skillsHTML += `<span>${skill.trim()}</span>`;
});

let projectsHTML = "<ul>";
projects.forEach(project=>{
if(project.trim()!==""){
projectsHTML += `<li>${project.trim()}</li>`;
}
});
projectsHTML += "</ul>";

portfolioOutput.innerHTML = `
<div class="portfolio ${theme}">
<h1>${name}</h1>
<p>${bio}</p>

<h3>Skills</h3>
<div class="skills">${skillsHTML}</div>

<h3>Projects</h3>
${projectsHTML}
</div>
`;

}

/* =============================
DOWNLOAD GENERATED HTML
============================= */

downloadBtn.addEventListener("click", downloadHTML);

function downloadHTML(){

const content = `
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>${nameInput.value} Portfolio</title>
<style>
body{font-family:Arial;padding:40px;}
</style>
</head>
<body>
${portfolioOutput.innerHTML}
</body>
</html>
`;

const blob = new Blob([content], {type:"text/html"});
const link = document.createElement("a");
link.href = URL.createObjectURL(blob);
link.download = "portfolio.html";
link.click();
}
97 changes: 97 additions & 0 deletions projects/devfolio-ai/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
*{
margin:0;
padding:0;
box-sizing:border-box;
}

body{
font-family:'Montserrat',sans-serif;
background:#111;
color:white;
min-height:100vh;
}

.app{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
padding:30px;
}

.builder{
background:#1e1e1e;
padding:25px;
border-radius:15px;
display:flex;
flex-direction:column;
gap:15px;
}

.preview{
background:#000;
padding:25px;
border-radius:15px;
overflow:auto;
}

input,textarea,select{
padding:10px;
border-radius:8px;
border:none;
outline:none;
}

textarea{
min-height:80px;
resize:none;
}

button{
padding:10px;
border:none;
border-radius:8px;
cursor:pointer;
font-weight:600;
background:#00c6ff;
color:black;
transition:0.3s;
}

button:hover{
transform:scale(1.05);
}

.portfolio{
padding:20px;
border-radius:10px;
}

.portfolio.dark{
background:#121212;
color:white;
}

.portfolio.light{
background:white;
color:#111;
}

.portfolio.gradient{
background:linear-gradient(135deg,#667eea,#764ba2);
color:white;
}

.skills span{
display:inline-block;
margin:5px;
padding:5px 10px;
border-radius:20px;
background:rgba(255,255,255,0.2);
font-size:0.8rem;
}

@media(max-width:900px){
.app{
grid-template-columns:1fr;
}
}