mirror of
https://github.com/dergigi/boris.git
synced 2025-12-24 01:54:19 +01:00
feat: add custom FontAwesome Pro books icon for Archive tab
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faSpinner, faExclamationCircle, faHighlighter, faBookmark, faBook } from '@fortawesome/free-solid-svg-icons'
|
||||
import { faSpinner, faExclamationCircle, faHighlighter, faBookmark } from '@fortawesome/free-solid-svg-icons'
|
||||
import { Hooks } from 'applesauce-react'
|
||||
import { RelayPool } from 'applesauce-relay'
|
||||
import { nip19 } from 'nostr-tools'
|
||||
@@ -13,6 +13,7 @@ import { BlogPostPreview } from '../services/exploreService'
|
||||
import { Bookmark } from '../types/bookmarks'
|
||||
import AuthorCard from './AuthorCard'
|
||||
import BlogPostCard from './BlogPostCard'
|
||||
import { faBooks } from '../icons/customIcons'
|
||||
|
||||
interface MeProps {
|
||||
relayPool: RelayPool
|
||||
@@ -190,7 +191,7 @@ const Me: React.FC<MeProps> = ({ relayPool }) => {
|
||||
data-tab="archive"
|
||||
onClick={() => setActiveTab('archive')}
|
||||
>
|
||||
<FontAwesomeIcon icon={faBook} />
|
||||
<FontAwesomeIcon icon={faBooks} />
|
||||
Archive ({readArticles.length})
|
||||
</button>
|
||||
</div>
|
||||
|
||||
24
src/icons/customIcons.ts
Normal file
24
src/icons/customIcons.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'
|
||||
|
||||
/**
|
||||
* Custom icon definitions for FontAwesome Pro icons
|
||||
* or any custom SVG icons that aren't in the free tier
|
||||
*/
|
||||
|
||||
/**
|
||||
* Books icon from FontAwesome Pro Regular
|
||||
* Source: https://github.com/vanphonggiang/font-awesome-6-pro/blob/main/svgs/regular/books.svg
|
||||
*/
|
||||
export const faBooks: IconDefinition = {
|
||||
prefix: 'far',
|
||||
iconName: 'books',
|
||||
icon: [
|
||||
512, // viewBox width
|
||||
512, // viewBox height
|
||||
[], // ligatures
|
||||
'e002', // unicode
|
||||
// SVG path data from the books.svg file
|
||||
'M232 0c-13.3 0-24 10.7-24 24V488c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V24c0-13.3-10.7-24-24-24H232zm8 464V48h32V464H240zM96 64c-13.3 0-24 10.7-24 24V488c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24H96zm8 400V112h32V464H104zM368 64c-13.3 0-24 10.7-24 24V488c0 13.3 10.7 24 24 24h48c13.3 0 24-10.7 24-24V88c0-13.3-10.7-24-24-24H368zm8 400V112h32V464H376z'
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user