Skip to content

Commit fc0bfcf

Browse files
committed
fix: bugs with 11ty /now page generation, item expire dates
1 parent 32a1a07 commit fc0bfcf

File tree

9 files changed

+199
-17
lines changed

9 files changed

+199
-17
lines changed

_data/now.json

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
{
2+
"nowItems": [
3+
{
4+
"itemDateExpire": "2025-08-25",
5+
"itemTitle": "Funding",
6+
"itemCaption": "Seeking funds to help us help Terrabyte make the planet a little bit better of a place. Have to spend money to make money, or something like that. Fingers crossed! (psst get in touch if you are looking for funding opportunities..? :)",
7+
"itemCategory": "p",
8+
"linkTitle": "What is Terrabyte?",
9+
"linkHref": "https://www.terrabyte.eco"
10+
},
11+
{
12+
"itemDateExpire": "2026-01-20",
13+
"itemTitle": "Wasted Space",
14+
"itemCaption": "The first game in the Terrabyte roster, the concept is to blast space enemies, collect destroyed materials, and recycle them into ship upgrades. We showcased our game in Berlin (yes, Germany!) at GTF and now you can play it too! I'm still working on some additions to the game hence why it's here and not on the main portfolio page.",
15+
"itemCategory": "tb",
16+
"linkTitle": "View the Wasted Space website",
17+
"linkHref": "https://www.wastedspace.fun"
18+
},
19+
{
20+
"itemDateExpire": "",
21+
"itemTitle": "Birding",
22+
"itemCaption": "I was raised on the outdoors, but as I got older, my studies and work grew to take up more and more of my free time. And now living in a big city, it can sometimes feel like I'm more disconnected to the natural world than my environmental work would suggest (and more than I would like). That was, until my brother introduced me to birding. I was skeptical on if I would actually enjoy it (or if it was an 'old person activity' like I previously thought), but it's a great way to get outside, connect with local wildlife, and be more mindful of what's out there.",
23+
"itemCategory": "p",
24+
"linkTitle": "I'm on eBird!",
25+
"linkHref": "https://ebird.org/profile/NjE4NTM3Ng"
26+
},
27+
{
28+
"itemDateExpire": "",
29+
"itemTitle": "Square Listings",
30+
"itemCaption": "Though I want to expand the Pixel Planet Today merch offerings, I'm currently working on the listings already up. That means finishing exports for wallpapers, getting stickers up on Etsy, and other organizational things to tie up loose ends.",
31+
"itemCategory": "tb",
32+
"linkTitle": "View the Webstore",
33+
"linkHref": "https://shop.pixelplanettoday.com"
34+
},
35+
{
36+
"itemDateExpire": "",
37+
"itemTitle": "byteOS: Notes",
38+
"itemCaption": "A tiny pixel art note-taking app that came to be mostly as an experiment for lightweight, offline tools. The app is released, but work on basic features is very much ongoing (like font packs, auto-saving, and recent notes).",
39+
"itemCategory": "tb",
40+
"linkTitle": "Download on Android",
41+
"linkHref": "https://play.google.com/store/apps/details?id=com.terrabyte.byteosnotes"
42+
},
43+
{
44+
"itemDateExpire": "",
45+
"itemTitle": "Pixel Planet Today",
46+
"itemCaption": "The world is constantly calling for environmental facts and pixel art: making this the project that never sleeps. I am trying to get into a more consistent posting schedule, but what can I say, there is much to be done.",
47+
"itemCategory": "tb",
48+
"linkTitle": "View the Pixel Planet Today Website",
49+
"linkHref": "https://www.pixelplanettoday.com"
50+
},
51+
{
52+
"itemDateExpire": "",
53+
"itemTitle": "Reading",
54+
"itemCaption": "Hit the reading goal for the year, but still working on a couple! TBR is getting smaller, but there is quite a pile to get through...",
55+
"itemCategory": "p",
56+
"linkTitle": "",
57+
"linkHref": ""
58+
},
59+
{
60+
"itemDateExpire": "",
61+
"itemTitle": "The Aurum Framework",
62+
"itemCaption": "After years of working in HTML and CSS, I am finally starting to build my own framework! It's nothing compared to Bootstrap, but a lightweight system to help build flex layouts more easily. I already use the same styles for this across (most of) my projects, so the thought is that if I can use the same resource for all of them, I don't have to have duplicate code everywhere. It's not exactly ready for primetime, but if you'd like to check it out, you're more than welcome to!",
63+
"itemCategory": "ghm",
64+
"linkTitle": "Check out the GitHub Repo",
65+
"linkHref": "https://github.com/goldenharpmedia/aurum"
66+
},
67+
{
68+
"itemDateExpire": "",
69+
"itemTitle": "Omaha & Nebraska Public Transportation Plan",
70+
"itemCaption": "Because I'm such an urbanism nerd, something that I've found myself doing is creating a map that outlines where public transportation improvements could be made in Omaha and other Central Nebraska locations. Do I expect these ideas to bloom to fruition? Not exactly, but if they did - boy, the state would be all the better for it. :)",
71+
"itemCategory": "p",
72+
"linkTitle": "View the custom Google Map",
73+
"linkHref": "https://www.google.com/maps/d/u/0/edit?mid=1m-HwihuWTXU6SkHG9q-nHJ25keWnUkc&usp=sharing"
74+
}
75+
],
76+
77+
"oldItems": [
78+
{
79+
"itemDateExpire": "2025-08-25",
80+
"itemTitle": "Earth Day Omaha",
81+
"itemCaption": "The biggest Earth Day event in the Omaha area, Earth Day Omaha is a celebration of our planet and the people who work to protect it. I recently joined the Green Omaha Coalition Board of Directors (yay!), and I've been very busy helping plan this year's event and create social media content to promote it.",
82+
"itemCategory": "p",
83+
"linkTitle": "Learn more",
84+
"linkHref": "https://www.greenomaha.org/about-earthdayomaha"
85+
},
86+
{
87+
"itemTitle": "Omaha Metro Bike Trail Connection Proposal",
88+
"itemCaption": "It's fun to envision a world/city that is built for people, not for cars. And since I'm an avid bicyclist, I made a map that plots where trail connections would make the most positive impact in the metro. I actually talked with the Papio NRD about my ideas, and while I don't know if I'll ever see them come to light (they say they will keep them in mind as other proposals move forward!), I at least did what I could as a concerned citizen to try.",
89+
"itemCategory": "p",
90+
"linkTitle": "View the custom Google Map",
91+
"linkHref": "https://www.google.com/maps/d/u/0/edit?mid=1YDg1iHCJykm6U4PgYVpDH3Z2dd1haQE&usp=sharing"
92+
},
93+
{
94+
"itemTitle": "PC Build",
95+
"itemCaption": "It's been awhile since I built my last desktop PC (10 years at this point!), so there's no time like the present! This one however, is different. I'm building this one with 100% used parts in an effort to cut down on e-waste! I plan on making it the first company computer for Terrabyte, but there are a few parts that I have yet to gather.",
96+
"itemCategory": "p",
97+
"linkTitle": "",
98+
"linkHref": ""
99+
},
100+
{
101+
"itemTitle": "Wasted Space",
102+
"itemCaption": "The first game in the Terrabyte roster, I'm super excited for it to go public! Currently the game is in closed beta, but we're aiming for an open beta to launch in June. We're going to showcase our game in Berlin (yes, Germany!) at GTF, so we're getting things prepared for that as well.",
103+
"itemCategory": "tb",
104+
"linkTitle": "View the Wasted Space website",
105+
"linkHref": "https://www.wastedspace.fun"
106+
},
107+
{
108+
"itemTitle": "Reading",
109+
"itemCaption": "I used to read a lot when I was younger, so to get back into reading has been really fun! I'm currently reading Tomorrow and Tomorrow and Tomorrow - it's a story about a budding game development duo, and it's really good 😊",
110+
"itemCategory": "p",
111+
"linkTitle": "",
112+
"linkHref": ""
113+
},
114+
{
115+
"itemTitle": "BCM MoneyIQ Social",
116+
"itemCaption": "My biggest contracted project right now - MoneyIQ Social is a soon-to-be content library and planning tool for Beavercreek Marketing clients. I recently finished designing most of the UI, and have started building out the HTML and CSS.",
117+
"itemCategory": "ghm",
118+
"linkTitle": "",
119+
"linkHref": ""
120+
},
121+
{
122+
"itemTitle": "Asana Mites Tool",
123+
"itemCaption": "To-do lists are amazing, but they are a struggle at the same time. It's annoying when making the to-do list becomes part of the to-do list! So, I decided to use the Asana API to create a simple Python program that allows a user to manage crazy-simple tasks easier. Instead of firing up the Asana app, navigating to the right workspace, project, and then section to only create a task that says, 'wash dishes', I can now open the program and write the task title and boom! It's basic functionality is implemented, as are some basic functions like clearing done tasks and getting info about the Mitebox (your container of mites)",
124+
"itemCategory": "p",
125+
"linkTitle": "View the GitHub Repo",
126+
"linkHref": "https://github.com/samharp/asana-mites"
127+
},
128+
{
129+
"itemTitle": "<little-bytes> October Newsletter",
130+
"itemCaption": "It's that time of year for another newsletter! It feels like there has been so much going on, so I'm really excited to get it all bundled up in a newsletter.",
131+
"itemCategory": "tb",
132+
"linkTitle": "Sign up for the newsletter",
133+
"linkHref": "https://terrabyte.eco/#newsletter"
134+
},
135+
{
136+
"itemTitle": "OriTech Materials",
137+
"itemCaption": "I like getting paid for design work, but I especially love paid design work in the realm of Terrabyte. Currently, I'm doing some website work for a company called OriTech, including their logo, website, and possible animations. It's all pixel art too!",
138+
"itemCategory": "tb",
139+
"linkTitle": "",
140+
"linkHref": ""
141+
},
142+
{
143+
"itemTitle": "Now Page",
144+
"itemCaption": "Building this page is, on its own, a task. Though the basic page is up and ready, I'm planning on later implementing 'now' items through WordPress to more easily create, update, and sort items.",
145+
"itemCategory": "p",
146+
"linkTitle": "",
147+
"linkHref": ""
148+
},
149+
{
150+
"itemTitle": "Painting",
151+
"itemCaption": "I'm not much of a painter, but I do really enjoy it. I'm currently finishing up the first painting I have attempted in a long time, and who knows, maybe more will follow.",
152+
"itemCategory": "p",
153+
"linkTitle": "",
154+
"linkHref": ""
155+
}
156+
]
157+
}

