diff --git a/bun.lockb b/bun.lockb index 5501719..421d459 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index d2c8961..76557fb 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "@nostr-dev-kit/ndk-cache-dexie": "^2.2.6", "@nostr-dev-kit/ndk-react": "^0.1.1", "lodash": "^4.17.21", + "nostr-login": "^1.0.12", "nostr-tools": "^2.2.0", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/src/components/AuthorProfile/AuthorProfile.css b/src/components/AuthorProfile/AuthorProfile.css index 2cabb62..a5b370e 100644 --- a/src/components/AuthorProfile/AuthorProfile.css +++ b/src/components/AuthorProfile/AuthorProfile.css @@ -15,6 +15,11 @@ .author-info a svg { height: 24px; color: white; + line-height: 1em; + } + + .author-name { + padding-right: 1em; } .author-image { diff --git a/src/components/ScrollView/ScrollView.tsx b/src/components/ScrollView/ScrollView.tsx index bb9799a..a8ec7ea 100644 --- a/src/components/ScrollView/ScrollView.tsx +++ b/src/components/ScrollView/ScrollView.tsx @@ -47,7 +47,7 @@ const ScrollView = ({ settings, images, currentImage, setCurrentImage, setViewMo const { activeProfile, profileNpub, title } = useProfile(settings, state.activeImage); const infoPanelAvailable = state.activeImage && (state.activeImage.content || state.activeImage.tags.length > 0); - console.log(JSON.stringify([state?.activeImage?.content, state?.activeImage?.tags])); + // console.log(JSON.stringify([state?.activeImage?.content, state?.activeImage?.tags])); return (
diff --git a/src/components/env.ts b/src/components/env.ts index 60009e2..618a350 100644 --- a/src/components/env.ts +++ b/src/components/env.ts @@ -1,24 +1,32 @@ +import { Dictionary } from 'lodash'; import { nip19 } from 'nostr-tools'; export const appName = 'slidestr.net'; +type Topic = { + tags: string[]; +}; -export const topics = { - art: ['art', 'artstr', 'beautiful', 'colorful', 'psychedelic'], - bitcoin: ['bitcoin', 'plebchain'], - nostr: ['coffeechain', 'nostr', 'zapathon', 'grownostr', 'freedom'], - animals: ['catstr', 'cute', 'dogstr'], - photography: [ - 'naturephotography', - 'photo', - 'photography', - 'photos', - 'photostr', - 'picoftheday', - 'streetphotography', - 'picstr', - ], - lifestyle: ['fashion', 'flowerstr', 'foodstr', 'style', 'weedstr', 'travel', 'travelstr', 'happy', 'life', 'love'], - gardening: ['gardening', 'gardenstr', 'nature'], +export const topics: Dictionary = { + art: { tags: ['art', 'artstr', 'beautiful', 'colorful', 'psychedelic'] }, + bitcoin: { tags: ['bitcoin', 'plebchain'] }, + nostr: { tags: ['coffeechain', 'nostr', 'zapathon', 'grownostr', 'freedom'] }, + animals: { tags: ['catstr', 'dogstr', 'animal', 'animals'] }, + photography: { + tags: [ + 'naturephotography', + 'photo', + 'photography', + 'photos', + 'photostr', + 'picoftheday', + 'streetphotography', + 'picstr', + ], + }, + lifestyle: { + tags: ['fashion', 'flowerstr', 'foodstr', 'style', 'weedstr', 'travel', 'travelstr', 'happy', 'life', 'love'], + }, + gardening: { tags: ['gardening', 'gardenstr', 'nature'] }, }; export const defaultHashTags = [ diff --git a/src/mainInner.tsx b/src/mainInner.tsx index 5525e6d..f22e593 100644 --- a/src/mainInner.tsx +++ b/src/mainInner.tsx @@ -3,6 +3,7 @@ import './index.css'; import { createBrowserRouter, RouterProvider } from 'react-router-dom'; import { NDKProvider } from '@nostr-dev-kit/ndk-react'; import { defaultRelays } from './components/env'; +import Home from './components/Home'; const MainInner = () => { //const [state] = useGlobalState(); @@ -10,7 +11,7 @@ const MainInner = () => { const router = createBrowserRouter([ { path: '/', - element: , + element: , }, { path: 'global',