acederberg.io
  • Home
  • Projects
    • Projects
    • Blog
    • Nvim Configuration
    • Blog and Demo Automation
    • Captura
  • Resume
  • Posts
  • Kaggle
  • Leetcode
  1. Projects
  2. Blog
  3. Components and Filters
  4. Overlay
  5. Docs: Javascript
  • Projects
    • Blog
      • About the Blog
      • Subprojects
        • Resume
        • Building A Custom Iconset for Kubernetes
        • Leetcode Problems
      • Technical Details
        • Blog ReadMe
        • Docker and Quarto
        • How is the Blog Deployed?
        • Static Quarto Websites in Kubernetes
      • Components and Filters
        • IFrames
          • Demo
          • Docs: Pandoc Filter
        • Overlay
          • Demo
          • Docs: Pandoc Filter
          • Docs: Javascript
        • Floaty
          • Demo: Overview
          • Demo: Skills
          • Demo: Contacts
          • Demo: Links
          • Demo: Under Construction
          • Docs: Pandoc Filter
          • Docs: Javascript
        • Resume
          • Demo
          • Docs: Pandoc Filter
    • Nvim Configuration
      • Nvim Configuration
      • Gallery
    • Blog and Demo Automation
      • Automation
      • Github Actions in Automation
    • Captura
      • What is Captura?
      • Things I Plan to Build Using Captura

On this page

  • Interfaces
    • TColorize
    • TColorizeOptions
    • TColorizeState
    • THideOverlayContentItemsOptions
    • THideOverlayOptions
    • TOverlay
    • TOverlayState
    • TShowOverlayContentItemOptions
  • Type Aliases
    • TAddContent()
    • TColorizeSetter()
    • THideOverlay()
    • THideOverlayContentItems()
    • TNextOverlayContentItem()
    • TRestoreOverlay()
    • TShowOverlay()
    • TShowOverlayContentItem()
    • TUpdateElement()
  • Variables
    • OverlayInstances
  • Functions
    • Colorize()
    • Overlay()
  1. Projects
  2. Blog
  3. Components and Filters
  4. Overlay
  5. Docs: Javascript

Overlay

Author

Adrian Cederberg

Note

Documentation generated by typedoc on Thu Feb 20 2025 16:25:49 GMT+0000 (Coordinated Universal Time) with typedoc-plugin-markdown (and then rendered by quarto).

blog


Interfaces

TColorize

Defined in: overlay.js:127

Properties

down()
down: () => void;

Defined in: overlay.js:133

Remove previous classes.

Returns

void

initialize()
initialize: () => void;

Defined in: overlay.js:132

Returns

void

mouseOut()
mouseOut: (event) => void;

Defined in: overlay.js:137

Parameters
event

Event

Returns

void

mouseOver()
mouseOver: (event) => void;

Defined in: overlay.js:138

Parameters
event

Event

Returns

void

restart()
restart: (options) => void;

Defined in: overlay.js:131

Start again with provided options.

Parameters
options

Partial<TColorizeOptions>

Returns

void

revert()
revert: () => void;

Defined in: overlay.js:135

Returns

void

setColor
setColor: TColorizeSetter;

Defined in: overlay.js:129

Update background and border classes for a new color.

setColorText
setColorText: TColorizeSetter;

Defined in: overlay.js:128

Update text classes for a new color.

setColorTextHover
setColorTextHover: TColorizeSetter;

Defined in: overlay.js:130

Update the color of text when hovered.

state
state: TColorizeState;

Defined in: overlay.js:139

up()
up: () => void;

Defined in: overlay.js:134

Add current classes.

Returns

void

updateElem
updateElem: TUpdateElement;

Defined in: overlay.js:136


TColorizeOptions

Defined in: overlay.js:110

Properties

color
color: null | string;

Defined in: overlay.js:111

colorText
colorText: null | string;

Defined in: overlay.js:112

colorTextHover
colorTextHover: null | string;

Defined in: overlay.js:113


TColorizeState

Defined in: overlay.js:93

Properties

classBackground
classBackground: null | string;

Defined in: overlay.js:100

classBackgroundPrev
classBackgroundPrev: null | string;

Defined in: overlay.js:101

classBorder
classBorder: null | string;

Defined in: overlay.js:102

classBorderPrev
classBorderPrev: null | string;

Defined in: overlay.js:103

classText
classText: null | string;

Defined in: overlay.js:104

classTextHover
classTextHover: null | string;

Defined in: overlay.js:106

classTextHoverPrev
classTextHoverPrev: null | string;

Defined in: overlay.js:107

classTextPrev
classTextPrev: null | string;

Defined in: overlay.js:105

color
color: null | string;

Defined in: overlay.js:94

colorPrev
colorPrev: null | string;

Defined in: overlay.js:95

colorText
colorText: null | string;

Defined in: overlay.js:96

colorTextHover
colorTextHover: null | string;

Defined in: overlay.js:98

colorTextHoverPrev
colorTextHoverPrev: null | string;

Defined in: overlay.js:99

colorTextPrev
colorTextPrev: null | string;

Defined in: overlay.js:97


THideOverlayContentItemsOptions

Defined in: overlay.js:51

Properties

keepLocalStorage?
optional keepLocalStorage: boolean;

Defined in: overlay.js:52


THideOverlayOptions

Defined in: overlay.js:65

Properties

isNotAnimated?
optional isNotAnimated: boolean;

Defined in: overlay.js:66

