Initial template refactoring (paused due to JSP)

This commit is contained in:
Graham Triggs 2016-09-29 15:22:05 +01:00
parent d1a93743fc
commit e2e3c8b041
19 changed files with 193 additions and 262 deletions

View file

@ -8,7 +8,9 @@
<div id="wrap" class="container"> <div id="wrap" class="container">
<div id="header"> <div id="header">
<#include "identity.ftl"> <header id="branding" role="banner">
<#include "identity.ftl">
</header>
<#-- Note to UI team: do not change this div without also making the corresponding change in menu.jsp --> <#-- Note to UI team: do not change this div without also making the corresponding change in menu.jsp -->
<div id="navAndSearch" class="block"> <div id="navAndSearch" class="block">
@ -22,11 +24,7 @@
<hr class="hidden" /> <hr class="hidden" />
<div id="contentwrap"> <div id="contentwrap">
<#if flash?has_content> <#include "flash.html">
<div id="flash-message">
${flash}
</div>
</#if>
<div id="content"> <div id="content">
${body} ${body}
@ -34,7 +32,6 @@
</div> <!-- contentwrap --> </div> <!-- contentwrap -->
<#include "footer.ftl"> <#include "footer.ftl">
</div> <!-- wrap --> </div> <!-- wrap -->
<#include "scripts.ftl"> <#include "scripts.ftl">

View file

@ -1,12 +1,17 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#if copyright??> <p class="copyright">
<div class="copyright"> <#if copyright??>
&copy;${copyright.year?c} <small>&copy;${copyright.year?c}
<#if copyright.url??> <#if copyright.url??>
<a href="${copyright.url}" title="${i18n().copyright}">${copyright.text}</a> <a href="${copyright.url}" title="${i18n().copyright}">${copyright.text}</a>
<#else> <#else>
${copyright.text} ${copyright.text}
</#if> </#if>
</div> | <a class="terms" href="${urls.termsOfUse}" title="${i18n().terms_of_use}">${i18n().terms_of_use}</a></small> |
</#if> </#if>
${i18n().powered_by} <a class="powered-by-vitro" href="http://vitro.sourceforge.net"><strong>Vitro</strong></a>
<#if user.hasRevisionInfoAccess>
| ${i18n().version} <a href="${version.moreInfoUrl}" title="${i18n().version}">${version.label}</a>
</#if>
</p>

View file

@ -0,0 +1,8 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#if flash?has_content>
<div id="flash-message">
${flash}
</div>
</#if>

View file

@ -2,23 +2,18 @@
<#import "lib-list.ftl" as l> <#import "lib-list.ftl" as l>
<div id="footer"> <footer role="contentinfo">
<#if urls.bannerImage??>
<img class="footerLogo" src="${urls.bannerImage}" alt="${siteTagline!}" />
</#if>
<div class="footerLinks">
<ul class="otherNav">
<@l.firstLastList>
<#include "subMenuLinks.ftl">
</@l.firstLastList>
</ul>
</div>
<#include "copyright.ftl"> <#include "copyright.ftl">
${i18n().all_rights_reserved} <a href="${urls.termsOfUse}" title="${i18n().terms_of_use}">${i18n().terms_of_use}</a> <nav role="navigation">
<ul id="footer-nav" role="list">
<li role="listitem"><a href="${urls.about}" title="${i18n().about}">${i18n().about}</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}" title="${i18n().contact_us}">${i18n().contact_us}</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank" title="${i18n().support}">${i18n().support}</a></li>
</ul>
</nav>
</footer>
<#include "version.ftl"> <#include "scripts.ftl">
</div>

View file

