Skip to content

Instantly share code, notes, and snippets.

View dainemawer's full-sized avatar
🌐
Globe trotting

Daine Mawer dainemawer

🌐
Globe trotting
View GitHub Profile
<meta charset="utf-8">
<title>Comoto Mobile — Sprint Demo</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Archivo+Black&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap" rel="stylesheet">
<style>
:root{
--bg:#eef0f3; --surface:#ffffff; --surface-2:#f4f5f7; --border:#dde0e5;
--text:#14161b; --text-2:#454a53; --text-3:#6b707a;
--prev:#1a63b0; --curr:#c2500f; --curr-soft:#c2500f1a;
@dainemawer
dainemawer / determine-sticky-state.js
Created March 14, 2024 06:00
Determine Sticky State in JavaScript - Daine Mawer
let stickyElementStyle = null;
let stickyElementTop = 0;
function determineStickyState(element) {
if (!stickyElementStyle) {
stickyElementStyle = window.getComputedStyle(element);
stickyElementTop = parseInt(stickyElementStyle.top, 10);
}
@dainemawer
dainemawer / main.yml
Created April 5, 2022 05:35
Github Lighthouse Server Config
name: Lighthouse
on: push
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Lighthouse on urls and upload data to private lhci server
uses: treosh/lighthouse-ci-action@v9
with:
@dainemawer
dainemawer / main.yml
Created April 5, 2022 05:34
Github Lighthouse CLI Config
name: Lighthouse CI
on: push
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v9
with:
@dainemawer
dainemawer / .gitlab-ci.yml
Last active April 5, 2022 05:35
Lighthouse Gitlab CLI Config
lhci:
image: cypress/browsers:node16.5.0-chrome94-ff93
script:
- npm ci
- npm run build
- npm install -g @lhci/cli@0.8.x
- lhci autorun --upload.target=temporary-public-storage --collect.staticDistDir="./projects/hola-magazine/.next" --collect.settings.chromeFlags="--no-sandbox" || echo "LHCI failed!"
@dainemawer
dainemawer / .gitlab-ci.yml
Last active April 5, 2022 05:35
Lighthouse Server Gitlab CI Config (GitLab)
variables:
LHCI_TOKEN: "$TOKEN"
SERVER_BASE_URL_VAR: "$SERVER_BASE_URL"
AUTH_USERNAME: $BASIC_AUTH_USERNAME
AUTH_PASS: $BASIC_AUTH_PASS
lhci:
image: cypress/browsers:node16.5.0-chrome94-ff93
script:
- npm ci