module Photish::Plugin::FooterLinks
Public Class Methods
is_for?(type)
click to toggle source
# File lib/photish/assets/example/site/_plugins/footer_links.rb, line 2 def self.is_for?(type) [ Photish::Plugin::Type::Collection, Photish::Plugin::Type::Album, Photish::Plugin::Type::Photo, Photish::Plugin::Type::Image, Photish::Plugin::Type::Page, ].include?(type) end
Public Instance Methods
links_with_seperator(links, seperator)
click to toggle source
# File lib/photish/assets/example/site/_plugins/footer_links.rb, line 12 def links_with_seperator(links, seperator) html = '' links.each_with_index do |link, index| if index == (links.count - 1) text = link[:text] else text = "#{link[:text]} #{seperator} " end html << "<a href=\"" << link[:url] << "\">" << text << "</a>" end html end