Skip to content

Commit

Permalink
added degree required to site
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael W. committed Oct 25, 2024
1 parent 3057f08 commit b6a81e6
Show file tree
Hide file tree
Showing 14 changed files with 13,911 additions and 1,281 deletions.
52 changes: 52 additions & 0 deletions CUUR0000SA0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+-------------+------+--------+---------+-----------+
| series id | year | period | value | footnotes |
+-------------+------+--------+---------+-----------+
| CUUR0000SA0 | 2014 | M12 | 234.812 | |
| CUUR0000SA0 | 2014 | M11 | 236.151 | |
| CUUR0000SA0 | 2014 | M10 | 237.433 | |
| CUUR0000SA0 | 2014 | M09 | 238.031 | |
| CUUR0000SA0 | 2014 | M08 | 237.852 | |
| CUUR0000SA0 | 2014 | M07 | 238.250 | |
| CUUR0000SA0 | 2014 | M06 | 238.343 | |
| CUUR0000SA0 | 2014 | M05 | 237.900 | |
| CUUR0000SA0 | 2014 | M04 | 237.072 | |
| CUUR0000SA0 | 2014 | M03 | 236.293 | |
| CUUR0000SA0 | 2014 | M02 | 234.781 | |
| CUUR0000SA0 | 2014 | M01 | 233.916 | |
| CUUR0000SA0 | 2013 | M12 | 233.049 | |
| CUUR0000SA0 | 2013 | M11 | 233.069 | |
| CUUR0000SA0 | 2013 | M10 | 233.546 | |
| CUUR0000SA0 | 2013 | M09 | 234.149 | |
| CUUR0000SA0 | 2013 | M08 | 233.877 | |
| CUUR0000SA0 | 2013 | M07 | 233.596 | |
| CUUR0000SA0 | 2013 | M06 | 233.504 | |
| CUUR0000SA0 | 2013 | M05 | 232.945 | |
| CUUR0000SA0 | 2013 | M04 | 232.531 | |
| CUUR0000SA0 | 2013 | M03 | 232.773 | |
| CUUR0000SA0 | 2013 | M02 | 232.166 | |
| CUUR0000SA0 | 2013 | M01 | 230.280 | |
| CUUR0000SA0 | 2012 | M12 | 229.601 | |
| CUUR0000SA0 | 2012 | M11 | 230.221 | |
| CUUR0000SA0 | 2012 | M10 | 231.317 | |
| CUUR0000SA0 | 2012 | M09 | 231.407 | |
| CUUR0000SA0 | 2012 | M08 | 230.379 | |
| CUUR0000SA0 | 2012 | M07 | 229.104 | |
| CUUR0000SA0 | 2012 | M06 | 229.478 | |
| CUUR0000SA0 | 2012 | M05 | 229.815 | |
| CUUR0000SA0 | 2012 | M04 | 230.085 | |
| CUUR0000SA0 | 2012 | M03 | 229.392 | |
| CUUR0000SA0 | 2012 | M02 | 227.663 | |
| CUUR0000SA0 | 2012 | M01 | 226.665 | |
| CUUR0000SA0 | 2011 | M12 | 225.672 | |
| CUUR0000SA0 | 2011 | M11 | 226.230 | |
| CUUR0000SA0 | 2011 | M10 | 226.421 | |
| CUUR0000SA0 | 2011 | M09 | 226.889 | |
| CUUR0000SA0 | 2011 | M08 | 226.545 | |
| CUUR0000SA0 | 2011 | M07 | 225.922 | |
| CUUR0000SA0 | 2011 | M06 | 225.722 | |
| CUUR0000SA0 | 2011 | M05 | 225.964 | |
| CUUR0000SA0 | 2011 | M04 | 224.906 | |
| CUUR0000SA0 | 2011 | M03 | 223.467 | |
| CUUR0000SA0 | 2011 | M02 | 221.309 | |
| CUUR0000SA0 | 2011 | M01 | 220.223 | |
+-------------+------+--------+---------+-----------+
4 changes: 4 additions & 0 deletions OEWS000000419020.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
+-----------+------+--------+-------+-----------+
| series id | year | period | value | footnotes |
+-----------+------+--------+-------+-----------+
+-----------+------+--------+-------+-----------+
52 changes: 52 additions & 0 deletions SUUR0000SA0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+-------------+------+--------+---------+-----------+
| series id | year | period | value | footnotes |
+-------------+------+--------+---------+-----------+
| SUUR0000SA0 | 2014 | M12 | 134.207 | |
| SUUR0000SA0 | 2014 | M11 | 135.107 | |
| SUUR0000SA0 | 2014 | M10 | 135.891 | |
| SUUR0000SA0 | 2014 | M09 | 136.211 | |
| SUUR0000SA0 | 2014 | M08 | 136.127 | |
| SUUR0000SA0 | 2014 | M07 | 136.392 | |
| SUUR0000SA0 | 2014 | M06 | 136.433 | |
| SUUR0000SA0 | 2014 | M05 | 136.216 | |
| SUUR0000SA0 | 2014 | M04 | 135.771 | |
| SUUR0000SA0 | 2014 | M03 | 135.375 | |
| SUUR0000SA0 | 2014 | M02 | 134.542 | |
| SUUR0000SA0 | 2014 | M01 | 134.017 | |
| SUUR0000SA0 | 2013 | M12 | 133.509 | |
| SUUR0000SA0 | 2013 | M11 | 133.596 | |
| SUUR0000SA0 | 2013 | M10 | 133.876 | |
| SUUR0000SA0 | 2013 | M09 | 134.255 | |
| SUUR0000SA0 | 2013 | M08 | 134.098 | |
| SUUR0000SA0 | 2013 | M07 | 133.919 | |
| SUUR0000SA0 | 2013 | M06 | 133.900 | |
| SUUR0000SA0 | 2013 | M05 | 133.626 | |
| SUUR0000SA0 | 2013 | M04 | 133.421 | |
| SUUR0000SA0 | 2013 | M03 | 133.558 | |
| SUUR0000SA0 | 2013 | M02 | 133.204 | |
| SUUR0000SA0 | 2013 | M01 | 132.137 | |
| SUUR0000SA0 | 2012 | M12 | 131.770 | |
| SUUR0000SA0 | 2012 | M11 | 132.208 | |
| SUUR0000SA0 | 2012 | M10 | 132.892 | |
| SUUR0000SA0 | 2012 | M09 | 132.988 | |
| SUUR0000SA0 | 2012 | M08 | 132.430 | |
| SUUR0000SA0 | 2012 | M07 | 131.731 | |
| SUUR0000SA0 | 2012 | M06 | 131.956 | |
| SUUR0000SA0 | 2012 | M05 | 132.154 | |
| SUUR0000SA0 | 2012 | M04 | 132.284 | |
| SUUR0000SA0 | 2012 | M03 | 131.905 | |
| SUUR0000SA0 | 2012 | M02 | 130.953 | |
| SUUR0000SA0 | 2012 | M01 | 130.438 | |
| SUUR0000SA0 | 2011 | M12 | 129.844 | |
| SUUR0000SA0 | 2011 | M11 | 130.196 | |
| SUUR0000SA0 | 2011 | M10 | 130.373 | |
| SUUR0000SA0 | 2011 | M09 | 130.635 | |
| SUUR0000SA0 | 2011 | M08 | 130.351 | |
| SUUR0000SA0 | 2011 | M07 | 129.983 | |
| SUUR0000SA0 | 2011 | M06 | 129.846 | |
| SUUR0000SA0 | 2011 | M05 | 129.999 | |
| SUUR0000SA0 | 2011 | M04 | 129.483 | |
| SUUR0000SA0 | 2011 | M03 | 128.585 | |
| SUUR0000SA0 | 2011 | M02 | 127.363 | |
| SUUR0000SA0 | 2011 | M01 | 126.778 | |
+-------------+------+--------+---------+-----------+
54 changes: 54 additions & 0 deletions app.css
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,57 @@ h3 {
.video-thumbnail:hover {
opacity: 0.8;
}

.degree {
font-size: 0.9em;
font-weight: bold;
}

.blue {
color: blue;
}

.green {
color: green;
}

/* Center the jobs list on the page */
#jobslist {
max-width: 1000px; /* Adjust max width as needed */
margin: 0 auto; /* Center-align #jobslist */
padding: 20px;
}

