322 lines
14 KiB
Text
322 lines
14 KiB
Text
|
|
[%#
|
||
|
|
Common code for all Dreamwidth site schemes, refactored for inheritance.
|
||
|
|
|
||
|
|
Authors:
|
||
|
|
Jen Griffin <kareila@livejournal.com>
|
||
|
|
Andrea Nall <anall@andreanall.com>
|
||
|
|
Based on Blueshift Site Scheme, authored by:
|
||
|
|
Emily Ravenwood <ravenwood@alltrees.org>
|
||
|
|
Denise Paolucci <denise@dreamwidth.org>
|
||
|
|
Which was in turn 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 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.need_res -%]
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- BLOCK block.head -%]
|
||
|
|
<head>
|
||
|
|
<title>[% sections.windowtitle || sections.title %]</title>
|
||
|
|
|
||
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||
|
|
[%- IF resource_group == "foundation" -%]
|
||
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||
|
|
[% END %]
|
||
|
|
|
||
|
|
[%- # block.need_res below includes files for the individual pages
|
||
|
|
dw.need_res( { group => "foundation" },
|
||
|
|
"js/foundation/foundation/foundation.reveal.js"
|
||
|
|
"js/skins/jquery.focus-on-reveal.js"
|
||
|
|
"stc/css/components/foundation-icons.css"
|
||
|
|
);
|
||
|
|
|
||
|
|
dw.need_res( "stc/canary.css" );
|
||
|
|
-%]
|
||
|
|
[%- PROCESS block.need_res -%]
|
||
|
|
[% dw_scheme.res_includes %]
|
||
|
|
[% sections.head %]
|
||
|
|
[% dw_scheme.final_head_html %]
|
||
|
|
<!--[if lte IE 8]>
|
||
|
|
<script src="[% site.jsroot%]/html5.js" type="text/javascript"></script>
|
||
|
|
<![endif]-->
|
||
|
|
</head>
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- BLOCK block.logo -%]
|
||
|
|
<span id='sitename'><a href="[% site.root %]/">[% site.nameshort %]</a></span>
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- BLOCK block.footer -%]
|
||
|
|
<ul>
|
||
|
|
<li><a href="[% site.root %]/legal/privacy">[% 'sitescheme.footer.legal.privacypolicy' | ml %]</a> • </li>
|
||
|
|
<li><a href="[% site.root %]/legal/tos">[% 'sitescheme.footer.legal.tos' | ml %]</a> • </li>
|
||
|
|
<li><a href="[% site.root %]/legal/diversity">[% 'sitescheme.footer.legal.diversitystatement' | ml %]</a> • </li>
|
||
|
|
<li><a href="[% site.root %]/legal/principles">[% 'sitescheme.footer.legal.guidingprinciples' | ml %]</a> • </li>
|
||
|
|
<li><a href="[% site.root %]/site/">[% 'sitescheme.footer.sitemap' | ml %]</a> • </li>
|
||
|
|
<li><a href="[% site.root %]/site/suggest">[% 'sitescheme.footer.suggestion' | ml %]</a></li>
|
||
|
|
</ul>
|
||
|
|
<p>[% 'sitescheme.footer.info' | ml %]</p>
|
||
|
|
[% IF site.is_canary %]
|
||
|
|
<div class="canary canary-bottom-right"><span>canary</span></div>
|
||
|
|
[% END %]
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- userpic_class = 'account-links-userpic' -%]
|
||
|
|
[%- BLOCK block.userpic -%]
|
||
|
|
<div id='[% userpic_class %]'><a href='[% site.root %]/manage/icons'>
|
||
|
|
[%- IF remote -%][%- userpic = remote.userpic -%]
|
||
|
|
[%- IF userpic -%]
|
||
|
|
<img src='[% userpic.url %]' [% userpic.img_fixedsize( 'width', 80, 'height', 80 ) %] alt='[% 'sitescheme.accountlinks.userpic.alt' | ml %]' />
|
||
|
|
[%- ELSE -%]
|
||
|
|
[%- dw.img( "nouserpic_sitescheme", "" ) -%]
|
||
|
|
[%- END -%]
|
||
|
|
[%- END -%]
|
||
|
|
</a></div>
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- account_link_options = {} -%]
|
||
|
|
[%- BLOCK block.accountlinks -%]
|
||
|
|
[%# At this point it's too tricky to work in foundation styling with the old table based way
|
||
|
|
of managing account links, so it's been split into two different sections. Hopefully,
|
||
|
|
the table based way can be removed when the entire site is Foundation-based.
|
||
|
|
%]
|
||
|
|
[%- IF resource_group == "foundation" -%]
|
||
|
|
[%- IF remote -%]
|
||
|
|
|
||
|
|
<div class="row" id="account-links">
|
||
|
|
<div class="columns large-12 small-12">
|
||
|
|
[%- inbox = remote.notification_inbox -%]
|
||
|
|
[%- unread = inbox.unread_count -%]
|
||
|
|
[%- identity = remote.is_identity -%]
|
||
|
|
|
||
|
|
[%- IF ! account_link_options.no_userpic -%]
|
||
|
|
[%- PROCESS block.userpic -%]
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
<div id='account-links-text' role="navigation" aria-label="[% 'sitescheme.navigation.accountlinks' | ml %]" data-reveal>
|
||
|
|
<div class='row'><div class='columns'>
|
||
|
|
<form action='[% site.root %]/logout' method='post'>
|
||
|
|
[%- dw.form_auth -%]
|
||
|
|
[%- remote.ljuser_display -%]
|
||
|
|
<input type="hidden" name="returnto" value="[% returnto | html %]" />
|
||
|
|
<input type="hidden" name="ret" value="1" />
|
||
|
|
<input class="logout button secondary" type="submit" name="logout_one" value="[% 'sitescheme.accountlinks.btn.logout' | ml %]" />
|
||
|
|
</form>
|
||
|
|
</div></div>
|
||
|
|
<div class='row'><div class='small-12 large-12 columns'>
|
||
|
|
<ul>
|
||
|
|
[%- IF ! identity -%]<li><a href='[% site.root %]/update'>[% 'sitescheme.accountlinks.post' | ml %]</a></li>[%- END -%]
|
||
|
|
<li><a href='[% remote.journal_base %]/read'>[% 'sitescheme.accountlinks.readinglist' | ml %]</a></li>
|
||
|
|
<li class="before-break"><a href='[% site.root %]/inbox/'>[% 'sitescheme.accountlinks.inbox' | ml %]
|
||
|
|
[%- IF unread -%] <span id='Inbox_Unread_Count'>([% unread %])</span>[%- END -%]
|
||
|
|
</a></li>
|
||
|
|
<li class="after-break"><a href='[% site.root %]/manage/settings/'>[% 'sitescheme.accountlinks.account' | ml %]</a></li>
|
||
|
|
[%- IF ! identity AND dw_scheme.show_invite_link -%]<li><a href='[% site.root %]/manage/circle/invite'>[% 'sitescheme.accountlinks.invitefriend' | ml %]</a></li>[%- END -%]
|
||
|
|
<li><a href='[% site.root %]/support/'>[% 'sitescheme.accountlinks.help' | ml %]</a></li>
|
||
|
|
</ul>
|
||
|
|
</div></div>
|
||
|
|
|
||
|
|
<button type="button" class="fi-icon--with-fallback close-reveal-modal">
|
||
|
|
<span class="fi-icon fi-x" aria-hidden="true"></span>
|
||
|
|
<span class="fi-icon--fallback">Close</span>
|
||
|
|
</button>
|
||
|
|
</div><!-- end #account-links-text -->
|
||
|
|
</div>
|
||
|
|
</div><!-- end #account-links.row -->
|
||
|
|
|
||
|
|
[%- ELSE -%] [%# no remote, logged out %]
|
||
|
|
[%- chal = dw_scheme.challenge_generate(300) -%]
|
||
|
|
<div class="row" id='account-links'>
|
||
|
|
<div class="columns show-for-medium-up small-12" role="navigation" aria-label="[% 'sitescheme.navigation.accountlinks' | ml %]">
|
||
|
|
<a href="[% site.root %]/login" class="button radius" data-reveal-id="nav-login-form">[% 'sitescheme.accountlinks.btn.login' | ml %]</a>
|
||
|
|
<div id='nav-login-form' class="reveal-modal" data-reveal>
|
||
|
|
<div class="row"><div class="columns">
|
||
|
|
[% PROCESS 'login.tt' %]
|
||
|
|
|
||
|
|
</div></div>
|
||
|
|
<button type="button" class="fi-icon--with-fallback close-reveal-modal">
|
||
|
|
<span class="fi-icon fi-x" aria-hidden="true"></span>
|
||
|
|
<span class="fi-icon--fallback">Close</span>
|
||
|
|
</button>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
[%- END -%] [%# end if remote %]
|
||
|
|
[%- ELSE -%] [%# resource group is not foundation %]
|
||
|
|
<div id="account-links" role="navigation" aria-label="[% 'sitescheme.navigation.accountlinks' | ml %]">
|
||
|
|
[%- IF remote -%]
|
||
|
|
[%- IF ! account_link_options.no_userpic -%]
|
||
|
|
[%- PROCESS block.userpic -%]
|
||
|
|
[%- END -%]
|
||
|
|
[%- inbox = remote.notification_inbox -%]
|
||
|
|
[%- unread = inbox.unread_count -%]
|
||
|
|
[%- identity = remote.is_identity -%]
|
||
|
|
[%- -%]<div id='account-links-text'>
|
||
|
|
<form action='[% site.root %]/logout' method='post'>
|
||
|
|
[%- dw.form_auth -%]
|
||
|
|
[%- remote.ljuser_display -%]
|
||
|
|
<input type="hidden" name="returnto" value="[% returnto | html %]" />
|
||
|
|
<input type="hidden" name="ret" value="1" />
|
||
|
|
<input type="submit" name="logout_one" value="[% 'sitescheme.accountlinks.btn.logout' | ml %]" />
|
||
|
|
</form>
|
||
|
|
[%- -%]<ul>
|
||
|
|
[%- IF ! identity -%]<li><a href='[% site.root %]/update'>[% 'sitescheme.accountlinks.post' | ml %]</a></li>[%- END -%]
|
||
|
|
[%- -%]<li><a href='[% remote.journal_base %]/read'>[% 'sitescheme.accountlinks.readinglist' | ml %]</a></li>
|
||
|
|
[%- -%]<li><a href='[% site.root %]/inbox/'>[% 'sitescheme.accountlinks.inbox' | ml %]
|
||
|
|
[%- IF unread -%] <span id='Inbox_Unread_Count'>([% unread %])</span>[%- END -%]
|
||
|
|
[%- -%]</a></li>
|
||
|
|
[%- -%]</ul>
|
||
|
|
[%- -%]<ul>
|
||
|
|
[%- -%]<li><a href='[% site.root %]/manage/settings/'>[% 'sitescheme.accountlinks.account' | ml %]</a></li>
|
||
|
|
[%- IF ! identity AND dw_scheme.show_invite_link -%]<li><a href='[% site.root %]/manage/circle/invite'>[% 'sitescheme.accountlinks.invitefriend' | ml %]</a></li>[%- END -%]
|
||
|
|
[%- -%]<li><a href='[% site.root %]/support/'>[% 'sitescheme.accountlinks.help' | ml %]</a></li>
|
||
|
|
[%- -%]</ul>
|
||
|
|
[%- -%]</div>
|
||
|
|
[%- ELSE -%] [%# no remote, logged out %]
|
||
|
|
[%- chal = dw_scheme.challenge_generate(300) -%]
|
||
|
|
[%- -%]<form action='[% site.root %]/login?ret=1' method='post' class='lj_login_form'>
|
||
|
|
[%- -%]<input type="hidden" name="returnto" value="[% returnto | html %]" />
|
||
|
|
[%- -%]<input type='hidden' name='chal' class='lj_login_chal' value='[% chal %]' />
|
||
|
|
<input type='hidden' name='response' class='lj_login_response' value='' />
|
||
|
|
<table summary='' id='login-table'>
|
||
|
|
[%- -%]<tr><td><label for='login_user'>[% 'sitescheme.accountlinks.login.username' | ml %]</label></td>
|
||
|
|
[%- -%]<td class='input-cell' colspan='2'><input name="user" id="login_user" size="20" maxlength="27" tabindex="1" aria-required="true" />
|
||
|
|
[%- %] <a href='[% site.root %]/openid/[% IF get.returnto %]?returnto=[% get.returnto | html %][% END %]' tabindex=5>[% 'sitescheme.accountlinks.login.openid' | ml %]</a></td></tr>
|
||
|
|
[%- -%]<tr><td><label for='login_password'>[% 'sitescheme.accountlinks.login.password' | ml %]</label></td>
|
||
|
|
[%- -%]<td class='input-cell' colspan='2'><input type="password" name="password" id="login_password" size="20" tabindex="2" aria-required="true" class="lj_login_password">
|
||
|
|
[%- %] <a href='[% site.root %]/lostinfo' tabindex=6>[% 'sitescheme.accountlinks.login.forgotpassword' | ml %]</a></td></tr>
|
||
|
|
[%- -%]<tr><td> </td>
|
||
|
|
[%- -%]<td class='remember-me-cell'>
|
||
|
|
[%- -%]<input type="checkbox" name="remember_me" id="login_remember_me" value="1" tabindex="3" />
|
||
|
|
[%- %] <label for='login_remember_me'>[% 'sitescheme.accountlinks.login.rememberme' | ml %]</label></td>
|
||
|
|
[%- -%]<td><input type="submit" name="login" value="[% 'sitescheme.accountlinks.btn.login' | ml %]" tabindex="4"/></td>
|
||
|
|
[%- -%]</tr></table></form>
|
||
|
|
[%- END -%] [%# end if remote %]
|
||
|
|
</div>
|
||
|
|
[%- END -%] [%# end if resource_group == "foundation" %]
|
||
|
|
[%- END -%] [%# end block.accountlinks %]
|
||
|
|
|
||
|
|
[%- BLOCK block.pagediv -%]
|
||
|
|
<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 %]>
|
||
|
|
<h1>[% sections.title %]</h1>
|
||
|
|
[% content %]
|
||
|
|
</div>
|
||
|
|
[% PROCESS block.accountlinks %]
|
||
|
|
<nav role="navigation" aria-label="[% 'sitescheme.navigation.sitelinks' | ml %]">
|
||
|
|
[% PROCESS block.menunav %]
|
||
|
|
</nav>
|
||
|
|
<div id="header-search" role="search">
|
||
|
|
[% dw_scheme.search_render %]
|
||
|
|
</div>
|
||
|
|
<footer role="contentinfo">
|
||
|
|
[% PROCESS block.footer %]
|
||
|
|
</footer>
|
||
|
|
</div>
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[%- canvas_opts = "" -%]
|
||
|
|
[%- BLOCK block.page -%]
|
||
|
|
[%- IF resource_group == "foundation" -%]
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en" class="no-js">
|
||
|
|
[% PROCESS block.head %]
|
||
|
|
[%# NOTE: Other site schemes override this block, so only gradation ends up with the class tag %]
|
||
|
|
<body [% sections.bodyopts %] class="gradation">
|
||
|
|
<div id="canvas" [% canvas_opts %]>
|
||
|
|
<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">
|
||
|
|
<span id="logo">
|
||
|
|
[% PROCESS block.logo %]
|
||
|
|
</span>
|
||
|
|
</div><!-- end masthead -->
|
||
|
|
|
||
|
|
<div id="content" role="main" [% sections.contentopts %]>
|
||
|
|
[%- PROCESS block.msgs -%]
|
||
|
|
<div class="row"><div class="large-12 columns">
|
||
|
|
<h1>[% sections.title %]</h1>
|
||
|
|
</div></div>
|
||
|
|
|
||
|
|
[%- PROCESS block.errors -%]
|
||
|
|
|
||
|
|
|
||
|
|
<div class="row"><div class="large-12 columns">
|
||
|
|
[%- content -%]
|
||
|
|
</div></div>
|
||
|
|
|
||
|
|
</div><!--end content-->
|
||
|
|
</div><!-- end page-->
|
||
|
|
|
||
|
|
[% PROCESS block.accountlinks %]
|
||
|
|
|
||
|
|
<nav role="navigation" aria-label="[% 'sitescheme.navigation.sitelinks' | ml %]" class="main-nav top-bar contain-to-grid" 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 %]
|
||
|
|
</section>
|
||
|
|
</nav>
|
||
|
|
<div id="header-search" role="search">
|
||
|
|
[% PROCESS block.search %]
|
||
|
|
</div><!-- end header-search-->
|
||
|
|
<footer role="contentinfo">
|
||
|
|
[% PROCESS block.footer %]
|
||
|
|
</footer>
|
||
|
|
</div> <!-- end canvas-->
|
||
|
|
[% dw_scheme.final_body_html %]
|
||
|
|
<script>
|
||
|
|
$(function() {
|
||
|
|
if ( $("#canvas").hasClass("vertical-nav") && $(".main-nav .toggle-topbar:visible").length == 0 ) {
|
||
|
|
$(".main-nav")
|
||
|
|
.find(".has-dropdown").removeClass( "has-dropdown" ).end()
|
||
|
|
.find(".top-bar-section").removeClass( "top-bar-section" ).end()
|
||
|
|
}
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
[%- PROCESS block.script_init -%]
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
[%- ELSE -%]
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="en">
|
||
|
|
[% PROCESS block.head %]
|
||
|
|
[%# NOTE: Other site schemes override this block, so only gradation ends up with the class tag %]
|
||
|
|
<body [% sections.bodyopts %] class="gradation">
|
||
|
|
<div id="canvas" [% canvas_opts %]>
|
||
|
|
[%- PROCESS block.msgs -%]
|
||
|
|
[% PROCESS block.pagediv %]
|
||
|
|
</div>
|
||
|
|
[% dw_scheme.final_body_html %]
|
||
|
|
</body>
|
||
|
|
</html>
|
||
|
|
[%- END -%]
|
||
|
|
[%- END -%]
|