mirror of
https://github.com/XFox111/my-website.git
synced 2026-07-02 19:52:45 +03:00
Compare commits
36 Commits
20250723.1
...
20250902.1
| Author | SHA1 | Date | |
|---|---|---|---|
| 39bf1c6d3d | |||
| a5999e49f0 | |||
| fe611095a1 | |||
| c81f13880d | |||
| d30785eb03 | |||
| 3559b717cb | |||
| 7aa509f3bb | |||
| 5a7119c755 | |||
| c76579341c | |||
| fedc5f0f1a | |||
| a4fbdbc5bd | |||
| 1c9809abea | |||
| 99d0eeb491 | |||
| 80892ba176 | |||
| 411d58204d | |||
| 6f45d3908d | |||
| 4e8489a719 | |||
| b7f4894d7e | |||
| 6fdd88ab8d | |||
| f601664382 | |||
| 725b9cebd9 | |||
| e16ab1f6f6 | |||
| ac7a3e2213 | |||
| 4a0c497144 | |||
| b3e639e718 | |||
| d29265687c | |||
| d90b3a4bc1 | |||
| af05da5f59 | |||
| 70e6fb0e45 | |||
| a5e30b31c4 | |||
| e24927770c | |||
| 4c7fb5c743 | |||
| dd8cd590a1 | |||
| f6cd9490f3 | |||
| 1aaecad076 | |||
| 84dc498bf4 |
@@ -17,7 +17,7 @@
|
||||
}
|
||||
},
|
||||
|
||||
"postCreateCommand": "yarn install",
|
||||
"postCreateCommand": "corepack enable && yarn install",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
|
||||
@@ -15,7 +15,6 @@ ATS_RESUME_URL=URL # Location of the ATS-compatible resume PDF (optional, remo
|
||||
RESUME_HAS_REFS=false # Appends last page of the resume to a result PDF file (only appies to non-ATS version)
|
||||
ALERT_TEXT_URL=URL # URL of a txt file with urgent message to be displayed (see app/_components/AlertMessage.tsx)
|
||||
CLARITY_ID=string # Clarity Analytics ID (optional, remove to disable)
|
||||
CLARITY_CONSENT=1 # 1 if you need to request explicit consent from user, 0 if not (requires CLARITY_ID)
|
||||
|
||||
CF_SITEKEY=3x00000000000000000000FF # Cloudflare Turnstile captcha sitekey for contact form (optional, remove to siable)
|
||||
CF_SECRET=1x0000000000000000000000000000000AA # Secret for token validation (requries CF_SITEKEY)
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v5
|
||||
- run: corepack enable
|
||||
- run: yarn install
|
||||
- run: yarn npm audit
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v5
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- uses: docker/metadata-action@v5
|
||||
id: meta
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL Advanced"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main", "next" ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
- '**/ci.yml'
|
||||
- '.vscode/*'
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ "main", "next" ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'LICENSE'
|
||||
- '**/ci.yml'
|
||||
- '.vscode/*'
|
||||
schedule:
|
||||
- cron: '23 22 * * 1'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze (${{ matrix.language }})
|
||||
# Runner size impacts CodeQL analysis time. To learn more, please see:
|
||||
# - https://gh.io/recommended-hardware-resources-for-running-codeql
|
||||
# - https://gh.io/supported-runners-and-hardware-resources
|
||||
# - https://gh.io/using-larger-runners (GitHub.com only)
|
||||
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
|
||||
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
|
||||
permissions:
|
||||
# required for all workflows
|
||||
security-events: write
|
||||
|
||||
# required to fetch internal or private CodeQL packs
|
||||
packages: read
|
||||
|
||||
# only required for workflows in private repositories
|
||||
actions: read
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- language: actions
|
||||
build-mode: none
|
||||
- language: javascript-typescript
|
||||
build-mode: none
|
||||
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
|
||||
# Use `c-cpp` to analyze code written in C, C++ or both
|
||||
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
|
||||
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
|
||||
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
|
||||
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
|
||||
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
|
||||
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v5
|
||||
|
||||
# Add any setup steps before running the `github/codeql-action/init` action.
|
||||
# This includes steps like installing compilers or runtimes (`actions/setup-node`
|
||||
# or others). This is typically only required for manual builds.
|
||||
# - name: Setup runtime (example)
|
||||
# uses: actions/setup-example@v1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
build-mode: ${{ matrix.build-mode }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
|
||||
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
|
||||
# queries: security-extended,security-and-quality
|
||||
|
||||
# If the analyze step fails for one of the languages you are analyzing with
|
||||
# "We were unable to automatically build your code", modify the matrix above
|
||||
# to set the build mode to "manual" for that language. Then modify this step
|
||||
# to build your code.
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||
- if: matrix.build-mode == 'manual'
|
||||
shell: bash
|
||||
run: |
|
||||
echo 'If you are using a "manual" build mode for one or more of the' \
|
||||
'languages you are analyzing, replace this with the commands to build' \
|
||||
'your code, for example:'
|
||||
echo ' make bootstrap'
|
||||
echo ' make release'
|
||||
exit 1
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "/language:${{matrix.language}}"
|
||||
@@ -41,11 +41,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.dismiss
|
||||
{
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
.controls
|
||||
{
|
||||
display: grid;
|
||||
@@ -65,19 +60,16 @@
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
|
||||
&:not(:has(> .dismiss))
|
||||
flex-flow: column;
|
||||
|
||||
.learnMore
|
||||
{
|
||||
flex-flow: column;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.learnMore
|
||||
{
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.controls > button:last-child
|
||||
{
|
||||
border-left: none;
|
||||
}
|
||||
.controls > button:last-child
|
||||
{
|
||||
border-left: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import { acceptCookies, dismissCookies, getCookieChoice, rejectCookies } from "@/_utils/analytics/client";
|
||||
import { Dismiss24Regular } from "@fluentui/react-icons";
|
||||
import { acceptCookies, getCookieChoice, rejectCookies } from "@/_utils/analytics/client";
|
||||
import React, { useCallback, useEffect, useState } from "react";
|
||||
import Button from "./Button";
|
||||
import cls from "./CookieBanner.module.scss";
|
||||
|
||||
const CookieBanner: React.FC<{ askForConsent: boolean; }> = props =>
|
||||
const CookieBanner: React.FC = () =>
|
||||
{
|
||||
const [visible, setVisible] = useState(false);
|
||||
|
||||
@@ -36,12 +35,6 @@ const CookieBanner: React.FC<{ askForConsent: boolean; }> = props =>
|
||||
setVisible(false);
|
||||
}, []);
|
||||
|
||||
const dismiss = useCallback(() =>
|
||||
{
|
||||
dismissCookies();
|
||||
setVisible(false);
|
||||
}, []);
|
||||
|
||||
if (!visible)
|
||||
return null;
|
||||
|
||||
@@ -59,16 +52,10 @@ const CookieBanner: React.FC<{ askForConsent: boolean; }> = props =>
|
||||
</p>
|
||||
</Button>
|
||||
|
||||
{ props.askForConsent ?
|
||||
<div className={ cls.controls }>
|
||||
<Button onClick={ accept }>Accept</Button>
|
||||
<Button onClick={ reject }>Reject</Button>
|
||||
</div>
|
||||
:
|
||||
<Button
|
||||
title="Dismiss" icon={ <Dismiss24Regular /> }
|
||||
onClick={ dismiss } className={ cls.dismiss } />
|
||||
}
|
||||
<div className={ cls.controls }>
|
||||
<Button onClick={ accept }>Accept</Button>
|
||||
<Button onClick={ reject }>Reject</Button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -46,7 +46,7 @@ const projects: Project[] =
|
||||
],
|
||||
image: tabsAsideLight,
|
||||
imageDark: tabsAsideDark,
|
||||
link: "https://github.com/xfox111/TabsAsideExtension/tree/next",
|
||||
link: "https://github.com/xfox111/TabsAsideExtension",
|
||||
stack:
|
||||
[
|
||||
{ text: "React/WXT", icon: ic.Desktop24Regular },
|
||||
|
||||
@@ -12,18 +12,12 @@ export const rejectCookies = (): void =>
|
||||
window.clarity?.("consent", false);
|
||||
};
|
||||
|
||||
export const dismissCookies = (): void =>
|
||||
{
|
||||
setCookie("CC", "", 1209600); // 14 days
|
||||
};
|
||||
|
||||
export const getCookieChoice = (): "accepted" | "rejected" | "acknowledged" | "none" =>
|
||||
export const getCookieChoice = (): "accepted" | "rejected" | "none" =>
|
||||
{
|
||||
switch (getCookie("CC"))
|
||||
{
|
||||
case "1": return "accepted";
|
||||
case "0": return "rejected";
|
||||
case "": return "acknowledged";
|
||||
default: return "none";
|
||||
}
|
||||
};
|
||||
@@ -41,7 +35,7 @@ function getCookie(name: string): string | undefined
|
||||
|
||||
for (const cookie of cookies)
|
||||
if (cookie.trim().startsWith(cookieName))
|
||||
return cookie.substring(cookieName.length);
|
||||
return cookie.trim().substring(cookieName.length);
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
@@ -9,13 +9,3 @@ export const analyticsEnabled = (): boolean =>
|
||||
unstable_noStore();
|
||||
return !!process.env.CLARITY_ID;
|
||||
};
|
||||
|
||||
/**
|
||||
* Check if Clarity requires explicit consent
|
||||
* @returns true if Clarity requires explicit consent
|
||||
*/
|
||||
export const requireExplicitConsent = (): boolean =>
|
||||
{
|
||||
unstable_noStore();
|
||||
return process.env.CLARITY_CONSENT === "1";
|
||||
};
|
||||
|
||||
@@ -3,7 +3,7 @@ import Button from "@/_components/Button";
|
||||
import RevokeConsentButton from "@/_components/RevokeConsentButton";
|
||||
import { canonicalName, getTitle } from "@/_data/metadata";
|
||||
import ThirdPartyAttribution from "@/_data/ThirdPartyAttributiont";
|
||||
import { analyticsEnabled, requireExplicitConsent } from "@/_utils/analytics/server";
|
||||
import { analyticsEnabled } from "@/_utils/analytics/server";
|
||||
import { ArrowLeft24Regular, ArrowRight24Regular } from "@fluentui/react-icons";
|
||||
import { Metadata } from "next";
|
||||
import { unstable_noStore } from "next/cache";
|
||||
@@ -45,17 +45,15 @@ const AttributionPage: React.FC = () => (
|
||||
If the "Do Not Track" option is enabled in your browser,
|
||||
the website will not execute any tracking code.
|
||||
</p>
|
||||
{ requireExplicitConsent() &&
|
||||
<p>
|
||||
If you previously gave your consent to use cookies,
|
||||
you can revoke it by clicking "Revoke my consent" button on this page below
|
||||
(the button is available only if the consent was given).
|
||||
Recorded data will be deleted after 30-day retention period.
|
||||
</p>
|
||||
}
|
||||
<p>
|
||||
If you previously gave your consent to use cookies,
|
||||
you can revoke it by clicking "Revoke my consent" button on this page below
|
||||
(the button is available only if the consent was given).
|
||||
Recorded data will be deleted after 30-day retention period.
|
||||
</p>
|
||||
|
||||
<div className={ cls.buttonRow }>
|
||||
{ requireExplicitConsent() && <RevokeConsentButton /> }
|
||||
<RevokeConsentButton />
|
||||
<Button appearance="secondary"
|
||||
href="https://learn.microsoft.com/clarity/faq#privacy" target="_blank"
|
||||
iconAfter={ <ArrowRight24Regular /> }>
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@ import { PropsWithChildren } from "react";
|
||||
import CookieBanner from "./_components/CookieBanner";
|
||||
import Footer from "./_components/Footer";
|
||||
import Header from "./_components/Header";
|
||||
import { analyticsEnabled, requireExplicitConsent } from "./_utils/analytics/server";
|
||||
import { analyticsEnabled } from "./_utils/analytics/server";
|
||||
import fonts from "./fonts";
|
||||
import "./_styles/globals.scss";
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function RootLayout(props: PropsWithChildren)
|
||||
}
|
||||
<body>
|
||||
{ analyticsEnabled() &&
|
||||
<CookieBanner askForConsent={ requireExplicitConsent() } />
|
||||
<CookieBanner />
|
||||
}
|
||||
|
||||
<Header />
|
||||
|
||||
+17
-17
@@ -21,28 +21,28 @@
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluentui/react-icons": "^2.0.305",
|
||||
"next": "^15.3.4",
|
||||
"nodemailer": "^7.0.4",
|
||||
"@fluentui/react-icons": "^2.0.309",
|
||||
"next": "^15.5.2",
|
||||
"nodemailer": "^7.0.6",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react": "^19.1.1",
|
||||
"react-dom": "^19.1.1",
|
||||
"react-social-icons": "^6.24.0",
|
||||
"react-turnstile": "^1.1.4",
|
||||
"sharp": "^0.34.2",
|
||||
"zod": "^3.25.67"
|
||||
"sharp": "^0.34.3",
|
||||
"zod": "^4.1.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@next/eslint-plugin-next": "^15.3.4",
|
||||
"@types/node": "^24.0.8",
|
||||
"@types/nodemailer": "^6.4.17",
|
||||
"@types/react": "^19.1.8",
|
||||
"@types/react-dom": "^19.1.6",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-next": "^15.3.4",
|
||||
"sass": "^1.89.2",
|
||||
"typescript": "^5.8.3",
|
||||
"typescript-eslint": "^8.35.1"
|
||||
"@next/eslint-plugin-next": "^15.5.2",
|
||||
"@types/node": "^24.3.0",
|
||||
"@types/nodemailer": "^7.0.1",
|
||||
"@types/react": "^19.1.12",
|
||||
"@types/react-dom": "^19.1.9",
|
||||
"eslint": "^9.32.0",
|
||||
"eslint-config-next": "^15.5.2",
|
||||
"sass": "^1.91.0",
|
||||
"typescript": "~5.8.3",
|
||||
"typescript-eslint": "^8.42.0"
|
||||
},
|
||||
"packageManager": "yarn@4.9.2"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user