/* Center degree boxes within each job section, relative to job title */
.degree-box {
font-size: 0.9em;
font-weight: bold;
padding: 10px 20px;
border-radius: 5px;
color: #fff;
text-align: center;
display: inline-block;
vertical-align: middle;
margin: 10px auto; /* Centers within job-section */
}

/* Ensure job-section is centered within jobslist */
.job-section {
background-color: #2a3b5a;
border-radius: 8px;
padding: 5px;
margin: 20px auto;
word-wrap: break-word;
overflow: hidden;
text-align: center; /* Aligns text center within each job-section */
}


/* Specific colors based on degree type */
.degree-box.blue {
background-color: #007bff; /* Blue for Bachelor’s degree */
}

.degree-box.green {
background-color: #28a745; /* Green for Graduate degree */
}
33 changes: 6 additions & 27 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// careers can be entered with a bachelor’s degree (highlighted in BLUE),
// and those whose careers require a graduate degree (highlighted in GREEN).

const jobslist = document.getElementById('jobslist');
const searchBar = document.getElementById('searchBar');
const mainCategory = document.getElementById('mainCategory');
Expand Down Expand Up @@ -61,8 +58,6 @@ const loadJobs = async () => {
}
};

// Function to display jobs
// Function to display jobs
const displayJobs = (jobs) => {
let lastCategory = '';
const htmlString = jobs.map(({ main_category, jobTitle, job }) => {
Expand All @@ -78,22 +73,23 @@ const displayJobs = (jobs) => {
`;
}).join('');

// Add margin between video containers
const videosHtml = job.videos.map(video => {
const videoId = extractVideoId(video.url);
const thumbnailUrl = `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`;

return `
<div class="video-wrapper" data-video-id="${videoId}" style="margin-bottom: 20px;"> <!-- Added margin-bottom for spacing -->
<div class="video-wrapper" data-video-id="${videoId}" style="margin-bottom: 20px;">
<img src="${thumbnailUrl}" class="video-thumbnail" alt="Video thumbnail" style="cursor: pointer;" />
</div>
`;
}).join(''); // Each video gets a bottom margin to create space between them
}).join('');

// Display degree required in a separate text box next to the job title
return `
${isNewCategory ? `<h2 class="main-category">${main_category}</h2>` : ''}
<div class="job-section">
<h3 class="job-title">${jobTitle}</h3>
<span class="degree-box">Degree Required: ${job.degree_required}</span> <!-- Degree info in a separate box -->
<ul class="links-list">${linksHtml}</ul>
<div class="videos-container">${videosHtml}</div>
</div>
Expand All @@ -114,31 +110,14 @@ const displayJobs = (jobs) => {
iframe.setAttribute('frameborder', '0');
iframe.setAttribute('allow', 'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture');
iframe.setAttribute('allowfullscreen', true);
iframe.setAttribute('loading', 'lazy'); // Enables lazy loading for the iframe
iframe.setAttribute('loading', 'lazy');

videoWrapper.innerHTML = ''; // Clear the thumbnail
videoWrapper.appendChild(iframe); // Replace with the iframe

// Track video visibility
observeVideo(videoWrapper, iframe);
videoWrapper.appendChild(iframe);
});
});
};


// Function to observe and pause the video when out of view
function observeVideo(videoWrapper, iframe) {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (!entry.isIntersecting) {
iframe.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
}
});
});

observer.observe(videoWrapper);
}

// Function to update the main category display
const updateMainCategory = (jobs) => {
const firstJob = jobs[0];
Expand Down
Loading

0 comments on commit b6a81e6

Please sign in to comment.