default-layout.hamlet 1.55 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

<!-- Static navbar -->
<nav .navbar.navbar-default.navbar-static-top>
    <div .container>
        <div .navbar-header>
            <button type="button" .navbar-toggle.collapsed data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>

        <div #navbar .collapse.navbar-collapse>
            <ul .nav.navbar-nav>
                $forall MenuItem label route _ <- navbarLeftFilteredMenuItems
                    <li :Just route == mcurrentRoute:.active>
                        <a href="@{route}">#{label}

            <ul .nav.navbar-nav.navbar-right>
                $forall MenuItem label route _ <- navbarRightFilteredMenuItems
                    <li :Just route == mcurrentRoute:.active>
                        <a href="@{route}">#{label}

<!-- Page Contents -->

<div .container>
    $if not $ Just HomeR == mcurrentRoute
        <ul .breadcrumb>
            $forall bc <- parents
                <li>
                    <a href="@{fst bc}">#{snd bc}

            <li .active>#{title}

    $maybe msg <- mmsg
      <div .alert.alert-info #message>#{msg}


$if (Just HomeR == mcurrentRoute)
    ^{widget}
$else
    <div .container>
        <div .row>
            <div .col-md-12>
                ^{widget}

<!-- Footer -->
<footer .footer>
    <div .container>
        <p .text-muted>
            #{appCopyright $ appSettings master}