Skip to content

Commit

Permalink
make the javascript vite in the modualized format
Browse files Browse the repository at this point in the history
  • Loading branch information
codejedi-ai committed Feb 9, 2025
1 parent 03e61a6 commit 394881a
Show file tree
Hide file tree
Showing 10 changed files with 561 additions and 184 deletions.
56 changes: 4 additions & 52 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -207,69 +207,22 @@ <h3>Majoring in Honours Bachelor of Computer Science with AI Specialization

<!--Skills-->
<section id="skills">
<div class="container">
<!-- Content will be generated by JavaScript -->
</div>

</section>

<!--Service-->

<!--Experience -->
<section class="experience" id="experience" style="background: #f2f2f2; padding: 30px 0;">


<div class="container">
<div class="heading text-center" style="margin: 0 0 20px">
<h2>Work Experience</h2>
<p>placeholder</p>
</div>
<div id="timeline">
<!-- Timeline items will be generated here -->
</div>
</div>

</section>


<!-- Portfolio -->

<section id="Portfolio" class="content">
<!-- Container -->
<div class="container portfolio_title">
<!-- Title -->
<div class="section-title">
<h2>Projects</h2>
<h6></h6> <!-- Quote will be inserted here --></div>
</div>
<!-- Container -->

<div class="portfolio-top"></div>

<!-- Portfolio Filters -->
<div class="portfolio">
<div id="filters" class="sixteen columns">
<ul class="clearfix">


</ul>
</div>
<!--/Portfolio Filters -->
<!-- Portfolio Wrapper -->
<div class="isotope fadeInLeft animated wow grid" id="portfolio_wrapper">
<!-- Portfolio Item -->

</div>
<!--/Portfolio Wrapper -->
</div>
<!--/Portfolio Filters -->

<div class="portfolio_btm"></div>

<div id="project_container">
<div class="clear"></div>
<div id="project_data"></div>
</div>
<!-- Add script reference -->


</section>

Expand All @@ -295,9 +248,8 @@ <h3><a href="https://github.com/codejedi-ai">GitHub</a></h3>
</div>
</div>
</footer>
<script type="module" src="/src/sections/skills-items.js"></script>
<script type="module" src="/src/sections/experience-items.js"></script>
<script type="module" src="/src/sections/portfolio-items.js"></script>
<script type="module" src="/src/main.js"></script>
<script type="text/javascript" src="js/sections/portfolio-items.js"></script>
<!-- Add viewport meta tag for proper dark mode detection -->
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
Expand Down
File renamed without changes.
File renamed without changes.
83 changes: 83 additions & 0 deletions public/js/sections/skills-items.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
const skillsData = [
{
img: 'img/aws-practitioner.png',
alt: 'AWS-CloudPractitioner-2021',
title: 'AWS Certified Practitioner',
date: '2 January 2021'
},
{
img: 'img/aws-developer.png',
alt: 'AWS-Developer',
title: 'AWS Certified Developer',
date: '29 August 2021'
},
{
img: 'img/aws-devops-prof.png',
alt: 'AWS-SysOps',
title: 'AWS Certified DevOps Engineer - Professional',
date: '23 August 2024'
},
{
img: '',
alt: '',
title: '?',
date: ''
}
];

const skillsQuote = {
text: "The greatest scientific discovery was the discovery of ignorance.",
author: "Yuval Noah Harari, Homo Deus: A History of Tomorrow"
};

function generateSkillsSection() {
const section = document.getElementById('skills');
if (!section) return;

const container = section.querySelector('.container');
container.innerHTML = `
<h2>Skills</h2>
<h6>"${skillsQuote.text}"-- ${skillsQuote.author}</h6>
<div class="skills_wrapper">
<div class="row">
${generateSkillItems()}
</div>
</div>
`;
}

function generateSkillItems() {
return skillsData.map(skill => `
<div class="col-md-3">
<div class="skills_icon delay-03s animated wow zoomIn">
${skill.img ? `<img src="${skill.img}" alt="${skill.alt}" />` : '<span></span>'}
</div>
<div class="skills_block">
<h3 class="animated fadeInUp wow">${skill.title}</h3>
<p class="animated fadeInDown wow">${skill.date}</p>
</div>
</div>
`).join('');
}

function setSkillsBackground() {
const skillsSection = document.getElementById('skills');
if (skillsSection) {
skillsSection.style.cssText = `
padding: 20px 0px;
background: url("../img/spacexRocket.jpeg") no-repeat center;
background-size: cover;
height: auto;
display: block;
margin-left: auto;
margin-right: auto;
position: center;
`;
}
}

