Skip to content

Commit 8c800c4

Browse files
committed
add load time, copyright, updated about, and more
- show site load time in top right corner on desktop - show copyright and source code link in bottom right on desktop - shorten projects tab name on mobile - update about me description - add bluesky social link - add social link emojis - use css variable for bold font weight
1 parent fa59ec8 commit 8c800c4

File tree

3 files changed

+112
-34
lines changed

3 files changed

+112
-34
lines changed

index.html

Lines changed: 40 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<span class="cwd">boldandbrad.dev</span>
2626
<span class="subtext"> on </span>
2727
<span class="branch">~</span>
28+
<span class="loadtime right desktop"></span>
29+
<span class="subtext right desktop">took&nbsp;</span>
2830
</div>
2931
<div>
3032
<span class="prompt">-&gt; </span>
@@ -38,45 +40,55 @@
3840
</div>
3941
<div>
4042
<p>
41-
Hi 👋, my name is Brad. I'm a software developer and agile coach
42-
who enjoys building open-source command line tools and helping
43-
others. I firmly believe that learning is a life long process. To
44-
that end, I am constantly on the lookout for new technologies to
45-
try and projects to take on. Today, you're likely to find me
46-
refining my
43+
Hey there 👋, I'm Brad. I'm a software developer, agile coach, and
44+
aspiring Lego master builder. I enjoy creating and using
45+
open-source command line tools, playing Minecraft and board games,
46+
and spending time with my friends and family.
47+
</p>
48+
<p>
49+
I firmly believe that learning is a life long process so I am
50+
constantly on the lookout for new technologies to try and projects
51+
to take on. Today, you're likely to find me refining my
4752
<a
4853
class="project-link"
4954
href="https://github.com/boldandbrad/dotfiles"
5055
target="_blank"
5156
>dotfiles</a>
52-
or building new things in golang 🐹 or rust 🦀.
57+
(which this site is modeled after) and building new things in
58+
golang 🐹 or rust 🦀.
5359
</p>
5460
<p>
55-
In my free time I play Minecraft and board games with my partner,
56-
tinker with Legos, and mod GameCubes. If you'd like to chat or
57-
collaborate on a project, feel free to reach out on socials:
61+
If you'd like to chat or collaborate, feel free to reach out on
62+
socials:
5863
</p>
5964
</div>
6065
<div>
6166
<ul>
6267
<li class="social-link">
63-
<i class="nf nf-cod-github"></i>
6468
<a
6569
href="https://github.com/boldandbrad"
6670
alt="github"
6771
target="_blank"
6872
>
69-
GitHub
73+
💾 GitHub
74+
</a>
75+
</li>
76+
<li class="social-link">
77+
<a
78+
href="https://bsky.app/profile/boldandbrad.bsky.social"
79+
alt="bluesky"
80+
target="_blank"
81+
>
82+
🦋 Bluesky
7083
</a>
7184
</li>
7285
<li class="social-link">
73-
<i class="nf nf-md-spotify"></i>
7486
<a
7587
href="https://open.spotify.com/user/1219025914"
7688
alt="spotify"
7789
target="_blank"
7890
>
79-
Spotify
91+
🎧 Spotify
8092
</a>
8193
</li>
8294
<li class="social-link">
@@ -86,20 +98,18 @@
8698
alt="twitch"
8799
target="_blank"
88100
>
89-
Twitch
101+
📹 Twitch
90102
</a>
91103
</li>
92104
<!--
93105
<li class="social-link">
94-
<i class="nf nf-md-discord"></i>
95106
<a href="" alt="discord" target="_blank">
96-
Discord
107+
💬 Discord
97108
</a>
98109
</li>
99110
<li class="social-link">
100-
<i class="nf nf-md-youtube"></i>
101111
<a href="" alt="youtube" target="_blank">
102-
YouTube
112+
📺 YouTube
103113
</a>
104114
</li>
105115
-->
@@ -118,6 +128,9 @@
118128
<span class="cwd">boldandbrad.dev</span>
119129
<span class="subtext"> on </span>
120130
<span class="branch">projects</span>
131+
132+
<span class="loadtime right desktop"></span>
133+
<span class="subtext right desktop">took&nbsp;</span>
121134
</div>
122135
<div>
123136
<span class="prompt">-&gt; </span>
@@ -170,10 +183,16 @@
170183
--><span
171184
id="projects-btn-id"
172185
class="nav-btn-id"
173-
>&nbsp;2&nbsp;</span><span class="nav-btn-title"
174-
>&nbsp;projects&nbsp;</span>
186+
>&nbsp;2&nbsp;</span><span class="nav-btn-title desktop"
187+
>&nbsp;projects&nbsp;</span><span class="nav-btn-title mobile"
188+
>&nbsp;prjs&nbsp;</span>
175189
<!-- TODO: add blog tab btn? -->
176190
</span>
191+
<span class="nav-msg desktop"><i>(c) 2024 Bradley Wojcik |
192+
<a
193+
href="https://github.com/boldandbrad/boldandbrad.github.io"
194+
class="nav-msg-link"
195+
>view src</a></i></span>
177196
</footer>
178197
</body>
179198
</html>

