examples: fix vweb assets example (#7949)
parent
226c918bdd
commit
5dbc19410c
|
@ -29,7 +29,7 @@ pub fn (mut app App) init_once() {
|
||||||
pub fn (mut app App) init() {
|
pub fn (mut app App) init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn (mut app App) index() {
|
pub fn (mut app App) index() vweb.Result {
|
||||||
// We can dynamically specify which assets are to be used in template.
|
// We can dynamically specify which assets are to be used in template.
|
||||||
mut am := assets.new_manager()
|
mut am := assets.new_manager()
|
||||||
am.add_css('assets/index.css')
|
am.add_css('assets/index.css')
|
||||||
|
@ -37,7 +37,7 @@ pub fn (mut app App) index() {
|
||||||
title := 'VWeb Assets Example'
|
title := 'VWeb Assets Example'
|
||||||
subtitle := 'VWeb can serve static assets too!'
|
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.'
|
message := 'It also has an Assets Manager that allows dynamically specifying which CSS and JS files to be used.'
|
||||||
$vweb.html()
|
return $vweb.html()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn (mut app App) text() vweb.Result {
|
fn (mut app App) text() vweb.Result {
|
||||||
|
|
Loading…
Reference in New Issue