1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

vweb: $html

This commit is contained in:
Alexander Medvednikov
2020-06-06 21:36:24 +02:00
parent 16bf300934
commit 4d5ac1e16d
7 changed files with 88 additions and 9 deletions

View File

@ -34,10 +34,11 @@ pub fn compile_template(content string) string {
mut s := strings.new_builder(1000)
// base := path.all_after_last('/').replace('.html', '')
s.writeln("
mut sb := strings.new_builder(${lines.len * 30})
header := \' \' // TODO remove
_ = header
//footer := \'footer\'
// === vweb html template ===
mut sb := strings.new_builder(${lines.len * 30})
header := \' \' // TODO remove
_ = header
//footer := \'footer\'
")
s.writeln(str_start)
mut in_css := true // false
@ -88,6 +89,7 @@ _ = header
}
}
s.writeln(str_end)
s.writeln('tmpl_res := sb.str() }')
s.writeln('tmpl_res := sb.str() ')
s.writeln('// === end of vweb html template ===')
return s.str()
}