From 85aa22ca6b4fc810fc7753a9a2543b4c9bec2583 Mon Sep 17 00:00:00 2001 From: akavm <max.henze@student.uni-halle.de> Date: Sat, 19 Dec 2020 13:03:42 +0100 Subject: [PATCH] Nested Templates --- week03/app/styles/app.scss | 28 ++++++++++++++++++++++++++++ week03/app/templates/application.hbs | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/week03/app/styles/app.scss b/week03/app/styles/app.scss index cc45bd1..9d645da 100644 --- a/week03/app/styles/app.scss +++ b/week03/app/styles/app.scss @@ -1,3 +1,31 @@ @import "settings"; @import 'foundation-sites/foundation'; @include foundation-everything; + +/* +* Menu styles +*/ +ul[role="menu"] { + @include menu-base; + @include menu-direction('vertical'); + + &.horizontal { + @include menu-direction('horizontal'); + } + + li { + &.menu-text{ + @include menu-text; + } + + &[role="separator"] { + padding-bottom: $global-padding; + } + + a { + &.active { + @include menu-state-active; + } + } + } +} \ No newline at end of file diff --git a/week03/app/templates/application.hbs b/week03/app/templates/application.hbs index e2147ca..79599bc 100644 --- a/week03/app/templates/application.hbs +++ b/week03/app/templates/application.hbs @@ -1 +1,18 @@ +<header class="top-bar"> + <nav class="top-bar-left" aria-label="Main"> + <ul class="horizontal" role="menu" aria-label="Main"> + <li class="menu-text">Athena - Study Portal</li> + <li><a href="" role="menuitem" tabindex="0" class="active">My Modules</a></li> + <li><a href="" role="menuitem" tabindex="-1">My Exams</a></li> + </ul> + </nav> + <nav class="top-bar-right" aria-label="User"> + <ul class="horizontal" role="menu" aria-label="User"> + <li><a role="menuitem" tabindex="0">Profile</a></li> + <li><a role="menuitem" tabindex="-1">Logout</a></li> + </ul> + </nav> +</header> + + {{outlet}} \ No newline at end of file -- GitLab