render

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package render provides interfaces and utilities for rendering OKR documents to various output formats including Marp slides.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Theme name (renderer-specific, e.g., "default", "corporate", "minimal")
	Theme string

	// IncludeRisks includes risks slides
	IncludeRisks bool

	// IncludeStatus shows status indicators and colors
	IncludeStatus bool

	// ShowScoreGrades shows letter grades for scores (A, B, C, etc.)
	ShowScoreGrades bool

	// ShowProgressBars shows visual progress bars
	ShowProgressBars bool

	// MaxObjectives limits objectives shown (0 = all)
	MaxObjectives int

	// MaxKeyResults limits key results per objective (0 = all)
	MaxKeyResults int

	// Custom CSS (for Marp/HTML renderers)
	CustomCSS string

	// Additional metadata (renderer-specific)
	Metadata map[string]string
}

Options contains rendering options common to all renderers.

func DefaultOptions

func DefaultOptions() *Options

DefaultOptions returns sensible default rendering options.

func ExecutiveOptions

func ExecutiveOptions() *Options

ExecutiveOptions returns options for executive-focused slides (fewer details).

type Renderer

type Renderer interface {
	// Format returns the output format name (e.g., "marp").
	Format() string
	// FileExtension returns the file extension for this format (e.g., ".md").
	FileExtension() string
	// Render converts an OKR document to the output format.
	Render(doc *okr.OKRDocument, opts *Options) ([]byte, error)
}

Renderer defines the interface for output format renderers.

Directories

Path Synopsis
Package marp provides a Marp markdown renderer for OKR documents.
Package marp provides a Marp markdown renderer for OKR documents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL