Class: Lvr::Template::Tags::Footer
- Inherits:
-
Liquid::Tag
- Object
- Liquid::Tag
- Lvr::Template::Tags::Footer
- Defined in:
- lib/lvr/template/tags.rb
Overview
A tag that renders the footer badges.
Instance Method Summary collapse
-
#initialize(tag_name, text, tokens) ⇒ Footer
constructor
A new instance of Footer.
- #render(context) ⇒ Object
Constructor Details
#initialize(tag_name, text, tokens) ⇒ Footer
Returns a new instance of Footer.
12 |
# File 'lib/lvr/template/tags.rb', line 12 def initialize(tag_name, text, tokens) = super |
Instance Method Details
#render(context) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/lvr/template/tags.rb', line 14 def render(context) project_title = CGI.escape(context['project']['title']) github_repository_link = CGI.escape(context['github']['repository']['link']) " [](https://x.com/intent/post?url=\#{github_repository_link}&text=\#{project_title})\n [](https://reddit.com/submit?url=\#{github_repository_link}&title=\#{project_title})\n [](https://news.ycombinator.com/submitlink?u=\#{github_repository_link}&t=\#{project_title})\n [](https://www.facebook.com/sharer/sharer.php?u=\#{github_repository_link})\n [](https://www.linkedin.com/sharing/share-offsite/?url=\#{github_repository_link})\n EOF\nend\n".chomp |