# frozen_string_literal: true module Pages class Templates < ApplicationPage def template render Layout.new(title: "Templates in Phlex") do render Markdown.new(<<~MD) # Templates Rather than use another language like ERB, HAML or Slim, Phlex provides a Ruby DSL for defining HTML templates. You can create a view class by subclassing `Phlex::View` and defining a method called `template`. Within the `template` method, you can compose HTML markup by calling the name of any [HTML element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element). The first argument to an HTML element method is the _text content_ for that element. For example, here’s a view with an `