document.addEventListener('DOMContentLoaded', () => {
generateSkillsSection();
setSkillsBackground();
});
168 changes: 168 additions & 0 deletions src/components/experience.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
export const experienceItems = [
{
year: '2024',
positions: [
{
title: 'Software Developer Intern - DevOps (Hybrid)',
company: 'Open Text Corporation',
location: 'Ottawa, ON, Canada',
companyUrl: 'https://www.opentext.com/',
period: 'Sep.3 ~ Dec.20, 2024 (4 months)',
},
{
title: 'Cloud Engineer Intern (Remote)',
company: 'Sun Life Financial',
location: 'Toronto, ON, Canada',
companyUrl: 'https://www.sunlife.ca/en/',
period: 'May.6~ Aug.30, 2024 (4 months)',
}
]
},
{
year: '2023',
positions: [
{
title: 'Site Reliability Engineer Intern (Remote)',
company: 'OANDA (Canada) Corporation',
location: 'Toronto, ON, Canada',
companyUrl: 'https://oanda.com/ca-en/',
period: 'Jan.9 ~ Apr.21, 2023 (4 Months)',
}
]
},
{
year: '2022',
positions: [
{
title: 'Site Reliability Engineer Intern (Hybrid)',
company: 'Carta Maple Technologies Inc.',
location: 'Waterloo, ON, Canada',
companyUrl: 'https://carta.com/',
period: 'May.2 ~ Aug.26, 2022 (4 Months)',
}
]
},
{
year: '2021',
positions: [
{
title: 'Software Development Co-op Student (Remote)',
company: 'VirtaMove Corp.',
location: 'Ottawa, ON, Canada',
companyUrl: 'https://www.virtamove.com/about-us',
period: 'May.6 ~ Aug.27, 2021 (4 Months)',
}
]
}
];
export const quotes = [
{
text: "Knowledge = Experience x Sensitivity",
author: "Yuval Noah Harari"
}
];

function generateRandomQuote() {
return quotes[0]; // Using first quote for consistency
}

export function generateTimelineHeader() {
const quote = generateRandomQuote();
const header = document.querySelector('#experience .heading');
if (header) {
header.innerHTML = `
<h2>Work Experience</h2>
<p>"${quote.text}" — ${quote.author}</p>
`;
}
}

function generateTimelineItem(item, side) {
return `
<div class="${side === 'right' ? 'col-sm-offset-6' : ''} col-sm-6 timeline-item">
<div class="row">
<div class="${side === 'right' ? 'col-sm-offset-1' : ''} col-sm-11">
<div class="timeline-panel ${side === 'right' ? 'debits' : 'credits'}">
<ul class="timeline-panel-ul">
<li><span class="importo">${item.title}</span></li>
<li><span class="causale">
<img src="/img/diamond.gif">
<a href="${item.companyUrl}">${item.company}| ${item.location}</a>
</span>
</li>
<li><p><small class="text-muted">${item.period}</small></p></li>
</ul>
</div>
</div>
</div>
</div>
`;
}

export function generateTimeline() {
const timeline = document.getElementById('timeline');
if (!timeline) {
console.error('Timeline element not found');
return;
}

// Add timeline year image at top
const yearImageSection = document.createElement('div');
yearImageSection.className = 'row timeline-movement timeline-movement-top';
yearImageSection.innerHTML = `
<div class="timeline-badge timeline-filter-movement">
<img src="/img/year.png" style="margin: 0 0 80px; position: relative">
</div>
`;
timeline.appendChild(yearImageSection);

let side = 'left';
experienceItems.forEach(yearGroup => {
const yearSection = document.createElement('div');
yearSection.className = 'row timeline-movement';

yearSection.innerHTML = `
<div class="timeline-badge">
<span class="timeline-balloon-date-day"></span>
<span class="timeline-balloon-date-month">${yearGroup.year}</span>
</div>
`;

yearGroup.positions.forEach(position => {
yearSection.innerHTML += generateTimelineItem(position, side);
side = side === 'left' ? 'right' : 'left';
});

timeline.appendChild(yearSection);
});
}

export function initExperience() {
let section = document.getElementById('experience');

// Create section if it doesn't exist
if (!section) {
section = document.createElement('section');
section.id = 'experience';
section.className = 'experience';
section.style.cssText = 'background: #f2f2f2; padding: 30px 0;';
document.body.appendChild(section);
}

// Create container structure
section.innerHTML = `
<div class="container">
<div class="heading text-center" style="margin: 0 0 20px">
<h2>Work Experience</h2>
<p>placeholder</p>
</div>
<div id="timeline">
<!-- Timeline items will be generated here -->
</div>
</div>
`;

// Generate content
generateTimelineHeader();
generateTimeline();
}
Loading

0 comments on commit 394881a

Please sign in to comment.