@ -1,19 +1,26 @@
<#-- NOTICE: This is SAMPLE Google Analytics code. You must replace it with your institution's code. --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- <#if gatracker??>
<script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); <script type="text/javascript">
</script> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
<script type="text/javascript"> </script>
try {
var pageTracker = _gat._getTracker("UA-5164622-5"); <script type="text/javascript">
pageTracker._setDomainName("vivo.cornell.edu"); try {
pageTracker._setAllowLinker(true); var pageTracker = _gat._getTracker("${gatracker}");
pageTracker._trackPageview(); <#if gadomain??>
var rollupTracker = _gat._getTracker("UA-12531954-1"); pageTracker._setDomainName("${gadomain});
rollupTracker._setDomainName("none"); </#if>
rollupTracker._setAllowLinker(true); pageTracker._setAllowLinker(true);
rollupTracker._trackPageview(location.host+location.pathname); pageTracker._trackPageview();
}
catch(err) {} <#if gatrackerrollup??>
</script> var rollupTracker = _gat._getTracker("${gatrackerrollup}");
--> rollupTracker._setDomainName("none");
rollupTracker._setAllowLinker(true);
rollupTracker._trackPageview(location.host+location.pathname);
</#if>
}
catch(err) {}
</script>
</#if>

View file

@ -8,8 +8,14 @@
<#include "stylesheets.ftl"> <#include "stylesheets.ftl">
<#include "themeStylesheets.ftl">
<#include "headScripts.ftl"> <#include "headScripts.ftl">
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="${urls.base}/js/selectivizr.js"></script>
<![endif]-->
<#if metaTags??> <#if metaTags??>
${metaTags.list()} ${metaTags.list()}
</#if> </#if>
@ -17,3 +23,5 @@
<#-- Inject head content specified in the controller. Currently this is used only to generate an rdf link on <#-- Inject head content specified in the controller. Currently this is used only to generate an rdf link on
an individual profile page. --> an individual profile page. -->
${headContent!} ${headContent!}
<link rel="shortcut icon" type="image/x-icon" href="${urls.base}/favicon.ico">

View file

@ -1,43 +1,41 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<header id="branding" role="banner"> <h1 class="vitro-logo"><a href="${urls.home}" title="${siteName}"><span class="displace">${siteName}</span></a></h1>
<h1 class="vivo-logo"><a href="${urls.home}" title="${siteName}"><span class="displace">${siteName}</span></a></h1> <#if siteTagline?has_content>
<#if siteTagline?has_content> <em>${siteTagline}</em>
<em>${siteTagline}</em> </#if>
</#if>
<nav role="navigation"> <nav role="navigation">
<ul id="header-nav" role="list"> <ul id="header-nav" role="list">
<#include "languageSelector.ftl"> <#include "languageSelector.ftl">
<#if user.loggedIn> <#if user.loggedIn>
<li role="listitem">${user.loginName}</li> <li role="listitem">${user.loginName}</li>
<li role="listitem"><a href="${urls.logout}" title="${i18n().end_your_Session}">${i18n().log_out}</a></li> <li role="listitem"><a href="${urls.logout}" title="${i18n().end_your_Session}">${i18n().log_out}</a></li>
<#if user.hasSiteAdminAccess> <#if user.hasSiteAdminAccess>
<li role="listitem"><a href="${urls.siteAdmin}" title="${i18n().manage_site}">${i18n().site_admin}</a></li> <li role="listitem"><a href="${urls.siteAdmin}" title="${i18n().manage_site}">${i18n().site_admin}</a></li>
</#if>
<#else>
<li role="listitem"><a href="${urls.login}" title="${i18n().login_to_manage_site}" >${i18n().login_button}</a></li>
</#if> </#if>
<#-- List of links that appear in submenus, like the header and footer. --> <#else>
<li role="listitem"><a href="${urls.about}" title="${i18n().more_details_about_site}">${i18n().about}</a></li> <li role="listitem"><a href="${urls.login}" title="${i18n().login_to_manage_site}" >${i18n().login_button}</a></li>
<#if urls.contact??> </#if>
<li role="listitem"><a href="${urls.contact}" title="${i18n().send_feedback_questions}">${i18n().contact_us}</a></li> <#-- List of links that appear in submenus, like the header and footer. -->
</#if> <li role="listitem"><a href="${urls.about}" title="${i18n().more_details_about_site}">${i18n().about}</a></li>
<li role="listitem"><a href="http://www.vivoweb.org/support" title="${i18n().visit_project_website}" target="blank">${i18n().support}</a></li> <#if urls.contact??>
<li role="listitem"><a href="${urls.index}" title="${i18n().view_content_index}">${i18n().index}</a></li> <li role="listitem"><a href="${urls.contact}" title="${i18n().send_feedback_questions}">${i18n().contact_us}</a></li>
</ul> </#if>
</nav> <li role="listitem"><a href="http://www.vivoweb.org/support" title="${i18n().visit_project_website}" target="blank">${i18n().support}</a></li>
<li role="listitem"><a href="${urls.index}" title="${i18n().view_content_index}">${i18n().index}</a></li>
</ul>
</nav>
<section id="search" role="region"> <section id="search" role="region">
<fieldset> <fieldset>
<legend>${i18n().search_form}</legend> <legend>${i18n().search_form}</legend>
<form id="search-form" action="${urls.search}" name="search" role="search" accept-charset="UTF-8" method="POST"> <form id="search-form" action="${urls.search}" name="search" role="search" accept-charset="UTF-8" method="POST">
<div id="search-field"> <div id="search-field">
<input type="text" name="querytext" class="search-vitro" value="${querytext!}" autocapitalize="off" /> <input type="text" name="querytext" class="search-vitro" value="${querytext!}" autocapitalize="off" />
<input type="submit" value="${i18n().search_button}" class="submit"> <input type="submit" value="${i18n().search_button}" class="submit">
</div> </div>
</form> </form>
</fieldset> </fieldset>
</section> </section>
</header>

View file

@ -9,10 +9,3 @@
</#list> </#list>
</ul> </ul>
</nav> </nav>
<div id="wrapper-content" role="main">
<#if flash?has_content>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>

View file

@ -0,0 +1 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->

View file

@ -1,3 +1,3 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<title>${siteName!}</title> <title>${(title?html)!siteName!}</title>

View file

@ -0,0 +1,19 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#if flash?has_content>
<#if flash?starts_with("Welcome") >
<section id="welcome-msg-container" role="container">
<section id="welcome-message" role="alert">${flash}</section>
</section>
<#else>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
</#if>
<!--[if lte IE 8]>
<noscript>
<p class="ie-alert">${i18n().javascript_ie_alert_text} Here are the <a href="http://www.enable-javascript.com" title="javascript instructions">${i18n().to_enable_javascript}</a>.</p>
</noscript>
<![endif]-->

View file

@ -1,33 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
</div> <!-- #wrapper-content -->
<footer role="contentinfo">
<p class="copyright">
<#if copyright??>
<small>&copy;${copyright.year?c}
<#if copyright.url??>
<a href="${copyright.url}" title="${i18n().copyright}">${copyright.text}</a>
<#else>
${copyright.text}
</#if>
| <a class="terms" href="${urls.termsOfUse}" title="${i18n().terms_of_use}">${i18n().terms_of_use}</a></small> |
</#if>
${i18n().powered_by} <a class="powered-by-vitro" href="http://vitro.sourceforge.net"><strong>Vitro</strong></a>
<#if user.hasRevisionInfoAccess>
| ${i18n().version} <a href="${version.moreInfoUrl}" title="${i18n().version}">${version.label}</a>
</#if>
</p>
<nav role="navigation">
<ul id="footer-nav" role="list">
<li role="listitem"><a href="${urls.about}" title="${i18n().about}">${i18n().about}</a></li>
<#if urls.contact??>
<li role="listitem"><a href="${urls.contact}" title="${i18n().contact_us}">${i18n().contact_us}</a></li>
</#if>
<li role="listitem"><a href="http://www.vivoweb.org/support" target="blank" title="${i18n().support}">${i18n().support}</a></li>
</ul>
</nav>
</footer>
<#include "scripts.ftl">

View file

@ -1,26 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<#-- NOTICE: This is SAMPLE Google Analytics code. You must replace it with your institution's code.
Please see documentation at https://confluence.cornell.edu/display/ennsrd/Google+Analytics+for+UI. -->
<#--
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-5164622-5");
pageTracker._setDomainName("vivo.cornell.edu");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
var rollupTracker = _gat._getTracker("UA-12531954-1");
rollupTracker._setDomainName("none");
rollupTracker._setAllowLinker(true);
rollupTracker._trackPageview(location.host+location.pathname);
}
catch(err) {}
</script>
-->

View file

@ -1,26 +0,0 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<meta charset="utf-8" />
<!-- Google Chrome Frame open source plug-in brings Google Chrome's open web technologies and speedy JavaScript engine to Internet Explorer-->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>${(title?html)!siteName!}</title>
<#include "stylesheets.ftl">
<link rel="stylesheet" href="${urls.theme}/css/screen.css" />
<#include "headScripts.ftl">
<!--[if (gte IE 6)&(lte IE 8)]>
<script type="text/javascript" src="${urls.base}/js/selectivizr.js"></script>
<![endif]-->
<#if metaTags??>
${metaTags.list()}
</#if>
<#-- Inject head content specified in the controller. Currently this is used only to generate an rdf link on
an individual profile page. -->
${headContent!}
<link rel="shortcut icon" type="image/x-icon" href="${urls.base}/favicon.ico">

View file

@ -1,38 +1,37 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<header id="branding" role="banner"> <h1 class="vitro-logo"><a title="${siteName}" href="${urls.home}"><span class="displace">${siteName}</span></a></h1>
<h1 class="vitro-logo"><a title="${siteName}" href="${urls.home}"><span class="displace">${siteName}</span></a></h1> <#-- Since we are using a graphic text for the tagline, we won't render ${siteTagline}
<#-- Since we are using a graphic text for the tagline, we won't render ${siteTagline} <#if siteTagline?has_content>
<#if siteTagline?has_content> <em>${siteTagline}</em>
<em>${siteTagline}</em> </#if>-->
</#if>-->
<nav role="navigation"> <nav role="navigation">
<ul id="header-nav" role="list"> <ul id="header-nav" role="list">
<#include "languageSelector.ftl"> <#include "languageSelector.ftl">
<li role="listitem"><a href="${urls.index}" title="${i18n().index}">${i18n().index}</a></li> <li role="listitem"><a href="${urls.index}" title="${i18n().index}">${i18n().index}</a></li>
<#if user.loggedIn> <#if user.loggedIn>
<#if user.hasSiteAdminAccess> <#if user.hasSiteAdminAccess>
<li role="listitem"><a href="${urls.siteAdmin}" title="${i18n().site_admin}">${i18n().site_admin}</a></li> <li role="listitem"><a href="${urls.siteAdmin}" title="${i18n().site_admin}">${i18n().site_admin}</a></li>
</#if>
<li>
<ul class="dropdown">
<li id="user-menu"><a href="#" title="${i18n().current_user}">${user.loginName}</a>
<ul class="sub_menu">
<#if urls.myAccount??>
<li role="listitem"><a href="${urls.myAccount}" title="${i18n().myAccount_heading}">${i18n().myAccount_heading}</a></li>
</#if>
<li role="listitem"><a href="${urls.logout}" title="${i18n().log_out}">${i18n().log_out}</a></li>
</ul>
</li>
</ul>
</li>
${scripts.add('<script type="text/javascript" src="${urls.base}/js/userMenu/userMenuUtils.js"></script>')}
<#else>
<li role="listitem"><a class="log-out" title="${i18n().login_to_manage_site}" href="${urls.login}">${i18n().login_button}</a></li>
</#if> </#if>
</ul> <li>
<ul class="dropdown">
<li id="user-menu"><a href="#" title="${i18n().current_user}">${user.loginName}</a>
<ul class="sub_menu">
<#if urls.myAccount??>
<li role="listitem"><a href="${urls.myAccount}" title="${i18n().myAccount_heading}">${i18n().myAccount_heading}</a></li>
</#if>
<li role="listitem"><a href="${urls.logout}" title="${i18n().log_out}">${i18n().log_out}</a></li>
</ul>
</li>
</ul>
</li>
</nav> ${scripts.add('<script type="text/javascript" src="${urls.base}/js/userMenu/userMenuUtils.js"></script>')}
<#else>
<li role="listitem"><a class="log-out" title="${i18n().login_to_manage_site}" href="${urls.login}">${i18n().login_button}</a></li>
</#if>
</ul>
</nav>

