Skip to content

Commit

Permalink
Merge pull request #2090 from thostetler/update-core-message
Browse files Browse the repository at this point in the history
Change the wording on core switch message
  • Loading branch information
thostetler committed Dec 4, 2020
2 parents e3425a1 + 1f08953 commit b6cee78
Showing 1 changed file with 111 additions and 80 deletions.
191 changes: 111 additions & 80 deletions src/index.html
Original file line number Diff line number Diff line change
@@ -1,57 +1,75 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">

<head profile="http://a9.com/-/spec/opensearch/1.1/">
<meta charset="utf-8"/>
<base href="/">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta name="google-site-verification" content="XxQuw38lagr8-TgtCyhAMP_6ELS9dy35fgrqo9dxw3o" />
<title>NASA/ADS</title>
<meta name="description" content="A powerful, streamlined new Astrophysics Data System" />
<link rel="preload" href="./styles/css/styles.css" as="style">
<link rel="preload" href="./libs/requirejs/require.js" as="script">
<link rel="preload" href="./config/shim.js" as="script">
<link rel="stylesheet" href="./styles/css/styles.css" />
<link rel="icon" type="image/png" sizes="32x32" href="./styles/img/favicon.ico"/>
<link rel="search"
type="application/opensearchdescription+xml"
href="https://ui.adsabs.harvard.edu/config/opensearch.xml"
title="ADS Search" />
<noscript>
<style>
#app-container {
display: none;
}
body {
overflow: hidden;
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#noscriptmsg {
max-width: 450px;
padding: 10px;
}
</style>
</noscript>
</head>
<head profile="http://a9.com/-/spec/opensearch/1.1/">
<meta charset="utf-8" />
<base href="/" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta
name="google-site-verification"
content="XxQuw38lagr8-TgtCyhAMP_6ELS9dy35fgrqo9dxw3o"
/>
<title>NASA/ADS</title>
<meta
name="description"
content="A powerful, streamlined new Astrophysics Data System"
/>
<link rel="preload" href="./styles/css/styles.css" as="style" />
<link rel="preload" href="./libs/requirejs/require.js" as="script" />
<link rel="preload" href="./config/shim.js" as="script" />
<link rel="stylesheet" href="./styles/css/styles.css" />
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./styles/img/favicon.ico"
/>
<link
rel="search"
type="application/opensearchdescription+xml"
href="https://ui.adsabs.harvard.edu/config/opensearch.xml"
title="ADS Search"
/>
<noscript>
<style>
#app-container {
display: none;
}
body {
overflow: hidden;
position: absolute;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
}
#noscriptmsg {
max-width: 450px;
padding: 10px;
}
</style>
</noscript>
</head>

<body>

<noscript>
<div id="noscriptmsg">
Sorry, but the fully featured ADS requires JavaScript to be enabled. Alternatively, <a href="https://ui.adsabs.harvard.edu/core">load basic HTML</a> (for slow connections/low resources).
<p>
Sorry, but the fully featured ADS requires JavaScript to be enabled.
</p>
<p>
<a class="btn btn-primary" href="https://ui.adsabs.harvard.edu/core"
>Click here to switch to Basic HTML</a
>
</p>
</div>
</noscript>

<!--items for announcement of new page, and optional skip to main content link go here (inserted by master.js)-->

<div id="app-container">
<!--this is where bbb discovery gets inserted -->
<!--this is where bbb discovery gets inserted -->
<div id="body-template-container" role="main">
<article class="loading-screen" style="display: none">
<h1 id="loading-screen-title">
Expand All @@ -61,14 +79,26 @@ <h1 id="loading-screen-title">
<section id="loading-screen-bar">
<span class="sr-only">loading...</span>
<div class="progress">
<div class="progress-bar progress-bar-striped active" role="progressbar" id="loading-screen-progress" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
<div
class="progress-bar progress-bar-striped active"
role="progressbar"
id="loading-screen-progress"
aria-valuenow="0"
aria-valuemin="0"
aria-valuemax="100"
style="width: 0%"
>
<span class="sr-only">0% Complete</span>
<span id="loading-screen-message"></span>
</div>
</div>
</section>
<h3 id="basic-html-message">
Loading ADS | <a href="https://ui.adsabs.harvard.edu/core">Load basic HTML</a> (for slow connections/low resources)
Loading ADS |
<a href="https://ui.adsabs.harvard.edu/core"
>Click here to switch to Basic HTML</a
>
(for slow connections/low resources)
</h3>
</article>
</div>
Expand All @@ -77,7 +107,7 @@ <h3 id="basic-html-message">
{
"@context": "http://schema.org",
"@type": "WebSite",
"name": "ADS",
"name": "ADS",
"url": "https://ui.absads.harvard.edu/",
"alternateName": "Astrophysics Data System",
"potentialAction": {
Expand All @@ -88,42 +118,43 @@ <h3 id="basic-html-message">
}
</script>
<script>
// Progress Bar
(function() {
var loadingContainer = document.querySelector('.loading-screen');
var progressBar = document.getElementById('loading-screen-progress');
var message = document.getElementById('loading-screen-message');
var progressInner = document.querySelector(
'#loading-screen-progress>span'
);
var progressValue = 0;

// Progress Bar
(function () {
var loadingContainer = document.querySelector('.loading-screen');
var progressBar = document.getElementById('loading-screen-progress');
var message = document.getElementById('loading-screen-message');
var progressInner = document.querySelector('#loading-screen-progress>span');
var progressValue = 0;

// show nothing for the first 3 seconds
setTimeout(function () {
loadingContainer.setAttribute('style', '');
}, 3000);
// show nothing for the first 3 seconds
setTimeout(function() {
loadingContainer.setAttribute('style', '');
}, 3000);

window.__setAppLoadingProgress = function (val, msg) {
if (val < progressValue) return;
try {
progressBar.setAttribute('aria-valuenow', val);
progressBar.style = 'width: ' + val + '%';
progressInner.innerText = val + '% Complete';
message.innerHTML = msg ? msg : message.innerHTML;
progressValue = val;
} catch (e) {
// do nothing
}
};
setTimeout(__setAppLoadingProgress, 200, 20);
setTimeout(__setAppLoadingProgress, 500, 25);
window.__setAppLoadingProgress(15, 'Downloading Assets');
window.__PAGE_LOAD_TIMESTAMP = new Date();
window.process = {
env: {
NODE_ENV: 'production'
}
};
})();
window.__setAppLoadingProgress = function(val, msg) {
if (val < progressValue) return;
try {
progressBar.setAttribute('aria-valuenow', val);
progressBar.style = 'width: ' + val + '%';
progressInner.innerText = val + '% Complete';
message.innerHTML = msg ? msg : message.innerHTML;
progressValue = val;
} catch (e) {
// do nothing
}
};
setTimeout(__setAppLoadingProgress, 200, 20);
setTimeout(__setAppLoadingProgress, 500, 25);
window.__setAppLoadingProgress(15, 'Downloading Assets');
window.__PAGE_LOAD_TIMESTAMP = new Date();
window.process = {
env: {
NODE_ENV: 'production',
},
};
})();
</script>

<!-- start the discovery application -->
Expand Down

0 comments on commit b6cee78

Please sign in to comment.