cv_gen_view.ex 328 B

123456789101112131415161718
  1. defmodule CvGenView do
  2. use Phoenix.Component
  3. @after_compile __MODULE__
  4. embed_templates "templates/*"
  5. attr :date, :any
  6. attr :rest, :global
  7. def date(assigns) do
  8. ~H"""
  9. <time datetime={@date} {@rest}><%= @date %></time>
  10. """
  11. end
  12. def __after_compile__(_env, _bytecode) do
  13. CvGen.generate()
  14. end
  15. end