Skip to content

Commit

Permalink
updated pages and service-worker
Browse files Browse the repository at this point in the history
  • Loading branch information
nicobako committed Jul 28, 2023
1 parent beba618 commit a3d0110
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
<h1>Nico Bako</h1>
<button _="on click toggle @data-theme='light' on body">Dark/Light</button>
<div class="row">
<button hx-get="./pages/readme.html" hx-target="#content" hx-trigger="load,click">Main</button>
<button hx-get="/pages/about_me/index.html" hx-target="#content">About Me</button>
<button hx-get="/pages/about_me/index.html" hx-target="#content" hx-trigger="load,click">About Me</button>
<button hx-get="./pages/about_site/index.html" hx-target="#content">About Site</button>
<button hx-get="./pages/buttons_demo/index.html" hx-target="#content">Buttons Demo</button>
</div>
<div id="content"></div>
Expand Down
10 changes: 5 additions & 5 deletions pages/about_me/about_me.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# About Me
# About Nico

I'm a software engineer who holds some *pretty radical beliefs* about code and software:
I'm a software developer with that loves writing *beautiful code*.

- If your code is not making the world a better place, then it's probably making it worse.
- Software is both an art and a science.
- Code can - and should - be beautiful.
I have a firm belief that writing code is about more than *implementing features*. Writing code is a creative process that is equal parts art and science.

My principle goal, when writing code, is to create software that improves the lives of whoever interacts with it. This includes customers, other developers, and fo course, myself.
File renamed without changes.
Empty file removed pages/landing/index.html
Empty file.
10 changes: 8 additions & 2 deletions sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ self.addEventListener("install", (event) => {
"/static/styles.css",
"/static/reset.css",
"/static/nico-bako.png",
"/pages/about_me/about_me.md",
"/pages/about_me/index.html",
"/pages/about_site/index.html",
"/pages/buttons_demo/index.html",
"https://md-block.verou.me/md-block.js",
"https://unpkg.com/[email protected]",
"https://unpkg.com/[email protected]",
"https://unpkg.com/[email protected]",
"https://unpkg.com/[email protected]",
]),
),
);
Expand All @@ -36,10 +40,12 @@ self.addEventListener("fetch", (event) => {
// If we found a match in the cache, return it, but also
// update the entry in the cache in the background.
event.waitUntil(cache.add(event.request));
console.log("resource found in cache");
return cachedResponse;
}

// If we didn't find a match in the cache, use the network.
console.log("resource not found in cache");
return fetch(event.request);
})(),
);
Expand Down

0 comments on commit a3d0110

Please sign in to comment.