diff --git a/.github/workflows/url-check.yml b/.github/workflows/url-check.yml deleted file mode 100644 index 4371065..0000000 --- a/.github/workflows/url-check.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: URL Checks -on: - push: - branches: ["main"] - pull_request: - branches: ["main"] - -jobs: - get_urls: - name: Load URLs - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.json.outputs.value }} - steps: - - uses: actions/checkout@v3 - - name: get specified property - id: load_urls - uses: ActionsTools/read-json-action@main - with: - file_path: "src/data/links.json" - prop_path: "linkData" - - id: json - run: | - echo "linkData=toJson(steps.load_urls.outputs.value)" >> $GITHUB_OUTPUT - - check: - name: Check URLs - runs-on: ubuntu-latest - needs: [get_urls] - strategy: - matrix: - value: ${{ fromJson(needs.get_urls.outputs.matrix) }} - steps: - - name: URL Health Check - uses: Jtalk/url-health-check-action@v3.1 - with: - url: ${{matrix.value}} - follow-redirect: true diff --git a/package.json b/package.json index 5d38f61..e8ad9f7 100644 --- a/package.json +++ b/package.json @@ -7,8 +7,8 @@ "node": ">=18.14.1" }, "scripts": { - "dev": "astro dev", - "start": "astro dev", + "dev": "astro dev --host", + "start": "astro dev --host", "build": "astro build", "preview": "astro preview", "check": "astro check", diff --git a/public/images/trident-logo.jpeg b/public/images/trident-logo.jpeg deleted file mode 100644 index 9424462..0000000 Binary files a/public/images/trident-logo.jpeg and /dev/null differ diff --git a/scripts/checkUrls.sh b/scripts/checkUrls.sh new file mode 100644 index 0000000..c51bba3 --- /dev/null +++ b/scripts/checkUrls.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Define an array of your JSON files +files=("projects" "links") +acceptable_codes=(200 301 302 000 999) +failed=false + +# Loop through each file +for file in "${files[@]}" +do + echo "Processing $file..." + # Extract URLs and loop through each + jq -r ".${file}[] | .url" "./src/data/${file}.json" | while read -r url; do + # Prepend http if not present + [[ "$url" != http* ]] && url="https:$url" + # Perform health check + http_status=$(curl -o /dev/null -s -w "%{http_code}\n" "$url") + if [[ "${acceptable_codes[@]}" =~ "$http_status" ]]; then + echo "URL check passed: $url" + else + echo "URL check failed: $url with status $http_status" + failed=true + fi + done +done + +if [ $failed ]; then exit 1; fi \ No newline at end of file diff --git a/src/components/About.astro b/src/components/About.astro index 8aaad5c..71ff5a6 100644 --- a/src/components/About.astro +++ b/src/components/About.astro @@ -1,20 +1,25 @@ --- + ---

- I'm a software engineer from New England, now living in Boulder, CO. I - currently work with Mathematica Policy Research + I'm a software engineer from New England, now living in Boulder, CO. I + currently work with Mathematica Policy Research on their infrastructure and data platforms.

I'm also working towards a master's degree in Media and Public Engagement at CU Boulder, where I focus on cooperatives, worker ownership, - governance, and enterprise design. + > at CU Boulder, where I focus on cooperatives, worker ownership, governance, + and enterprise design.

- I'm passionate about systems that enable and encourage collaboration, transparency, equity, and autonomy. + I'm passionate about systems that enable and encourage collaboration, + transparency, equity, and autonomy.

+

Check out some of my projects.

diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro index 14a5ea8..a1f9f0d 100644 --- a/src/components/SocialLinks.astro +++ b/src/components/SocialLinks.astro @@ -1,8 +1,8 @@ --- import SocialLink from "./SocialLink.astro"; -import links from "../data/links.json"; +import { links } from "../data/links.json"; --- diff --git a/src/components/projects/trident/TridentIndex.astro b/src/components/projects/trident/TridentIndex.astro index 0d5f806..79d8957 100644 --- a/src/components/projects/trident/TridentIndex.astro +++ b/src/components/projects/trident/TridentIndex.astro @@ -1,5 +1,5 @@ --- -import "../../../styles/main.css"; +import { Image } from "astro:assets"; import "../../../styles/trident/trident.css"; import TridentFooter from "./TridentFooter.astro"; @@ -7,43 +7,31 @@ import TridentPrevNextButtons from "./TridentPrevNextButtons.astro"; import TridentSection from "./TridentSection.astro"; import TridentSectionSelector from "./TridentSectionSelector.astro"; import { sections } from "../../../data/tridentConfig.json"; +import Layout from "../../../layouts/Layout.astro"; + +import tridentLogo from "../../../images/trident-logo.png"; const section = Astro.props.section as number; --- - - - drewmca.dev - - - - - - - - - - - -
-

Trident Audio Tour

- -
- {sections[section].date} -

- - Trident is an employee-owned bookstore and cafe located in Boulder, - Colorado. Experience an audio tour of the location below. - -

+ +
+

Trident Audio Tour

+ +
+ {sections[section].date} +

+ + Trident is an employee-owned bookstore and cafe located in Boulder, + Colorado. Experience an audio tour of the location below. + +

- - - - - - + + + + +
diff --git a/src/data/links.json b/src/data/links.json index ff379f0..1c0a57c 100644 --- a/src/data/links.json +++ b/src/data/links.json @@ -1,5 +1,5 @@ { - "linkData": [ + "links": [ { "type": "gmail", "text": "hi@drewmca.dev", @@ -8,7 +8,7 @@ { "type": "GitHub", "text": "@drewmcarthur", - "url": "https://github.com/drewmcarthur" + "url": "https://github.com/drewmcarthur/" }, { "type": "GitLab", @@ -18,7 +18,7 @@ { "type": "LinkedIn", "text": "@drewmcarthur", - "url": "https://linkedin.com/in/drewmcarthur" + "url": "https://www.linkedin.com/in/drewmcarthur" }, { "type": "Facebook", diff --git a/src/data/projects.json b/src/data/projects.json new file mode 100644 index 0000000..4e3b838 --- /dev/null +++ b/src/data/projects.json @@ -0,0 +1,43 @@ +{ + "projects": [ + { + "url": "//allielind.com", + "title": "allielind.com", + "desc": "a website for my partner, who happens to be an incredible aerialist!" + }, + { + "url": "//qrstats.drewmca.dev", + "title": "qrstats", + "desc": "an extremely simple webapp to track link redirects. I mostly wanted to mess around with writing rust code deployed to cloudflare's serverless workers." + }, + { + "url": "/papers/inflationary-equity.pdf", + "title": "Inflationary Equity", + "type": "school", + "desc": "a paper I wrote on the potential ramifications of lifting the cap in company stock, and automatically allocating it to employees." + }, + { + "url": "https://www.medicaid.gov/state-overviews/scorecard/welcome", + "title": "Medicaid Scorecard ETL", + "type": "work", + "desc": "I built the majority of the ETL pipeline that provides data for Medicaid Scorecard website." + }, + { + "url": "https://www.cms.gov/priorities/key-initiatives/hospital-price-transparency", + "title": "Price Transparency", + "type": "work", + "desc": "a set of infrastructure that scrapes the machine readable files that were mandated by legislation as of Summer 2022" + }, + { + "url": "//github.com/drewmcarthur/msgpack-bal", + "title": "msgpack-bal", + "desc": "a msgpack library written in ballerina." + }, + { + "url": "/projects/trident", + "title": "Trident Audio Project", + "type": "school", + "desc": "a class project on a local bookstore and cafe." + } + ] +} \ No newline at end of file diff --git a/src/images/apple-touch-icon.png b/src/images/apple-touch-icon.png new file mode 100644 index 0000000..32eb4d5 Binary files /dev/null and b/src/images/apple-touch-icon.png differ diff --git a/src/images/favicon-16x16.png b/src/images/favicon-16x16.png new file mode 100644 index 0000000..3ec9d7b Binary files /dev/null and b/src/images/favicon-16x16.png differ diff --git a/src/images/favicon-32x32.png b/src/images/favicon-32x32.png new file mode 100644 index 0000000..fc69663 Binary files /dev/null and b/src/images/favicon-32x32.png differ diff --git a/src/images/favicon.ico b/src/images/favicon.ico new file mode 100644 index 0000000..b57780a Binary files /dev/null and b/src/images/favicon.ico differ diff --git a/src/images/trident-logo.png b/src/images/trident-logo.png new file mode 100644 index 0000000..bf72375 Binary files /dev/null and b/src/images/trident-logo.png differ diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..db768f7 --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,40 @@ +--- +import "../styles/main.css"; +import appleTouchIcon from "../images/apple-touch-icon.png"; +import favicon16 from "../images/favicon-16x16.png"; +import favicon32 from "../images/favicon-32x32.png"; + +type Props = { + title?: string, + desc?: string +} + +let { title, desc } = Astro.props; +if (!title || title == "") title = "drewmca.dev"; +--- + + + + {title} + + + { desc ? : "" } + + + + + + + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro index da1fd41..43badaa 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,33 +1,11 @@ --- import App from "../components/App.astro"; -import "../styles/main.css"; +import Layout from "../layouts/Layout.astro"; --- - - - drew mca | drewmca.dev - - - - - - - - - - - - - - + + + diff --git a/src/pages/projects.astro b/src/pages/projects.astro new file mode 100644 index 0000000..74151f2 --- /dev/null +++ b/src/pages/projects.astro @@ -0,0 +1,23 @@ +--- +import Layout from "../layouts/Layout.astro"; +import "../styles/projects.css"; + +import { projects } from "../data/projects.json"; +--- + + +
drewmca.dev / projects
+ +
diff --git a/src/styles/main.css b/src/styles/main.css index 559cc4e..978d69d 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -29,21 +29,27 @@ @media (prefers-color-scheme: dark) { :root { + --color1: #292726; + --color2: #4D4946; + --color3: #807A75; + --color4: #DBD3CA; + --color5: #F0E6FA; + + /* to calculate, put the above hex into https://codepen.io/sosuke/pen/Pjoqqp */ + --color1-filter: invert(11%) sepia(34%) saturate(76%) hue-rotate(335deg) brightness(98%) contrast(89%); + --color2-filter: invert(26%) sepia(18%) saturate(167%) hue-rotate(344deg) brightness(94%) contrast(85%); + --color3-filer: invert(55%) sepia(2%) saturate(1547%) hue-rotate(345deg) brightness(86%) contrast(74%); + --color4-filter: invert(92%) sepia(25%) saturate(102%) hue-rotate(340deg) brightness(90%) contrast(90%); + --color5-filter: invert(88%) sepia(22%) saturate(271%) hue-rotate(212deg) brightness(102%) contrast(96%); + --main-color--hover: #fff; --main-color-filter--hover: invert(100%) sepia(1%) saturate(77%) hue-rotate(254deg) brightness(116%) contrast(101%); - --color1: #F0E6FA; - /* --color2: #D3CADB; */ - --color1-filter: invert(88%) sepia(22%) saturate(271%) hue-rotate(212deg) brightness(102%) contrast(96%); - /* --color2-filter: invert(96%) sepia(6%) saturate(1733%) hue-rotate(194deg) brightness(87%) contrast(98%); */ - - --background-color: var(--color5); - --main-color: var(--color1); - --light-color: var(--color1); + --main-color: var(--color5); + --light-color: var(--color5); - --background-color-filter: var(--color5-filter); - --main-color-filter: var(--color1-filter); - --light-color-filter: var(--color1-filter); + --main-color-filter: var(--color5-filter); + --light-color-filter: var(--color5-filter); } } @@ -101,7 +107,11 @@ a { scroll-behavior: smooth; } -#app:after { +.scrollable { + overflow: auto; +} + +.scrollable:after { content: ''; position: absolute; top: 0; @@ -229,7 +239,7 @@ a { } } -@media screen and (max-width: 600px) { +@media (max-width: 600px) { body { height: calc(83.5vh - env(safe-area-inset-bottom) - env(safe-area-inset-top)); } diff --git a/src/styles/projects.css b/src/styles/projects.css new file mode 100644 index 0000000..0bdd904 --- /dev/null +++ b/src/styles/projects.css @@ -0,0 +1,54 @@ +@media (max-width: 580px) { + div.header { + font-size: 1.7em; + } + + ul.projects { + padding: 0; + } + + ul.projects li { + padding: 0; + } +} + +ul.projects { + padding: 0 7.5vw; +} + +.projects .year { + font-style: italic; +} + +.projects li { + list-style: none; + margin-bottom: 1em; + padding: 0.5em; + border-bottom: 1px solid var(--color4); +} + +.projects li a { + text-decoration: none; +} + +.projects li p { + margin: 0; + margin-left: 1em; + margin-bottom: 1em; +} + +.projects li p:first-child { + text-decoration: underline; + margin: 0; +} + +.projects li span.type { + font-size: .8em; + margin-left: 10px; + padding: 0px 10px; + border-radius: 75px; + background-color: var(--color2); + color: var(--color4); + float: right; + margin-top: -30px +} \ No newline at end of file diff --git a/src/styles/trident/trident.css b/src/styles/trident/trident.css index 77a2f11..402107c 100644 --- a/src/styles/trident/trident.css +++ b/src/styles/trident/trident.css @@ -1,9 +1,8 @@ :root { - --main-color: #1c2424; + --main-color: var(--color5); } body { - background-color: white; max-width: 580px; margin: auto; overflow: auto; @@ -30,6 +29,7 @@ audio { .trident-logo { width: 100px; + height: auto; display: flex; justify-content: flex-end; }