🔖 [pagetop] release development version 0.0.56
This commit is contained in:
parent
ce28bf3e2f
commit
3ff00ac38f
5 changed files with 17 additions and 15 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "pagetop"
|
name = "pagetop"
|
||||||
version = "0.0.55"
|
version = "0.0.56"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
description = "An opinionated web framework to build modular Server-Side Rendering web solutions."
|
description = "An opinionated web framework to build modular Server-Side Rendering web solutions."
|
||||||
|
|
@ -36,8 +36,8 @@ itoa = "1.0.11"
|
||||||
nom = "7.1.3"
|
nom = "7.1.3"
|
||||||
paste = "1.0.15"
|
paste = "1.0.15"
|
||||||
substring = "1.4.5"
|
substring = "1.4.5"
|
||||||
term_size = "0.3.2"
|
terminal_size = "0.3.0"
|
||||||
toml = "0.8.16"
|
toml = "0.8.19"
|
||||||
|
|
||||||
tracing = "0.1.40"
|
tracing = "0.1.40"
|
||||||
tracing-appender = "0.2.3"
|
tracing-appender = "0.2.3"
|
||||||
|
|
@ -48,7 +48,7 @@ fluent-templates = "0.9.4"
|
||||||
unic-langid = { version = "0.9.5", features = ["macros"] }
|
unic-langid = { version = "0.9.5", features = ["macros"] }
|
||||||
|
|
||||||
actix-web = "4"
|
actix-web = "4"
|
||||||
actix-session = { version = "0.9.0", features = ["cookie-session"] }
|
actix-session = { version = "0.10.0", features = ["cookie-session"] }
|
||||||
|
|
||||||
actix-web-files = { package = "actix-files", version = "0.6.6" }
|
actix-web-files = { package = "actix-files", version = "0.6.6" }
|
||||||
actix-web-static-files = "4.0.1"
|
actix-web-static-files = "4.0.1"
|
||||||
|
|
|
||||||
|
|
@ -61,12 +61,14 @@ impl Application {
|
||||||
|
|
||||||
// Displays the application banner based on the configuration.
|
// Displays the application banner based on the configuration.
|
||||||
fn show_banner() {
|
fn show_banner() {
|
||||||
|
use terminal_size::{terminal_size, Width};
|
||||||
|
|
||||||
if config::SETTINGS.app.startup_banner.to_lowercase() != "off" {
|
if config::SETTINGS.app.startup_banner.to_lowercase() != "off" {
|
||||||
// Application name, formatted for the terminal width if necessary.
|
// Application name, formatted for the terminal width if necessary.
|
||||||
let mut app_name = config::SETTINGS.app.name.to_string();
|
let mut app_name = config::SETTINGS.app.name.to_string();
|
||||||
if let Some((term_width, _)) = term_size::dimensions() {
|
if let Some((Width(term_width), _)) = terminal_size() {
|
||||||
if term_width >= 80 {
|
if term_width >= 80 {
|
||||||
let maxlen = (term_width / 10) - 2;
|
let maxlen: usize = ((term_width / 10) - 2).into();
|
||||||
let mut app = app_name.substring(0, maxlen).to_owned();
|
let mut app = app_name.substring(0, maxlen).to_owned();
|
||||||
if app_name.len() > maxlen {
|
if app_name.len() > maxlen {
|
||||||
app = format!("{app}...");
|
app = format!("{app}...");
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ impl PackageTrait for Basic {
|
||||||
|
|
||||||
impl ThemeTrait for Basic {
|
impl ThemeTrait for Basic {
|
||||||
fn after_prepare_body(&self, page: &mut Page) {
|
fn after_prepare_body(&self, page: &mut Page) {
|
||||||
page.set_assets(AssetsOp::SetFavicon(
|
page.set_assets(AssetsOp::SetFavicon(Some(
|
||||||
Some(Favicon::new().with_icon("/base/favicon.ico")),
|
Favicon::new().with_icon("/base/favicon.ico"),
|
||||||
))
|
)))
|
||||||
.set_assets(AssetsOp::AddStyleSheet(
|
.set_assets(AssetsOp::AddStyleSheet(
|
||||||
StyleSheet::from("/base/css/normalize.min.css")
|
StyleSheet::from("/base/css/normalize.min.css")
|
||||||
.with_version("8.0.1")
|
.with_version("8.0.1")
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ impl PackageTrait for Chassis {
|
||||||
|
|
||||||
impl ThemeTrait for Chassis {
|
impl ThemeTrait for Chassis {
|
||||||
fn after_prepare_body(&self, page: &mut Page) {
|
fn after_prepare_body(&self, page: &mut Page) {
|
||||||
page.set_assets(AssetsOp::SetFavicon(
|
page.set_assets(AssetsOp::SetFavicon(Some(
|
||||||
Some(Favicon::new().with_icon("/base/favicon.ico")),
|
Favicon::new().with_icon("/base/favicon.ico"),
|
||||||
))
|
)))
|
||||||
.set_assets(AssetsOp::AddStyleSheet(
|
.set_assets(AssetsOp::AddStyleSheet(
|
||||||
StyleSheet::from("/base/css/normalize.min.css")
|
StyleSheet::from("/base/css/normalize.min.css")
|
||||||
.with_version("8.0.1")
|
.with_version("8.0.1")
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ impl PackageTrait for Inception {
|
||||||
|
|
||||||
impl ThemeTrait for Inception {
|
impl ThemeTrait for Inception {
|
||||||
fn after_prepare_body(&self, page: &mut Page) {
|
fn after_prepare_body(&self, page: &mut Page) {
|
||||||
page.set_assets(AssetsOp::SetFavicon(
|
page.set_assets(AssetsOp::SetFavicon(Some(
|
||||||
Some(Favicon::new().with_icon("/base/favicon.ico")),
|
Favicon::new().with_icon("/base/favicon.ico"),
|
||||||
))
|
)))
|
||||||
.set_assets(AssetsOp::AddStyleSheet(
|
.set_assets(AssetsOp::AddStyleSheet(
|
||||||
StyleSheet::from("/base/css/normalize.min.css")
|
StyleSheet::from("/base/css/normalize.min.css")
|
||||||
.with_version("8.0.1")
|
.with_version("8.0.1")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue