-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade for Bridgetown 1.2 initializers
- Loading branch information
1 parent
285430b
commit 39d46b7
Showing
12 changed files
with
82 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# Changelog | ||
|
||
# 0.7.0 / 2021-06-01 | ||
## 2.0.0 / 2023-01-22 | ||
|
||
* Upgrade for Bridgetown 1.2 initializers | ||
|
||
## 1.0.0 / 2022-03-20 | ||
|
||
* Update release to support Bridgetown 1.0 | ||
|
||
## 0.7.0 / 2021-06-01 | ||
|
||
* Official release supporting Bridgetown 0.21. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
module Bridgetown | ||
module ViewComponent | ||
VERSION = "1.0.0" | ||
VERSION = "2.0.0" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Bridgetown.configure do | ||
init :"bridgetown-view-component" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Greetings <%= @name %> | ||
<%= tag.hr %> | ||
|
||
<ul> | ||
<% posts.each do |post| %> | ||
<li><%= markdownify post %></li> | ||
<% end %> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
class HelloVc < ViewComponent::Base | ||
Bridgetown::ViewComponentHelpers.allow_rails_helpers :tag | ||
include Bridgetown::ViewComponentHelpers | ||
|
||
renders_many :posts | ||
|
||
def initialize(name:) | ||
@name = name | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
layout: default | ||
--- | ||
|
||
Testing this plugin: | ||
|
||
<%= render HelloVc.new(name: "Bridgetown") do |component |%> | ||
<% ["Post 1", "Post 2"].each do |blog_post| %> | ||
<% component.with_post do %> | ||
**<%= blog_post %>** <span>-></span> | ||
<% end %> | ||
<% end %> | ||
<% end %> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters