Commit Graph
7 Commits
Author SHA1 Message Date
kodor 967e7e1111 docs: regenerate roxygen documentation for paper_bg and force params (#19)
R-CMD-check / R CMD check (pull_request) Successful in 4m29s
2026-08-01 21:44:50 -04:00
jared 95b8ba1da4 fix: revert font_size default to 14pt, keep DPI fix
R-CMD-check / R CMD check (push) Successful in 3m37s
2026-05-19 15:11:27 -06:00
jared f134621df5 fix: bump base font_size to 16pt and drop fig.retina for readable README
R-CMD-check / R CMD check (push) Successful in 3m33s
The old fig.retina=2 at 150 DPI rendered PNGs at 2x resolution that
GitHub markdown can't use, making text appear half its intended size.
Switching to 96 DPI without retina produces images at their natural
display size. Combined with the base font bump (14 → 16pt), titles
and labels now render with proper editorial presence.
2026-05-19 14:40:48 -06:00
jared 31d3e2886d feat: bump title sizes, add font_scale to logo functions, ship SVGs
R-CMD-check / R CMD check (push) Successful in 3m36s
- Change rel_large default from 16/14 to 20/14 (~1.43x) to match the
  Civilytics editorial design system. Subtitle now renders at 1.0x base
  instead of 0.86x.
- Switch axis.text to rel() sizing so all text elements cascade from the
  root font_size, enabling uniform scaling.
- Add font_scale parameter (default 1.1) to civilytics_logo(),
  add_logo(), and add_logo_ga() — inflates text by ~10% before
  arrangeGrob composition to compensate for viewport shrinkage.
- Ship SVG logo variants (mark, wordmark, pulse) in inst/img/ for
  Quarto/HTML templates.
- Add "Maintaining brand assets" section to README documenting inst/img/
  file inventory and update workflow.
- Document full font size hierarchy in theme_civilytics() roxygen.
2026-05-19 12:51:23 -06:00
jared 515bae8685 feat: expand color system to 53 colors/10 palettes, add grid/slide themes, and README gallery
R-CMD-check / R CMD check (push) Successful in 3m41s
Replace the 16-color / 3-palette system with the full Civilytics design
system: 53 named colors (full navy, ember, violet ramps plus teal, plum,
moss, brass supporting hues) and 10 visualization palettes (qual,
qual_warm, qual_cool, seq_ember, seq_navy, seq_violet, seq_paper_ink,
div_navy_ember, div_violet_ember).

Enrich theme_civilytics() with grid and paper_bg parameters, add
theme_civilytics_slide() for presentations, and load all four brand fonts
(Inter, Libre Franklin, Source Serif 4, JetBrains Mono).

Add README.Rmd with rendered gallery showing all palettes, theme
variants, grid options, dark/slide modes, facets, and scale usage.
2026-05-19 10:35:32 -06:00
jared 7371069379 feat: rebrand logos with wordmark/mark variants and pipe-friendly API
R-CMD-check / R CMD check (push) Successful in 2m39s
- Replace old civilytics_logo.png/white.png/jpg/pdf with new rebrand
  assets: civilytics-wordmark.png, civilytics-wordmark-reverse.png,
  civilytics-mark.png, civilytics-mark-reverse.png (all transparent bg)
- make_logo_grob() now accepts type = c("wordmark", "mark") alongside
  variant = c("light", "dark") for 4 combinations
- New civilytics_logo() pipe-friendly convenience function:
    ggplot(df, aes(x, y)) + geom_point() + theme_civilytics() |>
      civilytics_logo()
  R's |> has lower precedence than +, so the full ggplot chain pipes
  through without parentheses
- Remove old icon/favicon assets no longer used
- Wrap showtext-dependent examples in \dontrun{} to prevent R CMD check
  failures in headless PostScript environments
2026-05-17 22:42:40 -06:00
jared c93c469267 feat: add brand color system, showtext fonts, and dark theme
R-CMD-check / R CMD check (push) Failing after 1m39s
- R/colors.R: civilytics_colors named vector (from --cv-* CSS vars on
  civilytics.com), three palettes (main/sequential/diverging),
  scale_color_civilytics() and scale_fill_civilytics() for ggplot2
- R/fonts.R: auto-loads Inter + Libre Franklin from Google Fonts via
  showtext in .onLoad(); exports civilytics_load_fonts() for manual retry
- R/theme.R: wires ggplot2 4.0 ink/paper/accent params into theme_grey()
  base, adds title_family + strip_color params; new theme_civilytics_dark()
  using navy_dark background and warm off-white text
- R/logo.R: make_logo_grob(variant) accepts "light"/"dark" to select the
  white logo for dark-background compositions
- DESCRIPTION: adds showtext, sysfonts; pins ggplot2 >= 4.0.0
- tests/testthat/test_theme.R: full test suite for colors, palettes,
  scales, both theme variants, and logo grob variants
2026-05-17 10:36:59 -06:00