Git Product home page Git Product logo

antora-ui's People

Contributors

alemorvan avatar bandantonio avatar brunchboy avatar countableset avatar cristatus avatar danyill avatar djencks avatar edward-encoord avatar eskwayrd avatar fviolette avatar gabeseltzer avatar ggrossetie avatar graphitefriction avatar hemangajmera avatar hsablonniere avatar konrumi avatar mojavelinux avatar pbokoc avatar pierrer avatar severeoverfl0w avatar sharom avatar snova-pavela avatar tgirard12 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

antora-ui's Issues

style monospace more distinctly

Someone noted that the monospace text is hard to differentiate on a page. Comparing it to some other styles like the one for k8s, I suspect it's because:

  • the font Antora uses is too similar to the variable width font
  • the background is too close in contrast

scrollbar color is weird sometimes

When you hover over the scrollbar there's weird background color. It's more noticeable in dark mode but even light mode looks a little off compared to other sites. It might be related to this change.
dark
Screen Shot 2022-05-03 at 10 46 23 PM
light
Screen Shot 2022-05-03 at 10 46 15 PM

duckduckgo example
Screen Shot 2022-05-03 at 10 46 52 PM

Review dark mode colors

I'm still not totally happy with it. I wonder if there's some tweaks we can do to it.

The contrast between the background, sidebar, header, and text color still 'feel' off.

Screenshot 2022-07-19 at 12-39-17 Hardware and Software Requirements Brand Docs

Switch back Highlightjs

Switch back to old version of highlightjs 9.18.3 from 11.3.1.

Currently the callout pool ball things aren't working correctly.
Example:
Screen Shot 2022-01-27 at 2 52 07 PM

Before html:
image
After html:
image (1)

Seems asciidoc inserts that <i class="conum" data-value="1">...</i> html into the source block. However, in the newer versions of highlighjs it escapes the html for security reasons, therefore, removing that style.

You can try and strip out the html and put it back in before highlight is called, however, it's a major pain

diff --git a/src/js/vendor/highlight.bundle.js b/src/js/vendor/highlight.bundle.js
index 1277756..78ee152 100644
--- a/src/js/vendor/highlight.bundle.js
+++ b/src/js/vendor/highlight.bundle.js
@@ -2,7 +2,39 @@
   'use strict'
 
   const hljs = require('highlight.js/lib/index')
+  const regex = /<i.*class="conum".*>.*<\/b>/
   ;[].slice.call(document.querySelectorAll('pre code.hljs')).forEach(function (node) {
-    hljs.highlightElement(node)
+    const lang = Array.from(node.classList.values()).find((item) => {
+      return item.includes('language-')
+    }).replace('language-', '')
+    let content = ''
+    node.innerHTML.split('\n').forEach(function (line) {
+      console.log(line)
+      const match = line.match(regex)
+      let replace = ''
+      if (match !== null) {
+        line = line.replace(match[0], '')
+        replace = match[0]
+      }
+      const result = hljs.highlight(line, { language: lang })
+      content += result.value + replace + '\n'
+    })
+    node.innerHTML = content
   })
 })()

Also looked into using the hljs.addPlugin({...}) methods, and seems the html escaping happens before those plugin callbacks, before:highlightElement and 'before:highlight'

content security policy errors

policy example:

default-src 'none'; script-src 'self'; connect-src 'self'; img-src 'self'; style-src 'self'; base-uri 'self'; form-action 'none'; frame-ancestors 'none'

errors:

Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). semantic-version.gradle.poolside.dev:10:1
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”). semantic-version.gradle.poolside.dev:11:1
Content Security Policy: The page’s settings blocked the loading of a resource at https://semantic-version.gradle.poolside.dev/_/font/fontawesome-webfont.eot?#iefix&v=4.7.0 (“default-src”). semantic-version.gradle.poolside.dev
Content Security Policy: The page’s settings blocked the loading of a resource at https://semantic-version.gradle.poolside.dev/_/font/fontawesome-webfont.woff2?v=4.7.0 (“default-src”). semantic-version.gradle.poolside.dev
Content Security Policy: The page’s settings blocked the loading of a resource at https://semantic-version.gradle.poolside.dev/_/font/fontawesome-webfont.woff?v=4.7.0 (“default-src”). semantic-version.gradle.poolside.dev
Content Security Policy: The page’s settings blocked the loading of a resource at https://semantic-version.gradle.poolside.dev/_/font/fontawesome-webfont.ttf?v=4.7.0 (“default-src”). semantic-version.gradle.poolside.dev
Content Security Policy: The page’s settings blocked the loading of a resource at https://semantic-version.gradle.poolside.dev/_/font/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular (“default-src”). semantic-version.gradle.poolside.dev

look into fixing some of these errors with csp if needed or come up with an alternative policy

references

to fix the font ones just add font-src 'self' to the policy 👍🏻

widen main content pane

We may consider widening the main content pane. Someone showed me Flux which fills a landscape screen. I'm not sure if there's a reason why the default Antora style leaves a gap on the right.

bold style not rendered

Looks like after the fix for #13, the bold face style is no longer being rendered correctly (Windows 10, Firefox 101.0.1). I discovered that removing both of the font-weight styles below appear to fix the issue. I'm not sure if this is the correct fix or not; just an experimental result.

b, dt, strong, th {
  font-weight: 500;
  font-weight: var(--body-font-weight-bold);
}

Current
image

Fixed
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.