45 Commits

Author SHA1 Message Date
rektdeckard
c3289161b7 fix(docs): correct link to unplugin 2025-05-12 11:53:09 -06:00
rektdeckard
8b2bb2c0d3 chore(docs): alphabetize ports 2025-04-11 16:47:14 -06:00
Aral Balkan
aab567b24a Add Kitten to list of Phosphor icons ports
Phoshor icons are now available by default in Kitten.
2025-04-11 16:38:13 -06:00
JaJuMa
760afdccf9 Update README.md 2025-03-25 00:52:18 -06:00
JaJuMa
8b7b6a81a8 Update README.md 2025-03-25 00:52:18 -06:00
JaJuMa
f55dd1c728 Add jajuma/phosphorhyva port 2025-03-25 00:52:18 -06:00
rektdeckard
eba0540fb8 fix(issues): remove illegal whitespace in community_port issue 2025-03-25 00:33:21 -06:00
rektdeckard
d46bbd545a chore(issues): add community_port issue template 2025-03-25 00:28:37 -06:00
Tobias Fried
8d840b4859 chore(docs): use stylesheets and jsDelivr CDN in vanilla example 2025-03-22 14:51:15 -06:00
rektdeckard
2f55d3268d chore(docs): add some links 2025-01-30 02:14:18 -07:00
rektdeckard
e1af590aaa chore(meta): add opencollective sponsor link 2025-01-29 22:14:27 -07:00
rektdeckard
0cdb1211ff feat(app): add ko-fi to banner and FUNDING.yaml 2025-01-10 21:38:45 -07:00
rektdeckard
596ef0bc85 fix(ci): don't assume file encoding 2024-12-29 21:57:53 -07:00
rektdeckard
13248a3270 chore(ci): make sure to create synced files
...and intermediate directories if they don't already exist
2024-12-29 21:50:35 -07:00
rektdeckard
6d2358ffe7 feat(ci): remove meta folders 2024-12-29 21:30:48 -07:00
rektdeckard
e28695fcd2 feat(ci): sync additional files 2024-12-29 21:30:48 -07:00
rektdeckard
d05dd19606 chore(docs): adjust logo 2024-12-29 21:30:48 -07:00
rektdeckard
1635d050ea feat(docs): add community links and owner prefix 2024-12-29 21:30:48 -07:00
rektdeckard
a93f137fd3 chore(sketch): don't include unzipped asset 2024-12-29 01:09:41 -07:00
rektdeckard
bf1433a612 chore(app): use relative urls so testing and preview are live 2024-12-29 01:09:41 -07:00
rektdeckard
72486d8ba0 chore(sketch): update plugin bundle 2024-12-29 01:09:41 -07:00
rektdeckard
315c9df6de chore(docs): add penpot (#672) 2024-12-29 01:09:41 -07:00
rektdeckard
09461de291 chore(docs): sort links (mostly) alphabetically 2024-12-29 01:09:41 -07:00
rektdeckard
cf552f45fb chore(ci): re-disable except for readme changes on master 2024-12-29 01:09:41 -07:00
rektdeckard
bafb374af4 feat(ci): enable all repos and include link in PR 2024-12-29 01:09:41 -07:00
rektdeckard
31595b49cf chore(ci): allow synced repos to not have sections 2024-12-29 01:09:41 -07:00
rektdeckard
1f1b3450c1 fix(ci): use default branch 2024-12-29 01:09:41 -07:00
rektdeckard
3f25a8aa88 chore(ci): use matrix for repo list 2024-12-29 01:09:41 -07:00
rektdeckard
74811edda7 fix(ci): correct lockfile name 2024-12-29 01:09:41 -07:00
rektdeckard
a5e6f10b04 chore(ci): temporarily run on all path changes 2024-12-29 01:09:41 -07:00
rektdeckard
288f4466c5 chore(ci): tweak commit msg 2024-12-29 01:09:41 -07:00
rektdeckard
b6d47ab575 fix(ci): use repos list 2024-12-29 01:09:41 -07:00
rektdeckard
a4421c82b2 feat(ci): create doc PRs, maybe? 2024-12-29 01:09:41 -07:00
rektdeckard
5a390a9231 chore(meta): consistent yaml extensions lol 2024-12-29 01:09:41 -07:00
rektdeckard
625dc776d5 feat(ci): set up preview and prod deployments 2024-12-29 01:09:41 -07:00
rektdeckard
b99c50d61f chore(docs): use explicit version in icon font example (#657) 2024-12-23 22:22:23 -07:00
rektdeckard
363e86fada fix(a11y): use buttons for grid items 2024-12-05 00:55:13 -07:00
Quang Phan
72b6fe088f docs: add link to phosphor-icons-tailwindcss 2024-11-15 01:42:10 -07:00
Jason Pepas
97ac81b0c1 add pepaslabs/phosphor-uikit to README 2024-10-11 15:28:33 -06:00
Tobias Fried
090f4fe1fb chore(funding): native bmac 2024-09-30 00:49:20 -06:00
Tobias Fried
710518cdaa fix(docs): correct webfont usage 2024-09-17 14:41:15 -06:00
adamglin
1a8a7aefd6 Add compose-phosphor-icon 2024-08-22 14:06:22 -06:00
rektdeckard
443545f18b feat(app): update companies mentioned in footer 2024-06-10 12:51:12 -06:00
rektdeckard
83763a2beb fix(app): better color input appearance in Firefox 2024-06-10 12:49:45 -06:00
rektdeckard
dd3fc59e02 fix(app): update vue snippet syntax 2024-06-04 11:06:26 -06:00
19 changed files with 1569 additions and 1026 deletions

6
.github/FUNDING.yaml vendored Normal file
View File

@@ -0,0 +1,6 @@
# Thanks for considering supporting this project! 🎉
github: [phosphor-icons, rektdeckard]
open_collective: phosphoricons
ko_fi: phosphoricons
patreon: phosphoricons
buy_me_a_coffee: phosphoricons

3
.github/FUNDING.yml vendored
View File

@@ -1,3 +0,0 @@
github: [phosphor-icons, rektdeckard]
patreon: phosphoricons
custom: ["https://www.buymeacoffee.com/phosphoricons"]

View File

@@ -0,0 +1,15 @@
---
name: Community port
about: Add your Phosphor port to the list of community projects on all Phosphor repositories
title: ""
labels: documentation
assignees: rektdeckard
---
<!-- BEFORE YOU REQUEST -->
<!-- 1. Links to free, open source software only please. No paid services or upselling. -->
<!-- 2. If you are able to, please make a PR yourself adding your port (in alphabetical order) to the "Community Projects" section in README.md. -->
**Details**
<!-- What is the name of your port, and where can the source code or project page be found? -->

BIN
.github/logo.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,54 @@
name: Build and deploy to preview
on:
push
concurrency:
group: 'preview'
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Add SSH Key to known_hosts
env:
KNOWN_HOSTS_ENTRY: ${{ secrets.DREAMHOST_KNOWN_HOSTS_ENTRY }}
HOST: ${{ secrets.HOST }}
run: |
mkdir -p ~/.ssh
echo "$KNOWN_HOSTS_ENTRY" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Build static site
run: pnpm build
- name: Deploy via rsync and sshpass
env:
USERNAME: ${{ secrets.DREAMHOST_FTP_USERNAME }}
PASSWORD: ${{ secrets.DREAMHOST_FTP_PASSWORD }}
HOST: ${{ secrets.DREAMHOST_FTP_HOST }}
DEPLOY_PATH: preview.phosphoricons.com
run: |
sshpass -p "$PASSWORD" rsync -avz --delete ./dist/* $USERNAME@$HOST:$DEPLOY_PATH

56
.github/workflows/dreamhost-static.yaml vendored Normal file
View File

@@ -0,0 +1,56 @@
name: Build and deploy to production
on:
push:
branches:
- master
concurrency:
group: 'prod'
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Install sshpass
run: sudo apt-get install -y sshpass
- name: Add SSH Key to known_hosts
env:
KNOWN_HOSTS_ENTRY: ${{ secrets.DREAMHOST_KNOWN_HOSTS_ENTRY }}
HOST: ${{ secrets.HOST }}
run: |
mkdir -p ~/.ssh
echo "$KNOWN_HOSTS_ENTRY" >> ~/.ssh/known_hosts
chmod 644 ~/.ssh/known_hosts
- name: Build static site
run: pnpm build
- name: Deploy via rsync and sshpass
env:
USERNAME: ${{ secrets.DREAMHOST_FTP_USERNAME }}
PASSWORD: ${{ secrets.DREAMHOST_FTP_PASSWORD }}
HOST: ${{ secrets.DREAMHOST_FTP_HOST }}
DEPLOY_PATH: phosphoricons.com
run: |
sshpass -p "$PASSWORD" rsync -avz --delete ./dist/* $USERNAME@$HOST:$DEPLOY_PATH

100
.github/workflows/sync-docs.yaml vendored Normal file
View File

@@ -0,0 +1,100 @@
name: Sync documentation
on:
push:
paths:
- 'README.md'
- '.github/FUNDING.yaml'
- '.github/logo.png'
branches:
- master
workflow_dispatch: # Allows manual triggering
concurrency:
group: 'docs'
cancel-in-progress: true
jobs:
sync-docs:
runs-on: ubuntu-latest
strategy:
matrix:
repository: [
'phosphor-icons/core',
'phosphor-icons/figma',
'phosphor-icons/flutter',
'phosphor-icons/penpot',
'phosphor-icons/phosphor-elm',
'phosphor-icons/play',
'phosphor-icons/react',
'phosphor-icons/sketch',
'phosphor-icons/swift',
'phosphor-icons/theme',
'phosphor-icons/unplugin',
'phosphor-icons/vue',
'phosphor-icons/web',
'phosphor-icons/webcomponents'
]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: source-repo
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
cache-dependency-path: source-repo/pnpm-lock.yaml
- name: Install dependencies
working-directory: source-repo
run: pnpm install
- name: Sync to target repositories
env:
GITHUB_TOKEN: ${{ secrets.SYNC_PAT }}
run: |
echo "Syncing to ${{ matrix.repository }}"
# Get the source repository name and commit info
COMMIT_URL="https://github.com/${GITHUB_REPOSITORY}/commit/${GITHUB_SHA}"
# Clone target repository using HTTPS with token
git clone "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ matrix.repository }}.git" target-repo
# Run sync script
cd source-repo
pnpm run sync-docs -- target-repo
cd ..
# Create PR if there are changes
cd target-repo
if [[ -n "$(git status --porcelain)" ]]; then
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
# Create branch
BRANCH="sync-readme-$(date +%Y%m%d-%H%M%S)"
git checkout -b $BRANCH
# Commit and push changes
git add .
git commit -am "chore(docs): sync readme section"
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${{ matrix.repository }}.git" $BRANCH
# Create PR using the GitHub CLI
gh pr create \
--repo "${{ matrix.repository }}" \
--title "chore(docs): sync readme section" \
--body "Automated PR to sync README section. This change originates from the following commit: ${COMMIT_URL}". \
--base $(git remote show origin | sed -n '/HEAD branch/s/.*: //p') \
--head $BRANCH
fi

View File

@@ -1,7 +1,10 @@
<img src="/meta/phosphor-mark-tight-black.png" width="96" align="right" />
# Phosphor Icons
<!-- BEGIN_LOGO -->
<img src="/.github/logo.png" width="128" align="right" />
<!-- END_LOGO -->
<!-- BEGIN_OVERVIEW -->
Phosphor is a flexible icon family for interfaces, diagrams, presentations — whatever, really.
- 1,248 icons and counting
@@ -10,6 +13,7 @@ Phosphor is a flexible icon family for interfaces, diagrams, presentations — w
- Raw stroke information retained to fine-tune the style
More ways to use at [phosphoricons.com](https://phosphoricons.com).
<!-- END_OVERVIEW -->
## For developers
@@ -17,18 +21,27 @@ Phosphor is available for [web](https://github.com/phosphor-icons/web), [React](
### Vanilla Web
- **Simple to use** We use a similar approach as many other icon sets out there, providing icons as a webfont that uses Unicode's Private Use Area character codes to map normally non-rendering characters to icons. But you don't need to know that. All you need to do is add the script to the document `<head>`, and drop in icons with an `<i/>` tag and the appropriate class:
- **Simple to use** We use a similar approach as many other icon sets out there, providing icons as a webfont that uses Unicode's Private Use Area character codes to map normally non-rendering characters to icons. But you don't need to know that. All you need to do is add the stylesheet for each weight you need to the document `<head>`, and drop in icons with an `<i/>` tag and the appropriate class:
```html
<!doctype html>
<html>
<head>
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/fill/style.css"
/>
</head>
<body>
<i class="ph-smiley"></i>
<i class="ph ph-smiley"></i>
<i class="ph-fill ph-heart" style="color: hotpink"></i>
<i class="ph-thin ph-cube"></i>
<i class="ph ph-cube"></i>
</body>
</html>
```
@@ -89,39 +102,61 @@ ReactDOM.render(<App />, document.getElementById("root"));
> [!NOTE]
> Due to possible namespace collisions with built-in HTML elements, compononent names in the Vue library are prefixed with `Ph`, but otherwise follow the same naming conventions. Both Pascal and kebab-case conventions can be used in templates.
## Our Related Projects
<!-- BEGIN_LINKS -->
## Our Projects
- [@phosphor-icons/homepage](https://github.com/phosphor-icons/homepage) ▲ Phosphor homepage and general info
- [@phosphor-icons/core](https://github.com/phosphor-icons/core) ▲ Phosphor icon assets and catalog
- [@phosphor-icons/react](https://github.com/phosphor-icons/react) ▲ Phosphor icon component library for React
- [@phosphor-icons/web](https://github.com/phosphor-icons/web) ▲ Phosphor icons for Vanilla JS
- [@phosphor-icons/vue](https://github.com/phosphor-icons/vue) ▲ Phosphor icon component library for Vue
- [@phosphor-icons/swift](https://github.com/phosphor-icons/swift) ▲ Phosphor icon component library for SwiftUI
- [@phosphor-icons/elm](https://github.com/phosphor-icons/phosphor-elm) ▲ Phosphor icons for Elm
- [@phosphor-icons/flutter](https://github.com/phosphor-icons/flutter) ▲ Phosphor IconData library for Flutter
- [@phosphor-icons/webcomponents](https://github.com/phosphor-icons/webcomponents) ▲ Phosphor icons as Web Components
- [@phosphor-icons/figma](https://github.com/phosphor-icons/figma) ▲ Phosphor icons Figma plugin
- [@phosphor-icons/sketch](https://github.com/phosphor-icons/sketch) ▲ Phosphor icons Sketch plugin
- [@phosphor-icons/flutter](https://github.com/phosphor-icons/flutter) ▲ Phosphor IconData library for Flutter
- [@phosphor-icons/pack](https://github.com/phosphor-icons/pack) ▲ Phosphor web font stripper to generate minimal icon bundles
- [@phosphor-icons/penpot](https://github.com/phosphor-icons/penpot) ▲ Phosphor icons Penpot plugin
- [@phosphor-icons/react](https://github.com/phosphor-icons/react) ▲ Phosphor icon component library for React
- [@phosphor-icons/sketch](https://github.com/phosphor-icons/sketch) ▲ Phosphor icons Sketch plugin
- [@phosphor-icons/swift](https://github.com/phosphor-icons/swift) ▲ Phosphor icon component library for SwiftUI
- [@phosphor-icons/theme](https://github.com/phosphor-icons/theme) ▲ A VS Code (and other IDE) theme with the Phosphor color palette
- [@phosphor-icons/unplugin](https://github.com/phosphor-icons/unplugin) ▲ A multi-framework bundler plugin for generating Phosphor sprite sheets
- [@phosphor-icons/vue](https://github.com/phosphor-icons/vue) ▲ Phosphor icon component library for Vue
- [@phosphor-icons/web](https://github.com/phosphor-icons/web) ▲ Phosphor icons for Vanilla JS
- [@phosphor-icons/webcomponents](https://github.com/phosphor-icons/webcomponents) ▲ Phosphor icons as Web Components
## Community Projects
- [phosphor-react-native](https://github.com/duongdev/phosphor-react-native) ▲ Phosphor icon component library for React Native
- [phosphor-svelte](https://github.com/haruaki07/phosphor-svelte) ▲ Phosphor icons for Svelte apps
- [phosphor-r](https://github.com/dreamRs/phosphoricons) ▲ Phosphor icon wrapper for R documents and applications
- [blade-phosphor-icons](https://github.com/codeat3/blade-phosphor-icons) ▲ Phosphor icons in your Laravel Blade views
- [adamglin0/compose-phosphor-icons](https://github.com/adamglin0/compose-phosphor-icon) ▲ Phosphor icons for Compose Multiplatform
- [altdsoy/phosphor_icons](https://github.com/altdsoy/phosphor_icons) ▲ Phosphor icons for Phoenix and TailwindCSS
- [amPerl/egui-phosphor](https://github.com/amperl/egui-phosphor) ▲ Phosphor icons for egui apps (Rust)
- [babakfp/phosphor-icons-svelte](https://github.com/babakfp/phosphor-icons-svelte) ▲ Phosphor icons for Svelte apps
- [brettkolodny/phosphor-lustre](https://github.com/brettkolodny/phosphor-lustre) ▲ Phosphor icons for Lustre
- [cellularmitosis/phosphor-uikit](https://github.com/cellularmitosis/phosphor-uikit) ▲ XCode asset catalog generator for Phosphor icons (Swift/UIKit)
- [cjohansen/phosphor-clj](https://github.com/cjohansen/phosphor-clj) ▲ Phosphor icons as Hiccup for Clojure and ClojureScript
- [codeat3/blade-phosphor-icons](https://github.com/codeat3/blade-phosphor-icons) ▲ Phosphor icons in your Laravel Blade views
- [dreamRs/phosphor-r](https://github.com/dreamRs/phosphoricons) ▲ Phosphor icon wrapper for R documents and applications
- [duongdev/phosphor-react-native](https://github.com/duongdev/phosphor-react-native) ▲ Phosphor icon component library for React Native
- [haruaki07/phosphor-svelte](https://github.com/haruaki07/phosphor-svelte) ▲ Phosphor icons for Svelte apps
- [IgnaceMaes/ember-phosphor-icons](https://github.com/IgnaceMaes/ember-phosphor-icons) ▲ Phosphor icons for Ember apps
- [iota-uz/icons](https://github.com/iota-uz/icons) ▲ Phosphor icons as Templ components (Go)
- [jajuma/phosphorhyva](https://github.com/JaJuMa-GmbH/phosphor-hyva) ▲ Phosphor icons for Magento 2 & Mage-OS with Hyvä Theme
- [Kitten](https://kitten.small-web.org/reference/#icons) ▲ Phosphor icons integrated by default in Kitten
- [lucagoslar/phosphor-css](https://github.com/lucagoslar/phosphor-css) ▲ CSS wrapper for Phosphor SVG icons
- [maful/ruby-phosphor-icons](https://github.com/maful/ruby-phosphor-icons) ▲ Phosphor icons for Ruby and Rails applications
- [meadowsys/phosphor-svgs](https://github.com/meadowsys/phosphor-svgs) ▲ Phosphor icons as Rust string constants
- [mwood/tamagui-phosphor-icons](https://github.com/mwood23/tamagui-phosphor-icons) ▲ Phosphor icons for Tamagui
- [noozo/phosphoricons_elixir](https://github.com/noozo/phosphoricons_elixir) ▲ Phosphor icons as SVG strings for Elixir/Phoenix
- [oyedejioyewole/nuxt-phosphor-icons](https://github.com/oyedejioyewole/nuxt-phosphor-icons) ▲ Phosphor icons integration for Nuxt
- [pepaslabs/phosphor-uikit](https://github.com/pepaslabs/phosphor-uikit) ▲ Xcode asset catalog generator for Swift/UIKit
- [raycast/phosphor-icons](https://www.raycast.com/marinsokol/phosphor-icons) ▲ Phosphor icons Raycast extension
- [reatlat/eleventy-plugin-phosphoricons](https://github.com/reatlat/eleventy-plugin-phosphoricons) ▲ An Eleventy shortcode plugin to embed icons as inline SVGs
- [robruiz/wordpress-phosphor-icons-block](https://github.com/robruiz/phosphor-icons-block) ▲ Phosphor icon block for use in WordPress v5.8+
- [sachaw/solid-phosphor](https://github.com/sachaw/solid-phosphor) ▲ Phosphor icons for SolidJS
- [SeanMcP/phosphor-astro](https://github.com/SeanMcP/phosphor-astro) ▲ Phosphor icons as Astro components
- [SorenHolstHansen/phosphor-leptos](https://github.com/SorenHolstHansen/phosphor-leptos) ▲ Phosphor icon component library for Leptos apps (Rust)
- [vnphanquang/phosphor-icons-tailwindcss](https://github.com/vnphanquang/phosphor-icons-tailwindcss) ▲ TailwindCSS plugin for Phosphor icons
- [wireui/phosphoricons](https://github.com/wireui/phosphoricons) ▲ Phosphor icons for Laravel
- [phosphor-css](https://github.com/lucagoslar/phosphor-css) ▲ CSS wrapper for Phosphor SVG icons
- [ruby-phosphor-icons](https://github.com/maful/ruby-phosphor-icons) ▲ Phosphor icons for Ruby and Rails applications
- [eleventy-plugin-phosphoricons](https://github.com/reatlat/eleventy-plugin-phosphoricons) ▲ An Eleventy plugin for add shortcode, allows Phosphor icons to be embedded as inline svg into templates
- [phosphor-leptos](https://github.com/SorenHolstHansen/phosphor-leptos) ▲ Phosphor icon component library for Leptos apps (rust)
- [wordpress-phosphor-icons-block](https://github.com/robruiz/phosphor-icons-block) ▲ Phosphor icon block for use in WordPress v5.8+
- [ember-phosphor-icons](https://github.com/IgnaceMaes/ember-phosphor-icons) ▲ Phosphor icons for Ember apps
If you've made a port of Phosphor and you want to see it here, just open a PR [here](https://github.com/phosphor-icons/homepage)!
## License
MIT © [Phosphor Icons](https://github.com/phosphor-icons)
<!-- END_LINKS -->

View File

@@ -1,6 +1,6 @@
{
"name": "@phosphor-icons/homepage",
"version": "2.0.6",
"version": "2.1.1",
"license": "MIT",
"homepage": "https://phosphoricons.com",
"author": {
@@ -20,12 +20,14 @@
],
"repository": "github:phosphor-icons/homepage",
"private": true,
"packageManager": "pnpm@9",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx,json,vue}\"",
"generate": "tsx scripts/generate.ts"
"generate": "tsx scripts/generate.ts",
"sync-docs": "tsx scripts/sync-docs.ts"
},
"dependencies": {
"@phosphor-icons/core": "^2.1.1",

1961
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

72
scripts/sync-docs.ts Normal file
View File

@@ -0,0 +1,72 @@
import fs from "node:fs";
import path from "node:path";
const README_PATH = "README.md";
const FUNDING_PATH = ".github/FUNDING.yaml";
const LOGO_PATH = ".github/logo.png";
const SYNC_SECTIONS = ["LOGO", "OVERVIEW", "LINKS"];
const SYNC_FILES: Array<string | Array<string>> = [
[FUNDING_PATH, ".github/FUNDING.yml"],
[LOGO_PATH, "meta"],
]; // These files will be replaced in the target repository
(function main() {
const targetRepo = process.argv[process.argv.length - 1];
if (!targetRepo) throw new Error("Target repository not provided");
const readmePath = path.resolve(__dirname, `../${README_PATH}`);
const readmeContent = fs.readFileSync(readmePath, "utf8");
const targetReadmePath = path.resolve(__dirname, `../../${targetRepo}/${README_PATH}`);
if (!fs.existsSync(targetReadmePath)) throw new Error(`README.md not found in ${targetRepo}`);
for (const section of SYNC_SECTIONS) {
const readmeSection = extractSection(readmeContent, section);
if (readmeSection) {
const targetReadmeContent = fs.readFileSync(targetReadmePath, "utf8");
const updatedDocsContent = updateSection(targetReadmeContent, section, readmeSection);
fs.writeFileSync(targetReadmePath, updatedDocsContent);
}
}
for (const file of SYNC_FILES) {
const fileName = Array.isArray(file) ? file[0] : file;
const filePath = path.resolve(__dirname, `../${fileName}`);
const fileContent = fs.readFileSync(filePath);
// If target file has aliases, remove them
if (Array.isArray(file)) {
for (const alias of file) {
const targetPath = path.resolve(__dirname, `../../${targetRepo}/${alias}`);
if (fs.existsSync(targetPath)) {
fs.rmSync(targetPath, { recursive: true });
}
}
}
// Write the target file and intermediate directories, or overwrite if it already exists
const targetPath = path.resolve(__dirname, `../../${targetRepo}/${fileName}`);
if (!fs.existsSync(path.dirname(targetPath))) {
fs.mkdirSync(path.dirname(targetPath), { recursive: true });
}
fs.writeFileSync(targetPath, fileContent);
}
})();
function extractSection(content: string, section: string) {
const pattern = new RegExp(
`<!-- BEGIN_${section} -->\n([\\s\\S]*)\n<!-- END_${section} -->`,
"g",
);
const match = pattern.exec(content);
return match?.[1];
}
function updateSection(content: string, section: string, newContent: string) {
const pattern = new RegExp(
`<!-- BEGIN_${section} -->\n([\\s\\S]*)\n<!-- END_${section} -->`,
"g",
);
return content.replace(pattern, `<!-- BEGIN_${section} -->\n${newContent}\n<!-- END_${section} -->`);
}

View File

@@ -48,6 +48,10 @@ body {
background-color: var(--acid);
}
::-moz-color-swatch {
border: none;
}
h2 {
font-weight: 400;
}

View File

@@ -65,6 +65,14 @@ const Footer = (_: FooterProps) => {
AllTrails
</a>
,{" "}
<a className="main-link" href="https://www.anthropic.com">
Anthropic
</a>
,{" "}
<a className="main-link" href="https://www.babbel.com/">
Babbel
</a>
,{" "}
<a
className="main-link"
href="https://www.dive.club/course/figma-academy"
@@ -76,8 +84,8 @@ const Footer = (_: FooterProps) => {
Framer
</a>
,{" "}
<a className="main-link" href="https://www.outgo.co/">
Outgo
<a className="main-link" href="https://www.khanacademy.org/">
Khan Academy
</a>
,{" "}
<a

View File

@@ -60,6 +60,10 @@ const Header = (_: HeaderProps) => {
We are now processing donations via{" "}
<a href="https://www.buymeacoffee.com/phosphoricons">
Buy Me a Coffee
</a>{" "}
and{" "}
<a href="https://ko-fi.com/phosphoricons">
Ko-fi
</a>
! Your one-time or recurring contribution does a lot to keep us
going. Please show us some support if you can!

View File

@@ -16,6 +16,8 @@
.grid-item {
display: flex;
appearance: none;
background: transparent;
box-sizing: border-box;
width: 160px;
height: 160px;

View File

@@ -68,11 +68,10 @@ const IconGridItem = (props: IconGridItemProps) => {
}, [originOffset]);
return (
<motion.div
<motion.button
className="grid-item"
key={name}
ref={ref}
tabIndex={0}
style={{
...style,
backgroundColor: isOpen ? "var(--background-layer)" : undefined,
@@ -80,7 +79,6 @@ const IconGridItem = (props: IconGridItemProps) => {
custom={delayRef}
transition={transition}
variants={itemVariants}
onKeyPress={(e) => e.key === "Enter" && handleOpen()}
onClick={handleOpen}
>
<Icon />
@@ -89,7 +87,7 @@ const IconGridItem = (props: IconGridItemProps) => {
{isNew && <span className="badge new"></span>}
{isUpdated && <span className="badge updated"></span>}
</p>
</motion.div>
</motion.button>
);
};

View File

@@ -14,7 +14,7 @@ const Links = (_: LinksProps) => {
<ArrowElbowDownRight size={24} />
<OutboundLink
className="nav-link"
href="https://phosphoricons.com/assets/phosphor-icons.zip"
href="/assets/phosphor-icons.zip"
eventLabel="Download all"
download
type="application/zip"
@@ -45,7 +45,7 @@ const Links = (_: LinksProps) => {
<div>
<ArrowElbowDownRight size={24} />
<OutboundLink
href="https://phosphoricons.com/assets/phosphor-icons.sketchplugin.zip"
href="/assets/phosphor-icons.sketchplugin.zip"
eventLabel="Download sketch plugin"
download
type="application/zip"

View File

@@ -30,33 +30,24 @@ export function getCodeSnippets({
const { r, g, b } = TinyColor(color).toRgb();
return {
[SnippetType.HTML]: `<i class="ph${
isDefaultWeight ? "" : `-${weight}`
[SnippetType.HTML]: `<i class="ph${isDefaultWeight ? "" : `-${weight}`
} ph-${name}"></i>`,
[SnippetType.REACT]: `<${displayName} size={${size}} ${
!isDefaultColor ? `color="${color}" ` : ""
[SnippetType.REACT]: `<${displayName} size={${size}} ${!isDefaultColor ? `color="${color}" ` : ""
}${isDefaultWeight ? "" : `weight="${weight}" `}/>`,
[SnippetType.VUE]: `<ph${displayName
.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2")
.toLowerCase()} :size="${size}" ${
!isDefaultColor ? `color="${color}" ` : ""
[SnippetType.VUE]: `<Ph${displayName} :size="${size}" ${!isDefaultColor ? `color="${color}" ` : ""
}${isDefaultWeight ? "" : `weight="${weight}" `}/>`,
[SnippetType.FLUTTER]: `Icon(\n PhosphorIcons.${displayName.replace(
/^\w/,
(c) => c.toLowerCase()
)}${
isDefaultWeight ? "" : weight.replace(/^\w/, (c) => c.toUpperCase())
},\n size: ${size.toFixed(1)},\n${
!isDefaultColor ? ` color: Color(0xff${color.replace("#", "")}),\n` : ""
)}${isDefaultWeight ? "" : weight.replace(/^\w/, (c) => c.toUpperCase())
},\n size: ${size.toFixed(1)},\n${!isDefaultColor ? ` color: Color(0xff${color.replace("#", "")}),\n` : ""
})`,
[SnippetType.ELM]: `Phosphor.${camelName}${
isDefaultWeight ? "" : " " + pascalWeight
[SnippetType.ELM]: `Phosphor.${camelName}${isDefaultWeight ? "" : " " + pascalWeight
}
|> withSize ${size}
|> withSizeUnit "px"
|> toHtml []`,
[SnippetType.SWIFT]: `Ph.${camelName}.${weight}${
!isDefaultColor
[SnippetType.SWIFT]: `Ph.${camelName}.${weight}${!isDefaultColor
? `\n .color(red: ${u8ToCGFloatStr(r)}, green: ${u8ToCGFloatStr(
g
)}, blue: ${u8ToCGFloatStr(b)})`