Skip to content

Commit

Permalink
Added custom social link. (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyxguo committed Apr 9, 2021
1 parent d8b361d commit 339ee51
Show file tree
Hide file tree
Showing 8 changed files with 204 additions and 168 deletions.
33 changes: 26 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#! ---------------------------------------------------------------
#! ObsidiaNext Theme for Hexo
#! Aurora Theme for Hexo
#! ---------------------------------------------------------------
#! Designed & Coded By TriDiamond
#! ---------------------------------------------------------------

#! ---------------------------------------------------------------
#! Site Configs
#! @docs https://obsidianext.tridiamond.tech/guide/configuration.html
#! @docs https://aurora.tridiamond.tech/guide/configuration.html
#! ---------------------------------------------------------------
site:
subtitle: TriDiamond's Blog
Expand All @@ -23,7 +23,7 @@ site:

#! ---------------------------------------------------------------
#! Authors Configs
#! @docs https://obsidianext.tridiamond.tech/guide/authors.html
#! @docs https://aurora.tridiamond.tech/guide/authors.html
#! ---------------------------------------------------------------
authors:
##! example
Expand All @@ -37,7 +37,7 @@ authors:

#! ---------------------------------------------------------------
#! Menu Configs
#! @docs https://obsidianext.tridiamond.tech/guide/menu.html
#! @docs https://aurora.tridiamond.tech/guide/menu.html
#! ---------------------------------------------------------------
menu:
About: true
Expand All @@ -46,7 +46,7 @@ menu:

#! ---------------------------------------------------------------
#! Theme Config
#! @docs https://obsidianext.tridiamond.tech/guide/theme.html
#! @docs https://aurora.tridiamond.tech/guide/theme.html
#! ---------------------------------------------------------------
theme:
dark_mode: true
Expand All @@ -58,20 +58,38 @@ theme:

#! ---------------------------------------------------------------
#! Social Configs
#! @docs https://obsidianext.tridiamond.tech/guide/social.html
#! @docs https://aurora.tridiamond.tech/guide/social.html
#! ---------------------------------------------------------------
socials:

custom_socials:
##! Example:
##! --- Using SVG
# bilibili:
# icon: http://localhost:4000/svg/bilibili.svg
# link: https://live.bilibili.com/22619211

##! --- Using IconFont
# baidu:
# icon: iconfont icon-baidu
# link: https://live.bilibili.com/22619211

##! --- Using FontAwesome
# book:
# icon: far fa-address-book
# link: https://live.bilibili.com/22619211

#! ---------------------------------------------------------------
#! Site Meta Configs
#! @docs https://obsidianext.tridiamond.tech/guide/theme.html
#! @docs https://aurora.tridiamond.tech/guide/theme.html
#! ---------------------------------------------------------------
site_meta:
cdn: cn
favicon:

#! ---------------------------------------------------------------
#! Plugins
#! @docs https://aurora.tridiamond.tech/guide/plugins.html
#! ---------------------------------------------------------------

# For local development only!
Expand Down Expand Up @@ -122,6 +140,7 @@ copy_protection:

#! ---------------------------------------------------------------
#! Injections
#! @docs https://aurora.tridiamond.tech/guide/site-meta.html#custom-meta
#! ---------------------------------------------------------------
injects:
scripts:
Expand Down
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export default defineComponent({
if (typeof footerHeight === 'number') {
wrapperHeight = wrapperHeight - footerHeight * 2
}
console.log(wrapperHeight)
wrapperStyle.value = {
'min-height': wrapperHeight + 'px'
}
Expand Down
77 changes: 3 additions & 74 deletions src/components/MobileMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,79 +25,7 @@
<p v-else class="pt-6 px-10 w-full text-sm text-center flex flex-col gap-2">
<ob-skeleton :count="2" height="20px" width="10rem" />
</p>

<ul
class="flex flex-row justify-evenly flex-wrap w-full py-4 px-2 text-center items-center"
>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.github"
>
<a :href="authorData.socials.github" target="_blank" ref="github">
<svg-icon icon-class="github" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.twitter"
>
<a :href="authorData.socials.twitter" target="_blank" ref="twitter">
<svg-icon icon-class="twitter" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.stackoverflow"
>
<a
:href="authorData.socials.stackoverflow"
target="_blank"
ref="stackoverflow"
>
<svg-icon icon-class="stackoverflow" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.wechat"
>
<a :href="authorData.socials.wechat" target="_blank" ref="wechat">
<svg-icon icon-class="wechat" class="fill-current" />
</a>
</li>
<li class="diamond-clip-path diamond-icon" v-if="authorData.socials.qq">
<a :href="authorData.socials.qq" target="_blank" ref="qq">
<svg-icon icon-class="qq" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.weibo"
>
<a :href="authorData.socials.weibo" target="_blank" ref="weibo">
<svg-icon icon-class="weibo" class="fill-current" />
</a>
</li>
<li class="diamond-clip-path diamond-icon" v-if="authorData.socials.csdn">
<a :href="authorData.socials.csdn" target="_blank" ref="csdn">
<svg-icon icon-class="csdn" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.zhifu"
>
<a :href="authorData.socials.zhifu" target="_blank" ref="zhifu">
<svg-icon icon-class="zhifu" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.juejin"
>
<a :href="authorData.socials.juejin" target="_blank" ref="juejin">掘</a>
</li>
</ul>
<Social :socials="authorData.socials" />
<ul class="grid grid-cols-3 pt-4 w-full px-2 text-lg">
<li class="col-span-1 text-center">
<span class="text-ob-bright">{{ authorData.post_list.length }}</span>
Expand Down Expand Up @@ -189,10 +117,11 @@ import { useRouter } from 'vue-router'
import { useNavigatorStore } from '@/stores/navigator'
import { useAuthorStore } from '@/stores/author'
import { AuthorPosts } from '@/models/Post.class'
import Social from '@/components/Social.vue'
export default defineComponent({
name: 'ObMobileMenu',
components: { Dropdown, DropdownMenu, DropdownItem },
components: { Dropdown, DropdownMenu, DropdownItem, Social },
setup() {
const appStore = useAppStore()
const authorStore = useAuthorStore()
Expand Down
87 changes: 3 additions & 84 deletions src/components/Sidebar/src/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,90 +43,7 @@
</p>
</div>
<div class="h-full w-full flex flex-col flex-1 justify-end items-end">
<ul
class="flex flex-row justify-evenly flex-wrap w-full py-4 px-2 text-center items-center"
>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.github"
>
<a :href="authorData.socials.github" target="_blank" ref="github">
<svg-icon icon-class="github" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.twitter"
>
<a
:href="authorData.socials.twitter"
target="_blank"
ref="twitter"
>
<svg-icon icon-class="twitter" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.stackoverflow"
>
<a
:href="authorData.socials.stackoverflow"
target="_blank"
ref="stackoverflow"
>
<svg-icon icon-class="stackoverflow" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.wechat"
>
<a :href="authorData.socials.wechat" target="_blank" ref="wechat">
<svg-icon icon-class="wechat" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.qq"
>
<a :href="authorData.socials.qq" target="_blank" ref="qq">
<svg-icon icon-class="qq" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.weibo"
>
<a :href="authorData.socials.weibo" target="_blank" ref="weibo">
<svg-icon icon-class="weibo" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.csdn"
>
<a :href="authorData.socials.csdn" target="_blank" ref="csdn">
<svg-icon icon-class="csdn" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.zhihu"
>
<a :href="authorData.socials.zhihu" target="_blank" ref="zhifu">
<svg-icon icon-class="zhifu" class="fill-current" />
</a>
</li>
<li
class="diamond-clip-path diamond-icon"
v-if="authorData.socials.juejin"
>
<a :href="authorData.socials.juejin" target="_blank" ref="juejin">
</a>
</li>
</ul>
<Social :socials="authorData.socials" />
<ul class="grid grid-cols-4 pt-4 w-full px-2 text-lg">
<li class="col-span-1 text-center">
<span class="text-ob-bright">{{ authorData.word_count }}</span>
Expand Down Expand Up @@ -159,9 +76,11 @@ import { useAppStore } from '@/stores/app'
import { useAuthorStore } from '@/stores/author'
import { computed, defineComponent, onMounted, ref, toRefs, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import Social from '@/components/Social.vue'
export default defineComponent({
name: 'ObProfile',
components: { Social },
props: {
author: {
type: String,
Expand Down
Loading

0 comments on commit 339ee51

Please sign in to comment.