fix meta, show welcome message

main
koehr 5 months ago committed by Norman Köhring
parent b6535f4a01
commit 30fd8ce3fe

@ -12,14 +12,14 @@ export default defineConfigWithTheme<ThemeConfig>({
['link', { rel: 'alternate', href: 'https://koehr.in' }],
['link', { rel: 'alternate', href: 'https://koehr.ing' }],
['link', { rel: 'canonical', href: 'https://koehr.ing' }],
['meta', { content: "The personal page and weblog of Norman Köhring" name: "description" }],
['meta', { content: "Norman Köhring" name: "author" }],
['meta', { content: "the codeartist — programmer and engineer based in Berlin" name: "DC.title" }],
['meta', { content: "52.4595, 13.5335" name: "ICBM" }],
['meta', { content: "52.4595; 13.5335" name: "geo.position" }],
['meta', { content: "DE-BE" name: "geo.region" }],
['meta', { content: "Berlin" name: "geo.placename" }],
['meta', { content: "width=device-width,initial-scale=1.0" name: "viewport" }],
['meta', { content: "The personal page and weblog of Norman Köhring", name: "description" }],
['meta', { content: "Norman Köhring", name: "author" }],
['meta', { content: "the codeartist — programmer and engineer based in Berlin", name: "DC.title" }],
['meta', { content: "52.4595, 13.5335", name: "ICBM" }],
['meta', { content: "52.4595; 13.5335", name: "geo.position" }],
['meta', { content: "DE-BE", name: "geo.region" }],
['meta', { content: "Berlin", name: "geo.plac,ename" }],
['meta', { content: "width=device-width,initial-scale=1.0", name: "viewport" }],
],
themeConfig: {
commands: [{
@ -36,7 +36,7 @@ export default defineConfigWithTheme<ThemeConfig>({
}]
}, {
command: 'contact',
aliases: ['email'],
aliases: ['email', 'homepage', 'www'],
help: 'How to contact Norman Köhring?',
message: [
'# other servers',

@ -29,9 +29,12 @@ onMounted(() => {
return
}
const { addText, clear, footerLinks } = useTerminal(textArea.value, commands.value)
clear()
addText('Hello World!')
const { addText, addLine, clear, footerLinks } = useTerminal(textArea.value, commands.value)
watch(frontmatter, () => {
addText(title.value + '\n', false)
addLine(content.value.join('\n'))
}, { immediate: true })
watch(footerLinks, () => {
footer.value = footerLinks.value

@ -20,8 +20,8 @@ export default function useTerminal(inputEl: HTMLTextAreaElement, commands: Simp
inputEl.focus()
}
function addText(text: string) {
const line = text + prompt
function addText(text: string, addPrompt=true) {
const line = addPrompt ? text + prompt : text
inputEl.value = inputEl.value + line
inputEl.scrollTop = inputEl.scrollTopMax
}
@ -31,6 +31,7 @@ export default function useTerminal(inputEl: HTMLTextAreaElement, commands: Simp
}
function clear() {
footerLinks.value = []
inputEl.value = ''
addText('')
}

Loading…
Cancel
Save