Prechádzať zdrojové kódy

fix(mobile): katex render

charlie 4 mesiacov pred
rodič
commit
edbd03f321

+ 2 - 0
gulpfile.js

@@ -115,6 +115,8 @@ const common = {
         'node_modules/katex/dist/fonts/*.woff2',
         'node_modules/katex/dist/fonts/*.woff2',
       ]).pipe(gulp.dest(path.join(outputPath, 'css', 'fonts'))),
       ]).pipe(gulp.dest(path.join(outputPath, 'css', 'fonts'))),
       () => gulp.src([
       () => gulp.src([
+        'node_modules/katex/dist/katex.min.js',
+        'node_modules/katex/dist/contrib/mhchem.min.js',
         'node_modules/marked/marked.min.js',
         'node_modules/marked/marked.min.js',
         'node_modules/@highlightjs/cdn-assets/highlight.min.js',
         'node_modules/@highlightjs/cdn-assets/highlight.min.js',
         'node_modules/@isomorphic-git/lightning-fs/dist/lightning-fs.min.js',
         'node_modules/@isomorphic-git/lightning-fs/dist/lightning-fs.min.js',

+ 10 - 0
src/main/capacitor/components/app.css

@@ -146,6 +146,16 @@ ion-content {
   }
   }
 }
 }
 
 
+.latex.initial {
+  @apply pt-1;
+
+  .katex-html {
+    &[aria-hidden="true"] {
+      @apply hidden;
+    }
+  }
+}
+
 [type='text']:focus, [type='email']:focus, [type='url']:focus,
 [type='text']:focus, [type='email']:focus, [type='url']:focus,
 [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus,
 [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus,
 [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus,
 [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus,

+ 1 - 1
src/main/frontend/config.cljs

@@ -106,7 +106,7 @@
     publishing?
     publishing?
     path
     path
 
 
-    (util/file-protocol?)
+    (or (util/file-protocol?) (util/capacitor-new?))
     (string/replace path "/static/" "./")
     (string/replace path "/static/" "./")
 
 
     :else
     :else