keepLocalStorage?
optional keepLocalStorage: boolean;

Defined in: overlay.js:67


TOverlay

Defined in: overlay.js:15

Properties

addContent
addContent: TAddContent;

Defined in: overlay.js:26

Add a page to the overlay.

colorize()
colorize: (colorize) => void;

Defined in: overlay.js:30

Parameters
colorize

Partial<TColorizeOptions>

Returns

void

colorizeContentItem()
colorizeContentItem: (contentItem) => void;

Defined in: overlay.js:29

Parameters
contentItem

HTMLElement

Returns

void

controls
controls: HTMLElement;

Defined in: overlay.js:19

elem
elem: HTMLElement;

Defined in: overlay.js:16

Outmost overlay element.

hideOverlay
hideOverlay: THideOverlay;

Defined in: overlay.js:22

Hide the overlay, its content, and all of the content items.

hideOverlayContentItems
hideOverlayContentItems: THideOverlayContentItems;

Defined in: overlay.js:23

Hide all overlay content items.

indicesToKeys
indicesToKeys: Map<number, string>;

Defined in: overlay.js:21

keysToIndices
keysToIndices: Map<string, number>;

Defined in: overlay.js:20

nextOverlayContentItem
nextOverlayContentItem: TNextOverlayContentItem;

Defined in: overlay.js:28

Show overlay content items.

overlayContent
overlayContent: Element;

Defined in: overlay.js:17

Overlay content element, should contain content items and navbar.

overlayContentItems
overlayContentItems: Element;

Defined in: overlay.js:18

Container for content.

restoreOverlay
restoreOverlay: TRestoreOverlay;

Defined in: overlay.js:27

When the page has been refreshed, use session storage to show the overlay again.

showOverlay
showOverlay: TShowOverlay;

Defined in: overlay.js:24

Show the overlay (but not a content item).

showOverlayContentItem
showOverlayContentItem: TShowOverlayContentItem;

Defined in: overlay.js:25

Show a content item by key.

state
state: TOverlayState;

Defined in: overlay.js:31


TOverlayState

Defined in: overlay.js:83

Properties

colorize
colorize: null | TColorize;

Defined in: overlay.js:88

currentIndex
currentIndex: null | number;

Defined in: overlay.js:85

The current index of the item displayed in the overlay.

currentKey
currentKey: null | string;

Defined in: overlay.js:86

The current key of the item display in the overlay.

length
length: number;

Defined in: overlay.js:84

The total number of content items.

overlayIsOpen
overlayIsOpen: null | boolean;

Defined in: overlay.js:87

Is the overlay open or not.


TShowOverlayContentItemOptions

Defined in: overlay.js:40

Properties

animationToRight?
optional animationToRight: boolean;

Defined in: overlay.js:43

isAnimated?
optional isAnimated: boolean;

Defined in: overlay.js:42

keepLocalStorage?
optional keepLocalStorage: boolean;

Defined in: overlay.js:41

Type Aliases

TAddContent()

type TAddContent<> = (elem) => void;

Defined in: overlay.js:55

Type Parameters

Parameters

elem

HTMLElement

Element to add to overlay.

Returns

void


TColorizeSetter()

type TColorizeSetter<> = (color) => any;

Defined in: overlay.js:116

Type Parameters

Parameters

color

string

Returns

any


THideOverlay()

type THideOverlay<> = (options?) => void;

Defined in: overlay.js:60

Type Parameters

Parameters

options?

Partial<THideOverlayOptions>

Returns

void


THideOverlayContentItems()

type THideOverlayContentItems<> = (options?) => void;

Defined in: overlay.js:46

Type Parameters

Parameters

options?

Partial<THideOverlayContentItemsOptions>

Returns

void


TNextOverlayContentItem()

type TNextOverlayContentItem<> = (incr) => void;

Defined in: overlay.js:78

Type Parameters

Parameters

incr

number

Number of pages to move over.

Returns

void


TRestoreOverlay()

type TRestoreOverlay<> = () => void;

Defined in: overlay.js:70

Type Parameters

Returns

void


TShowOverlay()

type TShowOverlay<> = () => void;

Defined in: overlay.js:74

Type Parameters

Returns

void


TShowOverlayContentItem()

type TShowOverlayContentItem<> = (key, options?) => HTMLElement | null;

Defined in: overlay.js:34

Type Parameters

Parameters

key

string

data-key for the content item.

options?

Partial<TShowOverlayContentItemOptions>

Returns

HTMLElement | null


TUpdateElement()

type TUpdateElement<> = (elem, mkClasses) => any;

Defined in: overlay.js:122

Type Parameters

Parameters

elem

HTMLElement

mkClasses

(color) => string[]

Returns

any

Variables

OverlayInstances

const OverlayInstances: Map<string, TOverlay>;

Defined in: overlay.js:5

Functions

Colorize()

function Colorize(overlay, options): TColorize;

Defined in: overlay.js:152

Tool for setting overlay color. This should be simplified later using scss.

Parameters

overlay

TOverlay

Overlay instance on which colorization will take effect.

options

Partial<TColorizeOptions>

Options for colorize.

Returns

TColorize


Overlay()

function Overlay(overlay, options): TOverlay;

Defined in: overlay.js:313

Parameters

overlay

HTMLElement

options
colorizeOptions

Partial<TColorizeOptions>

Returns

TOverlay

Docs: Pandoc Filter
Demo: Overview