mourningdove/schemes/global.tt

126 lines
3.6 KiB
Text
Raw Normal View History

2026-05-24 01:03:05 +00:00
[%# Short description of the page
Authors:
Andrea Nall <anall@andreanall.com>
Afuna <coder.dw@afunamatata.com>
Copyright (c) 2015 by Dreamwidth Studios, LLC.
This program is free software; you may redistribute it and/or modify it under
the same terms as Perl itself. For a copy of the license, please reference
'perldoc perlartistic' or 'perldoc perlgpl'.
%]
[%- BLOCK block.menunav -%]
[%- IF resource_group == "foundation" # Add in mobile links -%]
[%- IF remote # Show the accounts modal link -%]
<a id="account-link-access" class="show-for-small-only" href="#"
data-reveal-id="account-links-text">
[% remote.username %] &raquo;
</a>
[%- ELSE # Show a login modal link -%]
<a id="login-form-access" href="[% site.root %]/login" class="show-for-small-only" data-reveal-id="nav-login-form">
[% 'sitescheme.accountlinks.btn.login' | ml %]
</a>
[%- END -%]
[%- END -%]
<ul class="left">[%- nav_links = dw_scheme.menu_nav -%]
[% FOREACH cathash IN nav_links -%]
[%- cat = cathash.name -%][%- submenu = cathash.items -%]
[%- displayed = [] -%]
[%- FOREACH item IN submenu -%]
[%- IF item.display -%]
[%- v = BLOCK -%]
<li class='subnav'><a href='[% item.url %]'>[% item.text | ml(item.text_opts) %]</a></li>
[%- END; displayed.push(v) -%]
[%- END -%]
[%- END -%]
[%- IF displayed.size -%]
<li id='[% cat %]_topnav' class='topnav has-dropdown'><a href='[% site.root %]/nav/[% cat %]'>[% "menunav.$cat" | ml %]</a>
<ul id='[% cat %]_subnav' class='subnav_container dropdown'>
[% displayed.join("\n") %]
</ul>
</li>
[%- END -%]
[%- END %]
</ul>
[%- END -%]
[%- BLOCK block.search -%]
<ul class="right nav-search" role="search">
<li class="has-form">
<form action="[% site.root %]/multisearch" method="post">
<input name="q" id="search" type="search" title="[% 'widget.search.title' | ml %]" size="20" />
<select name="type">
[% FOREACH option = [
[ "int", "interest" ]
[ "region", "region" ]
[ "nav_and_user", "siteuser" ]
[ "faq", "faq"]
[ "email", "email" ]
] ~%]
<option value="[% option.0 %]">[% "widget.search." _ option.1 | ml %]</option>
[%- END -%]
</select>
<input type="submit" class="secondary button" value="[% 'widget.search.btn.go' | ml %]" />
</form>
</li>
</ul>
[%- END -%]
[%- BLOCK block.page -%]
<html>
<head>
<title>[% sections.title %]</title>
[%- dw_scheme.need_res("stc/lj_base-app.css") -%]
[% dw_scheme.res_includes %]
[% sections.head %]
[% dw_scheme.final_head_html %]
</head>
<body [% section.bodyopts %]>
[% content %]
</body>
</html>
[%- END -%]
[%- BLOCK block.skiplink -%]
[%# Visible only with screenreader or keyboard, per css %]
<div id="skip">
<a href="#content" tabindex="1">Skip to Main Content</a>
</div>
[%- END -%]
[%- BLOCK block.errors -%]
[%# sections.errors are instances of DW::FormErrors %]
[%- IF sections.errors.exist -%]
<div class="row">
<div class="columns large-12">
[%- FOREACH err = sections.errors.get_all -%]
<div class="alert-box alert radius">[%- err.message -%]</div>
[%- END -%]
</div>
</div>
[%- END -%]
[%- END -%]
[%- BLOCK block.msgs -%]
[%# sections.errors are instances of DW::FormErrors %]
[%- IF msgs -%]
<div class="row">
<div class="columns large-12">
[%- FOR msg IN msgs -%]
<div class="radius session-msg-box [% msg.level %]">
<span class="invisible"><b>[% msg.level.ucfirst %]:</b> </span>
[% msg.item -%]
</div>
[%- END -%]
</div>
</div>
[%- END -%]
[%- END -%]
[%- BLOCK block.script_init -%]
[%- IF resource_group == "foundation" -%]
<script>$(document).foundation();</script>
[%- END -%]
[%- END -%]