Skip to content

Commit ec5c97c

Browse files
committed
Replace font-awesome with tabler icons using iconify
1 parent 9652bcd commit ec5c97c

File tree

9 files changed

+1228
-164
lines changed

9 files changed

+1228
-164
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77
outputs:
88
artifact-name:
99
value: ${{ jobs.build.outputs.artifact-name }}
10-
secrets:
11-
NPM_FONTAWESOME_TOKEN:
12-
required: true
1310

1411
jobs:
1512
build:
@@ -31,16 +28,7 @@ jobs:
3128
cache: npm
3229

3330
- name: Install NPM dependencies
34-
# Skip post-install scripts for now to prevent token theft
35-
run: |
36-
npm config set '//npm.fontawesome.com/:_authToken' '${NPM_FONTAWESOME_TOKEN}'
37-
npm ci --ignore-scripts
38-
npm config delete '//npm.fontawesome.com/:_authToken'
39-
env:
40-
NPM_FONTAWESOME_TOKEN: ${{ secrets.NPM_FONTAWESOME_TOKEN }}
41-
42-
- name: Run post-install scripts
43-
run: npm rebuild
31+
run: npm ci
4432

4533
- name: Build project
4634
run: npm run build

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 1202 additions & 113 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,12 @@
1212
"format": "prettier --write . --list-different"
1313
},
1414
"dependencies": {
15-
"@fortawesome/fontawesome-svg-core": "^6.7.1",
16-
"@fortawesome/free-brands-svg-icons": "^6.7.1",
17-
"@fortawesome/pro-duotone-svg-icons": "^6.7.1",
18-
"@fortawesome/pro-light-svg-icons": "^6.7.1",
19-
"@fortawesome/pro-regular-svg-icons": "^6.7.1",
20-
"@fortawesome/pro-solid-svg-icons": "^6.7.1",
21-
"@fortawesome/pro-thin-svg-icons": "^6.7.1",
22-
"@fortawesome/vue-fontawesome": "^3.0.8",
2315
"vue": "^3.5.22",
2416
"vue-router": "^4.6.3"
2517
},
2618
"devDependencies": {
19+
"@iconify-json/tabler": "^1.2.23",
20+
"@iconify/tailwind4": "^1.1.0",
2721
"@tailwindcss/vite": "^4.1.16",
2822
"@tsconfig/node22": "^22.0.2",
2923
"@types/node": "^22.18.11",

src/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
@import 'tailwindcss';
22

3+
@plugin "@iconify/tailwind4";
4+
35
@layer base {
46
* {
57
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
@@ -69,3 +71,7 @@
6971
@apply pointer-events-none fixed;
7072
animation: taco-confetti ease-out 750ms both;
7173
}
74+
75+
@utility icon-* {
76+
@apply block aspect-square;
77+
}

src/views/about/FaqDisclosure.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<script setup lang="ts">
22
import { computed, useId } from 'vue';
3-
import { faChevronDown } from '@fortawesome/pro-solid-svg-icons';
4-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
53
64
const props = defineProps<{ title: string; openId: string | undefined }>();
75
const emit = defineEmits<{ (evt: 'update:openId', openId: string | undefined): void }>();
@@ -21,14 +19,14 @@
2119
type="button"
2220
class="flex w-full items-center justify-between bg-violet-700/90 p-5 text-left text-lg text-gray-100 shadow-md transition hover:bg-violet-700/80 md:text-xl"
2321
>
24-
{{ title }}
22+
<span class="mr-4">
23+
{{ title }}
24+
</span>
2525

2626
<span
27-
class="mr-0.5 ml-4 transition-all duration-500"
27+
class="icon-[tabler--chevron-down] ml-4 origin-center text-2xl transition-all duration-500"
2828
:class="open ? 'rotate-0' : '-rotate-450'"
29-
>
30-
<FontAwesomeIcon :icon="faChevronDown" class="scale-[80%]" />
31-
</span>
29+
></span>
3230
</button>
3331

3432
<div

src/views/game/panels/PanelSection.vue

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<script setup lang="ts">
22
import { onBeforeMount, onUnmounted, ref, watch } from 'vue';
3-
import { faChevronRight } from '@fortawesome/pro-solid-svg-icons';
4-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
53
import { useTailwindBreakpoint } from '@/utils';
64
75
defineProps<{
@@ -56,9 +54,7 @@
5654
<p v-if="description" class="text-xs text-gray-50">{{ description }}</p>
5755
</div>
5856

59-
<button type="button" class="p-1 lg:hidden">
60-
<FontAwesomeIcon :icon="faChevronRight" class="text-gray-200" />
61-
</button>
57+
<span class="icon-[tabler--chevron-right] ml-2 text-3xl text-gray-200 lg:hidden"></span>
6258
</div>
6359

6460
<!-- Desktop view content -->
@@ -100,9 +96,11 @@
10096
<button
10197
@click="mobileTrayOpen = false"
10298
type="button"
103-
class="absolute top-1/2 left-0 -translate-y-1/2 rounded-r-full bg-gray-300 py-2 pr-2 pl-1 opacity-75 shadow-sm"
99+
class="absolute top-1/2 left-0 flex -translate-y-1/2 rounded-r-full bg-gray-300 py-2 pr-1.5 pl-0.5 opacity-75 shadow-sm"
104100
>
105-
<FontAwesomeIcon :icon="faChevronRight" size="lg" class="text-gray-500" />
101+
<span
102+
class="icon-[tabler--chevron-right] -mr-1.5 -ml-1 text-3xl text-gray-500 lg:hidden"
103+
></span>
106104
</button>
107105

108106
<div class="h-full w-full min-w-[85vw] overflow-y-auto pb-24">

src/views/game/panels/achievements/AchievementsPanel.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<script setup lang="ts">
22
import { ACHIEVEMENTS, type GameState } from '@/game';
33
import { computed } from 'vue';
4-
import { faCheck } from '@fortawesome/pro-solid-svg-icons';
5-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
64
import PanelSection from '../PanelSection.vue';
75
86
const props = defineProps<{ state: GameState }>();
@@ -36,12 +34,10 @@
3634
:class="{ 'text-gray-600/50': !unlockedAchievements.has(achievementName) }"
3735
>
3836
<span>{{ achievementName }}</span>
39-
<FontAwesomeIcon
37+
<span
4038
v-if="unlockedAchievements.has(achievementName)"
41-
:icon="faCheck"
42-
size="lg"
43-
class="-mt-0.5 ml-1.5 text-purple-600"
44-
/>
39+
class="icon-[tabler--check] -mt-0.5 ml-1 text-xl text-purple-600"
40+
></span>
4541
</span>
4642
<p
4743
class="text-xs text-gray-500"

src/views/game/panels/skins/SkinsPanel.vue

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<script setup lang="ts">
22
import { type GameState, type SkinDefinition, SKINS } from '@/game';
3-
import { faCheck } from '@fortawesome/pro-solid-svg-icons';
4-
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
53
import NotEnoughTacosForSkinModal from '@/views/game/panels/skins/NotEnoughTacosForSkinModal.vue';
64
import PanelSection from '@/views/game/panels/PanelSection.vue';
75
import { ref } from 'vue';
@@ -73,13 +71,11 @@
7371
<span class="text-xs text-gray-600">{{ tacoProps.description }}</span>
7472
</span>
7573

76-
<FontAwesomeIcon
74+
<span
7775
v-if="state.ownedSkins.includes(tacoName)"
78-
:icon="faCheck"
79-
:size="state.selectedSkin === tacoName ? 'lg' : '1x'"
80-
class="mr-4! ml-auto! text-gray-700/50"
81-
:class="{ 'text-gray-700/70!': state.selectedSkin === tacoName }"
82-
/>
76+
class="icon-[tabler--check] mr-4! ml-auto! text-2xl text-gray-700/50 transition-all"
77+
:class="{ 'scale-105 text-purple-600!': state.selectedSkin === tacoName }"
78+
></span>
8379
</button>
8480
</div>
8581
</PanelSection>

0 commit comments

Comments
 (0)