Bridgetown + Primer
This is a demo of a Bridgetown site rendering the Primer ViewComponent-based design library by GitHub.
CounterComponent
25
# ERB code:
<%= render(Primer::CounterComponent.new(count: 25, font_size: 4)) %>
ButtonComponent
<%= render(Primer::ButtonComponent.new) { "Default" } %>
<%= render(Primer::ButtonComponent.new(scheme: :primary)) { "Primary" } %>
<%= render(Primer::ButtonComponent.new(scheme: :danger)) { "Danger" } %>
<%= render(Primer::ButtonComponent.new(scheme: :outline)) { "Outline" } %>
BorderBoxComponent
<%= render(Primer::BorderBoxComponent.new) do |component|
component.header { safe "<h2>Header</h2>" }
component.body do
markdownify do %>
Markdown **content** rendered _inside_ the component by [Bridgetown](https://www.bridgetownrb.com).
<% end
end
component.row { "Row one" }
component.row { "Row two" }
component.footer do
render(Primer::ButtonComponent.new(scheme: :primary)) { "Action" }
end
end %>
BlankslateComponent
Title
Description
LayoutComponent
Main
Sidebar
ProgressBarComponent
FlashComponent
This is a flash message!
This is a warning flash message!
This is a danger flash message!
This is a success flash message!