From c9cfe9d40b2c6c9eba6972618230152c838fa321 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 11 Jun 2020 20:34:59 +0200 Subject: [PATCH] vweb: @js and @css template fns --- vlib/vweb/tmpl/tmpl.v | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/vlib/vweb/tmpl/tmpl.v b/vlib/vweb/tmpl/tmpl.v index 5c0d4ccd94..32cca5d82c 100644 --- a/vlib/vweb/tmpl/tmpl.v +++ b/vlib/vweb/tmpl/tmpl.v @@ -67,8 +67,8 @@ _ = header else if line == '' { state = .html } - // TODO if line.contains('@include ') && false { + // TODO pos := line.index('@include ') or { continue } @@ -84,6 +84,20 @@ _ = header } continue //s.writeln(file_content) + } else if line.contains('@js ') { + pos := line.index('@js') or { + continue + } + s.write('') + } else if line.contains('@css ') { + pos := line.index('@css') or { + continue + } + s.write('') } else if line.contains('@if ') { s.writeln(str_end) pos := line.index('@if') or {