mourningdove/ext/dw-nonfree/schemes/tropo-common.tt

157 lines
5.2 KiB
Text
Raw Normal View History

2026-05-24 01:03:05 +00:00
[%#
Common code for Tropospherical site schemes, refactored for inheritance.
Converted to Template Toolkit by;
Andrea Nall <anall@andreanall.com>
Authors:
Jen Griffin <kareila@livejournal.com>
Based on Tropospherical Red, authored by:
Janine Smith <janine@netrophic.com>
Jesse Proulx <jproulx@jproulx.net>
Elizabeth Lubowitz <grrliz@gmail.com>
Copyright (c) 2010-2013 by Dreamwidth Studios, LLC.
This program is NOT free software or open-source; you can use it as an
example of how to implement your own site-specific extensions to the
Dreamwidth Studios open-source code, but you cannot use it on your site
or redistribute it, with or without modifications.
%][%- PROCESS '_dreamwidth.tt' -%]
[%- BLOCK block.need_res -%]
[%- old_css_files = [
'stc/jquery/jquery.ui.theme.smoothness.css',
'stc/lj_base-app.css',
'stc/base-colors-light.css',
'stc/reset.css',
'stc/tropo/tropo-base.css',
"stc/tropo/tropo-${tropo_color}.css"
];
dw_scheme.need_res({ group => 'default' }, old_css_files.merge( [ 'js/nav.js' ] ));
dw_scheme.need_res({ group => 'jquery' }, old_css_files.merge( [ 'js/nav-jquery.js' ] ));
dw_scheme.need_res({ group => 'foundation' },
'stc/css/skins/tropo/tropo-' _ tropo_color _ '.css'
);
-%]
[%- END -%]
[%- BLOCK block.page -%]
[%- IF logo_path -%]
[%- ELSIF tropo_color != 'red' -%]
[%- logo_path = '/tropo-red/dw_logo_' _ tropo_color _ '.png' -%]
[%- ELSE -%]
[%- logo_path = '/tropo-red/dw_logo.png' -%]
[%- END -%]
[%- IF resource_group == "foundation" -%]
<!DOCTYPE html>
<html lang="en" class="no-js">
[% PROCESS block.head %]
<body [% sections.bodyopts %] class="tropo tropo-[% tropo_color %]">
<div id="canvas">
[%- PROCESS block.skiplink -%]
[%# Not using the HTML 5 <header> element for now
because of incompatibilities with JAWS and
Firefox %]
<div id="masthead">
<div class="row">
<div class="columns large-4 small-12" role="banner">
<span id="logo">
[% PROCESS block.logo %]
</span>
</div>
</div>
</div>
<div id="page">
<div id="content" role="main" [% sections.contentopts %]>
<div class="row">
<div class="columns large-12">
[%- PROCESS block.msgs -%]
<h1>[% sections.title %]</h1>
</div>
</div>
[%- PROCESS block.errors -%]
<div class="row"><div class="large-12 columns">
[%- content -%]
</div></div>
</div>
<div class="row" id="account-links-wrapper">
<div class="columns large-8 large-offset-4">[% PROCESS block.accountlinks %]</div>
</div>
<nav role="navigation" aria-label="[% 'sitescheme.navigation.sitelinks' | ml %]" class="top-bar contain-to-grid main-nav" data-topbar>
<ul class="title-area">
<li class="name"></li>
<li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li>
</ul>
<section class="top-bar-section">
[% PROCESS block.menunav %]
[% PROCESS block.search %]
</section>
</nav>
<footer role="contentinfo">
[% PROCESS block.footer %]
</footer>
</div>
</div>
[% dw_scheme.final_body_html %]
[%- PROCESS block.script_init -%]
</body>
</html>
[%- ELSE -%]
<!DOCTYPE html>
<html lang="en">
[% PROCESS block.head %]
<body [% sections.bodyopts %] class="tropo tropo-[% tropo_color %]">
<div id="canvas">
<div id="page">
[%- PROCESS block.skiplink -%]
[%# Not using the HTML 5 <header> element for now
because of incompatibilities with JAWS and
Firefox %]
<div id="masthead" role="banner">
<span id="logo">
[% PROCESS block.logo %]
</span>
</div>
<div id="content" role="main" [% sections.contentopts %]>
[%- PROCESS block.msgs -%]
<h1>[% sections.title %]</h1>
[% content %]
</div>
[% PROCESS block.accountlinks %]
<nav role="navigation" aria-label="[% 'sitescheme.navigation.sitelinks' | ml %]">
[% PROCESS block.menunav %]
<div role="search">
[% dw_scheme.search_render %]
</div>
</nav>
<footer role="contentinfo">
[% PROCESS block.footer %]
</footer>
</div>
</div>
[% dw_scheme.final_body_html %]
<div id="shim-alpha"> </div>
</body>
</html>
[%- END -%]
[%- END -%]