<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

<%@ include file="/blogs/init.jsp" %>

<%
String coverImageCaption = ParamUtil.getString(request, "coverImageCaption");
String coverImageURL = ParamUtil.getString(request, "coverImageURL");

String viewEntryURL = ParamUtil.getString(request, "viewEntryURL");

boolean validViewEntryURL = Validator.isUrl(viewEntryURL);
%>

<c:if test="<%= Validator.isUrl(coverImageURL) %>">
	<c:if test="<%= validViewEntryURL %>">
		<a href="<%= HtmlUtil.escapeHREF(viewEntryURL) %>">
	</c:if>

	<div <c:if test="<%= Validator.isNotNull(coverImageCaption) %>">aria-label="<%= HtmlUtil.escapeAttribute(HtmlUtil.stripHtml(coverImageCaption)) %>" role="img"</c:if> class="aspect-ratio aspect-ratio-8-to-3 aspect-ratio-bg-cover cover-image" style="background-image: url('<%= HtmlUtil.escapeAttribute(coverImageURL) %>');"></div>

	<c:if test="<%= validViewEntryURL %>">
		</a>
	</c:if>
</c:if>