mirror of
https://github.com/getnora-io/nora.git
synced 2026-04-12 10:20:32 +00:00
Display version dynamically in UI sidebar
- Add VERSION constant using CARGO_PKG_VERSION - Show version in both light and dark theme sidebars - Update workspace version to 0.2.7
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
/// Application version from Cargo.toml
|
||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
/// Main layout wrapper with header and sidebar
|
||||
pub fn layout(title: &str, content: &str, active_page: Option<&str>) -> String {
|
||||
format!(
|
||||
@@ -202,13 +205,14 @@ fn sidebar_dark(active_page: Option<&str>) -> String {
|
||||
</nav>
|
||||
<div class="px-4 py-4 border-t border-slate-700">
|
||||
<div class="text-xs text-slate-400">
|
||||
Nora v0.2.0
|
||||
Nora v{}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"#,
|
||||
super::logo::LOGO_BASE64,
|
||||
nav_html
|
||||
nav_html,
|
||||
VERSION
|
||||
)
|
||||
}
|
||||
|
||||
@@ -563,13 +567,14 @@ fn sidebar(active_page: Option<&str>) -> String {
|
||||
<!-- Footer -->
|
||||
<div class="px-4 py-4 border-t border-slate-700">
|
||||
<div class="text-xs text-slate-400">
|
||||
Nora v0.2.0
|
||||
Nora v{}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
"#,
|
||||
super::logo::LOGO_BASE64,
|
||||
nav_html
|
||||
nav_html,
|
||||
VERSION
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user