diff --git a/Cargo.lock b/Cargo.lock index de95d92..e4b38a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2581,7 +2581,7 @@ dependencies = [ [[package]] name = "rustpad" -version = "0.2.11" +version = "0.2.13" dependencies = [ "argon2", "aws-config", diff --git a/Cargo.toml b/Cargo.toml index afddb1e..1cc70e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rustpad" -version = "0.2.11" +version = "0.2.13" edition = "2024" rust-version = "1.94" description = "Collaborative Markdown notepad built with Axum, WebSockets and SQLite, PostgreSQL and MySQL" diff --git a/src/app/pages.rs b/src/app/pages.rs index b28e7a1..ab5903e 100644 --- a/src/app/pages.rs +++ b/src/app/pages.rs @@ -26,9 +26,25 @@ fn render_editor_page( protected_resource_label: &str, extra_shortcuts: &str, ) -> Response { + let (resource_aria_label, resource_breadcrumb) = if resource_kind == "note" { + ( + "RustPad Workspace Note", + format!( + r#"WorkspaceNote"#, + escape_html(parent_url) + ), + ) + } else { + ( + "RustPad Note", + r#"Note"#.to_string(), + ) + }; + let html = include_str!("../../static/editor.html") .replace("__RESOURCE_KIND__", resource_kind) - .replace("__RESOURCE_LABEL__", "Note") + .replace("__RESOURCE_ARIA_LABEL__", resource_aria_label) + .replace("__RESOURCE_BREADCRUMB__", &resource_breadcrumb) .replace("__DOCUMENT_TITLE__", &escape_html(document_title)) .replace("__PARENT_TITLE__", &escape_html(parent_title)) .replace("__PARENT_URL__", &escape_html(parent_url)) diff --git a/static/css/styles.css b/static/css/styles.css index 694ed55..060069e 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -2586,7 +2586,7 @@ dialog::backdrop { } .hide-preview-line-numbers .preview { - padding-left: 0; + padding-left: 24px; } .hide-preview-line-numbers .preview-source-line::before { @@ -6178,6 +6178,25 @@ dialog::backdrop { text-decoration: none; } +.resource-brand__trail { + display: flex; + align-items: center; + gap: 5px; + min-height: .8rem; + white-space: nowrap; +} + +.resource-brand__separator { + color: var(--text-muted); + font-size: .68rem; + line-height: 1; + user-select: none; +} + +.resource-brand__kind--current { + color: var(--text-heading); +} + .resource-brand__kind:hover, .resource-brand__kind:focus-visible, .resource-brand__logo:hover, diff --git a/static/editor.html b/static/editor.html index 3411a9b..f9fe09c 100644 --- a/static/editor.html +++ b/static/editor.html @@ -15,9 +15,9 @@
-
+
- __RESOURCE_LABEL__ +