mirror of
https://github.com/sammyshear/sshear.dev.git
synced 2025-12-06 03:15:53 +00:00
Optimized by replacing nf with icons
This commit is contained in:
parent
e747b8191a
commit
d0ca44c219
@ -1,93 +0,0 @@
|
||||
Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
@ -1,11 +1,15 @@
|
||||
import { defineConfig } from "astro/config";
|
||||
|
||||
import tailwind from "@astrojs/tailwind";
|
||||
import react from "@astrojs/react";
|
||||
import robotsTxt from "astro-robots-txt";
|
||||
import sitemap from "@astrojs/sitemap";
|
||||
|
||||
import compressor from "astro-compressor";
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
integrations: [tailwind(), react()],
|
||||
site: "https://localhost:4321",
|
||||
integrations: [tailwind(), react(), robotsTxt(), sitemap(), compressor()],
|
||||
markdown: {
|
||||
shikiConfig: {
|
||||
themes: {
|
||||
|
||||
@ -13,10 +13,14 @@
|
||||
"dependencies": {
|
||||
"@astrojs/check": "^0.5.9",
|
||||
"@astrojs/react": "^3.1.0",
|
||||
"@astrojs/sitemap": "^3.1.1",
|
||||
"@astrojs/tailwind": "^5.1.0",
|
||||
"@primer/octicons-react": "^19.9.0",
|
||||
"@types/react": "^18.2.66",
|
||||
"@types/react-dom": "^18.2.22",
|
||||
"astro": "^4.5.5",
|
||||
"astro-compressor": "^0.4.1",
|
||||
"astro-robots-txt": "^1.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"tailwindcss": "^3.4.1",
|
||||
|
||||
@ -11,9 +11,15 @@ dependencies:
|
||||
'@astrojs/react':
|
||||
specifier: ^3.1.0
|
||||
version: 3.1.0(@types/react-dom@18.2.22)(@types/react@18.2.67)(react-dom@18.2.0)(react@18.2.0)(vite@5.1.6)
|
||||
'@astrojs/sitemap':
|
||||
specifier: ^3.1.1
|
||||
version: 3.1.1
|
||||
'@astrojs/tailwind':
|
||||
specifier: ^5.1.0
|
||||
version: 5.1.0(astro@4.5.5)(tailwindcss@3.4.1)
|
||||
'@primer/octicons-react':
|
||||
specifier: ^19.9.0
|
||||
version: 19.9.0(react@18.2.0)
|
||||
'@types/react':
|
||||
specifier: ^18.2.66
|
||||
version: 18.2.67
|
||||
@ -23,6 +29,12 @@ dependencies:
|
||||
astro:
|
||||
specifier: ^4.5.5
|
||||
version: 4.5.5(typescript@5.4.2)
|
||||
astro-compressor:
|
||||
specifier: ^0.4.1
|
||||
version: 0.4.1
|
||||
astro-robots-txt:
|
||||
specifier: ^1.0.0
|
||||
version: 1.0.0
|
||||
react:
|
||||
specifier: ^18.2.0
|
||||
version: 18.2.0
|
||||
@ -175,6 +187,13 @@ packages:
|
||||
- vite
|
||||
dev: false
|
||||
|
||||
/@astrojs/sitemap@3.1.1:
|
||||
resolution: {integrity: sha512-qPgdBIcDUaea98mTtLfi5z9oXZpzSjEn/kes70/Ex8FOZZ+DIHVKRYOLOtvy8p+FTXr/9oc7BjmIbTYmYLLJVg==}
|
||||
dependencies:
|
||||
sitemap: 7.1.1
|
||||
zod: 3.22.4
|
||||
dev: false
|
||||
|
||||
/@astrojs/tailwind@5.1.0(astro@4.5.5)(tailwindcss@3.4.1):
|
||||
resolution: {integrity: sha512-BJoCDKuWhU9FT2qYg+fr6Nfb3qP4ShtyjXGHKA/4mHN94z7BGcmauQK23iy+YH5qWvTnhqkd6mQPQ1yTZTe9Ig==}
|
||||
peerDependencies:
|
||||
@ -743,6 +762,15 @@ packages:
|
||||
requiresBuild: true
|
||||
optional: true
|
||||
|
||||
/@primer/octicons-react@19.9.0(react@18.2.0):
|
||||
resolution: {integrity: sha512-Uk4XrHyfylyfzZN9d8VFjF8FpfYHEyT4sabw+9+oP+GWAJHhPvNPTz6gXvUzJZmoblAvgcTrDslIPjz8zMh76w==}
|
||||
engines: {node: '>=8'}
|
||||
peerDependencies:
|
||||
react: '>=16.3'
|
||||
dependencies:
|
||||
react: 18.2.0
|
||||
dev: false
|
||||
|
||||
/@rollup/rollup-android-arm-eabi@4.13.0:
|
||||
resolution: {integrity: sha512-5ZYPOuaAqEH/W3gYsRkxQATBW3Ii1MfaT4EQstTnLKViLi2gLSQmlmtTpGucNP3sXEpOiI5tdGhjdE111ekyEg==}
|
||||
cpu: [arm]
|
||||
@ -912,6 +940,10 @@ packages:
|
||||
'@types/unist': 2.0.10
|
||||
dev: false
|
||||
|
||||
/@types/node@17.0.45:
|
||||
resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==}
|
||||
dev: false
|
||||
|
||||
/@types/prop-types@15.7.11:
|
||||
resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==}
|
||||
dev: false
|
||||
@ -930,6 +962,12 @@ packages:
|
||||
csstype: 3.1.3
|
||||
dev: false
|
||||
|
||||
/@types/sax@1.2.7:
|
||||
resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==}
|
||||
dependencies:
|
||||
'@types/node': 17.0.45
|
||||
dev: false
|
||||
|
||||
/@types/scheduler@0.16.8:
|
||||
resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==}
|
||||
dev: false
|
||||
@ -1114,6 +1152,17 @@ packages:
|
||||
resolution: {integrity: sha512-I1jXZMjAgCMmxT4qxXfPXa6SthSoE8h6gkSI9BGGNv8mP8G/v0blc+qFnZu6K42vTOiuME596QaLO0TP3Lk0xg==}
|
||||
dev: false
|
||||
|
||||
/astro-compressor@0.4.1:
|
||||
resolution: {integrity: sha512-IAgYAlxYRMolaptsFB9quH7RxX4eUeC4UfULCPhT+ILcg7m1kbaxuyUKqGg9Hh+KZ+FNPPDAz7DqUfl+HDWhQg==}
|
||||
dev: false
|
||||
|
||||
/astro-robots-txt@1.0.0:
|
||||
resolution: {integrity: sha512-6JQSLid4gMhoWjOm85UHLkgrw0+hHIjnJVIUqxjU2D6feKlVyYukMNYjH44ZDZBK1P8hNxd33PgWlHzCASvedA==}
|
||||
dependencies:
|
||||
valid-filename: 4.0.0
|
||||
zod: 3.22.4
|
||||
dev: false
|
||||
|
||||
/astro@4.5.5(typescript@5.4.2):
|
||||
resolution: {integrity: sha512-gZ3jR06dLmY9/SMkKMr+3pRSrUjhuwjnXt+9abFJV3WGwhCnLZbSNsTBrLMsaFHpAS1ReJChcTWyKRCvs/jCIQ==}
|
||||
engines: {node: '>=18.14.1', npm: '>=6.14.0'}
|
||||
@ -1760,6 +1809,11 @@ packages:
|
||||
dependencies:
|
||||
reusify: 1.0.4
|
||||
|
||||
/filename-reserved-regex@3.0.0:
|
||||
resolution: {integrity: sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dev: false
|
||||
|
||||
/fill-range@7.0.1:
|
||||
resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==}
|
||||
engines: {node: '>=8'}
|
||||
@ -3354,6 +3408,10 @@ packages:
|
||||
dependencies:
|
||||
suf-log: 2.5.3
|
||||
|
||||
/sax@1.3.0:
|
||||
resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==}
|
||||
dev: false
|
||||
|
||||
/scheduler@0.23.0:
|
||||
resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==}
|
||||
dependencies:
|
||||
@ -3449,6 +3507,17 @@ packages:
|
||||
resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==}
|
||||
dev: false
|
||||
|
||||
/sitemap@7.1.1:
|
||||
resolution: {integrity: sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg==}
|
||||
engines: {node: '>=12.0.0', npm: '>=5.6.0'}
|
||||
hasBin: true
|
||||
dependencies:
|
||||
'@types/node': 17.0.45
|
||||
'@types/sax': 1.2.7
|
||||
arg: 5.0.2
|
||||
sax: 1.3.0
|
||||
dev: false
|
||||
|
||||
/source-map-js@1.0.2:
|
||||
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@ -3873,6 +3942,13 @@ packages:
|
||||
/util-deprecate@1.0.2:
|
||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||
|
||||
/valid-filename@4.0.0:
|
||||
resolution: {integrity: sha512-VEYTpTVPMgO799f2wI7zWf0x2C54bPX6NAfbZ2Z8kZn76p+3rEYCTYVYzMUcVSMvakxMQTriBf24s3+WeXJtEg==}
|
||||
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
|
||||
dependencies:
|
||||
filename-reserved-regex: 3.0.0
|
||||
dev: false
|
||||
|
||||
/vfile-location@5.0.2:
|
||||
resolution: {integrity: sha512-NXPYyxyBSH7zB5U6+3uDdd6Nybz6o6/od9rk8bp9H8GR3L+cm/fC0uUTbqBmUTnMCUDslAGBOIKNfvvb+gGlDg==}
|
||||
dependencies:
|
||||
|
||||
Binary file not shown.
@ -6,15 +6,15 @@ import ThemeToggle from "./ThemeToggle";
|
||||
<header
|
||||
class="flex flex-row justify-between w-[90%] sm:w-3/4 md:w-1/2 lg:w-1/3"
|
||||
>
|
||||
<a href="/" class="group text-3xl hover:text-ctp-sky">
|
||||
<span></span>
|
||||
<a href="/" class="group text-2xl hover:text-ctp-sky">
|
||||
<span class="font-bold">$</span>
|
||||
<span
|
||||
class="inline-flex overflow-x-hidden animate-type whitespace-nowrap will-change-transform"
|
||||
>
|
||||
{SITE.author}
|
||||
</span>
|
||||
<span
|
||||
class="box-border inline-block w-1 h-10 ml-2 -mb-2 mt-2 group-hover:bg-ctp-sky bg-ctp-text animate-cursor will-change-transform"
|
||||
class="box-border inline-block w-1 h-8 ml-2 -mb-2 mt-2 group-hover:bg-ctp-sky bg-ctp-text animate-cursor will-change-transform"
|
||||
></span>
|
||||
</a>
|
||||
<span class="text-2xl place-self-end">
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import { MoonIcon, SunIcon } from "@primer/octicons-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function ThemeToggle() {
|
||||
@ -19,8 +20,12 @@ export default function ThemeToggle() {
|
||||
}, [theme]);
|
||||
|
||||
return (
|
||||
<button className="hover:text-ctp-yellow" onClick={handleClick}>
|
||||
{theme === "light" ? "" : ""}
|
||||
<button
|
||||
className="hover:text-ctp-yellow inline-flex place-content-center"
|
||||
onClick={handleClick}
|
||||
>
|
||||
{theme === "light" ? <MoonIcon size={16} /> : <SunIcon size={16} />}
|
||||
<span className="w-0 h-0 overflow-hidden">Toggle Theme</span>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
1
src/env.d.ts
vendored
1
src/env.d.ts
vendored
@ -1 +1,2 @@
|
||||
/// <reference path="../.astro/types.d.ts" />
|
||||
/// <reference types="astro/client" />
|
||||
|
||||
@ -17,13 +17,6 @@ import { SITE } from "../config";
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<style is:global>
|
||||
@font-face {
|
||||
font-family: "FiraCode NF";
|
||||
src: url("/fonts/FiraCodeNerdFont.ttf");
|
||||
}
|
||||
</style>
|
||||
|
||||
<script is:inline>
|
||||
const theme = (() => {
|
||||
if (
|
||||
|
||||
@ -5,9 +5,6 @@ export default {
|
||||
content: ["./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}"],
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
fontFamily: {
|
||||
sans: ["FiraCode NF"]
|
||||
},
|
||||
animation: {
|
||||
type: "type 1.2s ease-out .4s infinite alternate both",
|
||||
cursor: "cursor .4s linear infinite alternate"
|
||||
@ -27,7 +24,7 @@ export default {
|
||||
"95%": { width: "10ch" }
|
||||
},
|
||||
cursor: {
|
||||
"0%, 40%": { opacity: "0" },
|
||||
"0%, 40%": { opacity: "0.1" },
|
||||
"60%, 100%": { opacity: "1" }
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user