Skip to content

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snowcap

Early stage markup for iced using pest

Note

Currently under heavy development, and will change frequently.

There is a viewer application in the snowcap-viewer repository.

Here's an example of how the test.iced file renders.

Screenshot 2024-09-27 at 7 56 55 PM

Grammar

The grammar is specified in snowcap.pest and an example layout is in test.iced.

Iced Element Snowcap Syntax
Container {<attr:val,...> ...}
Row -<attr:val,...>[ element, ...]
Column |<attr:val,...>[ element, ...]
Stack ^<attr:val,...>[ element, ...]
Rule (horiz) rule-horizontal<height:2>()
Rule (vert) rule-vertical<width:2>()
Text text<attr:val,...>("Content")
Button button<attr:val,...>(element)
Toggler toggler<attr:val,...>(element)
QRCode qrcode<cell-size:10>(qr!("https://iced.rs"))
Markdown markdown(file!("README.md"))
Image image(file!("samples/ferris.png"))
Svg svg(file!("samples/coder.svg"))

For example, creating a container with a column would look like

{<width:fill, align-x:center>
	|<align:center>[
		text<size:19>("Hello"),
		text<size:24>("Snowcap")
	]
}
Screenshot 2024-09-25 at 8 36 26 PM

About

Simple markup language for iced

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages