-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
415 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<!-- | ||
- Copyright (c) 2023, Terwer . All rights reserved. | ||
- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | ||
- | ||
- This code is free software; you can redistribute it and/or modify it | ||
- under the terms of the GNU General Public License version 2 only, as | ||
- published by the Free Software Foundation. Terwer designates this | ||
- particular file as subject to the "Classpath" exception as provided | ||
- by Terwer in the LICENSE file that accompanied this code. | ||
- | ||
- This code is distributed in the hope that it will be useful, but WITHOUT | ||
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
- version 2 for more details (a copy is included in the LICENSE file that | ||
- accompanied this code). | ||
- | ||
- You should have received a copy of the GNU General Public License version | ||
- 2 along with this work; if not, write to the Free Software Foundation, | ||
- Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
- | ||
- Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com | ||
- or visit www.terwer.space if you need additional information or have any | ||
- questions. | ||
--> | ||
|
||
<script setup lang="ts"> | ||
import { usePost } from "~/composables/usePost" | ||
import { getFirstImageSrc, getSummery } from "~/utils/utils" | ||
import { createAppLogger } from "~/common/appLogger" | ||
|
||
const logger = createAppLogger("share-page") | ||
const { t } = useI18n() | ||
const { currentPost, setCurrentPost } = usePost() | ||
await setCurrentPost() | ||
|
||
// props | ||
const props = defineProps({ | ||
showTitleSign: Boolean, | ||
}) | ||
|
||
// datas | ||
const titleSign = " - " + t("blog.share") | ||
const title = `${currentPost.post.title}${props.showTitleSign ? titleSign : ""}` | ||
const desc = getSummery(currentPost.post.description) | ||
const headImage = await getFirstImageSrc(currentPost.post.description) | ||
const seoMeta = { | ||
title: title, | ||
ogTitle: title, | ||
description: desc, | ||
ogDescription: desc, | ||
} as any | ||
if (headImage) { | ||
logger.info("get a head image from doc=>", headImage) | ||
seoMeta.ogImage = headImage | ||
} | ||
useSeoMeta(seoMeta) | ||
|
||
// https://stackoverflow.com/a/71781246/4037224 | ||
const VNode = () => | ||
h("div", { | ||
class: "", | ||
innerHTML: currentPost.post.editorDom?.replaceAll('contenteditable="true"', 'contenteditable="false"') ?? "", | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div class="fn__flex-1 protyle" data-loading="finished"> | ||
<div class="protyle-content protyle-content--transition" data-fullwidth="true"> | ||
<div class="protyle-title protyle-wysiwyg--attr" style="margin: 16px 96px 0"> | ||
<div | ||
style="margin: 20px 0" | ||
contenteditable="false" | ||
data-position="center" | ||
spellcheck="false" | ||
class="protyle-title__input" | ||
data-render="true" | ||
> | ||
{{ currentPost.post.title }} | ||
</div> | ||
</div> | ||
<div | ||
class="protyle-wysiwyg protyle-wysiwyg--attr" | ||
spellcheck="false" | ||
contenteditable="false" | ||
data-doc-type="NodeDocument" | ||
> | ||
<VNode v-highlight /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,49 @@ | ||
<script setup lang="ts"></script> | ||
<script setup lang="ts"> | ||
const { t } = useI18n() | ||
const seoMeta = { | ||
title: `${t("syp.about")} - ${t("blog.site.title")}`, | ||
ogTitle: t("syp.about"), | ||
description: t("syp.about.desc"), | ||
ogDescription: t("syp.about.desc"), | ||
} as any | ||
useSeoMeta(seoMeta) | ||
</script> | ||
|
||
<template> | ||
<div> | ||
<h1>大家好,我是 <a href="https://github.saobby.my.eu.org.terwer" target="_blank">terwer</a> , 一个后端老菜鸟。</h1> | ||
<p>联系我:youweics@163.com</p> | ||
<div id="about"> | ||
<h1>👨🏻 关于我</h1> | ||
<p>大家好,我是 <nuxt-link to="https://blog.terwer.space" target="_blank">terwer</nuxt-link> , 一个后端老菜鸟。</p> | ||
<div class="sep"></div> | ||
|
||
<h1>🏹 技能</h1> | ||
<p>熟悉Java、Spring、Spring Cloud、Vue、React、Python 的拼写</p> | ||
<p>了解 Linux、windows、macOS 的开关机方式</p> | ||
<p>精通 Git 的 pull 和 push,并注册了 GitHub 帐号刷了一些 star</p> | ||
<p>微信公众号:架构设计漫谈</p> | ||
<nuxt-img src="https://img1.terwer.space/mp-qrcode.png" /> | ||
<div class="sep"></div> | ||
|
||
<h1>✉️ 联系</h1> | ||
<p>WeChat or QQ: 1035136784</p> | ||
<p>Email: youweics@163.com</p> | ||
<p>GitHub: <nuxt-link to="https://github.com/terwer" target="_blank">https://github.com/terwer</nuxt-link></p> | ||
</div> | ||
</template> | ||
|
||
<style scoped></style> | ||
<style lang="stylus" scoped> | ||
#about | ||
h1 | ||
font-size 32px | ||
p | ||
padding 8px 0 | ||
font-size 16px | ||
a | ||
color var(--el-color-primary) | ||
cursor pointer | ||
img | ||
width 25% | ||
height 25% | ||
.sep | ||
margin-top 20px | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,7 @@ | ||
<script setup lang="ts"> | ||
import { usePost } from "~/composables/usePost" | ||
import { getFirstImageSrc, getSummery } from "~/utils/utils" | ||
import { createAppLogger } from "~/common/appLogger" | ||
const logger = createAppLogger("share-page") | ||
const { currentPost, setCurrentPost } = usePost() | ||
await setCurrentPost() | ||
const title = currentPost.post.title | ||
const desc = getSummery(currentPost.post.description) | ||
const headImage = await getFirstImageSrc(currentPost.post.description) | ||
const seoMeta = { | ||
title: title, | ||
ogTitle: title, | ||
description: desc, | ||
ogDescription: desc, | ||
} as any | ||
if (headImage) { | ||
logger.info("get a head image from doc=>", headImage) | ||
seoMeta.ogImage = headImage | ||
} | ||
useSeoMeta(seoMeta) | ||
// https://stackoverflow.com/a/71781246/4037224 | ||
const VNode = () => | ||
h("div", { | ||
class: "", | ||
innerHTML: currentPost.post.editorDom?.replaceAll('contenteditable="true"', 'contenteditable="false"') ?? "", | ||
}) | ||
import Detail from "~/components/default/Detail.vue" | ||
</script> | ||
|
||
<template> | ||
<div class="fn__flex-1 protyle" data-loading="finished"> | ||
<div class="protyle-content protyle-content--transition" data-fullwidth="true"> | ||
<div class="protyle-title protyle-wysiwyg--attr" style="margin: 16px 96px 0"> | ||
<div | ||
style="margin: 20px 0" | ||
contenteditable="false" | ||
data-position="center" | ||
spellcheck="false" | ||
class="protyle-title__input" | ||
data-render="true" | ||
> | ||
{{ currentPost.post.title }} | ||
</div> | ||
</div> | ||
<div | ||
class="protyle-wysiwyg protyle-wysiwyg--attr" | ||
spellcheck="false" | ||
contenteditable="false" | ||
data-doc-type="NodeDocument" | ||
> | ||
<VNode v-highlight /> | ||
</div> | ||
</div> | ||
</div> | ||
<detail :show-title-sign="false" /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,7 @@ | ||
<script setup lang="ts"> | ||
import { usePost } from "~/composables/usePost" | ||
import { getFirstImageSrc, getSummery } from "~/utils/utils" | ||
import { createAppLogger } from "~/common/appLogger" | ||
const logger = createAppLogger("share-page") | ||
const { currentPost, setCurrentPost } = usePost() | ||
await setCurrentPost() | ||
const title = currentPost.post.title | ||
const desc = getSummery(currentPost.post.description) | ||
const headImage = await getFirstImageSrc(currentPost.post.description) | ||
const seoMeta = { | ||
title: title, | ||
ogTitle: title, | ||
description: desc, | ||
ogDescription: desc, | ||
} as any | ||
if (headImage) { | ||
logger.info("get a head image from doc=>", headImage) | ||
seoMeta.ogImage = headImage | ||
} | ||
useSeoMeta(seoMeta) | ||
// https://stackoverflow.com/a/71781246/4037224 | ||
const VNode = () => | ||
h("div", { | ||
class: "", | ||
innerHTML: currentPost.post.editorDom?.replaceAll('contenteditable="true"', 'contenteditable="false"') ?? "", | ||
}) | ||
import Detail from "~/components/default/Detail.vue" | ||
</script> | ||
|
||
<template> | ||
<div class="fn__flex-1 protyle" data-loading="finished"> | ||
<div class="protyle-content protyle-content--transition" data-fullwidth="true"> | ||
<div class="protyle-title protyle-wysiwyg--attr" style="margin: 16px 96px 0"> | ||
<div | ||
style="margin: 20px 0" | ||
contenteditable="false" | ||
data-position="center" | ||
spellcheck="false" | ||
class="protyle-title__input" | ||
data-render="true" | ||
> | ||
{{ currentPost.post.title }} | ||
</div> | ||
</div> | ||
<div | ||
class="protyle-wysiwyg protyle-wysiwyg--attr" | ||
spellcheck="false" | ||
contenteditable="false" | ||
data-doc-type="NodeDocument" | ||
> | ||
<VNode v-highlight /> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<detail :show-title-sign="false" /> | ||
</template> |
Oops, something went wrong.