Commit 619a6532 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

1268: Implement theming mechanism

Task-Url: https://pm.winseda.de/issues/1268
parent 38c63019
......@@ -7,10 +7,14 @@
<meta name="author" content="Tobias Gradl, University of Bamberg">
<meta name="description" content="<tiles:insertAttribute name="title" />">
<meta name="description" content="DARIAH-DE - Generic Search">
<tiles:importAttribute name="styles" />
<c:forEach items="${styles}" var="css">
<tiles:importAttribute name="genericStyles" />
<c:forEach items="${genericStyles}" var="css">
<link rel="stylesheet" href="<s:url value="/resources/css/${css}" />" type="text/css" media="screen, projection" />
</c:forEach>
<tiles:importAttribute name="templateStyles" />
<c:forEach items="${templateStyles}" var="css">
<link rel="stylesheet" href="<s:url value="/themes/${css}" />" type="text/css" media="screen, projection" />
</c:forEach>
<script type="text/javascript">
var AppProperties = function() {
......@@ -27,5 +31,6 @@
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="shortcut icon" type="image/png" href="<s:url value="/resources/img/favicon-template.png" />" />
<link rel="shortcut icon" type="image/x-icon" href="<s:url value="/theme/img/favicon.ico" />">
<link rel="icon" type="image/png" href="<s:url value="/theme/img/favicon.png" />">
</head>
\ No newline at end of file
......@@ -101,6 +101,11 @@
<a class="nav-link" href="<s:url value='/user' />" title="${_auth.displayName}"><span class="ti-user"></span></a>
</li>
</c:if>
<c:catch>
<tiles:importAttribute name="theme" />
<jsp:include page="../../../../themes/${theme}/jsp/add_navigation.jsp" />
</c:catch>
<c:if test="${collapsePanel!=null}">
<li class="nav-item navbar-separator grid-xl-hidden">
......@@ -125,32 +130,10 @@
</nav>
<h1 class="logobar">
<a class="logobar-link<c:if test="${smallLogo==true}"> logobar-link-sm</c:if>" href="" title="Startseite">
<img class="logobar-logo" src='<s:url value="/resources/img/logos/mww-green.svg" />' alt="MWW">
<img class="logobar-logo" src='<s:url value="/theme/img/theme-logo-de.svg" />' alt='<s:message code="~eu.dariah.de.minfba.theme.name" />'>
<span class="logobar-title">
<c:choose>
<c:when test="${smallLogo==true}">
<c:choose>
<c:when test="${customSearch!=null}">
${customSearch.name}
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.titles.generic_search" />
</c:otherwise>
</c:choose>
</c:when>
<c:otherwise>
<c:choose>
<c:when test="${customSearch!=null}">
${customSearch.name}
</c:when>
<c:otherwise>
<s:message code="~eu.dariah.de.minfba.search.view.titles.generic_search.br" />
</c:otherwise>
</c:choose>
</c:otherwise>
</c:choose>
<s:message code="${smallLogo==true ? '~eu.dariah.de.minfba.theme.application_titles.gs' : '~eu.dariah.de.minfba.theme.application_titles.br.gs'}" />
</span>
</a>
</h1>
</header>
......
......@@ -55,15 +55,21 @@
</noscript>
<!-- Footer -->
<%@ include file="incl/footer.jsp" %>
<tiles:importAttribute name="theme" />
<jsp:include page="../../../../themes/${theme}/jsp/footer.jsp" />
</wrapper>
<!-- JavaScript files at the end for faster loading of documents -->
<tiles:importAttribute name="scripts" />
<c:forEach items="${scripts}" var="s">
<!-- JavaScript files at the end for faster loading of documents -->
<tiles:importAttribute name="genericScripts" />
<c:forEach items="${genericScripts}" var="s">
<script type="text/javascript" src="<s:url value="/resources/js/${s}" />"></script>
</c:forEach>
<tiles:importAttribute name="templateScripts" />
<c:forEach items="${templateScripts}" var="s">
<script type="text/javascript" src="<s:url value="/themes/${s}" />"></script>
</c:forEach>
</body>
</html>
\ No newline at end of file
......@@ -21,16 +21,21 @@
</main>
<!-- Footer -->
<%@ include file="incl/footer.jsp" %>
<tiles:importAttribute name="theme" />
<jsp:include page="../../../../themes/${theme}/jsp/footer.jsp" />
</wrapper>
<noscript>
<div><s:message code="~eu.dariah.de.minfba.common.view.noscript" /></div>
</noscript>
<!-- JavaScript files at the end for faster loading of documents -->
<tiles:importAttribute name="scripts" />
<c:forEach items="${scripts}" var="s">
<tiles:importAttribute name="genericScripts" />
<c:forEach items="${genericScripts}" var="s">
<script type="text/javascript" src="<s:url value="/resources/js/${s}" />"></script>
</c:forEach>
<tiles:importAttribute name="templateScripts" />
<c:forEach items="${templateScripts}" var="s">
<script type="text/javascript" src="<s:url value="/themes/${s}" />"></script>
</c:forEach>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment