Start rewriting with Phlexite
This commit is contained in:
parent
e063e315ed
commit
f464d585cc
30 changed files with 486 additions and 921 deletions
20
views/nav_links.rb
Normal file
20
views/nav_links.rb
Normal file
|
@ -0,0 +1,20 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module BC
|
||||
module Views
|
||||
class NavLinks
|
||||
def initialize(back, fwd)
|
||||
@back = back
|
||||
@fwd = fwd
|
||||
end
|
||||
|
||||
def view_template
|
||||
nav class: 'nav-links' do
|
||||
@back ? a(href: @back) { "BACK" } : div
|
||||
a(href: "/") { "HOME" }
|
||||
@fwd ? a(href: @fwd) { "NEXT" } : div
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue