better links to workspaces
This commit is contained in:
Generated
+1
-1
@@ -2581,7 +2581,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustpad"
|
name = "rustpad"
|
||||||
version = "0.2.11"
|
version = "0.2.13"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argon2",
|
"argon2",
|
||||||
"aws-config",
|
"aws-config",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rustpad"
|
name = "rustpad"
|
||||||
version = "0.2.11"
|
version = "0.2.13"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.94"
|
rust-version = "1.94"
|
||||||
description = "Collaborative Markdown notepad built with Axum, WebSockets and SQLite, PostgreSQL and MySQL"
|
description = "Collaborative Markdown notepad built with Axum, WebSockets and SQLite, PostgreSQL and MySQL"
|
||||||
|
|||||||
+17
-1
@@ -26,9 +26,25 @@ fn render_editor_page(
|
|||||||
protected_resource_label: &str,
|
protected_resource_label: &str,
|
||||||
extra_shortcuts: &str,
|
extra_shortcuts: &str,
|
||||||
) -> Response {
|
) -> Response {
|
||||||
|
let (resource_aria_label, resource_breadcrumb) = if resource_kind == "note" {
|
||||||
|
(
|
||||||
|
"RustPad Workspace Note",
|
||||||
|
format!(
|
||||||
|
r#"<a id="resource-parent-link" class="resource-brand__kind" href="{}">Workspace</a><span class="resource-brand__separator" aria-hidden="true">/</span><span class="resource-brand__kind resource-brand__kind--current" aria-current="page">Note</span>"#,
|
||||||
|
escape_html(parent_url)
|
||||||
|
),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(
|
||||||
|
"RustPad Note",
|
||||||
|
r#"<span class="resource-brand__kind resource-brand__kind--current" aria-current="page">Note</span>"#.to_string(),
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
let html = include_str!("../../static/editor.html")
|
let html = include_str!("../../static/editor.html")
|
||||||
.replace("__RESOURCE_KIND__", resource_kind)
|
.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("__DOCUMENT_TITLE__", &escape_html(document_title))
|
||||||
.replace("__PARENT_TITLE__", &escape_html(parent_title))
|
.replace("__PARENT_TITLE__", &escape_html(parent_title))
|
||||||
.replace("__PARENT_URL__", &escape_html(parent_url))
|
.replace("__PARENT_URL__", &escape_html(parent_url))
|
||||||
|
|||||||
+20
-1
@@ -2586,7 +2586,7 @@ dialog::backdrop {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hide-preview-line-numbers .preview {
|
.hide-preview-line-numbers .preview {
|
||||||
padding-left: 0;
|
padding-left: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide-preview-line-numbers .preview-source-line::before {
|
.hide-preview-line-numbers .preview-source-line::before {
|
||||||
@@ -6178,6 +6178,25 @@ dialog::backdrop {
|
|||||||
text-decoration: none;
|
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:hover,
|
||||||
.resource-brand__kind:focus-visible,
|
.resource-brand__kind:focus-visible,
|
||||||
.resource-brand__logo:hover,
|
.resource-brand__logo:hover,
|
||||||
|
|||||||
+2
-2
@@ -15,9 +15,9 @@
|
|||||||
<body class="pad-page" data-resource-kind="__RESOURCE_KIND__" data-registration-enabled="__REGISTRATION_ENABLED__">
|
<body class="pad-page" data-resource-kind="__RESOURCE_KIND__" data-registration-enabled="__REGISTRATION_ENABLED__">
|
||||||
<header class="app-header">
|
<header class="app-header">
|
||||||
<div class="app-header__main">
|
<div class="app-header__main">
|
||||||
<div class="resource-brand" aria-label="RustPad __RESOURCE_LABEL__">
|
<div class="resource-brand" aria-label="__RESOURCE_ARIA_LABEL__">
|
||||||
<a class="resource-brand__logo home-brand" href="/" aria-label="RustPad home">RustPad</a>
|
<a class="resource-brand__logo home-brand" href="/" aria-label="RustPad home">RustPad</a>
|
||||||
<a id="resource-parent-link" class="resource-brand__kind __PARENT_CLASS__" href="__PARENT_URL__">__RESOURCE_LABEL__</a>
|
<nav class="resource-brand__trail" aria-label="Current location">__RESOURCE_BREADCRUMB__</nav>
|
||||||
</div>
|
</div>
|
||||||
<span class="header-divider"></span>
|
<span class="header-divider"></span>
|
||||||
<div id="document-link-copy" class="document-heading document-heading--copy" role="button" tabindex="0"
|
<div id="document-link-copy" class="document-heading document-heading--copy" role="button" tabindex="0"
|
||||||
|
|||||||
Reference in New Issue
Block a user