_data/site.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"title": "Sammy Harper",
3-
"url": "https://sammyharper.com",
3+
"url": "https://www.sammyharper.com",
44
"author": "Sammy Harper",
55
"language": "en-US",
66
"description": ""

_includes/footer.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
</section>
8484
<section data-au="flex-container align-center">
8585
<div data-au="flex-width">
86-
<p>Copyright &copy; <span id="copyright-year"></span>, Sammy Harper. All Rights Reserved.</p>
86+
<p>Copyright &copy; <span id="copyright-year"></span>, {{ site.author }}. All Rights Reserved.</p>
8787
<p>Website hosted by <a class="text-link" href="https://goldenharpmedia.com" target="_blank">Golden Harp Media</a>.</p>
8888
</div>
8989
<div id="footer-badges-container" data-au="set-width flex-container align-center">

_includes/macros/icon.njk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{# macro code here :) #}
2+
3+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
4+
<use href="#{{ NAME }}"/>
5+
</svg>

css/general-styles.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,9 @@ h4 .highlighter-container span{
405405
.item-header[data-au~="align-center"]{
406406
align-items:initial;
407407
}
408+
.item-category-badge{
409+
height:100%;
410+
}
408411
.item-category-badge span{
409412
display:none;
410413
}

css/hero-styles.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ h1.p-name{
5555
/*responsive*/
5656
@media only screen and (max-width: 865px){
5757
#hero-section .picture-container{
58-
display:none;
58+
display:none!important;
59+
background-color:red;
5960
}
6061
.about-me-container{
6162
margin-left:0;

index.njk

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,24 @@ scripts: /js/build-projects-scripts.js
1111
<section id="hero-section" class="h-card" data-au="flex-container align-center">
1212
<div class="hide other-h-card-data">
1313
<img class="u-photo" src="./img/self-pixel-portrait-summer-outfit-covid-centered.png">
14-
<a href="https://sammyharper.com" class="u-url u-uid">sammyharper.com</a>
14+
<a href="{{ site.url }}" class="u-url u-uid">{{ site.url }}</a>
1515

1616
</div>
17-
<div class="picture-container" data-au="flex-width flex-container all-center">
17+
<div class="picture-container" data-au="flex-width flex-container all-center flex-vertical">
1818
<div class="picture-frame-container">
1919
<div class="picture-frame material-shadow"></div>
20+
{# <a id="see-now-link" class="icon-link smiley-convo" href="/now">
21+
<div class="smiley-icon"></div>
22+
<h3 class="icon-link-tooltip ">What are you up to /now?</h3>
23+
</a> #}
2024
<a id="contact-me-link" class="icon-link smiley-convo" href="#contact-section">
2125
<div class="smiley-icon"></div>
2226
<h3 class="icon-link-tooltip say-hi-text">Say hi!</h3>
2327
</a>
2428
</div>
29+
<div class="buttons-container">
30+
{# <a class="standard-button" href="/now">What are you working on <code>/now</code>?</a> #}
31+
</div>
2532
</div>
2633
<div class="about-me-container" data-au="flex-width">
2734
<div class="about-me-title">

js/now-scripts.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,21 @@ window.addEventListener("load", function(){
6262
.then(data => {
6363

6464
var sysCurrentDate = new Date();
65+
66+
// console.log(sysCurrentDate);
6567

6668
for(let x = 0; x < data.nowItems.length; x++){
6769

68-
if(data.nowItems[x].itemDateExpire){
70+
// if(data.nowItems[x].itemDateExpire){
71+
console.log("existing data for itemDateExpire: " + data.nowItems[x].itemDateExpire);
6972
var itemExpireDate = new Date(data.nowItems[x].itemDateExpire);
70-
if(sysCurrentDate < itemExpireDate){
7173

74+
console.log("writing data for itemExpireDate: " + itemExpireDate);
75+
76+
if(sysCurrentDate > itemExpireDate){
77+
console.log("item expired: " + data.nowItems[x].itemTitle);
78+
}else{
79+
console.log("item active: " + data.nowItems[x].itemTitle);
7280

7381
createdItem = document.importNode(itemTemplateElem, true);
7482

@@ -96,16 +104,9 @@ window.addEventListener("load", function(){
96104

97105
// append to link container
98106
itemsContainer.appendChild(createdItem);
99-
100-
101-
102107
}
103108

104-
}
105-
106-
107-
108-
109+
// }
109110

110111
}
111112
})

js/now.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"nowItems": [
3-
{
3+
{
44
"itemDateExpire": "2025-08-25",
55
"itemTitle": "Funding",
66
"itemCaption": "Seeking funds to help us help Terrabyte make the planet a little bit better of a place. Have to spend money to make money, or something like that. Fingers crossed! (psst get in touch if you are looking for funding opportunities..? :)",
@@ -9,55 +9,63 @@
99
"linkHref": "https://www.terrabyte.eco"
1010
},
1111
{
12+
"itemDateExpire": "2026-01-20",
1213
"itemTitle": "Wasted Space",
1314
"itemCaption": "The first game in the Terrabyte roster, the concept is to blast space enemies, collect destroyed materials, and recycle them into ship upgrades. We showcased our game in Berlin (yes, Germany!) at GTF and now you can play it too! I'm still working on some additions to the game hence why it's here and not on the main portfolio page.",
1415
"itemCategory": "tb",
1516
"linkTitle": "View the Wasted Space website",
1617
"linkHref": "https://www.wastedspace.fun"
1718
},
1819
{
20+
"itemDateExpire": "",
1921
"itemTitle": "Birding",
2022
"itemCaption": "I was raised on the outdoors, but as I got older, my studies and work grew to take up more and more of my free time. And now living in a big city, it can sometimes feel like I'm more disconnected to the natural world than my environmental work would suggest (and more than I would like). That was, until my brother introduced me to birding. I was skeptical on if I would actually enjoy it (or if it was an 'old person activity' like I previously thought), but it's a great way to get outside, connect with local wildlife, and be more mindful of what's out there.",
2123
"itemCategory": "p",
2224
"linkTitle": "I'm on eBird!",
2325
"linkHref": "https://ebird.org/profile/NjE4NTM3Ng"
2426
},
2527
{
28+
"itemDateExpire": "",
2629
"itemTitle": "Square Listings",
2730
"itemCaption": "Though I want to expand the Pixel Planet Today merch offerings, I'm currently working on the listings already up. That means finishing exports for wallpapers, getting stickers up on Etsy, and other organizational things to tie up loose ends.",
2831
"itemCategory": "tb",
2932
"linkTitle": "View the Webstore",
3033
"linkHref": "https://shop.pixelplanettoday.com"
3134
},
3235
{
36+
"itemDateExpire": "",
3337
"itemTitle": "byteOS: Notes",
3438
"itemCaption": "A tiny pixel art note-taking app that came to be mostly as an experiment for lightweight, offline tools. The app is released, but work on basic features is very much ongoing (like font packs, auto-saving, and recent notes).",
3539
"itemCategory": "tb",
3640
"linkTitle": "Download on Android",
3741
"linkHref": "https://play.google.com/store/apps/details?id=com.terrabyte.byteosnotes"
3842
},
3943
{
44+
"itemDateExpire": "",
4045
"itemTitle": "Pixel Planet Today",
4146
"itemCaption": "The world is constantly calling for environmental facts and pixel art: making this the project that never sleeps. I am trying to get into a more consistent posting schedule, but what can I say, there is much to be done.",
4247
"itemCategory": "tb",
4348
"linkTitle": "View the Pixel Planet Today Website",
44-
"linkHref": "https://pixelplanettoday.com"
49+
"linkHref": "https://www.pixelplanettoday.com"
4550
},
4651
{
52+
"itemDateExpire": "",
4753
"itemTitle": "Reading",
4854
"itemCaption": "Hit the reading goal for the year, but still working on a couple! TBR is getting smaller, but there is quite a pile to get through...",
4955
"itemCategory": "p",
5056
"linkTitle": "",
5157
"linkHref": ""
5258
},
5359
{
60+
"itemDateExpire": "",
5461
"itemTitle": "The Aurum Framework",
5562
"itemCaption": "After years of working in HTML and CSS, I am finally starting to build my own framework! It's nothing compared to Bootstrap, but a lightweight system to help build flex layouts more easily. I already use the same styles for this across (most of) my projects, so the thought is that if I can use the same resource for all of them, I don't have to have duplicate code everywhere. It's not exactly ready for primetime, but if you'd like to check it out, you're more than welcome to!",
5663
"itemCategory": "ghm",
5764
"linkTitle": "Check out the GitHub Repo",
5865
"linkHref": "https://github.com/goldenharpmedia/aurum"
5966
},
6067
{
68+
"itemDateExpire": "",
6169
"itemTitle": "Omaha & Nebraska Public Transportation Plan",
6270
"itemCaption": "Because I'm such an urbanism nerd, something that I've found myself doing is creating a map that outlines where public transportation improvements could be made in Omaha and other Central Nebraska locations. Do I expect these ideas to bloom to fruition? Not exactly, but if they did - boy, the state would be all the better for it. :)",
6371
"itemCategory": "p",

0 commit comments

Comments
 (0)