ChWebsiteApp/CHDataManagement/Generator/ShorthandMarkdownKey.swift
2025-01-06 01:17:06 +01:00

71 lines
1.8 KiB
Swift

import Foundation
/**
A string key used in markdown to indicate special elements
*/
enum ShorthandMarkdownKey: String {
/// An image
/// Format: `![image](<imageId>;<caption?>]`
case image
/// Labels with an icon and a value
/// Format: `![labels](<icon=value>...)`
case labels
/// A video
/// Format: `![video](<fileId>;<option1...>]`
case video
/**
A variable number of buttons for file downloads, external links or other uses
Format: `![buttons](type=<specification>;...)`
Types:
- Download: `download=<fileId>,<text>,<download-filename?>`
- External link: `external=<url>,<text>`
- Git: `git=<url>,<text>`
- Play: `play-circle=<text>,<click-action>`
*/
case buttons
/// A box with a title and content
/// Format: `![box](<title>;<body>)`
case box
/// A 3D model to display
/// Format: `![model](<file>;<description>)`
case model
/// A pretty link to another page on the site.
/// Format: `![page](<pageId>)`
case pageLink = "page"
/// A pretty link to a tag list on the site.
/// Format: `![tag](<tagId>)`
case tagLink = "tag"
/// Additional HTML code included verbatim into the page.
/// Format: `![html](<fileId>)`
case includedHtml = "html"
/// SVG Image showing only a part of the image
/// Format `![svg](<fileId>;<<x>;<y>;<width>;<height>>?)`
case svg
/// A player to play audio files
/// Format: `![audio-player](<fileId>;<text>)`
case audioPlayer = "audio-player"
/// Add svg icons to the page for use in html components
/// Format: `![icons](icon-id;...)`
case icons
/**
Create an image comparison with a slider.
Format: `![compare](image1;image2)`
*/
case imageCompare = "compare"
}