From 5e9c3617cac1e3eac246e2ae7df6f4b71c33d37c Mon Sep 17 00:00:00 2001 From: Inverle Date: Thu, 4 Dec 2025 20:06:21 +0100 Subject: Improve layout of documentation page and add search feature (#8247) * Improve layout of documentation page and add search feature Closes https://github.com/FreshRSS/FreshRSS/issues/7915, https://github.com/FreshRSS/FreshRSS/issues/5325 Also: anchor headings and fix building site locally * Further improvements * Set color of hyperlinks * Consistent styling of close aside button across devices * Mobile layout 600px -> 1200px * Add suffix to docs `` * Note: titles of pages probably need to be improved, since currently they are just derived from the names of the first heading on every page * Add favicon * Improve font * Try to fix favicon not loading correctly on GH pages * Use local font * Attempt to fix GH pages * Final improvements * Copy to clipboard button * Support for nojs search * Dark mode * Load search.json (200KB json) only on search input focus * Keep scroll state of sidebar across navigations * Clickable images and CSP CSP so we avoid hotlinking resources and clickable images are useful for zooming on mobile for example * Fix typos * Disable Dark Reader extension if dark mode CSS is loaded * Support internationalisation (via language dropdown) * Add Gemfile.lock * Make CI build work with the custom plugin * Make menus closable with Esc * Fix typos CI * Suggestions * Use `ruby/setup-ruby` action in workflow for installing and caching gems. * Run build only when there are changes to `docs/` See: https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows?versionId=free-pro-team%40latest&productId=actions#running-your-workflow-only-when-a-push-to-specific-branches-occurs * Change font to `Open Sans` * Increase line height * Fix Liquid syntax error --- docs/assets/css/highlight.css | 282 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 docs/assets/css/highlight.css (limited to 'docs/assets/css/highlight.css') diff --git a/docs/assets/css/highlight.css b/docs/assets/css/highlight.css new file mode 100644 index 000000000..6b5c4b725 --- /dev/null +++ b/docs/assets/css/highlight.css @@ -0,0 +1,282 @@ +pre.highlight { + padding: 1rem; + overflow-x: scroll; +} + +/* generated with `rougify style github` */ +.highlight table td { padding: 5px; } + +.highlight table pre { margin: 0; } + +.highlight .cm { + color: #998; + font-style: italic; +} + +.highlight .cp { + color: #999; + font-weight: bold; +} + +.highlight .c1 { + color: #998; + font-style: italic; +} + +.highlight .cs { + color: #999; + font-weight: bold; + font-style: italic; +} + +.highlight .c, .highlight .ch, .highlight .cd, .highlight .cpf { + color: #998; + font-style: italic; +} + +.highlight .err { + color: #a61717; + background-color: #e3d2d2; +} + +.highlight .gd { + color: #000; + background-color: #fdd; +} + +.highlight .ge { + color: #000; + font-style: italic; +} + +.highlight .gr { + color: #a00; +} + +.highlight .gh { + color: #999; +} + +.highlight .gi { + color: #000; + background-color: #dfd; +} + +.highlight .go { + color: #888; +} + +.highlight .gp { + color: #555; +} + +.highlight .gs { + font-weight: bold; +} + +.highlight .gu { + color: #aaa; +} + +.highlight .gt { + color: #a00; +} + +.highlight .kc { + color: #000; + font-weight: bold; +} + +.highlight .kd { + color: #000; + font-weight: bold; +} + +.highlight .kn { + color: #000; + font-weight: bold; +} + +.highlight .kp { + color: #000; + font-weight: bold; +} + +.highlight .kr { + color: #000; + font-weight: bold; +} + +.highlight .kt { + color: #458; + font-weight: bold; +} + +.highlight .k, .highlight .kv { + color: #000; + font-weight: bold; +} + +.highlight .mf { + color: #099; +} + +.highlight .mh { + color: #099; +} + +.highlight .il { + color: #099; +} + +.highlight .mi { + color: #099; +} + +.highlight .mo { + color: #099; +} + +.highlight .m, .highlight .mb, .highlight .mx { + color: #099; +} + +.highlight .sa { + color: #000; + font-weight: bold; +} + +.highlight .sb { + color: #d14; +} + +.highlight .sc { + color: #d14; +} + +.highlight .sd { + color: #d14; +} + +.highlight .s2 { + color: #d14; +} + +.highlight .se { + color: #d14; +} + +.highlight .sh { + color: #d14; +} + +.highlight .si { + color: #d14; +} + +.highlight .sx { + color: #d14; +} + +.highlight .sr { + color: #009926; +} + +.highlight .s1 { + color: #d14; +} + +.highlight .ss { + color: #990073; +} + +.highlight .s, .highlight .dl { + color: #d14; +} + +.highlight .na { + color: #008080; +} + +.highlight .bp { + color: #999; +} + +.highlight .nb { + color: #0086b3; +} + +.highlight .nc { + color: #458; + font-weight: bold; +} + +.highlight .no { + color: #008080; +} + +.highlight .nd { + color: #3c5d5d; + font-weight: bold; +} + +.highlight .ni { + color: #800080; +} + +.highlight .ne { + color: #900; + font-weight: bold; +} + +.highlight .nf, .highlight .fm { + color: #900; + font-weight: bold; +} + +.highlight .nl { + color: #900; + font-weight: bold; +} + +.highlight .nn { + color: #555; +} + +.highlight .nt { + color: #000080; +} + +.highlight .vc { + color: #008080; +} + +.highlight .vg { + color: #008080; +} + +.highlight .vi { + color: #008080; +} + +.highlight .nv, .highlight .vm { + color: #008080; +} + +.highlight .ow { + color: #000; + font-weight: bold; +} + +.highlight .o { + color: #000; + font-weight: bold; +} + +.highlight .w { + color: #bbb; +} + +.highlight { + background-color: #f8f8f8; +} -- cgit v1.2.3