Lorem
ipsum dolor sit amet, consectetur adipiscing elit. Sed sed vehicula ipsum, ut malesuada neque. Morbi mollis mi a commodo imperdiet. Donec pellentesque sed tellus eget consectetur. Nam ullamcorper ligula sit amet ligula pretium, nec fermentum nibh
pretium. In malesuada metus id egestas ultricies. Proin lacinia diam non quam lacinia mollis. Sed condimentum pharetra facilisis.nibh
pretium. Aenean feugiat euismod congue. Fusce viverra erat et sodales finibus. Integer porttitor neque vel nunc lobortis semper.nibh
pretium. Aenean feugiat euismod congue. Fusce viverra erat et sodales finibus. Integer porttitor neque vel nunc lobortis semper.-- record person: name: caption location: string bio: optional body -- person amitu: Amit Upadhyay location: Bangalore, India Amit is the founder and CEO of FifthTry. He loves to code, and is pursuing his childhood goal of becoming a professional starer of the trees. -- person list employees: -- employees: Ganesh Salunke location: Mumbai, India Ganesh loves to UI. -- employees: Arpita Jaiswal location: Lucknow, India
A normal paragraph, called as markdown.
Nam ullamcorper ligula sit amet ligula pretium, nec fermentum nibh
pretium. Aenean feugiat euismod congue. Fusce viverra erat et sodales finibus. Integer porttitor neque vel nunc lobortis semper.
#[derive(serde::Deserialize)] struct Employee { name: String, location: String, bio: Option<String> } let doc = ftd::p2::Document::from("some/id", source, lib)?; let amitu: Employee = doc.get("amitu")?; let employees: Vec<Employee> = doc.get("employees")?;
-- string msg: hello world -- ftd.text: $msg
This is a ftd file that defines a variable msg
and uses it to shows
“hello world” in the UI using ftd.text
“component”.
Nam ullamcorper ligula sit amet ligula pretium, nec fermentum nibh
pretium. Aenean feugiat euismod congue. Fusce viverra erat et sodales finibus. Integer porttitor neque vel nunc lobortis semper.
Let’s see a slightly more complex layout:
-- ftd.column: border-width: 1 width: fill id: outer -- ftd.row: width: fill background-color: $ft.neutral-200 padding: 10 -- ftd.text: $msg width: fill -- ftd.row: -- ftd.text: $msg width: fill -- container: outer -- ftd.row: padding: 10 border-top: 1 width: fill align: center -- ftd.text: width: fill We support **markdown** as well.
Most websites you come across can be created using this (or will be in the future). We have a DSL that picks elements from CSS, after simplifying things a little bit.
As a goal we want ftd
files to be renderable in the browser, as well as in other
modes, like in Terminal using curses UI, natively on Mobile devices, Emacs,
rendering from scratch using just C/assembly for low-powered devices and so on.