countableset / antora-ui Goto Github PK
View Code? Open in Web Editor NEWFork of default antora ui.
Home Page: https://countableset.github.io/antora-ui/
License: Mozilla Public License 2.0
Fork of default antora ui.
Home Page: https://countableset.github.io/antora-ui/
License: Mozilla Public License 2.0
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:
looks like since release, https://github.com/countableSet/antora-ui/releases/tag/b3452341869, dark mode has been broken, but not in the preview builds...which is odd
looks like the line that broke it is
8faf0b4#diff-42e7f2e9997218fb76432a126d95e1b9ab1a2b0d7fcb96b80b0a745919679306R49
postcssVar({ preserve: preview }),
where before it was always set to true... which was set via 001090e to help preserve dark mode 🙃
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
light
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:
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'
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 👍🏻
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.
Nice, no more dependency on supplemental ui via https://gitlab.com/antora/antora-lunr-extension/-/commit/2521a335800edafb7f44160400aa6777df46cf4d
Looks like the search box might not be using the correct css?
Just review what's going on and make sure stuff is working ok.
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);
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.