View file

@ -1,7 +1,5 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ --> <#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
</header>
<#include "developer.ftl"> <#include "developer.ftl">
<nav role="navigation"> <nav role="navigation">
@ -11,22 +9,3 @@
</#list> </#list>
</ul> </ul>
</nav> </nav>
<div id="wrapper-content" role="main">
<#if flash?has_content>
<#if flash?starts_with("Welcome") >
<section id="welcome-msg-container" role="container">
<section id="welcome-message" role="alert">${flash}</section>
</section>
<#else>
<section id="flash-message" role="alert">
${flash}
</section>
</#if>
</#if>
<!--[if lte IE 8]>
<noscript>
<p class="ie-alert">${i18n().javascript_ie_alert_text} Here are the <a href="http://www.enable-javascript.com" title="javascript instructions">${i18n().to_enable_javascript}</a>.</p>
</noscript>
<![endif]-->

View file

@ -10,10 +10,12 @@
</head> </head>
<body class="${bodyClasses!}"> <body class="${bodyClasses!}">
<#include "identity.ftl"> <header id="branding" role="banner">
<#include "identity.ftl">
</header>
<#include "menu.ftl"> <#include "menu.ftl">
<div id="wrapper-content" role="main">
<section id="intro" role="region"> <section id="intro" role="region">
<h2>${i18n().what_is_vitro}</h2> <h2>${i18n().what_is_vitro}</h2>
@ -51,12 +53,11 @@
</section> <!-- #intro --> </section> <!-- #intro -->
<@widget name="login" /> <@widget name="login" />
<!-- Statistical information relating to property groups and their classes; displayed horizontally, not vertically--> <!-- Statistical information relating to property groups and their classes; displayed horizontally, not vertically-->
<@lh.allClassGroups vClassGroups! /> <@lh.allClassGroups vClassGroups! />
</div>
<#include "footer.ftl"> <#include "footer.ftl">
<script> <script>

View file

@ -9,12 +9,15 @@
</head> </head>
<body class="${bodyClasses!}"> <body class="${bodyClasses!}">
<#include "identity.ftl"> <header id="branding" role="banner">
<#include "search.ftl"> <#include "identity.ftl">
<#include "search.ftl">
</header>
<#include "menu.ftl"> <#include "menu.ftl">
${body} <div id="wrapper-content" role="main">
${body}
</div>
<#include "footer.ftl"> <#include "footer.ftl">
</body> </body>
</html> </html>

View file

@ -0,0 +1,3 @@
<#-- $This file is distributed under the terms of the license in /doc/license.txt$ -->
<link rel="stylesheet" href="${urls.theme}/css/screen.css" />