Commit b434dfe4 authored by Matija Obreza's avatar Matija Obreza

<local:content-header tag with HTML metadata

parent 4adc9fc4
......@@ -4,16 +4,16 @@
<html lang="${pageContext.response.locale.language}" dir="${pageContext.response.locale.language=='fa' || pageContext.response.locale.language=='ar' ? 'rtl' : 'ltr'}">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Genesys, global database on plant genetic resources, accession database, order seeds, request for genebank material" />
<meta name="author" content="Global Crop Diversity Trust" />
<!-- CSRF protection-->
<meta name="_csrf" content="${_csrf.token}"/>
<!-- default header name is X-CSRF-TOKEN -->
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<title><sitemesh:write property="title" /></title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- CSRF protection-->
<meta name="_csrf" content="${_csrf.token}"/>
<!-- default header name is X-CSRF-TOKEN -->
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<!-- Links -->
<link rel="shortcut icon" href="<c:url value="/html/images/genesys.png" />" />
......@@ -33,18 +33,18 @@
<link rel="alternate" hreflang="zh" href="<c:url value="/zh${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}" />" />
<title><sitemesh:write property="title" /></title>
<!-- Custom styles for this template -->
<%@include file="css.jsp" %>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Custom styles for this template -->
<%@include file="css.jsp" %>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<sitemesh:write property="head" />
<meta name="description" content="Genesys, global database on plant genetic resources, accession database, order seeds, request for genebank material" />
<meta name="author" content="Global Crop Diversity Trust" />
</head>
<body>
......
......@@ -5,21 +5,22 @@
<html lang="${pageContext.response.locale.language}" dir="${pageContext.response.locale.language=='fa' || pageContext.response.locale.language=='ar' ? 'rtl' : 'ltr'}"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:schema="http://schema.org/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
xmlns:germplasm="http://purl.org/germplasm/germplasmTerm#"
xmlns:germplasmType="http://purl.org/germplasm/germplasmType#"
>
<head >
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="author" content="Global Crop Diversity Trust" />
<!-- CSRF protection-->
<meta name="_csrf" content="${_csrf.token}"/>
<!-- default header name is X-CSRF-TOKEN -->
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<head>
<title><sitemesh:write property="title" /></title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="language" content="${pageContext.response.locale.language}" />
<!-- CSRF protection-->
<meta name="_csrf" content="${_csrf.token}"/>
<!-- default header name is X-CSRF-TOKEN -->
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<!-- Links -->
<link rel="shortcut icon" href="<c:url value="/html/images/genesys.png" />" />
......@@ -38,18 +39,17 @@
<link rel="alternate" hreflang="ru" href="<c:url value="/ru${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}" />" />
<link rel="alternate" hreflang="zh" href="<c:url value="/zh${pageContext.request.getAttribute('org.genesys2.server.servlet.filter.LocaleURLFilter.INTERNALURL')}" />" />
<title><sitemesh:write property="title" /></title>
<!-- Custom styles for this template -->
<%@include file="css.jsp" %>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Custom styles for this template -->
<%@include file="css.jsp" %>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<sitemesh:write property="head" />
<meta name="author" content="Global Crop Diversity Trust" />
</head>
<body>
......
......@@ -7,6 +7,7 @@
<title><spring:message code="accession.page.profile.title" arguments="${accession.accessionName}"
argumentSeparator="|"
/></title>
<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${accession.accessionName} | ${accession.instituteCode}" keywords="${accession.accessionName}" />
</head>
<body typeof="germplasm:GermplasmAccession">
<h1>
......
......@@ -4,8 +4,8 @@
<html>
<head>
<title>${title}</title>
<meta name="description" content="<c:out value="${jspHelper.htmlToText(article.summary)}" />" />
<title>${title}</title>
<local:content-headers description="${jspHelper.htmlToText(article.summary, 150)}" title="${title}" />
</head>
<body>
<content tag="header">
......
......@@ -5,6 +5,8 @@
<html>
<head>
<title><spring:message code="country.page.profile.title" arguments="${country.getName(pageContext.response.locale)}" argumentSeparator="|" /></title>
<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${country.getName(pageContext.response.locale)}" />
</head>
<body>
<h1>
......
......@@ -6,8 +6,7 @@
<head>
<title><spring:message code="organization.page.profile.title" arguments="${organization.slug}"
argumentSeparator="|" /></title>
<meta name="description" content="<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
<meta name="keywords" content="${organization.slug}, ${organization.title}" />
<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${organization.title}" keywords="${organization.slug}, ${organization.title}" />
</head>
<body>
<h1>
......
......@@ -6,10 +6,12 @@
<head>
<title><c:out value="${faoInstitute.fullName}" /><c:if test="${faoInstitute.acronym != ''}"> | ${faoInstitute.acronym}</c:if>
| <c:out value="${faoInstitute.code}" /></title>
<meta name="description"
content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />
<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
<meta name="keywords" content="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}" />
<local:content-headers description="${jspHelper.htmlToText(blurp.summary, 150)}" title="${faoInstitute.fullName}" keywords="${faoInstitute.acronym}, ${faoInstitute.fullName}, ${faoInstitute.code}" />
<meta name="description"
content="<spring:message code="faoInstitute.meta-description" arguments="${faoInstitute.fullName}|${faoInstitute.acronym}" argumentSeparator="|" />
<c:out value="${jspHelper.htmlToText(blurp.summary)}" />" />
</head>
<body typeof="schema:Organization">
<h1>
......
<%@ tag description="HTML headers" pageEncoding="UTF-8"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ attribute name="title" required="false" type="java.lang.String" description="title" %>
<%@ attribute name="description" required="false" type="java.lang.String" description="description" %>
<%@ attribute name="keywords" required="false" type="java.lang.String" description="keywords" %>
<%@ attribute name="imageUrl" required="false" type="java.lang.String" description="URL to an image" %>
<%-- Twitter --%>
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@GenesysPGR" />
<meta name="twitter:title" content="<c:out value="${title}" />" />
<c:if test="${description ne null}">
<meta name="description" content="<c:out value="${description}" />" />
<meta name="twitter:description" content="<c:out value="${description}" />" />
</c:if>
<c:if test="${keywords ne null}">
<meta name="keywords" content="<c:out value="${keywords}" />" />
</c:if>
<c:if test="${imageUrl ne null}">
<meta name="twitter:image" content="<c:out value="${imageUrl}" />" />
</c:if>
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