💄 (fonts) add fonts
This commit is contained in:
@@ -44,7 +44,7 @@ const close = async () => {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
margin: 1rem;
|
margin: 1rem;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
width: 200px;
|
width: 220px;
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
border: var(--primary-color) 2px solid;
|
border: var(--primary-color) 2px solid;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
|
||||||
const GITHUB_URL = 'https://github.com/login/oauth/authorize'
|
const GITHUB_URL = 'https://github.com/login/oauth/authorize'
|
||||||
|
|
||||||
const CLIENT_ID = 'Iv1.12dc43d013ce3623'
|
const CLIENT_ID = 'Iv1.12dc43d013ce3623'
|
||||||
|
|||||||
@@ -12,33 +12,39 @@ export const useImages = (sha: string) => {
|
|||||||
() => store.files.find((file) => file.sha === sha)?.path
|
() => store.files.find((file) => file.sha === sha)?.path
|
||||||
)
|
)
|
||||||
|
|
||||||
watch(currentFilePath, (filePath) => {
|
watch(
|
||||||
if (!filePath) {
|
currentFilePath,
|
||||||
return
|
(filePath) => {
|
||||||
}
|
if (!filePath) {
|
||||||
|
|
||||||
const images = document.querySelectorAll(`.note-${sha} img`)
|
|
||||||
|
|
||||||
images.forEach(async (image) => {
|
|
||||||
const src = image.getAttribute('src')
|
|
||||||
if (!src || src.startsWith(SRC_PREFIX)) {
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const imageFilePath = resolvePath(
|
const images = document.querySelectorAll(`.note-${sha} img`)
|
||||||
filePath,
|
|
||||||
image.getAttribute('src') ?? ''
|
|
||||||
)
|
|
||||||
|
|
||||||
const imageFile = store.files.find((file) => file.path === imageFilePath)
|
images.forEach(async (image) => {
|
||||||
|
const src = image.getAttribute('src')
|
||||||
|
if (!src || src.startsWith(SRC_PREFIX)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (!imageFile?.sha) {
|
const imageFilePath = resolvePath(
|
||||||
return
|
filePath,
|
||||||
}
|
image.getAttribute('src') ?? ''
|
||||||
const { getCachedFileContent } = useFile(imageFile.sha, false)
|
)
|
||||||
|
|
||||||
const fileContent = await getCachedFileContent()
|
const imageFile = store.files.find(
|
||||||
image.setAttribute('src', `${SRC_PREFIX} ${fileContent}`)
|
(file) => file.path === imageFilePath
|
||||||
})
|
)
|
||||||
})
|
|
||||||
|
if (!imageFile?.sha) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const { getCachedFileContent } = useFile(imageFile.sha, false)
|
||||||
|
|
||||||
|
const fileContent = await getCachedFileContent()
|
||||||
|
image.setAttribute('src', `${SRC_PREFIX} ${fileContent}`)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@charset "utf-8";
|
@charset "utf-8";
|
||||||
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&family=Courgette&family=IBM+Plex+Serif&family=Kiwi+Maru&family=Maven+Pro&family=Noto+Sans+KR&family=Tajawal&family=Domine&family=Amiri&display=swap');
|
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime&family=Courgette&family=IBM+Plex+Serif&family=Kiwi+Maru&family=Maven+Pro&family=Noto+Sans+KR&family=Tajawal&family=Domine&family=Amiri&display=swap&family=Montagu+Slab&family=Gowun+Batang&family=Cormorant+Garamond&family=forum');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
font-family: 'Courgette', cursive;
|
font-family: 'Courgette', cursive;
|
||||||
|
|||||||
Reference in New Issue
Block a user