diff --git a/fastn-core/src/apis/cache.rs b/fastn-core/src/apis/cache.rs index 360259628f..14c3b78134 100644 --- a/fastn-core/src/apis/cache.rs +++ b/fastn-core/src/apis/cache.rs @@ -102,12 +102,8 @@ pub async fn clear_( for package in query.package.iter() { if package.eq("main") { // TODO: List directories and files other than main - fastn_core::utils::remove_except( - &config.ds.root(), - &[".packages", ".build"], - &config.ds, - ) - .await?; + fastn_core::utils::remove_except(&config.ds.root(), &[".fastn", ".build"], &config.ds) + .await?; } else { let path = config.packages_root.join(package); if path diff --git a/fastn-core/src/commands/serve.rs b/fastn-core/src/commands/serve.rs index a865e2fe27..ce1b6145c7 100644 --- a/fastn-core/src/commands/serve.rs +++ b/fastn-core/src/commands/serve.rs @@ -439,12 +439,12 @@ async fn handle_static_route( } // the path can start with slash or -/. If later, it is a static file from our dependencies, so - // we have to look for them inside .packages. + // we have to look for them inside .fastn/package-cache. let path = match path.strip_prefix("/-/") { Some(path) if path.starts_with(package_name) => { path.strip_prefix(package_name).unwrap_or(path).to_string() } - Some(path) => format!(".packages/{path}"), + Some(path) => format!(".fastn/package-cache/{path}"), None => path.to_string(), }; diff --git a/fastn-core/src/config/mod.rs b/fastn-core/src/config/mod.rs index b4cb3a7005..64c81288be 100644 --- a/fastn-core/src/config/mod.rs +++ b/fastn-core/src/config/mod.rs @@ -603,7 +603,7 @@ impl Config { ) -> fastn_core::Result> { let mut ignored_files = vec![ ".history".to_string(), - ".packages".to_string(), + ".fastn/package-cache".to_string(), ".tracks".to_string(), "fastn".to_string(), "rust-toolchain".to_string(), @@ -731,7 +731,7 @@ impl Config { id = new_id.to_string(); } if !package.name.eq(self.package.name.as_str()) { - add_packages = format!(".packages/{}/", package.name); + add_packages = format!(".fastn/package-cache/{}/", package.name); } } let id = { @@ -776,7 +776,7 @@ impl Config { id = new_id.to_string(); } if !package.name.eq(self.package.name.as_str()) { - add_packages = format!(".packages/{}/", package.name); + add_packages = format!(".fastn/package-cache/{}/", package.name); } } let id = { @@ -860,20 +860,24 @@ impl Config { ) .await { - let base = root.join(".packages").join(package.name.as_str()); + let base = root + .join(".fastn/package-cache") + .join(package.name.as_str()); ds.write_content(&base.join("index.ftd"), string.into_bytes()) .await?; - return Ok(format!(".packages/{}/index.ftd", package.name)); + return Ok(format!(".fastn/package-cache/{}/index.ftd", package.name)); } if let Ok(string) = crate::http::http_get_str( format!("{}/README.md", base.trim_end_matches('/')).as_str(), ) .await { - let base = root.join(".packages").join(package.name.as_str()); + let base = root + .join(".fastn/package-cache") + .join(package.name.as_str()); ds.write_content(&base.join("README.md"), string.into_bytes()) .await?; - return Ok(format!(".packages/{}/README.md", package.name)); + return Ok(format!(".fastn/package-cache/{}/README.md", package.name)); } return Err(fastn_core::Error::UsageError { message: "File not found".to_string(), @@ -889,9 +893,11 @@ impl Config { Some((prefix, id)) => (format!("/{}", prefix), id.to_string()), None => ("".to_string(), id), }; - let base = root - .join(".packages") - .join(format!("{}{}", package.name.as_str(), prefix)); + let base = root.join(".fastn/package-cache").join(format!( + "{}{}", + package.name.as_str(), + prefix + )); let file_path = base.join(format!("{}.ftd", id)); ds.write_content(&file_path, string.into_bytes()).await?; return Ok(file_path.to_string()); @@ -901,7 +907,10 @@ impl Config { ) .await { - let base = root.join(".packages").join(package.name.as_str()).join(id); + let base = root + .join(".fastn/package-cache") + .join(package.name.as_str()) + .join(id); let file_path = base.join("index.ftd"); ds.write_content(&file_path, string.into_bytes()).await?; return Ok(file_path.to_string()); @@ -910,20 +919,27 @@ impl Config { crate::http::http_get_str(format!("{}/{}.md", base.trim_end_matches('/'), id).as_str()) .await { - let base = root.join(".packages").join(package.name.as_str()); + let base = root + .join(".fastn/package-cache") + .join(package.name.as_str()); ds.write_content(&base.join(format!("{}.md", id)), string.into_bytes()) .await?; - return Ok(format!(".packages/{}/{}.md", package.name, id)); + return Ok(format!(".fastn/package-cache/{}/{}.md", package.name, id)); } if let Ok(string) = crate::http::http_get_str( format!("{}/{}/README.md", base.trim_end_matches('/'), id).as_str(), ) .await { - let base = root.join(".packages").join(package.name.as_str()); + let base = root + .join(".fastn/package-cache") + .join(package.name.as_str()); ds.write_content(&base.join(format!("{}/README.md", id)), string.into_bytes()) .await?; - return Ok(format!(".packages/{}/{}/README.md", package.name, id)); + return Ok(format!( + ".fastn/package-cache/{}/{}/README.md", + package.name, id + )); } Err(fastn_core::Error::UsageError { message: "File not found".to_string(), @@ -939,7 +955,7 @@ impl Config { let mut add_packages = "".to_string(); if let Some(new_id) = id.strip_prefix("-/") { id = new_id.to_string(); - add_packages = ".packages/".to_string() + add_packages = ".fastn/package-cache/".to_string() } let mut id = id .split_once("-/") @@ -1103,7 +1119,7 @@ impl Config { let fastn_doc = utils::fastn_doc(&ds, &fastn_ds::Path::new("FASTN.ftd")).await?; let config_temp = config_temp::ConfigTemp::read(&ds).await?; let mut package = fastn_core::Package::from_fastn_doc(&ds, &fastn_doc)?; - let package_root = ds.root().join(".packages"); + let package_root = ds.root().join(".fastn/package-cache"); let all_packages = { let mut all_packages = std::collections::BTreeMap::new(); all_packages.insert(package.name.to_string(), package.to_owned()); diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/FASTN.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/FASTN.ftd new file mode 100644 index 0000000000..ad21ddb375 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/FASTN.ftd @@ -0,0 +1,16 @@ +-- import: fastn + +-- fastn.package: ftd-lang.github.io/fastn-ui +zip: https://codeload.github.com/fastn-stack/fastn-ui/zip/refs/heads/main + +-- fastn.dependency: fastn-community.github.io/roboto-mono + + + + + + + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/arrow-right.png b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/arrow-right.png new file mode 100644 index 0000000000..606fd1c48d Binary files /dev/null and b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/arrow-right.png differ diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/code.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/code.ftd new file mode 100644 index 0000000000..6c1f7a54cb --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/code.ftd @@ -0,0 +1,8 @@ +-- ftd.code code-page: +caption file-name: +optional body content: +string lang: +lang: $lang +if: $content is not null + +$content diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/create-cr.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/create-cr.ftd new file mode 100644 index 0000000000..31bbb11120 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/create-cr.ftd @@ -0,0 +1,37 @@ +-- import: fastn + +-- optional string title: +$always-include$: true + + +-- object create-cr-obj: +function: http +method: post +url: -/create-cr/ +title: $title + + + +-- ftd.column create-cr: +spacing: 40 +padding: 40 + +--- ftd.input: +width: fill +placeholder: CR title +$on-input$: $title=$VALUE +padding-horizontal: 10 +padding-vertical: $fastn.space.space-2 +background-color: $fastn.color.main.background.step-1 +color: $fastn.color.main.text-strong +border-width: 0 +cursor: text + +--- ftd.text: Create CR +padding: 10 +border-radius: 8 +color: $fastn.color.main.cta-secondary.text +background-color: $fastn.color.main.cta-secondary.base +$on-click$: message-host $create-cr-obj + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/cross.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/cross.svg new file mode 100644 index 0000000000..97f5a58cb8 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/cross.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete-icon.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete-icon.svg new file mode 100644 index 0000000000..03a532296e --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete.png b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete.png new file mode 100644 index 0000000000..9e2f98e0ef Binary files /dev/null and b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/delete.png differ diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop-active.svg new file mode 100644 index 0000000000..997bc056f2 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop.svg new file mode 100644 index 0000000000..e9bac96fe0 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/desktop.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/downarrow.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/downarrow.svg new file mode 100644 index 0000000000..fb29f79475 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/downarrow.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-active.svg new file mode 100644 index 0000000000..ac98fd7d12 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-default.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-default.svg new file mode 100644 index 0000000000..85bdb3cedb --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/e-default.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon-default.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon-default.svg new file mode 100644 index 0000000000..293970eaf9 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon-default.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon.svg new file mode 100644 index 0000000000..bb0d35f945 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit.svg new file mode 100644 index 0000000000..6f03f71f9a --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor-icon.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor-icon.svg new file mode 100644 index 0000000000..bd78c99744 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor-icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor.ftd new file mode 100644 index 0000000000..5b8be9c9c6 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/editor.ftd @@ -0,0 +1,3220 @@ +-- import: fastn + +-- import: fastn-community.github.io/roboto-mono/assets as mono + +-- boolean show-cr-ui: false + +-- boolean show-create-new-folder: false + +-- boolean show-create-new-file: false + +-- boolean toc-show: true + +-- boolean sitemap-show: false + +-- boolean show-modification: false + +-- boolean show-conflict: false + +-- boolean dialog-open: false + +-- boolean show-server-actions: false + +-- boolean show-datas: false + +-- boolean $is-mobile: false + +-- boolean show-rename: false + +-- boolean show-guide: false + +-- boolean show-overlay: false + +-- boolean show-delete-dialog: false + +-- boolean show-diff: false + +-- boolean show-action-on-status: true + +-- boolean show-revert: true + +-- fastn.toc-item list fs: +$processor$: package-tree + +-- optional string source: +$always-include$: true + +-- optional string path: +$always-include$: true + +-- string url: -/edit/ +$always-include$: true + +-- object edit-obj: +function: http +method: post +url: $url +value: $source +path: $path + +-- optional string diff: +$always-include$: true + +-- fastn.toc-item list sample-toc: +$processor$: toc + +-level: +-level: +- level: + - item-one: / + - item-two: / + - level-one: / + - item-one: / + - item-two: / + - item-three: / + - item-four: / +- level: + - item-one: / + - item-two: / + - level-one: + - item-one: / + - level-two: + - item-one: / + - item-two: / + - item-three: / + - item-four: / +- level: + - item-one: / + - item-two: / + - level-one: + - item-one: / + - item-two: / + - item-three: / + - item-four: / + +-- fastn.toc-item list sample-list: +$processor$: toc + +- Home: + url: https://fastn.dev/ + - Features: + url: https://fastn.dev/about/ + - Package Manager: + url: https://fastn.dev/package-manager/ + - Remixing Sites: + url: https://fastn.dev/remixing/ + - Open Source: + url: https://fastn.dev/open-source/ + - Why Not To Use `fastn`?: + url: https://fastn.dev/why-not/ + - Open Source: + url: https://fastn.dev/open-source/ + - Known Issues: + url: https://fastn.dev/known-issues/ +- Author Manual: + url: https://fastn.dev/author/ + - Create new fastn project: + url: https://fastn.dev/author/create-project/ + - Create new fastn project on github: + url: https://fastn.dev/author/create-on-github/ + - How to install fastn on local machine: + url: https://fastn.dev/how-to/install/ + - Build fastn project locally: + url: https://fastn.dev/author/build-project/ + - Featured Components: + url: https://fastn.dev/featured/ + - How To: + url: https://fastn.dev/how-to/ + - Install `fastn`: + url: https://fastn.dev/how-to/install/ + - Update `fastn`: + url: https://fastn.dev/how-to/update/ + - Get started with Github pages: + url: https://fastn.dev/how-to/get-started-github-pages/ + - Get started with Vercel: + url: https://fastn.dev/how-to/get-started-vercel/ + - `fastn` Usage: + url: https://fastn.dev/usage/ + - `fastn start-project`: + url: https://fastn.dev/start-project/ + - `fastn build`: + url: https://fastn.dev/build/ + - `fastn sync`: + url: https://fastn.dev/sync/ + - `fastn status`: + url: https://fastn.dev/status/ + - `fastn diff`: + url: https://fastn.dev/diff/ + - `fastn update`: + url: https://fastn.dev/update/ + - `fastn serve`: + url: https://fastn.dev/serve/ +- Themes Guide: + url: https://fastn.dev/themes/ + - About Themes: + url: https://fastn.dev/themes/ + - Package Interface: + url: https://fastn.dev/package-interface/ + - Theme Config: + url: https://fastn.dev/theme/config/ + - Responsive Themes: + url: https://fastn.dev/theme/responsive/ + - Dark Mode: + url: https://fastn.dev/theme/dark-mode/ + - Components: + url: https://fastn.dev/theme/header/ + - Dark Mode: + url: https://fastn.dev/theme/header/ + - FASTN Variables: + url: https://fastn.devvars/ + - FASTN Typography: + url: https://fastn.dev/theme/type/ + - FASTN Color: + url: https://fastn.dev/theme/color/ + - FASTN Space: + url: https://fastn.dev/theme/space/ + - How to use Google Font: + url: https://fastn.dev/theme/google-font-how-to-use/ + - FASTN Sitemap: + url: https://fastn.dev/sitemap/ + - FTD Host Features: + url: https://fastn.dev/ftd-host/ + - `$processor$: + url: https://fastn.dev/http/ + - `$processor$: + url: https://fastn.dev /toc/ + - `$processor$: + url: https://fastn.dev/package-query/ + - `$processor$: + url: https://fastn.dev/processors/get-data/ + - `$processor$: + url: https://fastn.dev/processors/sitemap/ + - `import: + url: https://fastn.dev/fastn-vars/ + - Foreign Variables: + url: https://fastn.dev/theme/foreign-variables/ + +- Development: + url: https://fastn.dev/journal/ + - Overview: + url: https://fastn.dev/journal/ + - Roadmap: + url: https://fastn.dev/roadmap/ + - Journal: + url: https://fastn.dev/journal/ + - Contribution Guide: + url: https://fastn.dev/contribute/ + - How Versioning Works: + url: https://fastn.dev/versioning/ + - What is `fastn`.manifest.ftd`?: + url: https://fastn.dev/fastn-manifest/ + - File System Organization: + url: https://fastn.dev/fs/ + - `fastn`.ftd`: + url: https://fastn.dev/fastn-ftd-file/ + - Day To Day: + url: https://fastn.dev + - How To Run Tests: + url: https://fastn.dev/day-to-day/how-to-run-tests/ + - How To Update Failing Snapshot Tests: + url: https://fastn.dev/day-to-day/how-to-fix-tests/ + - Sitemap: + - `serve`: + url: https://fastn.dev/sitemap/serve/ + - `static`: + url: https://fastn.dev/sitemap/static/ + - `favicon.ico`: + url: https://fastn.dev/sitemap/favicon/ + - `sync` API: + url: https://fastn.dev/sitemap/sync/ + - Using `fastn` Crate: + url: https://fastn.dev/crate/ + - Overview: + url: https://fastn.dev/crate/ + - `fastn::Config`: + url: https://fastn.dev/crate/config/ + - `fastn::Document`: + url: https://fastn.dev/crate/document/ + -`fastn::Error`: + url: https://fastn.dev/crate/error/ + -`fastn::File`: + url: https://fastn.dev/crate/file/ + -`fastn::Font`: + url: https://fastn.dev/crate/font/ + -`fastn::Package`: + url: https://fastn.dev/crate/package/ + -`fastn::render`: + url: https://fastn.dev/crate/render/ + -`fastn::Result`: + url: https://fastn.dev/crate/result/ + -`fastn::StaticFile`: + url: https://fastn.dev/crate/static-file/ + -Private Stuff: + -`fastn::utils`: + url: https://fastn.dev/crate/utils/ + - Dependencies: + - `ftd`: + url: https://fastn.dev/crate/deps/ftd/ + - `fbt-lib`: + url: https://fastn.dev/crate/deps/fbt-lib/ + - `camino`: + url: https://fastn.dev/crate/deps/camino/ + - `infer`: + url: https://fastn.dev/crate/deps/infer/ + +-- $is-mobile: true +if: { ftd.device == mobile } + +-- ftd.image-src downarrow: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/downarrow.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/downarrow.svg + +-- ftd.image-src close: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/cross.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/cross.svg + +-- ftd.image-src edit: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit.svg + +-- ftd.image-src e-active: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/e-active.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/e-active.svg + +-- ftd.image-src m-active: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/m-active.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/m-active.svg + +-- ftd.image-src edit-default: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit-icon-default.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit-icon-default.svg + +-- ftd.image-src file: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/file.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/file.svg + +-- ftd.image-src refresh: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/refresh.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/refresh.svg + +-- ftd.image-src mobile-active: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile-active.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile-active.svg + +-- ftd.image-src mobile: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile.svg + +-- ftd.image-src file-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/new-file-icon.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/new-file-icon.svg + +-- ftd.image-src folder-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/folder-icon.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/folder-icon.svg + +-- ftd.image-src right-arrow: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/right-arrow.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/right-arrow.svg + +-- ftd.image-src rename-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit-icon.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/edit-icon.svg + +-- ftd.image-src server-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/server.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/server.svg + +-- ftd.image-src local-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/local.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/local.svg + +-- ftd.image-src pull-request-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/git-pull-request.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/git-pull-request.svg + +-- ftd.image-src delete-icon: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/delete-icon.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/delete-icon.svg + +-- ftd.image-src arrow-right: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/arrow-right.png +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/arrow-right.png + +-- ftd.image-src desktop: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/desktop.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/desktop.svg + +-- ftd.image-src desktop-active: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/desktop-active.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/desktop-active.svg + +-- ftd.image-src mobile-frame: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile-frame.png +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/mobile-frame.png + +-- ftd.image-src sync-img: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/sync.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/sync.svg + +-- ftd.image-src showbar: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/showbar.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/showbar.svg + +-- ftd.image-src m-default: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/m-default.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/m-default.svg + +-- ftd.image-src e-default: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/e-default.svg +dark: https://fifthtry.github.io/fastn-ui/-/fifthtry.github.io/fastn-ui/e-default.svg + + + + + +-- ftd.font-size fine-print-desktop: +line-height: 16 +size: 12 +letter-spacing: 0 + +-- ftd.type fine-print: $fastn.font-display +desktop: $fine-print-desktop +mobile: $fine-print-desktop +xl: $fine-print-desktop +weight: 400 + +-- ftd.font-size copy-print-medium-desktop: +line-height: 24 +size: 16 +letter-spacing: 0 + +-- ftd.type copy-print-medium: $fastn.font-display +desktop: $copy-print-medium-desktop +mobile: $copy-print-medium-desktop +xl: $copy-print-medium-desktop +weight: 600 + +-- ftd.font-size editor-font: +line-height: 16 +size: 13 +letter-spacing: 0 + +-- ftd.type monospace: $mono.fonts.Mono +desktop: $editor-font +mobile: $editor-font +xl: $editor-font +weight: 400 + +-- ftd.font-size small-desktop: +line-height: 14 +size: 12 +letter-spacing: 0 + +-- ftd.type small-font: $fastn.font-display +desktop: $small-desktop +mobile: $small-desktop +xl: $small-desktop +weight: 400 + +-- ftd.font-size fine-print-bold-desktop: +line-height: 18 +size: 14 +letter-spacing: 0 + +-- ftd.type fine-print-bold: $fastn.font-display +desktop: $fine-print-bold-desktop +mobile: $fine-print-bold-desktop +xl: $fine-print-bold-desktop +weight: 700 + +-- ftd.font-size tiny-font: +line-height: 16 +size: 13 +letter-spacing: 0 + +-- ftd.type tiny: $fastn.font-display +desktop: $tiny-font +mobile: $tiny-font +xl: $tiny-font +weight: 300 + +-- ftd.font-size copy-print-bold-desktop: +line-height: 16 +size: 20 +letter-spacing: 0 + +-- ftd.type copy-print-bold: $fastn.font-display +desktop: $copy-print-bold-desktop +mobile: $copy-print-bold-desktop +xl: $copy-print-bold-desktop +weight: 700 + +-- ftd.font-size dialog-title-bold: +line-height: 20 +size: 14 +letter-spacing: 0 + +-- ftd.type dialog-title: $fastn.font-display +desktop: $dialog-title-bold +mobile: $dialog-title-bold +xl: $dialog-title-bold +weight: 600 + + + + + + + + + + +-- ftd.column editor: +width: fill + +--- editor-main: + +--- print-toc: +if: $toc-show +toc: $fs + +--- print-sitemap-toc: +if: $sitemap-show +sample-list: $sample-list + + + + + + + + + + + +-- ftd.row editor-main: +boolean open: false +boolean show-desktop: false +boolean show-mobile: false +boolean show-fullscreen: false +boolean edits: true +background-color: $inherited.colors.main.background.step-2 +color: $inherited.colors.main.text-strong +width: fill +height: fill +open: true +append-at: toc-id + +--- display-rename: +if: $show-rename + +--- container: ftd.main + +--- delete-confimation: +if: $show-delete-dialog + +--- container: ftd.main + +--- new-file: +if: $show-create-new-file + +--- container: ftd.main + +--- folder: +if: $show-create-new-folder + +--- container: ftd.main + + +--- overlay: +if: $show-overlay + +--- container: ftd.main + +--- ftd.row: +if: not $is-mobile +width: fill +height: fill +id: mobile-side + +--- ftd.column: +width: percent 0 +width if not $open: percent 25 +min-width if not $open: 300 + +--- ftd.column: +width if not $open: percent 25 +min-width if not $open: 300 +id: desktop-container +overflow-x: auto +height: calc 100vh +anchor: window +left: 0 +left if $open: -700 +top: 0 +background-color: $inherited.colors.main.background.base + +--- ftd.row: +background-color: $grey-dark +padding-vertical: $fastn.space.space-3 +padding-horizontal: $fastn.space.space-3 +width: fill +$on-mouse-enter$: $show-server-actions = true +$on-mouse-leave$: $show-server-actions = false + +--- ftd.text: $fastn.package-name +role: $copy-print-bold +color: $inherited.colors.main.text-strong +width: fill + +--- ftd.row: +if: $show-server-actions +spacing: 25 +align: right +anchor: parent +right: 20 +top: 10 + +--- ftd.image: +src: $sync-img +$on-click$: message-host $sync-obj + +--- ftd.image: +src: $refresh + +--- container: desktop-container + +--- ftd.row: +if: $show-cr-ui +id: change-request +width: fill +background-color: $dark-grey +color: $inherited.colors.main.text-strong +padding-vertical: $fastn.space.space-3 +padding-left: $fastn.space.space-3 +padding-right: 54 +spacing:4 + +--- ftd.image: +src: $pull-request-icon +width: 16 +margin-top: 2 + +--- container: change-request + +--- change-request-text: +cr-number: #8 +cr-title: cr-title-it-can-be-short-it-can-be-long-in-that-case-we-do-line-break +url: /somecrlink + +--- container: desktop-container + +--- ftd.row: +if: $show-cr-ui +padding-top: 15 +padding-left: 14 +padding-bottom: 14 +border-bottom: 4 +border-color: $dark-grey +width: fill + +--- print-cr-toc: +sample-list: $sample-toc + +--- container: desktop-container + +--- ftd.column: +width: fill +padding-top if $show-cr-ui: 8 + +--- ftd.row: +width: fill +id: text-container + +--- ftd.row: +width: fill +$on-click$: $toc-show= true +$on-click$: $sitemap-show= false +background-color if $sitemap-show: $inherited.colors.main.background.step-1 +border-bottom if $sitemap-show: 1 +border-color if $sitemap-show: $inherited.colors.main.border-strong +padding-vertical: 8 +padding-horizontal: 16 + +--- ftd.text: All files +color: $folder-color +role: $fine-print-bold +width: fill +align: center + +--- container: text-container + +--- ftd.row: +width: fill +$on-click$: $toc-show= false +$on-click$: $sitemap-show= true +background-color if $toc-show: $inherited.colors.main.background.step-1 +border-bottom if $toc-show: 1 +border-color if $toc-show: $inherited.colors.main.border-strong +padding-vertical: 8 +padding-horizontal: 16 + +--- ftd.text: Sitemap +color: $folder-color +role: $fine-print-bold +width: fill +align: center + +--- container: desktop-container + +--- ftd.column: +width: fill +height: fill +spacing: 8 +overflow-y: auto +id:toc-id + +--- container: toc-id + +--- ftd.row: +id: toc-id +width: fill + +--- container: mobile-side + +--- ftd.row: +id: left-side +width: percent 75 +width if $open: percent 100 +width if not $open: percent 75 +min-height: calc 100vh +align: right +margin-right: 0 +background-color: $inherited.colors.main.background.step-1 + +--- ftd.column: +width: calc 100% - 53px +id: switch-container +padding-left: 16 + +--- ftd.row: +width: fill +id: show-container +spacing: 18 +padding-vertical: 12 + +--- ftd.image: +src: $showbar +width: 20 +height: auto +$on-click$: toggle $open + +--- container: show-container + +--- ftd.row: +spacing: 8 + +--- ftd.text: $path +role: $fine-print-bold +color: $inherited.colors.main.cta-primary.base + +/--- ftd.text: (Preview) +role: $fine-print-bold +color: $inherited.colors.main.cta-primary.base +white-space: nowrap + +--- container: switch-container + +--- ftd.column: +id: code-container +width: fill + +--- ftd.column: +margin-bottom: 0 +margin-bottom if $show-modification: 20 +width: fill +min-height: 0 +min-height if $show-modification: 300 +overflow-y: auto + +--- change-card: +if: $show-modification +change: MERGE + +- While we love `fastn`, it is this `fastn` not the right +- tool for you. We document some of the reasons here. If +- you come across any other objects, please help us update +- this page. + ++ While we love `fastn`, it is this `fastn` not the right ++ tool for you. We document some of the reasons here. If ++ you come across any other reasons why FASTN should not ++ be used, please help us update this page. ++ While we love `fastn`, it is this `fastn` not the right ++ tool for you. We document some of the reasons here. If ++ you come across any other reasons why FASTN should not ++ be used, please help us update this page. + +--- container: code-container + +--- ftd.column: +width: fill +min-height: 0 +min-height if $show-conflict: 137 +margin-bottom: 0 +margin-bottom if $show-conflict: 20 +overflow-y: auto + + +--- error-card: Unexpected Error +if: $show-conflict + +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +234 +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +235 +Error: PackageError { message: "failed to parse ParseError { message: \"fifthtry.github.io/doc-site/assets#files.some.png not found 2\", doc_id: \"https://fifthtry.github.io/doc-site/index/\", line_number: 0 }" } +236 +Error: Process completed with exit code 1. +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +234 +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +235 + +--- container: code-container + +--- ftd.row: +width: fill +id: edit-input + +--- ftd.input: +if: $edits +width: fill +min-width: percent 100 +min-height: calc 100vh - 52px +multiline: true +placeholder: -- ftd.text: hello world +value: $source +$on-input$: $source=$VALUE +$on-input$: message-host $edit-obj +$on-click$: $show-guide = true +color: $inherited.colors.main.text +role: $monospace +background-color: $inherited.colors.main.background.base +white-space: pre + +--- container: edit-input + +--- guide-80chars: +if: $show-guide + +--- container: code-container + +--- ftd.column: +if: $show-desktop +width: fill +height: fill +background-color: $inherited.colors.main.text-strong + +--- ftd.iframe: +src: $path +width: fill +min-width: percent 100 +min-height: calc 100vh - 52px +background-color: $inherited.colors.main.text-strong + +--- container: code-container + +--- ftd.row: +if: $show-mobile +id: mobile-container +align: center + +--- ftd.column: +align: center +width: 396 +height: 672 +background-image: $mobile-frame +background-repeat: false + +--- ftd.column: +anchor: parent +left: 25 +top: 100 +width: 348 +height: 472 + +--- ftd.iframe: +src: $path +height: 472 +width: 348 + +--- container: mobile-container + +--- ftd.column: +margin-left: 134 +align: center + +--- ftd.text: iphone X +role: $fastn.type.fine-print +color: $inherited.colors.main.cta-primary.base + +/--- ftd.text: Iphone SE +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +/--- ftd.text: Samsung Note +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +/--- ftd.text: Samsung Galaxy +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +--- container: left-side + +--- ftd.column: +width: 53 +height: fill +padding-top: 16 +padding-bottom: 21 +id: main-sidebar +background-color: $inherited.colors.main.background.step-1 + +--- ftd.column: +width: fill +height: fill +spacing: 32 +id: sidebar + +--- ftd.row: +width: fill +id: modify-container + +--- ftd.image: +if: not $show-modification +src: $m-default +align: center +width: fill +height: auto +$on-click$: toggle $show-modification + +--- container: modify-container + +--- ftd.image: +if: $show-modification +src: $m-active +align: center +width: fill +height: auto +$on-click$: toggle $show-modification + +--- container: sidebar + +--- ftd.row: +width: fill +id: conflict-container + +--- ftd.image: +if: not $show-conflict +src: $e-default +align: center +width: fill +height: auto +$on-click$: toggle $show-conflict + +--- container: conflict-container + +--- ftd.image: +if: $show-conflict +src: $e-active +align: center +width: fill +height: auto +$on-click$: toggle $show-conflict + +--- container: main-sidebar + +--- ftd.column: +width: 53 +id: image +padding-horizontal: 12 +spacing: 32 +anchor: window +right: 0 +bottom: 24 +z-index: 9999 + +/--- ftd.image: +src: $edit +width: 20 +height: auto +$on-click$: $show-desktop = false +$on-click$: $show-mobile = false +$on-click$: $edits = true + +--- ftd.image: +if: $edits +src: $edit +width: 20 +height: auto +$on-click$: $show-desktop = false +$on-click$: $show-mobile = false +$on-click$: $edits = true +$on-click$: $show-guide = false + +--- ftd.image: +if: not $edits +src: $edit-default +width: 20 +height: auto +$on-click$: $show-desktop = false +$on-click$: $show-mobile = false +$on-click$: $edits = true +$on-click$: $show-guide = false + +--- container: image + +--- ftd.image: +if: not $show-mobile +src: $mobile +width: 20 +height: auto +$on-click$: toggle $show-mobile +$on-click$: $show-desktop= false +$on-click$: $edits = false +$on-click$: $show-guide = false + +--- ftd.image: +if: $show-mobile +src: $mobile-active +width: 20 +height: auto + +--- container: image + +--- ftd.image: +if: not $show-desktop +src: $desktop +width: 20 +height: auto +$on-click$: toggle $show-desktop +$on-click$: $show-mobile = false +$on-click$: $edits = false +$on-click$: $show-guide = false + +--- ftd.image: +if: $show-desktop +src: $desktop-active +width: 20 +height: auto + +--- container: ftd.main + +--- ftd.column: +if: $is-mobile +id: mobile-side +height: fill +width: fill + +--- ftd.column: +width: percent 0 +width if $open: percent 100 +id: mobile-frame + +--- ftd.column: +if: $open +width: percent 90 +anchor: window +background-color: $inherited.colors.main.background.base +height: fill +id: right-side +z-index: 99 + +--- ftd.row: +background-color: $grey-dark +padding-vertical: $fastn.space.space-3 +padding-horizontal: $fastn.space.space-3 +width: fill + +--- ftd.text: $fastn.package-name +role: $copy-print-bold +color: $inherited.colors.main.text-strong +width: percent 75 + +--- ftd.row: +spacing: 12 +align: right + +--- ftd.image: +src: $sync-img +$on-click$: message-host $sync-obj + +--- ftd.image: +src: $refresh + +--- ftd.column: +anchor: window +right: 0 +top: 0 +height: fill +background-color: $inherited.colors.main.background.step-1 +width: 53 +padding-top: 20 +padding-left: 20 + +--- ftd.image: +src: $showbar +width: 20 +height: auto +$on-click$: toggle $open +$on-click$: $show-fullscreen = true + +--- container: right-side + +--- ftd.row: +if: $show-cr-ui +id: change-request +width: fill +background-color: $dark-grey +color: $inherited.colors.main.text-strong +padding-vertical: $fastn.space.space-3 +padding-left: $fastn.space.space-3 +padding-right: 54 +spacing:4 + +--- ftd.image: +src: $pull-request-icon +width: 16 +margin-top: 2 + +--- container: change-request + +--- change-request-text: +cr-number: #8 +cr-title: cr-title-it-can-be-short-it-can-be-long-in-that-case-we-do-line-break +url: /somecrlink + +--- container: right-side + +--- ftd.row: +if: $show-cr-ui +padding-top: 15 +padding-left: 14 +padding-bottom: 14 +border-bottom: 4 +border-color: $dark-grey +width: fill + +--- print-cr-toc: +sample-list: $sample-toc + +--- container: right-side + +--- ftd.column: +width: fill +padding-top if $show-cr-ui: 8 + +--- ftd.row: +width: fill +id: text-container + +--- ftd.row: +width: fill +$on-click$: $toc-show= true +$on-click$: $sitemap-show= false +background-color if $sitemap-show: $inherited.colors.main.background.step-1 +border-bottom if $sitemap-show: 1 +border-color if $sitemap-show: $inherited.colors.main.border-strong +padding-vertical: 8 +padding-horizontal: 16 + +--- ftd.text: All files +color: $folder-color +role: $fine-print-bold +width: fill +align: center + +--- container: text-container + +--- ftd.row: +width: fill +$on-click$: $toc-show= false +$on-click$: $sitemap-show= true +background-color if $toc-show: $inherited.colors.main.background.step-1 +border-bottom if $toc-show: 1 +border-color if $toc-show: $inherited.colors.main.border-strong +padding-vertical: 8 +padding-horizontal: 16 + +--- ftd.text: Sitemap +color: $folder-color +role: $fine-print-bold +width: fill +align: center + +--- container: right-side + +--- ftd.column: +width: fill +height: fill +spacing: 8 +overflow-y: auto +id:toc-id + +--- container: toc-id + +--- ftd.row: +id: toc-id +width: fill + +--- container: mobile-side + +--- ftd.row: +id: left-side +width if $open: percent 100 +width if not $open: percent 100 +width: fill +height: fill +background-color: $inherited.colors.main.background.base + +--- ftd.column: +width: fill +id: switch-container +spacing: 14 + +--- ftd.row: +width: fill +id: show-container +spacing: 18 +padding-vertical: 12 +padding-left: 16 + +--- ftd.image: +src: $showbar +width: 20 +height: auto +$on-click$: toggle $open + +--- container: show-container + +--- ftd.row: +spacing: 8 + +--- ftd.text: $path +role: $fine-print-bold +color: $inherited.colors.main.cta-primary.base + +/--- ftd.text: (Preview) +role: $fine-print-bold +color: $inherited.colors.main.cta-primary.base +white-space: nowrap + +--- container: switch-container + +--- ftd.column: +height: calc 100vh - 82px +id: code-container +width: fill +overflow-y: auto + +--- ftd.row: +width: fill +padding-left: 16 +margin-bottom: 0 +min-height: 0 +min-height if $show-modification: 200 +margin-bottom if $show-modification: 20 +overflow-y: auto + +--- change-card: +if: $show-modification +change: committed + +- While we love `fastn`, it is this `fastn` not the right +- tool for you. We document some of the reasons here. If +- you come across any other objects, please help us update +- this page. + ++ While we love `fastn`, it is this `fastn` not the right ++ tool for you. We document some of the reasons here. If ++ you come across any other reasons why FASTN should not ++ be used, please help us update this page. + +--- container: code-container + +--- ftd.row: +width: fill +margin-bottom: 0 +min-height: 0 +min-height if $show-conflict: 200 +margin-bottom if $show-conflict: 20 +padding-left: 16 +overflow-y: auto + +--- error-card: Unexpected Error +if: $show-conflict + +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +234 +package base not found. Package: fifthtry.github.io/doc-site, File: filename.png +235 +Error: PackageError { message: "failed to parse ParseError { message: \"fifthtry.github.io/doc-site/assets#files.some.png not found 2\", doc_id: \"https://fifthtry.github.io/doc-site/index/\", line_number: 0 }" } +236 +Error: Process completed with exit code 1. + +--- container: code-container + +--- ftd.input: +if: $edits +width: fill +padding-horizontal: 16 +min-width: percent 100 +min-height: calc 100vh - 82px +multiline: true +placeholder: -- ftd.text: hello world +value: $source +$on-input$: $source=$VALUE +$on-input$: message-host $edit-obj +color: $inherited.colors.main.text +background-color: $inherited.colors.main.background.base +white-space: pre + +--- container: code-container + +--- ftd.column: +if: $show-desktop +width: fill +height: fill +background-color: $inherited.colors.main.text-strong + +--- ftd.iframe: +src: $path +width: fill +min-width: percent 100 +min-height: calc 100vh - 82px +background-color: $inherited.colors.main.text-strong + +--- container: code-container + +--- ftd.row: +if: $show-mobile +width: fill +id: mobile-container +align: center + + +--- ftd.iframe: +src: $path +height: calc 100vh +width: fill + +--- container: mobile-container + +--- ftd.column: +if: not $is-mobile +margin-left: 134 +align: center + +--- ftd.text: iphone X +role: $fastn.type.fine-print +color: $inherited.colors.main.cta-primary.base + +/--- ftd.text: Iphone SE +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +/--- ftd.text: Samsung Note +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +/--- ftd.text: Samsung Galaxy +role: $fastn.type.fine-print +color: $inherited.colors.main.text + +--- container: left-side + +--- ftd.column: +if: not $edits +anchor: window +background-color: $inherited.colors.main.background.step-1 +right: 0 +bottom: 0 +width: 46 +height: fill +id: image-one +padding-top: $fastn.space.space-3 +padding-bottom: 21 +spacing: 32 + +--- ftd.column: +width: fill +height: fill +spacing: 32 +id: sidebar-one + +--- ftd.row: +width: fill +id: modify-container + +--- ftd.image: +if: not $show-modification +src: $m-default +width: fill +$on-click$: toggle $show-modification + +--- container: modify-container + +--- ftd.image: +if: $show-modification +src: $m-active +width: fill +$on-click$: toggle $show-modification + +--- container: sidebar-one + +--- ftd.row: +width: fill +id: conflict-container + +--- ftd.image: +if: not $show-conflict +src: $e-default +align: center +width: fill +$on-click$: toggle $show-conflict + +--- container: conflict-container + +--- ftd.image: +if: $show-conflict +src: $e-active +align: center +width: fill +$on-click$: toggle $show-conflict + +--- container: image + +--- ftd.column: +id: bottom-conttainer +width: fill +padding-horizontal: 12 +spacing: 32 + +--- ftd.image: +if: $edits +src: $edit +width: 20 +height: auto +$on-click$: $show-mobile = false +$on-click$: $edits = true + +--- ftd.image: +if: not $edits +src: $edit-default +width: 20 +height: auto +$on-click$: $show-mobile = false +$on-click$: $edits = true + +--- container: bottom-conttainer + +--- ftd.image: +if: not $show-mobile +src: $mobile +width: 20 +height: auto +$on-click$: toggle $show-mobile +$on-click$: $edits = false + +--- ftd.image: +if: $show-mobile +src: $mobile-active +width: 20 +height: auto + +--- container: left-side + +--- ftd.column: +if: $edits +width: 53 +height: fill +padding-top: 16 +padding-bottom: 21 +id: main-sidebar +background-color: $inherited.colors.main.background.step-1 +margin-left: 16 + +--- ftd.column: +width: fill +height: fill +spacing: 32 +id: sidebar-two + +--- ftd.row: +width: fill +id: modify-container + +--- ftd.image: +if: not $show-modification +src: $m-default +align: center +width: fill +height: auto +$on-click$: toggle $show-modification + +--- container: modify-container + +--- ftd.image: +if: $show-modification +src: $m-active +align: center +width: fill +height: auto +$on-click$: toggle $show-modification + +--- container: sidebar-two + +--- ftd.row: +width: fill +id: conflict-container + +--- ftd.image: +if: not $show-conflict +src: $e-default +align: center +width: fill +height: auto +$on-click$: toggle $show-conflict + +--- container: conflict-container + +--- ftd.image: +if: $show-conflict +src: $e-active +align: center +width: fill +height: auto +$on-click$: toggle $show-conflict + +--- container: main-sidebar + +--- ftd.column: +width: fill +id: image-two +padding-horizontal: 12 +spacing: 32 + +--- ftd.image: +if: $edits +src: $edit +width: 20 +height: auto +$on-click$: $show-mobile = false +$on-click$: $edits = true + +--- ftd.image: +if: not $edits +src: $edit-default +width: 20 +height: auto +$on-click$: $show-mobile = false +$on-click$: $edits = true + +--- container: image + +--- ftd.image: +if: not $show-mobile +src: $mobile +width: 20 +height: auto +$on-click$: toggle $show-mobile +$on-click$: $show-desktop= false +$on-click$: $edits = false + +--- ftd.image: +if: $show-mobile +src: $mobile-active +width: 20 +height: auto + +--- container: ftd.main + + + + + + + + + +-- object sync-obj: +function: http +method: get +url: /-/editor-sync/ + +-- ftd.row sync: +spacing: 10 + +--- ftd.text: Sync +padding: 10 +position: center +border-radius: 8 +color: $inherited.colors.main.cta-secondary.text +background-color: $inherited.colors.main.cta-secondary.base +$on-click$: message-host $sync-obj + + + + + + + + + + +-- object view-obj: +function: redirect +url: $path + + + + + + + + + + +-- ftd.row view: +spacing: 10 + +--- ftd.text: View +padding: 10 +position: center +border-radius: 8 +color: $inherited.colors.main.cta-tertiary.text +background-color: $inherited.colors.main.cta-tertiary.base +$on-click$: message-host $view-obj + + + + + + + + + + +-- optional string create-file-path: +$always-include$: true + +-- object create-obj: +function: http +method: post +url: $url +path: $create-file-path + + + + + + + + + + +-- ftd.row create: +spacing: 10 + +--- ftd.input: +placeholder: Enter file name +$on-input$: $create-file-path=$VALUE +padding: 10 +position: center +border-radius: 8 + +--- ftd.text: Create +$on-click$: message-host $create-obj +color: $inherited.colors.main.cta-primary.text +background-color: $inherited.colors.main.cta-primary.base +padding: 10 +align: center +border-radius: 8 + + + + + + + + + + +-- optional string delete-file-path: +$always-include$: true + +-- object delete-obj: +function: http +method: post +url: $url +path: $delete-file-path +operation: delete + + + + + + + + + + +-- optional string rename-file-path: +$always-include$: true + +-- optional string new-name: +$always-include$: true + +-- object rename-obj: +function: http +method: post +url: $url +path: $rename-file-path +operation: rename +data: $new-name + + + + + + + + + + +-- ftd.column print-toc: +fastn.toc-item list toc: +width: fill +margin-top if $is-mobile: $fastn.space.space-2 + +--- print-toc-item: +$loop$: $toc as $obj +toc: $obj +is-first: true + + + + + + + + + + +-- ftd.row folder: +anchor: window +width: 285 +height: 30 +left: 370 +left if $is-mobile: 12 +top: 84 +z-index: 99999 +background-color: $inherited.colors.main.background.step-2 +border-radius: 4 +id: newfile-row + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-2 +padding-left: 10 +padding-right: 5 +padding-vertical: 3 +border-radius: 4 + +--- ftd.text: New folder +role: $tiny +color: $inherited.colors.main.cta-primary.base +margin-right: $fastn.space.space-2 +align: center +white-space: nowrap + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-1 + +--- ftd.input: +width: fill +placeholder: folder name +$on-input$: $create-file-path=$VALUE +padding-horizontal: 10 +padding-vertical: $fastn.space.space-2 +background-color: $inherited.colors.main.background.step-1 +color: $inherited.colors.main.text-strong +border-width: 0 +cursor: text + +--- ftd.image: +src: $arrow-right +$on-click$: message-host $create-obj +align: center +margin-right: 10 + +--- ftd.row: +anchor: parent +right: -12 +top: -12 +z-index: 9999 +width: 16 +height: 16 +background-color: $inherited.colors.main.background.step-2 +border-width: 1 +border-color: $grey-dark +padding: 3 +border-radius: 100 +id: close + +--- ftd.image: +src: $close +width: 8 +height: 8 +$on-click$: $show-create-new-folder = false +$on-click$: $dialog-open = false +$on-click$: $show-overlay = false + + + + + + + + + + +-- optional string revert-file-path: +$always-include$: true + +-- object revert-obj: +function: http +method: post +url: -/revert/ +path: $revert-file-path +operation: delete + + + + + + + + + + +-- ftd.row new-file: +anchor: window +width: 285 +height: 30 +left: 370 +left if $is-mobile: 12 +top: 84 +z-index: 10000 +background-color: $inherited.colors.main.background.step-2 +border-radius: 4 +id: newfile-row + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-2 +padding-left: 10 +padding-right: 5 +padding-vertical: 3 +border-radius: 4 + +--- ftd.text: New file +role: $tiny +color: $inherited.colors.main.cta-primary.base +margin-right: $fastn.space.space-2 +align: center +white-space: nowrap + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-1 + +--- ftd.input: +width: fill +placeholder: filename.ftd +$on-input$: $create-file-path=$VALUE +padding-horizontal: 10 +padding-vertical: $fastn.space.space-2 +background-color: $inherited.colors.main.background.step-1 +color: $inherited.colors.main.text-strong +border-width: 0 +cursor: text + +--- ftd.image: +src: $arrow-right +$on-click$: message-host $create-obj +align: center +margin-right: 10 + +--- ftd.row: +anchor: parent +right: -12 +top: -12 +z-index: 9999 +width: 16 +height: 16 +background-color: $inherited.colors.main.background.step-2 +border-width: 1 +border-color: $grey-dark +padding: 3 +border-radius: 100 +id: close-one + +--- ftd.image: +src: $close +width: 8 +height: 8 +$on-click$: $show-create-new-file = false +$on-click$: $dialog-open = false +$on-click$: $show-overlay = false + + + + + + + + + + +-- ftd.column print-toc-item: +fastn.toc-item toc: +boolean is-first: false +boolean show-actions: false +boolean show: false +width: fill +border-radius: 2 +padding-bottom: 2 +padding-top: 2 +boolean show-children: false + +--- ftd.row: +$on-click$: toggle $show-children +width: fill +id: file-hover +background-color if $MOUSE-IN: $light-green +padding-left: 2 +padding-top: 2 +padding-bottom: 2 +padding-right: 12 +margin-bottom: 1 +$on-mouse-enter$: $show-actions = true +$on-mouse-leave$: $show-actions = false +$on-mouse-leave$: $show = false + +--- ftd.row: +if: $show-actions +anchor: parent +left if not $is-mobile: 260 +left if $toc.number is null: 204 +right if $is-mobile: 30 +top: 5 +height: 36 +z-index: 99 +spacing: 9 +id: row-id + +--- ftd.row: +spacing: 9 +if: $show-action-on-status +align: right + +--- ftd.row: +if: $toc.number is null + +--- ftd.image: +if: not $dialog-open +src: $file-icon +width: 24 +$on-click$: $show-create-new-file = true +$on-click$: $show-overlay = true +$on-click$: $dialog-open = true + +--- container: row-id + +--- ftd.row: +if: $toc.number is null + +--- ftd.image: +if: not $dialog-open +src: $folder-icon +width: 24 +$on-click$: $show-create-new-folder = true +$on-click$: $show-overlay = true +$on-click$: $dialog-open = true + +--- container: row-id + +--- ftd.image: +if: not $dialog-open +src: $rename-icon +width: 24 +if: not $show +$on-click$: $rename-path = $toc.path +$on-click$: $rename-title = $toc.title +$on-click$: $show-rename = true +$on-click$: $dialog-open = true +id: rename-area + +--- ftd.image: +if: not $dialog-open +src: $delete-icon +width: 24 +if: $toc.path is not null +$on-click$: $show-delete-dialog = true +$on-click$: $show-overlay = true +$on-click$: $dialog-open = true +id: rename-area +margin-right: $fastn.space.space-2 + +--- container: file-hover + +--- ftd.row: +width: fill +id: switch-container +padding-left: $fastn.space.space-3 + +--- ftd.row: +if: $show-children +width: 15 +width if $toc.children is empty: 0 +align: center +cursor: pointer +id: this-id + +--- ftd.image: +if: $toc.children is not empty +src: $downarrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.row: +if: not $show-children +align: center +width if $toc.children is not empty: 15 +width if $toc.children is empty: 0 +padding-left if $toc.children is not empty: 4 +id: that-id + +--- ftd.image: +if: $toc.children is not empty +src: $right-arrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.image: +if: $toc.children is empty +src: $file +width: 15 +height: auto +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.row: +width: fill + +--- show-item: $toc.title +link: $toc.url +status: $toc.number + +--- container: ftd.main + +--- ftd.column: +if: $show-children +width: fill +padding-left if not $is-first: $fastn.space.space-3 +padding-left if $is-first: $fastn.space.space-3 + +--- print-toc-item: +$loop$: $toc.children as $obj +toc: $obj + +--- container: ftd.main + + + + + + + + + + +-- optional string rename-path: +$always-include$: true + +-- optional string rename-title: +$always-include$: true + + + + + + + + + + +-- ftd.row display-rename: +anchor: window +width: 285 +height: 30 +left: 370 +left if $is-mobile: 12 +top: 84 +z-index: 10000 +background-color: $inherited.colors.main.background.step-2 +border-radius: 4 +id: rename-row + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-2 +padding-left: 10 +padding-right: 5 +padding-vertical: 3 +border-radius: 4 + +--- ftd.text: Rename +role: $tiny +color: $inherited.colors.main.cta-primary.base +margin-right: $fastn.space.space-2 +align: center + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.step-1 + +--- ftd.input: +width: fill +value: $rename-title +placeholder: $rename-title +$on-input$: $new-name=$VALUE +$on-input$: $rename-file-path=$rename-path +padding-horizontal: 10 +padding-vertical: $fastn.space.space-2 +background-color: $inherited.colors.main.background.step-1 +color: $inherited.colors.main.text-strong +border-width: 0 +cursor: text + +--- ftd.image: +src: $arrow-right +$on-click$: message-host $rename-obj +align: center +margin-right: 10 + +--- ftd.row: +anchor: parent +right: -12 +top: -12 +z-index: 9999 +width: 16 +height: 16 +background-color: $inherited.colors.main.background.step-2 +border-width: 1 +border-color: $grey-dark +padding: 3 +border-radius: 100 +id: close-two + +--- ftd.image: +src: $close +width: 8 +height: 8 +$on-click$: $show-rename = false +$on-click$: $dialog-open = false + + + + + + + + + + +-- ftd.row show-item: +caption title: +optional string link: +optional string status: +padding-horizontal: 2 +width: fill + +--- ftd.row: +if: $status == Uptodate +spacing: 10 +width: fill +$on-mouse-enter$: $show-action-on-status = true +$on-mouse-enter$: $show-revert = false + +--- ftd.text: $title +if: $link is not null +link: $link +color: $inherited.colors.main.text-strong +role: $monospace +width: fill + +--- ftd.text: $title +if: $link is null +color: $inherited.colors.main.text-strong +role: $monospace +width: fill + +/--- ftd.text: C -- dont show any text in-case of status is untracked +color: $changed +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == Added +color: $added +width: fill +id: added-container +$on-mouse-enter$: $show-action-on-status = true +$on-mouse-enter$: $show-revert = false + +--- ftd.text: $title +if: $link is not null +link: $link +color: $inherited.colors.main.text-strong +role: $monospace +white-space: nowrap +width: fill + +--- ftd.text: $title +if: $link is null +color: $inherited.colors.main.text-strong +role: $monospace +width: fill + +--- ftd.text: A +color: $added +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == Modified +width: fill +spacing: 10 +$on-mouse-enter$: $show-action-on-status = true +$on-mouse-enter$: $show-revert = true +color: $merge + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: M +color: $merge +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == Deleted +width: fill +spacing: 10 +color: $red +$on-mouse-enter$: $show-revert = true +$on-mouse-enter$: $show-action-on-status = false + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: D +color: $deleted +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == Conflicted +width: fill +spacing: 10 +color: $grey +$on-mouse-enter$: $show-revert = true +$on-mouse-enter$: $show-action-on-status = true + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: C +color: $changed +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == Outdated +width: fill +spacing: 10 +color: $orange +$on-mouse-enter$: $show-revert = true +$on-mouse-enter$: $show-action-on-status = true + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: O +color: $outdated +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == ClientEditedServerDeleted +width: fill +spacing: 10 +color: $orange +$on-mouse-enter$: $show-revert = true +$on-mouse-enter$: $show-action-on-status = true + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: Cˆ +color: $changed +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status == ClientDeletedServerEdited +width: fill +spacing: 10 +color: $orange +$on-mouse-enter$: $show-revert = true +$on-mouse-enter$: $show-action-on-status = true + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +if: $link is null +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: C˘ +color: $changed +role: $monospace +align: right + +--- container: ftd.main + +--- ftd.row: +if: $status is null +width: fill +spacing: 10 +$on-mouse-enter$: $show-revert = false +$on-mouse-enter$: $show-action-on-status = true + +--- ftd.text: $title +if: $link is not null +link: $link +width: fill +color: $inherited.colors.main.text-strong +role: $monospace + +--- ftd.text: $title +width: fill +if: $link is null +color: $inherited.colors.main.text-strong +role: $monospace + + + + + + + + + + +-- ftd.column overlay: +background-color: $overlay-bg +width: fill +height: fill +anchor: window +top: 0 +left: 0 +z-index: 9999 +id: iamoverlay + + + + + + + + + + +-- ftd.row guide-80chars: +border-right: 1 +border-color: $inherited.colors.main.border +height: calc 100vh - 52px +anchor: parent +top: 0 +left: 619 +width: 10 +z-index: 9999 + + + + + + + + + + +-- ftd.column delete-confimation: +caption title: Delete file? +string subtitle: This file has changes which will be lost +string close: CANCEL DELETE +string confirm: CONFIRM DELETE +width: percent 80 +width if $is-mobile: fill +height: 365 +max-width: 500 +align: center +background-color: $delete-dialog-bg +padding-horizontal: $fastn.space.space-4 +padding-vertical: $fastn.space.space-4 +border-radius: 8 +anchor: window +top: 100 +left: 380 +left if $is-mobile: 0 +z-index: 99999 + +--- ftd.column: +width: fill +id: title-container + +--- ftd.text: $title +role: $dialog-title +color: $orange +margin-bottom: $fastn.space.space-1 + +--- ftd.text: $subtitle +role: $fastn.type.fine-print +color: $inherited.colors.main.text-strong +margin-bottom: $fastn.space.space-2 + +--- container: title-container + +--- ftd.column: +width: fill +id: code-container + +--- ftd.input: +width: fill +min-width: percent 100 +min-height: 250 +multiline: true +placeholder: -- ftd.text: hello world +value: $source +$on-input$: $source=$VALUE +$on-input$: message-host $edit-obj +background-color: $code-bg +color: $inherited.colors.main.text +white-space: pre + +--- container: code-container + +--- ftd.column: +width: fill +margin-top: 18 + +--- ftd.row: +align: right +spacing: 24 + +--- ftd.text: $close +role: $dialog-title +color: $inherited.colors.main.text +$on-click$: $show-delete-dialog = false +$on-click$: $show-overlay = false +$on-click$: $dialog-open = false + +--- ftd.text: $confirm +role: $dialog-title +color: $orange +$on-click$: $show-overlay = false +$on-click$: $dialog-open = false +$on-click$: $show-delete-dialog = false +$on-click$: message-host $delete-obj + + + + + + + + + + +-- ftd.column print-sitemap-toc: +fastn.toc-item list sample-list: +width: fill +margin-top if $is-mobile: $fastn.space.space-2 + +--- print-sitemap-toc-item: +$loop$: $sample-list as $obj +children: $obj.children +title: $obj.title +url: $obj.url + + + + + + + + + + +-- ftd.column print-sitemap-toc-item: +caption title: +optional string url: +fastn.toc-item list children: +boolean show-actions: false +boolean show-tooltip: false +boolean show: false +width: fill +border-radius: 2 +padding-bottom: 2 +padding-top: 2 +boolean show-children: false +id: file-row + +--- ftd.row: +$on-click$: toggle $show-children +width: fill +id: file-hover +background-color if $MOUSE-IN: $light-green +padding-left: 2 +padding-top: 2 +padding-bottom: 2 +padding-right: 12 +margin-bottom: 1 + +--- ftd.row: +width: fill +id: switch-container +padding-left: $fastn.space.space-3 + +--- ftd.row: +if: $show-children +width: 12 +align: center + +--- ftd.image: +if: $children is not empty +src: $downarrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.row: +if: not $show-children +align: center +width: 12 + +--- ftd.image: +if: $children is not empty +src: $right-arrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.image: +if: $children is empty +src: $file +width: 15 +height: auto +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.row: +width: fill + +--- show-sample-item: $title +show-tooltip: $show-tooltip +link: $url + + +--- container: ftd.main + +--- ftd.column: +if: $show-children +width: fill +padding-left: $fastn.space.space-3 + +--- print-sitemap-toc-item: +$loop$: $children as $obj +children: $obj.children +title: $obj.title +url: $obj.url + +--- container: ftd.main + + + + + + + + + + +-- ftd.row show-sample-item: +boolean show-tooltip: false +caption title: +optional string link: +padding-horizontal: 2 +width: fill +open: true +append-at: sample-item-container + +--- ftd.row: +width: fill +id: show-tooltip +spacing: 8 + +--- ftd.text: $title +if: $link is not null +color: $inherited.colors.main.text-strong +role: $monospace +white-space: nowrap + +--- ftd.text: $title +if: $link is null +color: $inherited.colors.main.text-strong +role: $monospace +white-space: nowrap + +--- container: show-tooltip + +--- ftd.column: +id: sample-container +padding-vertical: $fastn.space.space-1 +padding-horizontal: $fastn.space.space-1 +border-radius: 100 +margin-top: 4 +background-color: $inherited.colors.main.text +$on-mouse-enter$: $show-tooltip = true +$on-mouse-leave$: $show-tooltip = false + +--- container: sample-container + +--- ftd.row: +id: sample-item-container + +--- sitemap-data: +if: $show-tooltip + +--- container: ftd.main + +--- ftd.text: A +color: $added +role: $monospace +align: right + + + + + + + + + + +-- ftd.column sitemap-data: +width: fill +id: tooltip-container +anchor: parent +top: -6 +left: 0 +z-index: 200 + +--- ftd.row: +width: 10 +height: 10 +background-color: $grey-shade +left: -6 +anchor: parent +top: 15 +rotate: 132 +border-left: 1 +border-bottom: 1 +border-color: $border-line +border-style: solid +z-index: 999 +--- container: ftd.main + +--- ftd.row: +width: 120 +top: 20 +left: -56 +anchor: parent +background-color: $grey-shade +padding-bottom:4 +padding-horizontal:8 +border-radius: 4 +border-width: 1 +border-color: $border-line + +--- ftd.column: +width: fill +id: key-container + +--- ftd.row: +width: fill +id: text-container +border-bottom: 1 +padding-bottom:4 +padding-vertical: 4 +border-color: $border-line + +--- ftd.row: +width:fill + +--- ftd.text: Key +role: $small-font +color: $inherited.colors.main.text-strong + +--- ftd.text: : +role: $small-font +color: $inherited.colors.main.text-strong + +--- container: text-container + +--- ftd.text: value +role: $small-font +color: $inherited.colors.main.text-strong +width: fill + +--- container: key-container + +--- ftd.row: +width: fill +id: text-container +padding-bottom:4 +border-color: $border-line +padding-vertical: 4 + +--- ftd.row: +width:fill + +--- ftd.text: Key +role: $small-font +color: $inherited.colors.main.text-strong + +--- ftd.text: : +role: $small-font +color: $inherited.colors.main.text-strong + +--- container: text-container + +--- ftd.text: value +role: $small-font +color: $inherited.colors.main.text-strong +width: fill + + + + + + + + + +-- ftd.column print-cr-toc: +fastn.toc-item list sample-list: +width: fill +boolean open: true +max-height: 220 +margin-top if $is-mobile: $fastn.space.space-2 + +--- ftd.row: +width: fill +id: modified-container +align: center + +--- ftd.row: +id: cr-wrap +spacing: 4 +width: fill + +--- ftd.row: +width if $open: 12 +align: center + +--- ftd.image: +if: $open +align: center +src: $downarrow +$on-click$: toggle $open + +--- container: cr-wrap + +--- ftd.row: +width if not $open: 12 +align: center + +--- ftd.image: +if: not $open +align: center +src: $right-arrow +$on-click$: toggle $open + +--- container: cr-wrap + +--- ftd.text: Modified files +color: $blue +role: $fine-print-bold +width: fill +align: center +white-space: nowrap + +--- container: modified-container + +--- ftd.row: +align: right +spacing: 24 +padding-right: 12 + +--- ftd.image: +src: $local-icon +width: 20 + +--- ftd.image: +src: $server-icon +width: 20 +--- container: ftd.main + +--- ftd.column: +if: $open +width: fill +overflow-y: auto +margin-top: $fastn.space.space-2 + +--- print-cr-toc-item: +$loop$: $sample-list as $obj +children: $obj.children +title: $obj.title +url: $obj.url + + + + + + + + + + +-- ftd.column print-cr-toc-item: +caption title: +optional string url: +fastn.toc-item list children: +boolean show-actions: false +boolean show-tooltip: false +boolean show: false +width: fill +border-radius: 2 +padding-bottom: 2 +padding-top: 2 +boolean show-children: false +id: file-row + +--- ftd.row: +$on-click$: toggle $show-children +width: fill +id: file-hover +background-color if $MOUSE-IN: $light-green +padding-left: 2 +padding-top: 2 +padding-bottom: 2 +padding-right: 12 +margin-bottom: 1 + +--- ftd.row: +width: fill +id: switch-container +padding-left: $fastn.space.space-3 + +--- ftd.row: +if: $show-children +align: center +width if $children is not empty: 12 +width if $children is empty: 0 + +--- ftd.image: +if: $children is not empty +src: $downarrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 +width: 12 + +--- container: switch-container + +--- ftd.row: +if: not $show-children +align: center +width if $children is empty: 0 +width if $children is not empty: 12 + +--- ftd.image: +if: $children is not empty +src: $right-arrow +$on-click$ if not $show-children:$show-children = false +align: center +padding-right: $fastn.space.space-1 + +--- container: switch-container + +--- ftd.row: +width: fill + +--- show-cr-item: $title +link: $url + +--- container: ftd.main + +--- ftd.column: +if: $show-children +width: fill +padding-left: $fastn.space.space-3 + +--- print-cr-toc-item: +$loop$: $children as $obj +children: $obj.children +title: $obj.title +url: $obj.url + +--- container: ftd.main + + + + + + + + + + +-- ftd.row show-cr-item: +caption title: +optional string link: +padding-horizontal: 2 +width: fill + +--- ftd.row: +width: fill +spacing: 8 + +--- ftd.text: $title +if: $link is not null +color: $inherited.colors.main.text-strong +role: $monospace +white-space: nowrap + +--- ftd.text: $title +if: $link is null +color: $inherited.colors.main.text-strong +role: $monospace +white-space: nowrap + +--- container: ftd.main + +--- ftd.text: A +color: $added +role: $monospace +align: right + + + + + + + + + + +-- ftd.row change-request-text: +string cr-number: +string cr-title: +optional string url: +width: fill +spacing: 4 +margin-left: $fastn.space.space-1 + +--- ftd.text: $cr-number +if: $url is null +role: $monospace +color: $blue + +--- container: ftd.main + +--- ftd.text: $cr-number +if: $url is not null +link: $url +role: $monospace +color: $blue + +--- container: ftd.main + +--- ftd.text: $cr-title +role: $monospace +width: fill +color: $grey-medium +link: $url + + + + + + + + + + + +-- ftd.column error-card: +caption title: +width: fill +body body: +padding-vertical: 24 +padding-horizontal: 36 +border-left: 4 +background-color: $code-bg-dark +border-color : $red-text + +--- ftd.text: $title +width: fill +role: $fastn.type.copy-tight +color: $red-text + +--- ftd.text: +text: $body +width: fill +role: $fastn.type.copy-tight +color: $red-text + + + + + + + + + + +-- ftd.column change-card: +caption change: +body body: +width: fill + +--- ftd.text: $change +top: 20 +right: 20 +anchor: parent +role: $copy-print-medium +color: $sky-blue + +--- container: ftd.main + +--- ftd.code: +lang: diff +text: $body +width: fill +role: $fastn.type.copy-tight +border-left: 4 +padding-vertical: 24 +padding-horizontal: 24 +background-color: $code-bg-dark +border-color : $sky-blue + + + + + + + + + + + + +-- ftd.color blue: +light: #81AACE +dark: #81AACE + +-- ftd.color dark-grey: +light: #373636 +dark: #373636 + +-- ftd.color grey-medium: +light: #D9D9D9 +dark: #D9D9D9 + +-- ftd.color code-bg-dark: +light: #2b303b +dark: #2b303b + +-- ftd.color committed: +light: #50ABEC +dark: #50ABEC + +-- ftd.color merged: +light: #49EC46 +dark: #49EC46 + +-- ftd.color conflict: +light: #F51616 +dark: #F51616 + +-- ftd.color grey-shade: +light: #3B404D +dark: #3B404D + +-- ftd.color border-line: +light: #484848 +dark: #484848 + +-- ftd.color sky-blue: +light: #13E3F0 +dark: #13E3F0 + +-- ftd.color delete-dialog-bg: +light: rgba(59, 64, 77, 1) +dark: rgba(59, 64, 77, 1) + +-- ftd.color added: +light: rgba(73, 236, 70, 1) +dark: rgba(73, 236, 70, 1) + +-- ftd.color merge: +light: rgba(19, 227, 240, 1) +dark: rgba(19, 227, 240, 1) + +-- ftd.color deleted: +light: rgba(101, 101, 101, 1) +dark: rgba(101, 101, 101, 1) + +-- ftd.color outdated: +light: rgba(245, 206, 68, 1) +dark: rgba(245, 206, 68, 1) + +-- ftd.color changed: +light: rgba(219, 51, 246, 1) +dark: rgba(219, 51, 246, 1) + +-- ftd.color red: +light: red +dark: red + +-- ftd.color red-text: +light: rgba(191, 97, 106, 1) +dark: rgba(191, 97, 106, 1) + +-- ftd.color grey: +light: grey +dark: grey + +-- ftd.color orange: +light: rgba(245, 116, 22, 1) +dark: rgba(245, 116, 22, 1) + +-- ftd.color 2b303b: +light: #2b303b +dark: #2b303b + +-- ftd.color folder-color: +light: rgba(129, 170, 206, 1) +dark: rgba(129, 170, 206, 1) + +-- ftd.color grey-dark: +light: #2B2A2A +dark: #2B2A2A + +-- ftd.color light-green: +light: rgba(73, 236, 70, 0.1) +dark: rgba(73, 236, 70, 0.1) + +-- ftd.color overlay-bg: +light: rgba(0, 0, 0, 0.6) +dark: rgba(0, 0, 0, 0.6) + +-- ftd.color code-bg: +light: rgba(44, 48, 58, 1) +dark: rgba(44, 48, 58, 1) diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/file.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/file.svg new file mode 100644 index 0000000000..7e47af6722 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/file.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/folder-icon.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/folder-icon.svg new file mode 100644 index 0000000000..deff767a46 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/folder-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/git-pull-request.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/git-pull-request.svg new file mode 100644 index 0000000000..5842835c13 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/git-pull-request.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/image.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/image.ftd new file mode 100644 index 0000000000..5d1045dafa --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/image.ftd @@ -0,0 +1,4 @@ +-- ftd.image image-page: +caption file-name: +ftd.image-src src: +src: $src diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/index.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/index.ftd new file mode 100644 index 0000000000..c3eed3f5f8 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/index.ftd @@ -0,0 +1,292 @@ +-- import: fastn +-- import: fastn-lib + + + + + + + + + + + + +-- ftd.column package-info-page: +width: fill +padding: 40 + +--- fastn-lib.h0: $fastn.i18n.welcome-fastn-page + +$fastn.i18n.welcome-fastn-page-subtitle + +--- ftd.text: $fastn.package-name + +--- fastn-lib.key-value-without-default: $fastn.i18n.language +value: $fastn.language + +--- fastn-lib.key-value-without-default: Zip: +value: $fastn.package-zip + + + + + + + + + + + +-- ftd.column translation-status-page: +padding-vertical: 40 +padding-horizontal: 20 +width: fill + +--- h0: $fastn.i18n.language-detail-page + +--- title: $fastn.package-title +subtitle: key-value: $fastn.i18n.last-modified-on +> value: $fastn.last-modified-on +> default: Never synced + +$fastn.i18n.language-detail-page-body + +--- key-value: $fastn.i18n.total-number-of-documents +value: $fastn.number-of-documents +default: Not known + +--- files-status: +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors + + + + + + + + + + + + +-- ftd.row key-value: +caption key: +optional string value: +string default: +margin-bottom: 10 +spacing: 2 + +--- ftd.text: $key +position: center + +--- ftd.text: $value +if: $value is not null +position: center + +--- ftd.text: $default +if: $value is null +position: center + + + + + + + + + + + + +-- ftd.column title: +caption title: +optional body body: +ftd.ui subtitle: +width: fill +region: h1 + +--- ftd.row: +spacing: 25 +width: fill + +--- ftd.text: $title +region: title +ftd.color-scheme colors: +color: $colors.cta-secondary.base +align: center +link: $fastn.home-url + +--- ftd.text: $fastn.language +if: $fastn.language is not null +border-radius: 10 +ftd.color-scheme colors: +color: $colors.cta-secondary.base +background-color: $colors.cta-secondary.base +padding-vertical: 5 +padding-horizontal: 20 +align: center + +--- container: ftd.main + +--- subtitle: + +--- markdown: +if: $body is not null +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +body: $body + + + + + + + + + + + + +-- ftd.column h0: +caption title: +optional body body: +width: fill +padding-horizontal: 90 +region: h0 + +--- ftd.text: +text: $title +region: title +ftd.color-scheme colors: +color: $colors.cta-secondary.base +padding-bottom: 24 + +--- container: ftd.main + +--- markdown: +if: $body is not null +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +body: $body + + + + + + + + + + + + +-- ftd.text markdown: +body body: +ftd.color-scheme colors: +color: $colors.cta-secondary.base +text: $body +padding-bottom: 34 +padding-top: 50 + + + + + + + + + + + + +-- ftd.row print: +caption file: +ftd.color-scheme colors: +ftd.ui status: +width: fill +border-bottom: 1 +border-color: $colors.cta-primary.base +padding: 10 + +--- ftd.text: $file +width: percent 50 +padding: 5 + +--- status: + + + + + + + + + + + + +-- ftd.column files-status: +ftd.color-scheme colors: +background-color: $colors.cta-primary.base +width: fill +max-width: 800 + +--- ftd.row: +width: fill +background-color: $colors.cta-primary.base +color: $colors.cta-primary.text +padding: 10 +border-top-radius: 5 + +--- ftd.text: $fastn.i18n.document +width: percent 50 +padding: 5 + +--- ftd.text: $fastn.i18n.status +width: percent 50 +padding: 5 + +--- container: ftd.main + +--- print: $obj +$loop$: $fastn.missing-files as $obj +status: ftd.text: $fastn.i18n.missing +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +> padding: 5 +> color: $colors.cta-primary.base +> background-color: $colors.cta-primary.base +> border-radius: 10 + +--- print: $obj +$loop$: $fastn.never-marked-files as $obj +status: ftd.text: $fastn.i18n.never-marked +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +> padding: 5 +> color: #4e4ead +> background-color: #e0dff9 +> border-radius: 10 + +--- print: $obj +$loop$: $fastn.outdated-files as $obj +status: ftd.text: $fastn.i18n.out-dated +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +> padding: 5 +> color: #f7d06d +> background-color: #fef7e5 +> border-radius: 10 + +--- print: $obj +$loop$: $fastn.upto-date-files as $obj +status: ftd.text: $fastn.i18n.upto-date +ftd.color-scheme colors: $fastn.design.colors.brand +colors: $colors +> padding: 5 +> color: #4da486 +> background-color: #e0efeb +> border-radius: 10 + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local-active.svg new file mode 100644 index 0000000000..1781af61b9 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local-active.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local.svg new file mode 100644 index 0000000000..a4f6b73eb1 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/local.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-active.svg new file mode 100644 index 0000000000..601f9576fa --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-default.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-default.svg new file mode 100644 index 0000000000..06fa1165b9 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/m-default.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/manifest.json b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/manifest.json new file mode 100644 index 0000000000..6f71f202e1 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/manifest.json @@ -0,0 +1,211 @@ +{ + "files": { + "FASTN.ftd": { + "name": "FASTN.ftd", + "checksum": "22E9BA037F761093E2BEA5C9D4E33E03787661992D94BA0612BD996FFA1AAE0F", + "size": 208 + }, + "arrow-right.png": { + "name": "arrow-right.png", + "checksum": "9F08169F542CB20A17F9432290A23B35DA8E815718E13749C125E5C915398036", + "size": 264 + }, + "code.ftd": { + "name": "code.ftd", + "checksum": "55817640588F621BDE4A4850AED568085E2C1E9CBBCD7C399C0FADA7DB6E512C", + "size": 125 + }, + "create-cr.ftd": { + "name": "create-cr.ftd", + "checksum": "17C19856B09572E56A82BB37704A69F8505022A65D792CB6E4E89750E84FA263", + "size": 659 + }, + "cross.svg": { + "name": "cross.svg", + "checksum": "030E3E7DBA0BD039E86E78A1DA968F24EA0811FB1C4CAD3481E18947A3F7A1D4", + "size": 1483 + }, + "delete-icon.svg": { + "name": "delete-icon.svg", + "checksum": "52593C3DC6B757A0F683709E254559723400EC0633915866E60E5B3F6DA0922C", + "size": 2944 + }, + "delete.png": { + "name": "delete.png", + "checksum": "044778C91335EC245858A656123EF2B561558C4554B59AAAB36D2208A35C9CD7", + "size": 647 + }, + "desktop-active.svg": { + "name": "desktop-active.svg", + "checksum": "8775C6BF6DCF54FBB347C2484900F65BE08FC2E9F7A1A22F377589E53ACB57CE", + "size": 740 + }, + "desktop.svg": { + "name": "desktop.svg", + "checksum": "2F345251CAAD01E884CD37EEE0AC4E939ABD092428A9B83BDB4886892456C1C8", + "size": 740 + }, + "downarrow.svg": { + "name": "downarrow.svg", + "checksum": "3EDC5E9D3185DABE1ED80673A59B38FA26B86905585C66DAC3DB10038800DEEA", + "size": 493 + }, + "e-active.svg": { + "name": "e-active.svg", + "checksum": "21373E1D1CB66CFDBD4DC69207F6EE1737EC5375CD2061B5EB704790AE19022C", + "size": 285 + }, + "e-default.svg": { + "name": "e-default.svg", + "checksum": "C0F739A6B7182CD32FB54732DBB375D9DD880613118758B65051F19F93F8EED4", + "size": 226 + }, + "edit-icon-default.svg": { + "name": "edit-icon-default.svg", + "checksum": "3E413DAEDE33A18766C486523F19F7B3EC3C1F13E93BEAC85E503B718D0E7B93", + "size": 680 + }, + "edit-icon.svg": { + "name": "edit-icon.svg", + "checksum": "A13E52D1FCC7FD76FD39CB697432D4AC3C47290991558B63A3FDEB43C483B1E8", + "size": 590 + }, + "edit.svg": { + "name": "edit.svg", + "checksum": "7E234382BB2096A022CF12D258515210D30BE7F5D2866902D711E90592F8CB46", + "size": 676 + }, + "editor-icon.svg": { + "name": "editor-icon.svg", + "checksum": "AE8CCE7B1D9EEBE7590EF2A519453CB2059C94E230393D6E1074E0D17F605C51", + "size": 2934 + }, + "editor.ftd": { + "name": "editor.ftd", + "checksum": "E4EC691229D5AE382614B0E3E066E14C4E8FABECCE861DDDD6BC24CFF4BAFFFA", + "size": 59032 + }, + "file.svg": { + "name": "file.svg", + "checksum": "56417622D53BA855271F5A0455F841BA4E084D326C733C461900F860ECEEC162", + "size": 1512 + }, + "folder-icon.svg": { + "name": "folder-icon.svg", + "checksum": "09558AC0F284D4FF37E0B94A2275C3A988B77E465FBA15C9A61650EA57D6D903", + "size": 995 + }, + "git-pull-request.svg": { + "name": "git-pull-request.svg", + "checksum": "F86F00421FA0F656E252440C2675E78E5B952C6343D7BB161F0092C5A1728416", + "size": 1302 + }, + "image.ftd": { + "name": "image.ftd", + "checksum": "58F326B131268701961B0E1763109CAD8CB1A9D8D864720135E63A11EA26B3EC", + "size": 73 + }, + "index.ftd": { + "name": "index.ftd", + "checksum": "3088825DA1446D71924305D7B073D03294A1E7E466AF8EF9449FE0A0CDAC3683", + "size": 4040 + }, + "local-active.svg": { + "name": "local-active.svg", + "checksum": "2DDC6BB01721570A9955188F46051140A457B4776FA0B080A08030F558B8D094", + "size": 292 + }, + "local.svg": { + "name": "local.svg", + "checksum": "1D9CCBE45D0D80A9367852BEEFB7930B63FC78413076784F32E32832C3741319", + "size": 292 + }, + "m-active.svg": { + "name": "m-active.svg", + "checksum": "B43127FA9B7B528A2A0858F6CF8E35C0D74E4F810B6A0098AE832FB052CBB51A", + "size": 340 + }, + "m-default.svg": { + "name": "m-default.svg", + "checksum": "8D94D17FE48001159854B031AF5D96E9220171ACAABEA7A5514E7D19EB24CA1F", + "size": 279 + }, + "markdown.ftd": { + "name": "markdown.ftd", + "checksum": "E49C79D420F5A91ACBFD6F891D03062EE9CE9F17743180872D85BE6994E738A6", + "size": 104 + }, + "mobile-active.svg": { + "name": "mobile-active.svg", + "checksum": "EAE169027F9884E0559E95793F626EB41FE0340511E0D8BED1EC55390B8E7E04", + "size": 1493 + }, + "mobile-frame.png": { + "name": "mobile-frame.png", + "checksum": "6B5910F7EB38FFD7B0518661A2A4AF52FCBC825E3F0ADCA166A17FA92D77D98B", + "size": 42009 + }, + "mobile.svg": { + "name": "mobile.svg", + "checksum": "38B6E21D51CBD7864FA2365BB127BB86A30337574CA1DF47C9C1369DCDA8D65C", + "size": 1485 + }, + "new-file-icon.svg": { + "name": "new-file-icon.svg", + "checksum": "652F3B1C3FCD4F85821925FC5DBF7ADB0F964A3F2F530B821D5D8C5C47B2F11F", + "size": 2982 + }, + "original-status.ftd-0.2": { + "name": "original-status.ftd-0.2", + "checksum": "146E13845A43A62192CFC5CEBB46C706C97998C811F4ECFEBF10E259AFBA379E", + "size": 3306 + }, + "package-info.ftd": { + "name": "package-info.ftd", + "checksum": "DDAC4D477EAB215452C3B904C906460816AFEBE8CF1027CC1E5EA8363F99457F", + "size": 881 + }, + "refresh.svg": { + "name": "refresh.svg", + "checksum": "0BE9E00669EF7798975D06DBD704D80C1DD348D712B2FB0728836F5959CAF538", + "size": 1354 + }, + "rename.png": { + "name": "rename.png", + "checksum": "6E653D8E53E6B826ACD190A365263CD0D4E560506D436DBD3C7C688BC392BB67", + "size": 464 + }, + "right-arrow.svg": { + "name": "right-arrow.svg", + "checksum": "4F72E539073791B9C9F1A4738381A60021372A8F512FC8F4621D5A641FD7943D", + "size": 426 + }, + "server-active.svg": { + "name": "server-active.svg", + "checksum": "35B41E77D4AAA14FF83CB1761197374B4C5206DACEBBB2ECE44CE07BD5683131", + "size": 318 + }, + "server.svg": { + "name": "server.svg", + "checksum": "55E91C6C89BC3818EB771AA08F37D97FDAE9E17E8CEE9B429AD456C2A49AB935", + "size": 318 + }, + "showbar.svg": { + "name": "showbar.svg", + "checksum": "F6109ECDC65DFEFC3B371EB878638BE9D96F7325C3F67CE23D7E8A7E9A172E9E", + "size": 795 + }, + "sync.svg": { + "name": "sync.svg", + "checksum": "86D7130343B46622211A67074289D55536122FE441E27B32E612ED795B259E00", + "size": 1427 + }, + "translation-status.ftd": { + "name": "translation-status.ftd", + "checksum": "F46AF144A7CB8201D123EEE299613F2964DF64A36A5451BF67941DF990D463D2", + "size": 3168 + } + }, + "zip_url": "https://github.com/fastn-stack/fastn-ui/archive/9b154f7807d317c4f617b06726a11ca2ab0a42a1.zip", + "checksum": "01F7EA2F19DBBC720D062757D833BA3C63D282FC7111C13E9E904391EC8CDBFD" +} diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/markdown.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/markdown.ftd new file mode 100644 index 0000000000..2a977ae675 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/markdown.ftd @@ -0,0 +1,6 @@ +-- ftd.text markdown-page: +caption file-name: +optional body content: +if: $content is not null + +$content diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-active.svg new file mode 100644 index 0000000000..fd00bf6f49 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-active.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-frame.png b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-frame.png new file mode 100644 index 0000000000..2c6433949d Binary files /dev/null and b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile-frame.png differ diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile.svg new file mode 100644 index 0000000000..e4f4330308 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/mobile.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/new-file-icon.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/new-file-icon.svg new file mode 100644 index 0000000000..0691c3cd2f --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/new-file-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/original-status.ftd-0.2 b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/original-status.ftd-0.2 new file mode 100644 index 0000000000..2fcea966b4 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/original-status.ftd-0.2 @@ -0,0 +1,247 @@ +-- import: fastn + + + + + + + + + +-- ftd.column original-status-page: +padding-vertical: 40 +padding-horizontal: 20 +width: fill + +-- h0: Translation Status + +-- title: $fastn.package-title +subtitle: key-value: Last modified on: +/> value: $fastn.last-modified-on +/> default: Never synced + +Here is the list of the translation status for the available languages. + +-- key-value: Total number of documents: +value: $fastn.number-of-documents +default: Not known + +-- language-status: + + + + +-- ftd.row key-value: +caption key: +optional string value: +string default: +margin-bottom: 10 +spacing: 2 + +--- ftd.text: $key + +--- ftd.text: $value +if: $value is not null + +--- ftd.text: $default +if: $value is null + + + + + + + + + + + +-- ftd.column title: +caption title: +optional body body: +ftd.ui subtitle: +width: fill +region: h1 + + +--- ftd.row: +spacing: 25 +width: fill + +--- ftd.text: $title +region: title +color: $inherited.colors.main.text +align: center +link: $fastn.home-url + +--- ftd.text: $fastn.language +if: $fastn.language is not null +border-radius: 10 +background-color: $inherited.colors.main.background.base +padding-vertical: 5 +padding-horizontal: 20 +color: $inherited.colors.main.text +align: center + +--- container: ftd.main + +--- subtitle: + +--- markdown: +if: $body is not null +body: $body + + + + + + + + + + + +-- ftd.column h0: +caption title: +optional body body: +width: fill +padding-horizontal: 90 +region: h0 + +--- ftd.text: +text: $title +region: title +color: $inherited.colors.main.text +padding-bottom: 24 + +--- container: ftd.main + +--- markdown: +if: { body != NULL } +body: $body + + + + + + + + + + + + + + +-- ftd.text markdown: +body body: +text: $body +color: $inherited.colors.main.text +padding-bottom: 34 +padding-top: 50 + + + + + + + + + + +-- ftd.row print: +fastn.all-language-status-data data: +width: fill +border-bottom: 1 +border-color: $inherited.colors.main.cta-primary.base +padding: 10 + +--- ftd.text: $data.language +link: $data.url +width: percent 20 +padding: 5 + +--- ftd.integer: $data.never-marked +width: percent 20 +padding: 5 +color: $inherited.colors.main.cta-primary.base + +--- ftd.integer: $data.missing +width: percent 20 +padding: 5 +color: $inherited.colors.main.cta-primary.base + +--- ftd.integer: $data.out-dated +width: percent 20 +padding: 5 +color: $inherited.colors.main.cta-primary.base + +--- ftd.integer: $data.upto-date +width: percent 20 +padding: 5 +color: $inherited.colors.main.cta-primary.base + +--- ftd.text: $data.last-modified-on +if: $data.last-modified-on is not null +link: $data.url +width: percent 20 +padding: 5 + +--- ftd.text: Never Synced +if: $data.last-modified-on is null +link: $data.url +width: percent 20 +padding: 5 + + + + + + + + + + + +-- ftd.column language-status: +background-color: $inherited.colors.main.background.base +width: fill +max-width: 1000 +border-radius: 5 + +--- ftd.row: +width: fill +background-color: $inherited.colors.main.background.base +border-color: $inherited.colors.main.cta-primary.base +padding: 10 +border-top-radius: 5 + +--- ftd.text: Language +width: percent 20 + +--- ftd.text: Never marked +width: percent 20 +padding: 5 + +--- ftd.text: Missing +width: percent 20 +padding: 5 + +--- ftd.text: Out-dated +width: percent 20 +padding: 5 + +--- ftd.text: Up-to Date +width: percent 20 +padding: 5 + +--- ftd.text: Last modified on +width: percent 20 +padding: 5 + +--- container: ftd.main + +/--- print: +$loop$: $fastn.all-language-translation-status as $obj +data: $obj + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/package-info.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/package-info.ftd new file mode 100644 index 0000000000..78e0f58de7 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/package-info.ftd @@ -0,0 +1,34 @@ +-- import: fastn +-- import: fastn-lib + + +-- ftd.column package-info-page: +width: fill +padding: 40 + +--- fastn-lib.h0: $fastn.i18n.welcome-fastn-page + +$fastn.i18n.welcome-fastn-page-subtitle + +--- ftd.text: $fastn.package-name + +--- fastn-lib.key-value-without-default: Built with `fastn-cli` version +value: $fastn.info.cli-version + +--- fastn-lib.key-value-without-default: Git hash for `fastn-cli` build +value: $fastn.info.cli-git-commit-hash + +--- fastn-lib.key-value-without-default: `fastn-cli` build timestamp +value: $fastn.info.cli-created-on + +--- fastn-lib.key-value-without-default: $fastn.i18n.language +value: $fastn.language + +--- fastn-lib.key-value-without-default: Zip: +value: $fastn.package-zip + +--- fastn-lib.key-value-without-default: Build timestamp +value: $fastn.info.build-created-on + +--- fastn-lib.key-value-without-default: FTD version +value: $fastn.info.ftd-version diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/refresh.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/refresh.svg new file mode 100644 index 0000000000..0f4747405b --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/refresh.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/rename.png b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/rename.png new file mode 100644 index 0000000000..97f7a72089 Binary files /dev/null and b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/rename.png differ diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/right-arrow.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/right-arrow.svg new file mode 100644 index 0000000000..97429baec0 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/right-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server-active.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server-active.svg new file mode 100644 index 0000000000..527b060850 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server-active.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server.svg new file mode 100644 index 0000000000..1de5cddd19 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/server.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/showbar.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/showbar.svg new file mode 100644 index 0000000000..f46740c0a9 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/showbar.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/sync.svg b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/sync.svg new file mode 100644 index 0000000000..8de2198c63 --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/sync.svg @@ -0,0 +1,3 @@ + + + diff --git a/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/translation-status.ftd b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/translation-status.ftd new file mode 100644 index 0000000000..fe611a3aed --- /dev/null +++ b/fastn-core/tests/18-fmt/output/.fastn/package-cache/fastn-stack.github.io/fastn-ui/translation-status.ftd @@ -0,0 +1,184 @@ +-- import: fastn +-- import: fastn-lib + + +-- ftd.column translation-status-page: +padding-vertical: 40 +padding-horizontal: 20 +width: fill + +--- h0: $fastn.i18n.language-detail-page + +--- title: $fastn.package-title +subtitle: key-value: $fastn.i18n.last-modified-on +> value: $fastn.last-modified-on +> default: Never synced + +$fastn.i18n.language-detail-page-body + +--- key-value: $fastn.i18n.total-number-of-documents +value: $fastn.number-of-documents +default: Not known + +--- files-status: + + + +-- ftd.row key-value: +caption key: +optional string value: +string default: +margin-bottom: 10 +spacing: 2 + +--- ftd.text: $key +position: center + +--- ftd.text: $value +if: $value is not null +position: center + +--- ftd.text: $default +if: $value is null +position: center + + + +-- ftd.column title: +caption title: +optional body body: +ftd.ui subtitle: +width: fill +region: h1 + +--- ftd.row: +spacing: 25 +width: fill + +--- ftd.text: $title +region: title +color: $fastn.color.main.text +style: bold +align: center +link: $fastn.home-url + +--- ftd.text: $fastn.language +if: $fastn.language is not null +border-radius: 10 +background-color: $fastn.color.main.background.base +padding-vertical: 5 +padding-horizontal: 20 +color: $fastn.color.main.text +align: center + +--- container: ftd.main + +--- subtitle: + +--- markdown: +if: $body is not null +body: $body + + +-- ftd.column h0: +caption title: +optional body body: +width: fill +padding-horizontal: 90 +region: h0 + +--- ftd.text: +text: $title +region: title +color: $fastn.color.main.text +style: bold +padding-bottom: 24 + +--- container: ftd.main + +--- markdown: +if: $body is not null +body: $body + + + +-- ftd.text markdown: +body body: +text: $body +color: $fastn.color.main.text +padding-bottom: 34 +padding-top: 50 + + + +-- ftd.row print: +caption file: +ftd.ui status: +width: fill +border-bottom: 1 +border-color: $fastn.color.main.cta-primary.base +padding: 10 + +--- ftd.text: $file +width: percent 50 +padding: 5 + +--- status: + + + +-- ftd.column files-status: +background-color: $fastn.color.main.background.base +width: fill +max-width: 800 + +--- ftd.row: +width: fill +background-color: $fastn.color.main.background.base +color: $fastn.color.main.text +padding: 10 +border-top-radius: 5 + +--- ftd.text: $fastn.i18n.document +width: percent 50 +padding: 5 + +--- ftd.text: $fastn.i18n.status +width: percent 50 +padding: 5 + +--- container: ftd.main + +--- print: $obj +$loop$: $fastn.missing-files as $obj +status: ftd.text: $fastn.i18n.missing +> padding: 5 +> color: $fastn.color.main.text +> background-color: $fastn.color.main.background.base +> border-radius: 10 + +--- print: $obj +$loop$: $fastn.never-marked-files as $obj +status: ftd.text: $fastn.i18n.never-marked +> padding: 5 +> color: $fastn.color.main.text +> background-color: $fastn.color.main.background.base +> border-radius: 10 + + +--- print: $obj +$loop$: $fastn.outdated-files as $obj +status: ftd.text: $fastn.i18n.out-dated +> padding: 5 +> color: $fastn.color.main.text +> background-color: $fastn.color.main.background.base +> border-radius: 10 + + +--- print: $obj +$loop$: $fastn.upto-date-files as $obj +status: ftd.text: $fastn.i18n.upto-date +> padding: 5 +> color: $fastn.color.main.text +> background-color: $fastn.color.main.background.base +> border-radius: 10 diff --git a/fastn-core/tests/20-fastn-update-check/cmd.p1 b/fastn-core/tests/20-fastn-update-check/cmd.p1 index 458afb8156..43933622c4 100644 --- a/fastn-core/tests/20-fastn-update-check/cmd.p1 +++ b/fastn-core/tests/20-fastn-update-check/cmd.p1 @@ -10,5 +10,5 @@ Error: Out of Sync Package The package 'fastn-community.github.io/bling' is out of sync with the FASTN.ftd file. -File: '/.packages/fastn-community.github.io/bling/Changelog.md' +File: '/.fastn/package-cache/fastn-community.github.io/bling/Changelog.md' Operation: Write Attempt diff --git a/fastn-update/src/lib.rs b/fastn-update/src/lib.rs index c01bd444ef..3859e6dd7b 100644 --- a/fastn-update/src/lib.rs +++ b/fastn-update/src/lib.rs @@ -295,7 +295,7 @@ pub async fn update( offline: bool, check: bool, ) -> fastn_core::Result<()> { - let packages_root = ds.root().join(".packages"); + let packages_root = ds.root().join(".fastn/package-cache"); let current_package = utils::read_current_package(ds).await?; if current_package.dependencies.is_empty() { diff --git a/fastn/src/main.rs b/fastn/src/main.rs index 8b46c46861..ee74bd5eed 100644 --- a/fastn/src/main.rs +++ b/fastn/src/main.rs @@ -147,6 +147,7 @@ async fn fastn_core_commands(matches: &clap::ArgMatches) -> fastn_core::Result<( let inline_css = build.values_of_("css"); let zip_url = build.value_of_("zip-url"); let offline: bool = build.get_flag("offline"); + let _dev_mode: bool = build.get_flag("dev"); fastn_update::update(&ds, offline, false).await?; @@ -281,6 +282,7 @@ fn app(version: &'static str) -> clap::Command { .action(clap::ArgAction::Append)) .arg(clap::arg!(--edition "The FTD edition")) .arg(clap::arg!(--offline "Disables automatic package update checks to operate in offline mode")) + .arg(clap::arg!(--"dev" "Runs fastn build in dev mode for performing download-on-demand")) ) .subcommand( clap::Command::new("fmt") @@ -347,7 +349,8 @@ mod sub_command { .arg(clap::arg!(--"css" "CSS text added in ftd files") .action(clap::ArgAction::Append)) .arg(clap::arg!(--"download-base-url" "If running without files locally, download needed files from here")) - .arg(clap::arg!(--offline "Disables automatic package update checks to operate in offline mode")); + .arg(clap::arg!(--offline "Disables automatic package update checks to operate in offline mode")) + .arg(clap::arg!(--"dev" "Runs fastn serve in dev mode for performing download-on-demand")); if cfg!(feature = "remote") { serve } else {