Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade blueprint benchmark template #16

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions benchmark/blueprint.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ module ToHtml
end

private def blueprint
h1 { "Benchmark" }
h1 "Benchmark"

h2 { "Long Text" }
h2 "Long Text"

div class: "long-text" do
p do
"Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
end
p "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet."
end

h2 { "Deeply Nested" }
h2 "Deeply Nested"
div class: "some" do
div class: "deeply" do
div class: "nested", foo: "bar" do
Expand All @@ -36,7 +34,7 @@ module ToHtml
div class: "elements" do
div class: "isnt" do
div class: "that" do
span { "beautiful" }
span "beautiful"
end
end
end
Expand All @@ -49,15 +47,15 @@ module ToHtml
end
end

h2 { "Method Call" }
h2 "Method Call"
div class: "method-call" do
span { some_string }
span some_string
end

h2 { "Iteration" }
h2 "Iteration"
ul do
names.each do |name|
li { name }
li name
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.0
shards:
blueprint:
git: https://github.com/stephannv/blueprint.git
version: 0.4.0
version: 0.6.0

html_builder:
git: https://github.com/crystal-lang/html_builder.git
Expand Down
Loading