Skip to content

Commit

Permalink
bump ver
Browse files Browse the repository at this point in the history
  • Loading branch information
kleutzinger committed Oct 1, 2023
1 parent 25f97d1 commit 9fd1e4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 2 additions & 9 deletions site-generator/kevbadge.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
(function () {
// "version": "0.0.14",
// "version": "0.0.15",
const location = new URL(window.location);
const IS_LOCAL_DEV = ["0.0.0.0", "localhost", "127.0.0.1"].includes(
location.hostname,
);
const IS_DEBUG = location.search.includes("debug");
let badge_color = "#72ab59";
async function get_json() {
let json_url =
"https://kevinleutzinger.com/site-generator/generated/projects.json";
if (IS_LOCAL_DEV) {
// try loading json from local file
json_url = "/site-generator/generated/projects.json";
// set background to red to indicate local dev
badge_color = "red";
}
try {
const response = await fetch(json_url);
const data = await response.json();
Expand Down Expand Up @@ -52,7 +45,7 @@
height: 6em;
width: 6em;
border: 0 none;
background: ${badge_color};
background: ${IS_LOCAL_DEV ? "red" : "#72ab59"};
color: #fff;
cursor: pointer;
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
Expand Down
2 changes: 1 addition & 1 deletion site-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kevbadge",
"version": "0.0.14",
"version": "0.0.15",
"description": "badge featured on a few of my websites which provides info like source code, links, and other fun things",
"main": "kevbadge.js",
"scripts": {
Expand Down

0 comments on commit 9fd1e4b

Please sign in to comment.