Polish accessibility and SEO metadata
This commit is contained in:
parent
d8f7704733
commit
508bb7a4da
13 changed files with 76 additions and 21 deletions
|
|
@ -4,22 +4,40 @@ import SiteNav from "./SiteNav.astro";
|
|||
|
||||
const {
|
||||
title,
|
||||
description,
|
||||
bodyClass,
|
||||
pathname,
|
||||
pathname = "/",
|
||||
canonical,
|
||||
robots = "max-image-preview:large",
|
||||
ogType = "website",
|
||||
image = "/assets/uploads/2013/10/BannerFamilyFed_23_10c1.jpg",
|
||||
parabolaSettings = { masonry: "0", magazine: "0", mobile: "1", fitvids: "1" },
|
||||
} = Astro.props;
|
||||
const parabolaSettingsScript = `var parabola_settings = ${JSON.stringify(parabolaSettings)};`;
|
||||
const canonicalUrl = canonical ?? pathname;
|
||||
const metaTitle = title
|
||||
.replace(/–|–/g, "-")
|
||||
.replace(/‘|’|‘|’/g, "'")
|
||||
.replace(/“|”|“|”/g, '"')
|
||||
.replace(/&/g, "&");
|
||||
---
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<slot name="head" />
|
||||
<title set:html={title} />
|
||||
<meta name="robots" content="max-image-preview:large" />
|
||||
{description && <meta name="description" content={description} />}
|
||||
{robots && <meta name="robots" content={robots} />}
|
||||
<meta property="og:site_name" content="FFWPU Ireland" />
|
||||
<meta property="og:title" content={metaTitle} />
|
||||
{description && <meta property="og:description" content={description} />}
|
||||
{canonicalUrl && <meta property="og:url" content={canonicalUrl} />}
|
||||
{image && <meta property="og:image" content={image} />}
|
||||
<meta property="og:type" content={ogType} />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<link rel="stylesheet" id="content-blocks-css" href="/css/block-library.css?ver=6.6.5" type="text/css" media="all" />
|
||||
<link rel="stylesheet" id="pdfprnt_frontend-css" href="/assets/vendor/pdf/css/frontend.css?ver=2.4.0" type="text/css" media="all" />
|
||||
<link rel="stylesheet" id="parabola-fonts-css" href="/assets/theme/parabola/fonts/fontfaces.css?ver=2.4.1" type="text/css" media="all" />
|
||||
|
|
@ -30,7 +48,7 @@ const parabolaSettingsScript = `var parabola_settings = ${JSON.stringify(parabol
|
|||
<script is:inline type="text/javascript" src="/js/jquery.min.js?ver=2.0.2" id="jquery-js"></script>
|
||||
<script is:inline type="text/javascript" id="parabola-frontend-js-extra" set:html={parabolaSettingsScript}></script>
|
||||
<script is:inline type="text/javascript" src="/assets/theme/parabola/js/frontend.js?ver=2.4.1" id="parabola-frontend-js"></script>
|
||||
{canonical && <link rel="canonical" href={canonical} />}
|
||||
{canonicalUrl && <link rel="canonical" href={canonicalUrl} />}
|
||||
</head>
|
||||
<body class={bodyClass}>
|
||||
<div id="toTop"> </div>
|
||||
|
|
@ -39,13 +57,13 @@ const parabolaSettingsScript = `var parabola_settings = ${JSON.stringify(parabol
|
|||
<header id="header">
|
||||
<div id="masthead">
|
||||
<div id="branding" role="banner">
|
||||
<img id="bg_image" alt="FFWPU Ireland" title="FFWPU Ireland" src="/assets/uploads/2013/10/BannerFamilyFed_23_10c1.jpg" />
|
||||
<img id="bg_image" alt="Family Federation for World Peace and Unification Ireland" src="/assets/uploads/2013/10/BannerFamilyFed_23_10c1.jpg" />
|
||||
<div id="header-container">
|
||||
<a href="/index.html" id="linky"></a>
|
||||
<a href="/index.html" id="linky" aria-label="FFWPU Ireland home page"></a>
|
||||
</div>
|
||||
<div style="clear:both;"></div>
|
||||
</div>
|
||||
<a id="nav-toggle"><span> </span></a>
|
||||
<a id="nav-toggle" href="#access" role="button" aria-label="Toggle navigation menu"><span> </span></a>
|
||||
<SiteNav pathname={pathname} />
|
||||
</div>
|
||||
<div style="clear:both;height:1px;width:1px;"> </div>
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ function isCurrent(item) {
|
|||
}
|
||||
---
|
||||
|
||||
<nav id="access" class="jssafe" role="navigation">
|
||||
<div class="skip-link screen-reader-text"><a href="#content" title="Skip to content">Skip to content</a></div>
|
||||
<nav id="access" class="jssafe" role="navigation" aria-label="Primary navigation">
|
||||
<div class="skip-link screen-reader-text"><a href="#content">Skip to content</a></div>
|
||||
<div class="menu">
|
||||
<ul id="prime_nav" class="menu">
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue