Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add footer with program version #456

Merged
merged 8 commits into from
Mar 1, 2021

Conversation

levaitamas
Copy link
Contributor

Implements #336. Looks super basic. Comments, edits, etc. are welcome.


Directory Listing:

image


An Error Page:

image


Copy link
Owner

@svenstaro svenstaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice stuff. Just small nits. :)

src/renderer.rs Outdated
}
}
}
}
}

// Get version info
fn get_version_info() -> String {
const PROG_NAME: Option<&'static str> = option_env!("CARGO_PKG_NAME");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit: You can use crate_version!() and crate_name!() from clap (which is re-exported from structopt which we already use). This should cut down on the code a little.

src/renderer.rs Outdated
// Partial: version footer
fn version_footer() -> Markup {
html! {
p style="text-align:center;padding-top:1em" {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this a little less visible. I suggest making it smaller and giving it a somewhat succinct color (depending on theme).

The at_color in style.scss seems like a good candidate to build off of. I suggest make a new variable footer_color in every theme, use the respective values of at_color and just tone down the contrast a little.

@svenstaro
Copy link
Owner

Oh, and you can tell clippy to ignore the complexity for that function that's failing.

@levaitamas
Copy link
Contributor Author

Thanks for your comments, @svenstaro. I managed to address them. Could you please take another look?

@svenstaro
Copy link
Owner

Great stuff, thanks! :)

@svenstaro svenstaro merged commit 54f755c into svenstaro:master Mar 1, 2021
@levaitamas levaitamas deleted the version-footer branch March 1, 2021 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants