Skip to content

Commit

Permalink
🏃 speeding up site
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnath committed Mar 8, 2024
1 parent 24d86c9 commit a1b44b7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified workspaces/website/public/scott-nath-profile-photo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions workspaces/website/src/components/BaseHead.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// all pages through the use of the <BaseHead /> component.
import '../styles/global.css';
import '../components/resume/styles/resume.css';
import { PROFILE_PIC } from '../consts';
export interface Props {
title: string;
Expand All @@ -12,10 +13,10 @@ export interface Props {
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description, image = '/scott-nath-profile-pic.jpeg' } = Astro.props;
const { title, description, image = PROFILE_PIC } = Astro.props;
---
<script defer data-domain="scottnath.com" src="https://plausible.io/js/script.js" type="text/partytown"></script>
<script type="text/partytown" defer data-domain="scottnath.com" src="https://plausible.io/js/script.outbound-links.js"></script>
<script defer data-domain="scottnath.com" src="https://plausible.io/js/script.outbound-links.js" type="text/partytown"></script>



Expand All @@ -24,7 +25,7 @@ const { title, description, image = '/scott-nath-profile-pic.jpeg' } = Astro.pro
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="icon" href="/favicon-mind-blown.ico" id="favicon" />
<meta name="generator" content={Astro.generator} />
<link rel="preload" as="image" href="/scott-nath-profile-pic.jpeg" />
<link rel="preload" as="image" href={image} />

<!-- Canonical URL -->
<link rel="canonical" href={canonicalURL} />
Expand Down
5 changes: 3 additions & 2 deletions workspaces/website/src/components/DevToUser.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
import {dsd} from 'profile-components/devto-utils';
import profilePic from '~/assets/scott-nath-profile-photo.jpeg';
import { PROFILE_PIC } from '../consts';
const declaredDOM = dsd({
username: 'scottnath',
profile_image: profilePic.src,
profile_image: PROFILE_PIC,
},true);
---

Expand Down
4 changes: 2 additions & 2 deletions workspaces/website/src/components/GitHubUser.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
import {dsd} from 'profile-components/github-utils';
import profilePic from '~/assets/scott-nath-profile-photo.jpeg';
import { PROFILE_PIC } from '../consts';
const repos = JSON.stringify(['scottnath/profile-components', 'storydocker/storydocker']);
const declaredDOM = await dsd({
login: 'scottnath',
avatar_url: profilePic.src,
avatar_url: PROFILE_PIC,
repos
},true)
Expand Down
5 changes: 2 additions & 3 deletions workspaces/website/src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---
import DopeStripes from './DopeStripes.astro';
import HeaderLink from './HeaderLink.astro';
import { SITE_TITLE, SITE_SUBTITLE } from '../consts';
import profilePic from '~/assets/scott-nath-profile-photo.jpeg';
import { SITE_TITLE, SITE_SUBTITLE, PROFILE_PIC } from '../consts';
import devLogo from '~/assets/logos/dev.svg';
import githubLogo from '~/assets/logos/github-inverse.svg';
import linkedinLogo from '~/assets/logos/linkedin.svg';
Expand All @@ -17,7 +16,7 @@ import mastodonLogo from '~/assets/logos/Mastodon.svg';
{SITE_TITLE}
</h2>
<h3>{SITE_SUBTITLE}</h3>
<img src={profilePic.src} alt="Scott Nath picture" width="400" height="400" class="avatar" />
<img src={PROFILE_PIC} alt="Scott Nath picture" width="400" height="400" class="avatar" />
<nav>
<HeaderLink href="/">Home</HeaderLink>
<HeaderLink href="/blahg">Blahg</HeaderLink>
Expand Down
2 changes: 2 additions & 0 deletions workspaces/website/src/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
export const SITE_TITLE = 'Scott Nath';
export const SITE_SUBTITLE = 'Front-end architect';
export const SITE_DESCRIPTION = `${SITE_SUBTITLE}, full-stack software engineer, and developer advocate. Extensive experience creating UI development systems with a focus on where developers and designers collaborate.`;
// image must be in root of public folder
export const PROFILE_PIC = '/scott-nath-profile-photo.avif';

export const RESUME_DEFUALTS = {
name: SITE_TITLE,
Expand Down

0 comments on commit a1b44b7

Please sign in to comment.