From 1daa5afe394d56aa89a5d495fd913fd7796729a6 Mon Sep 17 00:00:00 2001 From: "xiaoqi.cxq" Date: Thu, 6 Apr 2023 14:00:15 +0800 Subject: [PATCH] update styles --- .../styledHtmlWithThemeAndTocTemplate.html | 14 ++++++++++++-- .../templates/styledHtmlWithThemeTemplate.html | 14 ++++++++++++-- src/services/exportSvc.js | 2 ++ static/landing/share.html | 3 ++- static/themes/preview-theme-caoyuangreen.js | 2 +- static/themes/preview-theme-jikebrack.js | 1 + static/themes/preview-theme-simplebrack.js | 1 + 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/src/data/templates/styledHtmlWithThemeAndTocTemplate.html b/src/data/templates/styledHtmlWithThemeAndTocTemplate.html index 46fc205e..1ccb208b 100644 --- a/src/data/templates/styledHtmlWithThemeAndTocTemplate.html +++ b/src/data/templates/styledHtmlWithThemeAndTocTemplate.html @@ -7,6 +7,16 @@ {{files.0.name}} @@ -14,7 +24,7 @@ {{#if pdf}} {{else}} - + {{/if}}
@@ -23,7 +33,7 @@
-
+
{{{files.0.content.html}}}
diff --git a/src/data/templates/styledHtmlWithThemeTemplate.html b/src/data/templates/styledHtmlWithThemeTemplate.html index 00ecd7f4..78ede0c8 100644 --- a/src/data/templates/styledHtmlWithThemeTemplate.html +++ b/src/data/templates/styledHtmlWithThemeTemplate.html @@ -7,6 +7,16 @@ {{files.0.name}} @@ -14,10 +24,10 @@ {{#if pdf}} {{else}} - + {{/if}}
-
+
{{{files.0.content.html}}}
diff --git a/src/services/exportSvc.js b/src/services/exportSvc.js index 8c553fae..800fc6cd 100644 --- a/src/services/exportSvc.js +++ b/src/services/exportSvc.js @@ -73,6 +73,7 @@ export default { const parsingCtx = markdownConversionSvc.parseSections(converter, content.text); const conversionCtx = markdownConversionSvc.convert(parsingCtx); const html = conversionCtx.htmlSectionList.map(htmlSanitizer.sanitizeHtml).join(''); + const colorThemeClass = `app--${store.getters['data/computedSettings'].colorTheme}`; const themeClass = `preview-theme--${store.state.theme.currPreviewTheme}`; let themeStyleContent = ''; const themeStyleEle = document.getElementById(`preview-theme-${store.state.theme.currPreviewTheme}`); @@ -134,6 +135,7 @@ export default { yamlProperties: content.properties, html: containerElt.innerHTML, toc, + colorThemeClass, themeClass, themeStyleContent, }, diff --git a/static/landing/share.html b/static/landing/share.html index 3f5c85e6..e9b2dd53 100644 --- a/static/landing/share.html +++ b/static/landing/share.html @@ -61,7 +61,7 @@ } .share-content { - margin-top: 60px; + padding-top: 50px; }