Skip to content

Commit

Permalink
feat: add mastodon
Browse files Browse the repository at this point in the history
  • Loading branch information
kleinpetr committed Oct 22, 2023
1 parent f2ece8a commit 409bdff
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 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: '@[email protected]'
}
})
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: '@[email protected]'
}
})
```
Expand Down
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@
"files.associations": {
"*.css": "postcss"
},
"editor.formatOnSave": false
"editor.formatOnSave": false,
"workbench.colorCustomizations": {
"activityBar.background": "#14340F",
"titleBar.activeBackground": "#1C4915",
"titleBar.activeForeground": "#F5FCF3"
}
}
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 '@[email protected]'
* @studioIcon simple-icons:mastodon
* */
mastodon: ''
}
}
})

0 comments on commit 409bdff

Please sign in to comment.