Skip to content

Instantly share code, notes, and snippets.

@paige-fh
Last active July 23, 2024 20:33
Show Gist options
  • Save paige-fh/64da4a103f04f913ba2f8f1c50099145 to your computer and use it in GitHub Desktop.
Save paige-fh/64da4a103f04f913ba2f8f1c50099145 to your computer and use it in GitHub Desktop.
parent banner / sibling nav logic pseudo code
--------------- --------------- ---------------
| Left | | Middle | | Right |
| | | | | |
--------------- --------------- ---------------
# Coming of Age in a Complex World (FHAO Collection | Collection)
if ((has_parent = FALSE) and (has_sibling = FALSE) and (has_children = TRUE)) {
Left = Blank
Middle/dropdown = Page currently on and then it's CHILDREN
Right = Button(s) with or without numbers to first child
}
# Being Seen: Becoming Who You Want to Be (FHAO Collection | Text Set)
if ((has_parent = TRUE) and (has_sibling = TRUE) and (has_children = TRUE)) {
Left = Shows parent (Coming of Age)
Middle/dropdown = Page currently on and then it's CHILDREN
Right = Button(s) with or without numbers to first child
}
# What Does It Mean to Come of Age? | Introductory Lesson (Resource | Lesson)
if ((has_parent = TRUE) and (has_sibling = TRUE) and (has_children = FALSE)) {
Left = Shows parent (Coming of Age)
Middle/dropdown = Page currently on and then it's SIBLINGS?
Right = Button(s) to prev and next siblings
}
# What Is “Normal”? (Resource | Lesson)
if ((has_parent = TRUE) and (has_sibling = TRUE) and (has_children = FALSE)) {
Left = Shows parent (Being Seen: Becoming Who You Want to Be (FHAO Collection | Text Set)
)
Middle/dropdown = Page currently on and then it's SIBLINGS?
Right = Button(s) to prev and next siblings
}
# What if something is an only child?
if ((has_parent = TRUE) and (has_sibling = FALSE) and (has_children = FALSE)) {
Left = Shows parent
Middle/dropdown = Nothing
Right = Nothing
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment