diff --git a/.gitignore b/.gitignore index 4083037..64126e7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ local +node_modules +assetpack.db diff --git a/cpanfile b/cpanfile index 8811399..4b2387e 100644 --- a/cpanfile +++ b/cpanfile @@ -1 +1,2 @@ -requires 'Mojolicious' => '9.48', +requires 'Mojolicious' => '9.48'; +requires 'Mojolicious::Plugin::AssetPack' => '2.15'; diff --git a/cpanfile.snapshot b/cpanfile.snapshot index 95f032b..3a88c17 100644 --- a/cpanfile.snapshot +++ b/cpanfile.snapshot @@ -1,5 +1,21 @@ # carton snapshot format: version 1.0 DISTRIBUTIONS + File-Which-1.27 + pathname: P/PL/PLICEASE/File-Which-1.27.tar.gz + provides: + File::Which 1.27 + requirements: + ExtUtils::MakeMaker 0 + base 0 + perl 5.006 + IPC-Run3-0.049 + pathname: R/RJ/RJBS/IPC-Run3-0.049.tar.gz + provides: + IPC::Run3 0.049 + requirements: + ExtUtils::MakeMaker 0 + Test::More 0.31 + Time::HiRes 0 Mojolicious-9.48 pathname: S/SR/SRI/Mojolicious-9.48.tar.gz provides: @@ -120,3 +136,32 @@ DISTRIBUTIONS IO::Socket::IP 0.37 Sub::Util 1.41 perl 5.016 + Mojolicious-Plugin-AssetPack-2.15 + pathname: S/SR/SRI/Mojolicious-Plugin-AssetPack-2.15.tar.gz + provides: + Mojolicious::Plugin::AssetPack 2.15 + Mojolicious::Plugin::AssetPack::Asset undef + Mojolicious::Plugin::AssetPack::Asset::Null undef + Mojolicious::Plugin::AssetPack::Pipe undef + Mojolicious::Plugin::AssetPack::Pipe::CoffeeScript undef + Mojolicious::Plugin::AssetPack::Pipe::Combine undef + Mojolicious::Plugin::AssetPack::Pipe::Css undef + Mojolicious::Plugin::AssetPack::Pipe::Favicon undef + Mojolicious::Plugin::AssetPack::Pipe::Fetch undef + Mojolicious::Plugin::AssetPack::Pipe::JavaScript undef + Mojolicious::Plugin::AssetPack::Pipe::Jpeg undef + Mojolicious::Plugin::AssetPack::Pipe::Less undef + Mojolicious::Plugin::AssetPack::Pipe::Png undef + Mojolicious::Plugin::AssetPack::Pipe::Riotjs undef + Mojolicious::Plugin::AssetPack::Pipe::RollupJs undef + Mojolicious::Plugin::AssetPack::Pipe::Sass undef + Mojolicious::Plugin::AssetPack::Pipe::TypeScript undef + Mojolicious::Plugin::AssetPack::Pipe::Vuejs undef + Mojolicious::Plugin::AssetPack::Store undef + Mojolicious::Plugin::AssetPack::Util undef + Mojolicious::Plugin::AssetPack::Util::_chdir undef + requirements: + ExtUtils::MakeMaker 0 + File::Which 1.21 + IPC::Run3 0.048 + Mojolicious 9.34 diff --git a/mojo_app/assets/materialize.css b/mojo_app/assets/materialize.css new file mode 120000 index 0000000..477a32e --- /dev/null +++ b/mojo_app/assets/materialize.css @@ -0,0 +1 @@ +../node_modules/materialize-css/dist/css/materialize.css \ No newline at end of file diff --git a/mojo_app/lib/MojoApp.pm b/mojo_app/lib/MojoApp.pm index 3f38a44..dda1190 100644 --- a/mojo_app/lib/MojoApp.pm +++ b/mojo_app/lib/MojoApp.pm @@ -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; diff --git a/mojo_app/package-lock.json b/mojo_app/package-lock.json new file mode 100644 index 0000000..dabcd3d --- /dev/null +++ b/mojo_app/package-lock.json @@ -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" + } + } +} diff --git a/mojo_app/package.json b/mojo_app/package.json new file mode 100644 index 0000000..41974fe --- /dev/null +++ b/mojo_app/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "materialize-css": "^1.0.0" + } +} diff --git a/mojo_app/templates/layouts/default.html.ep b/mojo_app/templates/layouts/default.html.ep index 599c556..323bdd5 100644 --- a/mojo_app/templates/layouts/default.html.ep +++ b/mojo_app/templates/layouts/default.html.ep @@ -1,5 +1,12 @@ -