feat: update style

This commit is contained in:
purocean
2022-05-08 14:42:46 +08:00
parent f0bd31e08a
commit 4810fa5970
2 changed files with 11 additions and 2 deletions
+8 -2
View File
@@ -352,7 +352,12 @@ async function fetchContent (type: 'readme' | 'changelog', extension: Extension)
return r.text()
})
contentMap.value[type][extension.id] = markdownIt.render(markdown)
contentMap.value[type][extension.id] = `
<link rel="stylesheet" href="${location.origin}/github.css">
<div style="padding: 12px" class="markdown-body">
${markdownIt.render(markdown)}
</div>
`
} catch (error: any) {
logger.error('fetchContent', error)
if (type === 'readme') {
@@ -458,7 +463,6 @@ function iframeOnload (e: any) {
win.document.body.innerHTML = ''
win.document.body.appendChild(article)
win.document.body.style.padding = '12px'
win.document.documentElement.style.background = 'transparent'
}
iframeLoaded.value = true
@@ -749,6 +753,8 @@ onUnmounted(() => {
.content-wrapper {
position: relative;
height: 100%;
background: #fff;
.tabs {
position: absolute;
right: 0;
+3
View File
@@ -52,6 +52,9 @@ export default defineConfig({
'/extension': {
target: 'http://localhost:3044'
},
'/github.css': {
target: 'http://localhost:3044'
},
'/api': {
target: 'http://localhost:3044'
},