script.js

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,22 @@
1-
// add content loaded event listener
2-
document.addEventListener("DOMContentLoaded", userOS);
1+
// load dynamic content on page load
2+
onload = function () {
3+
getLoadTime();
4+
getSystem();
5+
};
6+
7+
// calculate approximate page load time
8+
function getLoadTime() {
9+
const [entry] = performance.getEntriesByType("navigation");
10+
// console.table(entry.toJSON());
11+
const loadDuration = entry.domComplete - entry.startTime;
12+
const loadtime_elements = document.getElementsByClassName("loadtime");
13+
for (const elem of loadtime_elements) {
14+
elem.innerHTML = loadDuration.toFixed(0) + "ms";
15+
}
16+
}
317

418
// determine user operating system
5-
function userOS() {
19+
function getSystem() {
620
const userAgent = navigator.userAgent,
721
platform = navigator.platform,
822
macosPlatforms = ["Macintosh", "MacIntel", "MacPPC", "Mac68K"],
@@ -28,10 +42,10 @@ function userOS() {
2842
}
2943
}
3044

31-
// add key event listener
45+
// add key-event listener
3246
document.addEventListener("keydown", parseKey);
3347

34-
// parse key events
48+
// parse key-events
3549
function parseKey(e) {
3650
console.log("key pressed: " + e.key);
3751
if (e.code == "Digit1") {
@@ -61,14 +75,14 @@ function _deactivate_tabs() {
6175

6276
function show_home_tab() {
6377
document.getElementById("projects-tab").style.display = "none";
64-
document.getElementById("home-tab").style.display = "block";
78+
document.getElementById("home-tab").style.display = "unset";
6579
_deactivate_tabs();
6680
_activate_tab("home-btn-id");
6781
}
6882

6983
function show_projects_tab() {
7084
document.getElementById("home-tab").style.display = "none";
71-
document.getElementById("projects-tab").style.display = "block";
85+
document.getElementById("projects-tab").style.display = "unset";
7286
_deactivate_tabs();
7387
_activate_tab("projects-btn-id");
7488
}

styles.css

Lines changed: 51 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@
1010
/* import Anonymous Pro typeface */
1111
@import url("https://fonts.googleapis.com/css2?family=Anonymous+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap");
1212

13+
/*----------------------------*/
14+
/* display size specific */
15+
/*----------------------------*/
16+
17+
.desktop {
18+
display: unset;
19+
}
20+
.mobile {
21+
display: none;
22+
}
23+
24+
@media (max-width: 450px) {
25+
.desktop {
26+
display: none;
27+
}
28+
.mobile {
29+
display: unset;
30+
}
31+
}
32+
1333
/*----------------------------*/
1434
/* global styles */
1535
/*----------------------------*/
@@ -20,6 +40,9 @@
2040
font-weight: 400;
2141
font-size: 16pt;
2242
color: var(--ctp-mocha-text);
43+
44+
/* variables */
45+
--bold-weight: 700;
2346
}
2447

2548
html,
@@ -35,6 +58,7 @@ body {
3558
bottom: 1rem;
3659
margin: 1rem 0 1rem 1rem;
3760
padding-right: 1rem;
61+
width: calc(100vw - 2rem);
3862
}
3963

4064
::selection {
@@ -58,7 +82,7 @@ li {
5882

5983
a {
6084
text-decoration: none;
61-
font-weight: 700;
85+
font-weight: var(--bold-weight);
6286
}
6387

6488
a:hover {
@@ -67,27 +91,27 @@ a:hover {
6791

6892
.system {
6993
color: var(--ctp-mocha-maroon);
70-
font-weight: 700;
94+
font-weight: var(--bold-weight);
7195
}
7296

7397
.user {
7498
color: var(--ctp-mocha-mauve);
75-
font-weight: 700;
99+
font-weight: var(--bold-weight);
76100
}
77101

78102
.shell {
79103
color: var(--ctp-mocha-lavender);
80-
font-weight: 700;
104+
font-weight: var(--bold-weight);
81105
}
82106

83107
.cwd {
84108
color: var(--ctp-mocha-blue);
85-
font-weight: 700;
109+
font-weight: var(--bold-weight);
86110
}
87111

88112
.branch {
89113
color: var(--ctp-mocha-green);
90-
font-weight: 700;
114+
font-weight: var(--bold-weight);
91115
}
92116

93117
.prompt {
@@ -103,10 +127,22 @@ a:hover {
103127
color: var(--ctp-mocha-surface2);
104128
}
105129

130+
.loadtime {
131+
color: var(--ctp-mocha-yellow);
132+
}
133+
134+
.right {
135+
float: inline-end;
136+
}
137+
106138
/*----------------------------*/
107139
/* home tab */
108140
/*----------------------------*/
109141

142+
#home-tab {
143+
display: unset;
144+
}
145+
110146
.cmd-whoami {
111147
display: inline-block;
112148
vertical-align: middle;
@@ -190,6 +226,15 @@ footer {
190226
background: var(--ctp-mocha-surface0);
191227
}
192228

229+
.nav-msg {
230+
float: inline-end;
231+
color: var(--ctp-mocha-surface2);
232+
}
233+
234+
.nav-msg-link {
235+
color: var(--ctp-mocha-lavender);
236+
}
237+
193238
/*----------------------------*/
194239
/* animations */
195240
/*----------------------------*/

0 commit comments

Comments
 (0)