39 Commits

Author SHA1 Message Date
wdm-ih
1975b6e8ee update boostlook.css to new design system
remove high level styles

updated styles for common components; set basic layout margins;

antora and asciidoc templates desktop

antora and asciidoc mobile

commented unused legacy css variables

fixed styles for links in code blocks

Quickbook template adaptation

removed unused css vars

templates specific adjustments; syntax colors
2025-03-05 18:08:48 +02:00
Julio Estrada
db19639793 fix(css): ensure consistent toc behavior across breakpoints 2025-03-04 18:52:33 -05:00
Chrissy Wainwright
ee40a557f9 fix z-index on spirit nav #406
the spirit nav should be clickable when the h2 takes up the same space
2025-02-21 09:48:11 -06:00
Julio Estrada
fab289a8fb backup boostlook.css file 2025-02-19 12:37:26 -05:00
Chrissy Wainwright
ae8eff4cfa maintain root font size above 1024px 2025-02-17 09:34:07 -06:00
Chrissy Wainwright
6ac3315c1e revert vertical scrollbars to always display
* make wider
* keep rounded corners
2025-02-17 09:33:54 -06:00
Chrissy Wainwright
aaf7928ae1 550 weight for more #toc styles 2025-02-06 09:02:05 -06:00
Chrissy Wainwright
1996d2e5cd adjust TOC colors/bolding 2025-02-06 09:02:05 -06:00
Chrissy Wainwright
60ea4e15ea Scrollbar consistency
* unset scrollbar-color and scrollbar-width. This has an unintended
  effect of displaying the arrow buttons in Webkit on PC
* display scrollbars as very thin
* update all scrollbars in boostlook to behave the same way:
  thin and only show up on hover
