Skip to content

Instantly share code, notes, and snippets.

@villeilkkala
Last active January 23, 2018 13:07
Show Gist options
  • Save villeilkkala/5b2b77fb5edfc08e88738f95e19040f1 to your computer and use it in GitHub Desktop.
Save villeilkkala/5b2b77fb5edfc08e88738f95e19040f1 to your computer and use it in GitHub Desktop.
<div className={VSS(focus.styles, "app")}>
{focus.currentPage}
<ul className="menu">
<ForEach context={{origin: focus}}
focus={focus[Relatable.getRelations]("page").sort( (a, b) => a.order - b.order)}>
<li className={origin.currentPage === focus[Relation.target] ? "current" : null}
onClick={() => origin.currentPage = focus[Relation.target]}>
{focus[Relation.target][Valaa.name]}
</li>
</ForEach>
</ul>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment