Skip to content

Commit

Permalink
feat: add mastodon (#85)
Browse files Browse the repository at this point in the history
* feat: add mastodon

* fix: change demo  mastodon handle

* Update .demo/app.config.ts

* Update .demo/content/1.index.md

* Update .vscode/settings.json

---------

Co-authored-by: Sébastien Chopin <seb@nuxtlabs.com>
  • Loading branch information
kleinpetr and Atinux committed Oct 25, 2023
1 parent f2ece8a commit 365adb1
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .demo/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default defineAppConfig({
cover: '/cover.jpg',
socials: {
twitter: 'Atinux',
github: 'Atinux/content-wind'
github: 'Atinux/content-wind',
mastodon: '@atinux@webtoo.ls'
}
})
2 changes: 2 additions & 0 deletions .demo/content/1.index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ interface AppConfigInput {
socials?: {
twitter?: string
github?: string
mastodon?: string
}
}
```
Expand All @@ -104,6 +105,7 @@ export default defineAppConfig({
socials: {
twitter: 'Atinux',
github: 'Atinux/content-wind'
mastodon: '@atinux@webtoo.ls'
}
})
```
Expand Down
3 changes: 2 additions & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export default defineAppConfig({
socials: {
twitter: '',
github: ''
github: '',
mastodon: '',
},
nuxtIcon: {
aliases: {
Expand Down
1 change: 1 addition & 0 deletions components/AppNavbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const appConfig = useAppConfig()
<div class="space-x-3 transition text-gray-500">
<a v-if="appConfig.socials?.twitter" :href="`https://twitter.com/${appConfig.socials?.twitter}`" title="Twitter" class="dark:text-gray-100 hover:text-gray-700 dark:hover:text-gray-300"><Icon name="fa-brands:twitter" class="w-5 h-5" /></a>
<a v-if="appConfig.socials?.github" :href="`https://github.com/${appConfig.socials?.github}`" title="GitHub" class="dark:text-gray-100 hover:text-gray-700 dark:hover:text-gray-300"><Icon name="fa-brands:github" class="w-5 h-5" /></a>
<a v-if="appConfig.socials?.mastodon" :href="`https://elk.zone/${appConfig.socials?.mastodon}`" title="Mastodon" class="dark:text-gray-100 hover:text-gray-700 dark:hover:text-gray-300"><Icon name="fa-brands:mastodon" class="w-5 h-5" /></a>
<ColorModeSwitch class="dark:text-gray-100 hover:text-gray-700 dark:hover:text-gray-300" />
</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion nuxt.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ export default defineNuxtSchema({
* @example 'nuxt/framework'
* @studioIcon simple-icons:github
* */
github: ''
github: '',
/**
* Mastodon handle
* @example '@nuxt@webtoo.ls'
* @studioIcon simple-icons:mastodon
* */
mastodon: ''
}
}
})

0 comments on commit 365adb1

Please sign in to comment.