Add MaterializeCSS styles (#1)

## Changes
* Adds the [AssetPack](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack) Mojolicious plugin
* Adds the [MaterializeCSS](https://www.npmjs.com/package/materialize-css) Node package
* Applies styles to app

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-07-31 03:07:33 +00:00
parent d2cecc1523
commit 203a53cb32
10 changed files with 102 additions and 8 deletions

1
mojo_app/assets/materialize.css vendored Symbolic link
View File

@@ -0,0 +1 @@
../node_modules/materialize-css/dist/css/materialize.css

View File

@@ -10,6 +10,9 @@ sub startup ($self) {
# Configure the application
$self->secrets($config->{secrets});
$self->plugin(AssetPack => {pipes => [qw(Css)]});
$self->asset->process("app.css" => ("materialize.css"));
# Router
my $r = $self->routes;

18
mojo_app/package-lock.json generated Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "mojo_app",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"materialize-css": "^1.0.0"
}
},
"node_modules/materialize-css": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/materialize-css/-/materialize-css-1.0.0.tgz",
"integrity": "sha512-4/oecXl8y/1i8RDZvyvwAICyqwNoKU4or5uf8uoAd74k76KzZ0Llym4zhJ5lLNUskcqjO0AuMcvNyDkpz8Z6zw==",
"license": "MIT"
}
}
}

5
mojo_app/package.json Normal file
View File

@@ -0,0 +1,5 @@
{
"dependencies": {
"materialize-css": "^1.0.0"
}
}

View File

@@ -1,5 +1,12 @@
<!DOCTYPE html>
<html>
<head><title><%= title %></title></head>
<body><%= content %></body>
<head>
<title><%= title %></title>
%= asset "app.css"
</head>
<body>
<%= content %>
</body>
</html>