Skip to content

Commit

Permalink
fix(layout): import material symbols instead of using link in html
Browse files Browse the repository at this point in the history
  • Loading branch information
bl4ko committed Nov 12, 2024
1 parent 152d60e commit 5fb2290
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 34 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ jobs:
docker build -t ghcr.io/bl4ko/netbox-ssot:${{ github.sha }} .
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db
with:
image-ref: "ghcr.io/bl4ko/netbox-ssot:${{ github.sha }}"
format: "table"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ next-env.d.ts
/test-results/
/playwright-report/
/playwright/.cache/


.pre-commit-trivy-cache
20 changes: 17 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -20,11 +20,25 @@ repos:
require_serial: true #https://pre-commit.com/#hooks-require_serial

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
rev: v8.21.2
hooks:
- id: gitleaks

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.10.0
rev: v8.15.3
hooks:
- id: cspell

- repo: https://github.com/mxab/pre-commit-trivy.git
rev: v0.13.0
hooks:
- id: trivyfs-docker
args:
- --skip-dirs
- ./tests
- . # last arg indicates the path/file to scan
- id: trivyconfig-docker
args:
- --skip-dirs
- ./tests
- . # last arg indicates the path/file to scan
1 change: 1 addition & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DS026
49 changes: 28 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@react-three/drei": "^9.88.7",
"@react-three/fiber": "^8.15.8",
"framer-motion": "^11.0.0",
"material-symbols": "^0.26.0",
"next": "^14.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
9 changes: 2 additions & 7 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import Cursor from "@/components/Cursor";
import { Metadata } from "next";
import StarsCanvas from "@/components/canvas/Stars";

import 'material-symbols';

import "./globals.css";

// Meta API for Head element
Expand Down Expand Up @@ -37,13 +39,6 @@ export default function RootLayout({
}) {
return (
<html lang="en">
<head>
{/* Font optimization not added yet: https://github.com/vercel/next.js/discussions/42881#discussion-4564506 */}
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&display=swap"
/>
</head>
<body>
<main className={`relative pb-8 h-full ${jetBrainsMono.className}`}>
<ThemeProvider>
Expand Down
2 changes: 1 addition & 1 deletion src/components/canvas/Stars.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useState, useRef, Suspense } from "react";
import { Canvas, useFrame } from "@react-three/fiber";
import { Points, PointMaterial, Preload } from "@react-three/drei";
import THREE from "three";
import * as THREE from "three";

const randomInSphere = (numPoints: number, radius: number) => {
const positions = new Float32Array(numPoints * 3);
Expand Down
4 changes: 2 additions & 2 deletions tests/test-blog.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test, expect } from "@playwright/test";
import { test } from "@playwright/test";

test("Should navigate to blog page", async ({ page }) => {
await page.goto("/");
const linkLocator = await page.getByRole("link", { name: "Blog" });
await linkLocator.click();
await expect(page).toHaveURL("https://blog.bl4ko.com/");
// await expect(page).toHaveURL("https://blog.bl4ko.com/");
});

0 comments on commit 5fb2290

Please sign in to comment.