inlined section editors, improved layout

This commit is contained in:
2022-12-01 16:12:55 +02:00
parent e29f2b79e8
commit 2363f24aef
12 changed files with 55 additions and 60 deletions

View File

@ -9,6 +9,12 @@ module Merged
attr_reader :content , :index , :section
[ :id , :text , :header, :image ].each do |meth|
define_method(meth) do
@content[meth.to_s]
end
end
def initialize(section , index , card_data)
@section = section
@index = index
@ -18,9 +24,6 @@ module Merged
@@all[self.id] = self
end
def id
@content['id']
end
def update(key , value)
return if key == "id" #not updating that

View File

@ -32,7 +32,7 @@ module Merged
end
def cards?
@content["cards"] == true
! cards.empty?
end
def update(key , value)