Logout -> do
lift loginCap.logout
H.put LoggedOut
withNavBar :: forall s m. H.ComponentHTML MainAction s m -> H.ComponentHTML MainAction s m
withNavBar body =
HH.div_
[HH.nav
[P.classes (ClassName <$> ["navbar", "navbar-expand-lg", "navbar-light", "bg-white"])]
[HH.div
[P.classes (ClassName <$> ["container-fluid"])]
[brand, logout]
]
,body
]
brand :: forall a s m. H.ComponentHTML a s m
brand = HH.div
[P.classes (ClassName <$> ["navbar-brand"])]
[HH.h4
[P.classes (ClassName <$> ["font-weight-bold"])]
[HH.text "Aftok"]
]
logout :: forall s m. H.ComponentHTML MainAction s m
logout = HH.button
[P.classes (ClassName <$> ["btn", "navbar-btn", "btn-sm", "btn-primary", "lift", "ml-auto"])
,E.onClick \_ -> Just Logout
]
[HH.text "Logout"]
-- <!-- Navigation -->
-- <ul class="navbar-nav ml-auto">
-- <li class="nav-item dropdown">
-- <a class="nav-link dropdown-toggle" id="navbarAccount" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false">
-- Guidebook
-- </a>
-- <ul class="dropdown-menu" aria-labelledby="navbarAccount">
-- <li class="dropdown-item dropright">
-- <a class="dropdown-link dropdown-toggle" data-toggle="dropdown" href="#">
-- Getting Started
-- </a>
-- <div class="dropdown-menu">
-- <a class="dropdown-item" href="@@webRoot/guide-foundation.html">
-- Foundational Principles
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-time.html">
-- Measuring Contributions
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-revenue.html">
-- Revenue Sharing
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-tithing.html">
-- Varying Compensation
-- </a>
-- </div>
-- </li>
-- <!--
-- <li class="dropdown-item dropright">
-- <a class="dropdown-link dropdown-toggle" data-toggle="dropdown" href="#">
-- Up And Running
-- </a>
-- <div class="dropdown-menu">
-- <a class="dropdown-item" href="@@webRoot/guide-voting.html">
-- Share-Weighted Voting
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-auctions.html">
-- Expense Auctions
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-forks.html">
-- Project Forks & Merges
-- </a>
-- </div>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-link dropdown-toggle" data-toggle="dropdown" href="#">
-- Coming Soon!
-- </a>
-- <div class="dropdown-menu">
-- <a class="dropdown-item" href="@@webRoot/guide-debt-contracts.html">
-- 3rd-party Contracts
-- </a>
-- <a class="dropdown-item" href="@@webRoot/guide-delegative-voting.html">
-- Delegative Voting
-- </a>
-- </div>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/blog.html">
-- Blog
-- </a>
-- </li>
-- -->
-- </ul>
-- </li>
-- <li class="nav-item dropdown">
-- <a class="nav-link dropdown-toggle" id="navbarAccount" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false">
-- My Account
-- </a>
-- <ul class="dropdown-menu" aria-labelledby="navbarAccount">
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" data-toggle="modal" href="#modalSigninHorizontal">
-- Sign In
-- </a>
-- </li>
-- <!--
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-revenue.html">
-- Revenue Dashboard
-- </a>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-auctions.html">
-- Active Expense Auctions
-- </a>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-general.html">
-- Project List
-- </a>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-tithes.html">
-- My Tithes
-- </a>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-keys.html">
-- Manage Payment Keys
-- </a>
-- </li>
-- <li class="dropdown-item dropright">
-- <a class="dropdown-item" href="@@webRoot/account-billing.html">
-- Billing Center
-- </a>
-- </li>
-- -->
-- </ul>
-- </li>
-- <li class="nav-item dropdown">
-- <a class="nav-link dropdown-toggle" id="navbarDocumentation" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false">
-- Documentation
-- </a>
-- <div class="dropdown-menu dropdown-menu-md" aria-labelledby="navbarDocumentation">
-- <div class="list-group list-group-flush">
-- <a class="list-group-item" href="@@webRoot/docs/index.html">
--
-- <!-- Icon -->
-- <div class="icon icon-sm text-primary">
-- @@include("../assets/img/icons/duotone-icons/General/Clipboard.svg")
-- </div>
--
-- <!-- Content -->
-- <div class="ml-4">
--
-- <!-- Heading -->
-- <h6 class="font-weight-bold text-uppercase text-primary mb-0">
-- Documentation
-- </h6>
--
-- <!-- Text -->
-- <p class="font-size-sm text-gray-700 mb-0">
-- CLI & API user guide
-- </p>
--
-- </div>
--
-- </a>
-- <a class="list-group-item" href="@@webRoot/faq.html">
--
-- <!-- Icon -->
-- <div class="icon icon-sm text-primary">
-- @@include("../assets/img/icons/duotone-icons/Code/Question-circle.svg")
-- </div>
--
-- <!-- Content -->
-- <div class="ml-4">
--
-- <!-- Heading -->
-- <h6 class="font-weight-bold text-uppercase text-primary mb-0">
-- FAQ
-- </h6>
--
-- <!-- Text -->
-- <p class="font-size-sm text-gray-700 mb-0">
-- Common problems & solutions
-- </p>
--
-- </div>
--
-- </a>
-- <a class="list-group-item" href="https://discord.gg/wbhCGjw" target="_blank">
--
-- <!-- Icon -->
-- <div class="icon icon-sm text-primary">
-- @@include("../assets/img/icons/social/discord.svg")
-- </div>
--
-- <!-- Content -->
-- <div class="ml-4">
--
-- <!-- Heading -->
-- <h6 class="font-weight-bold text-uppercase text-primary mb-0">
-- Community
-- </h6>
--
-- <!-- Text -->
-- <p class="font-size-sm text-gray-700 mb-0">
-- Join our Discord chat
-- </p>
--
-- </div>
--
-- </a>
-- <!--
-- <a class="list-group-item" href="@@webRoot/docs/changelog.html">
--
-- <div class="icon icon-sm text-primary">
-- @@include("../assets/img/icons/duotone-icons/Files/File.svg")
-- </div>
--
-- <div class="ml-4">
--
-- <h6 class="font-weight-bold text-uppercase text-primary mb-0">
-- Changelog
-- </h6>
--
-- <p class="font-size-sm text-gray-700 mb-0">
-- Project history
-- </p>
-- </div>
-- </a>
-- -->
-- </div>
-- </div>
-- </li>
-- </ul>