Centralize page definitions
This commit is contained in:
parent
f5285561bb
commit
9e3f80b549
4 changed files with 15 additions and 18 deletions
|
@ -4,14 +4,7 @@ module BC
|
|||
module Views
|
||||
module Pages
|
||||
class Index < ::Phlex::HTML
|
||||
def sections = {
|
||||
"1. Concepts of Biocircuits" => "/concepts.html",
|
||||
"2. The Simplest Circuit" => "/simplest-circuit.html",
|
||||
"3. Repressors & Leaks" => "/repressors.html",
|
||||
"4. Activators" => "/activators.html",
|
||||
"5. Ultrasensitivity & the Hill Function" => "/hill-functions.html",
|
||||
"6. Choosing Between Activators & Repressors" => "/activators-vs-repressors.html"
|
||||
}
|
||||
def sections = BC.pages.each_with_index.map { |page, idx| ["#{idx + 1}. #{page[1]}", "/#{page[0]}.html"] }
|
||||
|
||||
def view_template
|
||||
render(::BC::Views::BaseLayout.new("Home")) do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue