diff --git a/examples/vweb/vweb_assets/index.html b/examples/vweb/vweb_assets/index.html index bdfa670d29..f687e58438 100644 --- a/examples/vweb/vweb_assets/index.html +++ b/examples/vweb/vweb_assets/index.html @@ -1,7 +1,7 @@
@title - @css + @css 'examples/vweb/vweb_assets/assets/index.css'

@title

diff --git a/examples/vweb/vweb_assets/vweb_assets.v b/examples/vweb/vweb_assets/vweb_assets.v index cd102ddf3e..5e00b8fae1 100644 --- a/examples/vweb/vweb_assets/vweb_assets.v +++ b/examples/vweb/vweb_assets/vweb_assets.v @@ -20,10 +20,10 @@ pub fn (mut app App) init_once() { // Arbitary mime type. app.serve_static('/favicon.ico', 'favicon.ico', 'img/x-icon') // Automatically make available known static mime types found in given directory. - app.handle_static('assets') + // app.handle_static('assets') // This would make available all known static mime types from current // directory and below. - // app.vweb.handle_static('.') + app.handle_static('.') } pub fn (mut app App) init() { @@ -31,9 +31,9 @@ pub fn (mut app App) init() { pub fn (mut app App) index() vweb.Result { // We can dynamically specify which assets are to be used in template. - mut am := assets.new_manager() - am.add_css('assets/index.css') - css := am.include_css(false) + // mut am := assets.new_manager() + // am.add_css('assets/index.css') + // css := am.include_css(false) title := 'VWeb Assets Example' subtitle := 'VWeb can serve static assets too!' message := 'It also has an Assets Manager that allows dynamically specifying which CSS and JS files to be used.'