Skip to content

Commit

Permalink
Update 2024.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rwuhrmangsa authored Jan 7, 2025
1 parent f57742e commit 81684dc
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion _pages/progress/2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,55 @@ news-category: FIBF-PROGRAM

{% include banner.html title-override="2024 Progress Update" width="grid-col-11" offset="grid-offset-1" %}


<script>
window.addEventListener('load', function() {
let output = '';
fetch('/news-api/')
.then(response => response.json())
.then(data => {
let year = new Date().getFullYear();
let pastmonth = (new Date().getMonth()).toString().padStart(2, '0');
let currentmonth = (new Date().getMonth() + 1).toString().padStart(2, '0');

// Build dates array from last 3 weeks
let datesArray = [];
for (let i = 0; i < 21; i++) {
let date = new Date(new Date().setDate(new Date().getDate() - i)).toISOString().split('T')[0];
datesArray.push(date);
}

// let filteredData = data.filter(function(item) {
// return item.Date.includes(year + '-' + currentmonth);
// });

// Filter data by dates array
let filteredData = data.filter(function(item) {
return datesArray.includes(item.Date.split('T')[0]);
});

if (filteredData.length === 0) {
output = 'No new notifications';
} else {
document.getElementById('notification-button').classList.remove('text-base-dark');
document.getElementById('notification-button').classList.add('text-secondary-dark');
output += '<h1 class="font-body-lg">Latest Notifications</h1>';
for (const item of filteredData) {
output += '<p><a href="' + item.Hyperlink + '" title="' + item.Title + '" class="display-block font-body-xs">' + item.Title + '</a>';
output += '<time datetime="' + new Date(item.Date).toISOString().split('T')[0] + '" class="notification-date display-block font-body-xs"><i>' + new Date(item.Date).toLocaleDateString('en-US', {timeZone: 'UTC'}) + '</i></time></p>';
}
}
output += '<p><a href="/#news" class="display-inline-block font-body-xs usa-button" data-close-modal>View all notifications</a></p>';
document.getElementById('news-content').innerHTML = output;

})
.catch(error => {
console.error('Error:', error);
});
});
</script>


<style>
a.green-link {
color: #D83933; /* Red color */
Expand Down Expand Up @@ -181,7 +230,7 @@ Performance management is a crucial function of any government program, whether

<img src="/assets/images/performance-management/performance-framework-puzzle.png" align="right" height=275 width=400>
<FONT STYLE="font-size:10px; align: center;"><a title="Watch Evidence-based Performance Management video" href="#performance-management-modal" aria-controls="performance-management-modal" data-open-modal>(Animation: Relationship of Management Performance to Mission Delivery</A></FONT>
<FONT STYLE="font-size:10px; text-align: center;"><a title="Watch Performance Management animation" href="#performance-management-modal" aria-controls="performance-management-modal" data-open-modal>(Animation: Relationship of Management Performance to Mission Delivery</A></FONT>

<BR>
<A HREF="/performance-management/">Performance Framework</A>
Expand Down

0 comments on commit 81684dc

Please sign in to comment.