19 lines
414 B
Crystal
19 lines
414 B
Crystal
|
macro add_mapping(mapping)
|
||
|
def initialize({{*mapping.keys.map { |id| "@#{id}".id }}})
|
||
|
end
|
||
|
|
||
|
def to_a
|
||
|
return [{{*mapping.keys.map { |id| "@#{id}".id }}}]
|
||
|
end
|
||
|
|
||
|
DB.mapping({{mapping}})
|
||
|
end
|
||
|
|
||
|
macro templated(filename)
|
||
|
render "src/invidious/views/#{{{filename}}}.ecr", "src/invidious/views/layout.ecr"
|
||
|
end
|
||
|
|
||
|
macro rendered(filename)
|
||
|
render "src/invidious/views/#{{{filename}}}.ecr"
|
||
|
end
|