💄 (fonts) add fonts
This commit is contained in:
@@ -44,7 +44,7 @@ const close = async () => {
|
||||
bottom: 0;
|
||||
margin: 1rem;
|
||||
padding: 0.5rem;
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
color: var(--primary-color);
|
||||
border: var(--primary-color) 2px solid;
|
||||
border-radius: 4px;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<script lang="ts" setup>
|
||||
|
||||
const GITHUB_URL = 'https://github.com/login/oauth/authorize'
|
||||
|
||||
const CLIENT_ID = 'Iv1.12dc43d013ce3623'
|
||||
|
||||
@@ -12,33 +12,39 @@ export const useImages = (sha: string) => {
|
||||
() => store.files.find((file) => file.sha === sha)?.path
|
||||
)
|
||||
|
||||
watch(currentFilePath, (filePath) => {
|
||||
if (!filePath) {
|
||||
return
|
||||
}
|
||||
|
||||
const images = document.querySelectorAll(`.note-${sha} img`)
|
||||
|
||||
images.forEach(async (image) => {
|
||||
const src = image.getAttribute('src')
|
||||
if (!src || src.startsWith(SRC_PREFIX)) {
|
||||
watch(
|
||||
currentFilePath,
|
||||
(filePath) => {
|
||||
if (!filePath) {
|
||||
return
|
||||
}
|
||||
|
||||
const imageFilePath = resolvePath(
|
||||
filePath,
|
||||
image.getAttribute('src') ?? ''
|
||||
)
|
||||
const images = document.querySelectorAll(`.note-${sha} img`)
|
||||
|
||||
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) {
|
||||
return
|
||||
}
|
||||
const { getCachedFileContent } = useFile(imageFile.sha, false)
|
||||
const imageFilePath = resolvePath(
|
||||
filePath,
|
||||
image.getAttribute('src') ?? ''
|
||||
)
|
||||
|
||||
const fileContent = await getCachedFileContent()
|
||||
image.setAttribute('src', `${SRC_PREFIX} ${fileContent}`)
|
||||
})
|
||||
})
|
||||
const imageFile = store.files.find(
|
||||
(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";
|
||||
@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;
|
||||
|
||||
Reference in New Issue
Block a user