mirror of
https://github.com/mgrove36/bbc-young-reporter.git
synced 2026-03-03 03:17:07 +00:00
Define webpage title via JS
This commit is contained in:
@@ -14,14 +14,14 @@
|
||||
<!-- add to homescreen for Safari on iOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC School Report | Reading School">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC Young Reporter | Reading School">
|
||||
<link rel="apple-touch-icon-precomposed" href="https://matthew-grove.ml/logo.png">
|
||||
|
||||
<!-- tile icon & colour for Windows 8 -->
|
||||
<meta name="msapplication-TileImage" content="https://matthew-grove.ml/logo.png">
|
||||
<meta name="msapplication-TileColor" content="#d84315">
|
||||
|
||||
<title>Article Name | BBC School Report | Reading School</title>
|
||||
<title>BBC Young Reporter | Reading School</title>
|
||||
<meta name="description" content="News articles written by Reading School students in year 8">
|
||||
|
||||
<!-- import Roboto (font) -->
|
||||
@@ -45,6 +45,11 @@
|
||||
<script src="/assets/global.js"></script>
|
||||
<link href="/assets/global.css" rel="stylesheet">
|
||||
<link href="/assets/article-page.css" rel="stylesheet">
|
||||
|
||||
<!-- define title so that webpage & top app bar titles can be instantiated via JS -->
|
||||
<script>
|
||||
window.page_title = "Article Name";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- cookie notice is included via jQuery -->
|
||||
|
||||
@@ -29,7 +29,10 @@ $(document).ready(function(){
|
||||
}
|
||||
|
||||
// set top app bar title
|
||||
$(".mdc-top-app-bar__title").html(window.page_title);
|
||||
if (window.page_title != null) {
|
||||
$(".mdc-top-app-bar__title").html(window.page_title + " | BBC Young Reporter | Reading School");
|
||||
document.title= window.page_title + " | BBC Young Reporter | Reading School";
|
||||
}
|
||||
|
||||
// give 'seleted' styling to correct item on navbar
|
||||
$(drawer_item_link_query_selector + "']").addClass("mdc-list-item--activated");
|
||||
@@ -43,7 +46,7 @@ $(document).ready(function(){
|
||||
jQuery("time.timeago").timeago();
|
||||
|
||||
// include cookie notice
|
||||
if(Cookies.get("reading-school-bbc-school-report-cookies-accepted") != "true") {
|
||||
if(Cookies.get("reading-school-bbc-young-reporter-cookies-accepted") != "true") {
|
||||
$("#cookies").load("/page-inserts/cookie-notice.html", function(){
|
||||
$("#cookies").show();
|
||||
$("#cookies").animate({bottom: "0px"}, 1000);
|
||||
@@ -53,7 +56,7 @@ $(document).ready(function(){
|
||||
$("#cookies").animate({bottom: "-100px"}, 1000);
|
||||
setTimeout(function(){$("#cookies").hide()},1000);
|
||||
$(".source-code-link").animate({bottom: "15px"}, 1000);
|
||||
Cookies.set("reading-school-bbc-school-report-cookies-accepted", "true", {expires: 30});
|
||||
Cookies.set("reading-school-bbc-young-reporter-cookies-accepted", "true", {expires: 30});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<!-- add to homescreen for Safari on iOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC School Report | Reading School">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC Young Reporter | Reading School">
|
||||
<link rel="apple-touch-icon-precomposed" href="https://matthew-grove.ml/logo.png">
|
||||
|
||||
<!-- tile icon & colour for Windows 8 -->
|
||||
<meta name="msapplication-TileImage" content="https://matthew-grove.ml/logo.png">
|
||||
<meta name="msapplication-TileColor" content="#d84315">
|
||||
|
||||
<title>Name | BBC School Report | Reading School</title>
|
||||
<title>BBC Young Reporter | Reading School</title>
|
||||
<meta name="description" content="News articles written by Reading School students in year 8">
|
||||
|
||||
<!-- import Roboto (font) -->
|
||||
@@ -45,6 +45,11 @@
|
||||
<script src="/assets/global.js"></script>
|
||||
<link href="/assets/global.css" rel="stylesheet">
|
||||
<link href="/assets/mdc-card-list.css" rel="stylesheet">
|
||||
|
||||
<!-- define title so that webpage & top app bar titles can be instantiated via JS -->
|
||||
<script>
|
||||
window.page_title = "Name";
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- cookie notice is included via jQuery -->
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
<!-- add to homescreen for Safari on iOS -->
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC School Report | Reading School">
|
||||
<meta name="apple-mobile-web-app-title" content="BBC Young Reporter | Reading School">
|
||||
<link rel="apple-touch-icon-precomposed" href="https://matthew-grove.ml/logo.png">
|
||||
|
||||
<!-- tile icon & colour for Windows 8 -->
|
||||
<meta name="msapplication-TileImage" content="https://matthew-grove.ml/logo.png">
|
||||
<meta name="msapplication-TileColor" content="#d84315">
|
||||
|
||||
<title>BBC School Report | Reading School</title>
|
||||
<title>BBC Young Reporter | Reading School</title>
|
||||
<meta name="description" content="News articles written by Reading School students in year 8">
|
||||
|
||||
<!-- import Roboto (font) -->
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<div class="mdc-top-app-bar__row">
|
||||
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-start">
|
||||
<a href="javascript:void(0);" class="material-icons mdc-top-app-bar__navigation-icon">menu</a>
|
||||
<span class="mdc-top-app-bar__title">BBC School Report | Reading School</span>
|
||||
<span class="mdc-top-app-bar__title">BBC Young Reporter | Reading School</span>
|
||||
</section>
|
||||
<section class="mdc-top-app-bar__section mdc-top-app-bar__section--align-end" role="toolbar">
|
||||
<img src="/images/logo-white.png" class="mdc-top-app-bar__action-item" aria-label="Reading School" alt="Reading School Logo" style="height:45px;width:35px;padding:0;"/>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<script src="/vle/bbcnews/assets/cookies.js"></script>
|
||||
<script>
|
||||
Cookies.remove("reading-school-bbc-school-report-cookies-accepted");
|
||||
Cookies.remove("reading-school-bbc-young-reporter-cookies-accepted");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user