2025-01-27 11:35:35 -06:00
Julio Estrada
1d8f100e27 add relative positioning to headings 2025-01-23 15:52:42 -05:00
Chrissy Wainwright
f2912dae60 Update how horizontal scrollbars work for code and tables
For consistency across browsers and systems, set the overflow-x to auto, but using colors that match the background of the code block or table, so the scrollbar isn’t initially visible. On hover, the colors will change to the defined scrollbar colors. Note they do still display differently depending on each user’s systems settings, based on if they use classic or overlay scrollbars
Also moved scrollbar-related code to that section of the CSS file
2025-01-23 11:28:40 -06:00
Chrissy Wainwright
edae038a12 Final round CSS refactor
* make sure comments at top match file and template structures
* move styling around to be in the correct sections, with other similar styles
2025-01-17 11:57:56 -06:00
Chrissy Wainwright
635523765b fixed toolbar for mobile 2025-01-10 17:12:00 -06:00
Chrissy Wainwright
4691e12a97 display spirit nav on .qbk docs
* fix placement so spirit nav is always in upper right
* hide footer spirit nav, since it wasn't visible before this change
2025-01-10 17:12:00 -06:00
Chrissy Wainwright
e4bbe2c988 CSS refactoring
* remove duplicate heading declaration
* move #libraryReadMe selectors to single section
* use numerical value for font-weight instead of 'normal'
* define --bl-secondary-color
* work on combining duplicated selectors
* move scrollbar styles to single section
* move spriti nav styles to single section
2025-01-10 16:57:21 -06:00
Julio Estrada
2d1ce0543b feat: enhance boostlook.css with structural updates, theming, and README styles
- correct font size and variable references
- add missing theme variables and improve typography
- add styles for Library README section
- improve structural and styling updates across components
2025-01-08 17:19:38 -05:00
Julio Estrada
8e0507c040 feat: add asciidoc live preview (#27)
- add live preview functionality for local doc development
- document setup prerequisites and usage in README
- include basic troubleshooting guide
- run pre-commit on all files
2024-12-24 18:12:55 -05:00
Julio Estrada
0d189f8dba refactor: enhance scrollbar UX and overflow handling
enhance scrollbar styles:
- hide scrollbars for iframes and apply custom scrollbar styles
- ensure nav/toc and content areas are scrollable with proper styling
- remove horizontal scrollbars in code blocks
- fix template-specific scroll styling and behavior
2024-12-21 09:49:59 -05:00
Chrissy Wainwright
8c8b17b371 further style fixes 2024-12-19 08:14:28 -06:00
Chrissy Wainwright
ac9339031c Bring styles over from boostbook; makes styling consistent across doc types 2024-12-19 08:14:28 -06:00
Chrissy Wainwright
898d3194db various adjustments for links, code, and headings
* remove border radius on code blocks
* update/fix hover styling for links - change color and underline
* bg color for code blocks
* reduce spacing on Antora TOC links
* reduce size of h1 and h2
* remove spacing between .qbk TOC sections
* spirit nav hover styles
2024-12-17 08:54:23 -06:00
Julio Estrada
f8c7e6c87c chore: update boostlook.css sync workflow, fix boostlook.rb syntax 2024-12-17 09:12:45 -05:00
Julio Estrada
608c10de80 Update font-weight for Noto Sans Display in boostlook.css 2024-12-13 17:35:47 -05:00
Chrissy Wainwright
35446e1a34 libraryReadMe style fixes for consistency
* margin beneath lists
* heading font sizes to match Antora
2024-12-13 09:05:41 -06:00
Julio C. Estrada
78a00e206d refactor: update boostlook.css library readme styles (#62) 2024-12-11 18:05:44 -05:00
Julio C. Estrada
62a0a7e179 hide scrollbars (#61) 2024-12-11 16:01:32 -05:00
Rob Beeston
3541dca9b5 Merge pull request #60 from cdw9/54_headings_toc 2024-12-10 15:26:55 -08:00
Chrissy Wainwright
4771a0aa9d heading and TOC styles for consistency
* adjust size and spacing for headings to match Antora
* TOC style adjustments - less bold headings
* code size and color within headings and TOC
2024-12-10 15:16:18 -06:00
Chrissy Wainwright
b3355ac246 Merge pull request #59 from cdw9/54_code
adjustments for code styles, table headers
2024-12-09 15:22:33 -06:00
Chrissy Wainwright
eada473564 code style adjustments 2024-12-09 15:21:14 -06:00
Chrissy Wainwright
57721be356 adjustments for code styles, table headers 2024-12-09 15:09:09 -06:00
Chrissy Wainwright
82821acb50 Merge pull request #57 from cdw9/1521_code_links
fix link colors
2024-12-05 16:01:39 -06:00
Chrissy Wainwright
0260bc0e6e lighter font weight for code 2024-12-05 15:29:45 -06:00
Chrissy Wainwright
8a925d39ad lighten font weight on code 2024-12-05 13:29:48 -06:00
Chrissy Wainwright
084de82b16 fix link colors
* set the global link hover color to the same value as --bl-primary-color
* fix link styles for links that are also code, so it is clear they are links
2024-12-05 12:51:13 -06:00
Chrissy Wainwright
ec5e02c410 Merge pull request #55 from cdw9/cdw9/54_qbk
styling fixes for quickbook docs
2024-12-03 19:01:52 -06:00
Chrissy Wainwright
de37aec7ab display qbk spirit-nav like antora 2024-12-03 17:09:33 -06:00
Chrissy Wainwright
36c49442a9 adjust alignment
* left align tables, toc, and notes
* move heading up to line up with nav icons
2024-12-03 14:41:58 -06:00
Chrissy Wainwright
d05b628e9e styling fixes for quickbook docs 2024-12-03 10:52:48 -06:00
10 changed files with 11516 additions and 550 deletions

1
.gitattributes vendored
View File

@@ -1,4 +1,3 @@
* text=auto
*.css text eol=lf

View File

@@ -53,7 +53,7 @@ jobs:
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add static/css/boostlook.css
if ! git diff-index --quiet HEAD; then
git commit -m "chore: Update boostlook.css from boostlook repository [skip ci]"
git commit -m "chore: Update boostlook.css from boostlook repository"
git push origin develop
else
echo "No changes to commit. Skipping commit to develop."

View File

@@ -15,3 +15,97 @@ html mp11.html : mp11.adoc
Noto font files are covered under the Open Font License:
https://fonts.google.com/noto/use
## Live Preview for AsciiDoc Documentation
BoostLook includes a **live preview** feature to streamline local development and review of AsciiDoc documentation. This allows for automatic rendering and real-time browser preview of changes made to [`specimen.adoc`](/doc/specimen.adoc) and [`boostlook.css`](/boostlook.css) files.
### Overview
The preview functionality is handled by a Ruby script ([`boostlook_preview.rb`](./boostlook_preview.rb)). This script monitors AsciiDoc, HTML, and CSS files for changes, automatically rebuilding and opening the rendered HTML in your default web browser.
---
### Prerequisites
Ensure the following dependencies are installed:
- **Ruby** (>= 2.7 recommended)
- **Asciidoctor** Install via `gem install asciidoctor`
- **Listen Gem** Install via `gem install listen`
- **Boost.Build (b2)** Required for builds invoked by the script. Ensure it is installed and available in your system's PATH.
---
### Usage and Detailed Steps
1. **Install Ruby and Required Gems**:
- Ensure Ruby is installed on your system. You can check by running:
```bash
ruby -v
```
If Ruby is not installed, follow the instructions on [ruby-lang.org](https://www.ruby-lang.org/en/documentation/installation/) to install it.
- Install Asciidoctor:
```bash
gem install asciidoctor
```
- Install the Listen gem:
```bash
gem install listen
```
2. **Install Boost.Build (b2)**:
- Follow the instructions on the [Boost.Build website](https://boostorg.github.io/build/) to install `b2`.
- Ensure `b2` is available in your system's PATH by running:
```bash
which b2
```
3. **Locate Specimen AsciiDoc File**:
- Place your AsciiDoc files in the `doc` directory. The default file is `doc/specimen.adoc`.
- The default file structure should include:
```
/boostlook
├── doc
│ └── specimen.adoc <--
│ └── ...
├── boostlook.css
└── boostlook_preview.rb
└── boostlook.rb
└── ...
```
4. **Navigate to the project directory**:
```bash
cd /path/to/boostlook
```
5. **Run the preview script**:
- Ensure you're in the root folder
```bash
ruby boostlook_preview.rb
```
6. **Edit and Preview**:
- Edit your AsciiDoc (specimen.adoc) or CSS (boostlook.css) files.
- The script will automatically detect changes and rebuild the documentation.
- Refresh the browser to see changes.
7. **Refresh Your Browser** to view changes.
---
### Troubleshooting
- **Script Not Running**:
- Ensure all prerequisites are installed correctly.
- Check for any error messages in the terminal and resolve them accordingly.
- **Changes Not Reflecting**:
- Ensure the files being edited are within the monitored directories (`doc` and root directory).
- Verify that the browser is refreshing automatically or manually refresh the browser.
- **Boost.Build (b2) Not Found**:
- Ensure `b2` is installed and available in your system's PATH.
- Run `which b2` to verify its availability.

File diff suppressed because it is too large Load Diff

View File

@@ -39,7 +39,7 @@ Asciidoctor::Extensions.register do
isPinned = !isPinned;
localStorage.setItem('tocPinned', isPinned);
html.classList.toggle('toc-pinned', isPinned);
updateTocVisibility(isPinned); state
updateTocVisibility(isPinned);
});
tocButton.addEventListener("mouseenter", () => {

1981
boostlook_old.css Normal file

File diff suppressed because it is too large Load Diff

163
boostlook_preview.rb Executable file
View File

@@ -0,0 +1,163 @@
#!/usr/bin/env ruby
require 'asciidoctor'
require 'listen'
require 'pathname'
require 'logger'
# AsciidocRenderer handles building AsciiDoc files, monitoring changes, and rendering the output in a browser.
class AsciidocRenderer
# Define our relevant constant paths
PATHS = {
jamfile: 'doc/Jamfile',
specimen_docinfo_footer: 'doc/specimen-docinfo-footer.html',
specimen_adoc: 'doc/specimen.adoc',
css: 'boostlook.css',
boostlook_rb: 'boostlook.rb',
output_dir: 'doc/html'
}.freeze
# OS-specific commands to open the default web browser
OS_BROWSER_COMMANDS = {
/darwin/ => 'open', # macOS
/linux/ => 'xdg-open', # Linux
/mingw|mswin/ => 'start' # Windows
}.freeze
def initialize
# Initialize the logger
@logger = Logger.new($stdout)
@logger.level = Logger::INFO
@logger.formatter = ->(_, _, _, msg) { "#{msg}\n" }
@file_opened = false # Flag to prevent multiple browser openings
@shutdown_requested = false # Flag to handle graceful shutdown
validate_b2 # Ensure Boost.Build is installed
end
# Entry point to run the renderer
def run
validate_files # Check for the presence of required files
initial_build # Perform the initial build and render
setup_signal_traps # Setup signal handlers for graceful shutdown
watch_files # Start watching for file changes
end
private
# Validates that all required files are present
def validate_files
required_files = [PATHS[:jamfile], PATHS[:specimen_docinfo_footer], PATHS[:specimen_adoc], PATHS[:css], PATHS[:boostlook_rb]]
missing_files = required_files.reject { |file| File.exist?(file) }
unless missing_files.empty?
missing_files.each { |file| @logger.error("Required file #{file} not found") }
exit 1
end
end
# Checks if the 'b2' command (Boost.Build) is available
def validate_b2
unless system('which b2 > /dev/null 2>&1')
@logger.error("'b2' command not found. Please install Boost.Build and ensure it's in your PATH.")
exit 1
end
end
# Builds the AsciiDoc project using Boost.Build
def build_asciidoc
Dir.chdir('doc') do
if system('b2')
@logger.info("Build successful")
true
else
@logger.error("Build failed")
false
end
end
end
# Opens the generated HTML file in the default web browser
def open_in_browser
return if @file_opened
cmd = OS_BROWSER_COMMANDS.find { |platform, _| RUBY_PLATFORM =~ platform }&.last
if cmd
system("#{cmd} #{PATHS[:output_dir]}/specimen.html")
@file_opened = true
else
@logger.warn("Unsupported OS. Please open #{PATHS[:output_dir]}/specimen.html manually")
end
end
# Performs the initial build and opens the result in the browser
def initial_build
if build_asciidoc && File.exist?("#{PATHS[:output_dir]}/specimen.html")
open_in_browser
@logger.info("Rendered #{PATHS[:specimen_adoc]} to #{PATHS[:output_dir]}/specimen.html")
else
@logger.error("Failed to generate #{PATHS[:output_dir]}/specimen.html")
end
end
# Sets up file listeners to watch for changes and trigger rebuilds
def watch_files
@listener = Listen.to('doc', '.') do |modified, added, removed|
handle_file_changes(modified, added, removed)
end
@listener.ignore(/doc\/html/) # Ignore changes in the output directory
@listener.start
@logger.info("Watching for changes in 'doc' and root directories (excluding 'doc/html')...")
# Keep the script running until a shutdown is requested
until @shutdown_requested
sleep 1
end
shutdown # Perform shutdown procedures
end
# Handles detected file changes by determining if a rebuild is necessary
def handle_file_changes(modified, added, removed)
@logger.debug("Modified files: #{modified.join(', ')}")
@logger.debug("Added files: #{added.join(', ')}") if added.any?
@logger.debug("Removed files: #{removed.join(', ')}") if removed.any?
relevant_files = [
File.expand_path(PATHS[:jamfile]),
File.expand_path(PATHS[:specimen_docinfo_footer]),
File.expand_path(PATHS[:specimen_adoc]),
File.expand_path(PATHS[:css]),
File.expand_path(PATHS[:boostlook_rb])
]
# Check if any of the changed files are relevant for rebuilding
changes_relevant = (modified + added + removed).any? do |file|
relevant_files.include?(File.expand_path(file))
end
if changes_relevant
@logger.info("Relevant changes detected, rebuilding...")
if build_asciidoc && File.exist?("#{PATHS[:output_dir]}/specimen.html")
open_in_browser
@logger.info("Re-rendered successfully")
end
end
end
# Sets up signal traps to handle graceful shutdown on interrupt or terminate signals
def setup_signal_traps
Signal.trap("INT") { @shutdown_requested = true }
Signal.trap("TERM") { @shutdown_requested = true }
end
# Performs shutdown procedures, such as stopping the file listener
def shutdown
@logger.info("Shutting down...")
@listener.stop if @listener
exit
end
end
# Instantiate and run the AsciidocRenderer
AsciidocRenderer.new.run

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
<style>
*:not(pre)>code { background: none; color: #600000; }
:not(pre):not([class^=L])>code { background: none; color: #600000; }
*:not(pre)>code { background: none; }
:not(pre):not([class^=L])>code { background: none; }
</style>

View File

@@ -438,7 +438,7 @@ See <<chars_format overview>> for description.
[#integral_usage_notes_]
* All built-in integral types are allowed except bool which is deleted
* from_chars for integral type is constexpr (BOOST_CHARCONV_CONSTEXPR is defined) when:
** compiled using `-std=c++14` or newer
** compiled using `-std=c++14` or newer
** using a compiler with `\__builtin_ is_constant_evaluated`
* These functions have been tested to support `\__int128` and `unsigned __int128`
@@ -993,4 +993,3 @@ This documentation is copyright 2022-2023 Peter Dimov and Matt Borland and is di
the http://www.boost.org/LICENSE_1_0.txt[Boost Software License, Version 1.0].
:leveloffset: -1