mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Remove all code references to Kilt
This commit is contained in:
parent
a251ede5bd
commit
0ab0ecb7c6
1 changed files with 7 additions and 9 deletions
|
@ -1,5 +1,3 @@
|
|||
require "kilt"
|
||||
|
||||
CONTENT_FOR_BLOCKS = Hash(String, Tuple(String, Proc(String))).new
|
||||
|
||||
# `content_for` is a set of helpers that allows you to capture
|
||||
|
@ -37,9 +35,9 @@ CONTENT_FOR_BLOCKS = Hash(String, Tuple(String, Proc(String))).new
|
|||
# setting the appropriate set of tags that should be added to the layout.
|
||||
macro content_for(key, file = __FILE__)
|
||||
%proc = ->() {
|
||||
__kilt_io__ = IO::Memory.new
|
||||
__view_io__ = IO::Memory.new
|
||||
{{ yield }}
|
||||
__kilt_io__.to_s
|
||||
__view_io__.to_s
|
||||
}
|
||||
|
||||
CONTENT_FOR_BLOCKS[{{key}}] = Tuple.new {{file}}, %proc
|
||||
|
@ -60,17 +58,17 @@ end
|
|||
# ```
|
||||
# render "src/views/index.ecr", "src/views/layout.ecr"
|
||||
# ```
|
||||
@[Deprecated("Use `ECR#render` instead")]
|
||||
macro render(filename, layout)
|
||||
__content_filename__ = {{filename}}
|
||||
content = render {{filename}}
|
||||
render {{layout}}
|
||||
io = IO::Memory.new
|
||||
content = ECR.embed {{filename}}, io
|
||||
ECR.embed {{layout}}, io
|
||||
io.to_s
|
||||
end
|
||||
|
||||
# Render view with the given filename.
|
||||
@[Deprecated("Use `ECR#render` instead")]
|
||||
macro render(filename)
|
||||
Kilt.render({{filename}})
|
||||
ECR.render({{filename}})
|
||||
end
|
||||
|
||||
# Halt execution with the current context.
|
||||
|
|
Loading…
Reference in a new issue