Skip to content

Commit

Permalink
Make favicon path work in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
thostetler committed Feb 12, 2022
1 parent 2b0d2ba commit 6caf1d6
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 16 deletions.
2 changes: 2 additions & 0 deletions grunt/aliases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ release:
- env:prod
- clean:release
- copy:release
- string-replace:favicon
- string-replace:production
- check-release-version
- string-replace:latest_version
Expand All @@ -87,6 +88,7 @@ release:quick:
- env:prod
- clean:release
- copy:release
- string-replace:favicon
- string-replace:production
- check-release-version
- string-replace:latest_version
Expand Down
2 changes: 0 additions & 2 deletions grunt/optimize-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,6 @@ requirejs.config(${JSON.stringify(contents)});
grunt.registerTask('generateConfigs', function() {
const cfg = getDiscoveryConfig();

console.log(fullConfig);

// generate the rest of the bundles
_.forEach(fullConfig, function({ name, include }, moduleName) {
const _cfg = _.extend({}, cfg, {
Expand Down
13 changes: 4 additions & 9 deletions grunt/string-replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,13 @@
* @module grunt/string-replace
*/
module.exports = {
dist: {
files: [
{
src: 'dist/index.html',
dest: 'dist/index.html',
},
],
favicon: {
files: { 'dist/': 'dist/*.html' },
options: {
replacements: [
{
pattern: 'data-main="./config/discovery.config"',
replacement: 'data-main="./bumblebee_app.js"',
pattern: /\.\/styles\/favicon/g,
replacement: '',
},
],
},
Expand Down
11 changes: 11 additions & 0 deletions src/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
<link rel="preload" href="./styles/css/styles.css" as="style" />
<link rel="stylesheet" href="./styles/css/styles.css" />
<link rel="preload" href="./libs/require.js" as="script" />
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="./styles/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="./styles/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./styles/favicon/favicon-16x16.png" />
<link rel="manifest" href="./styles/favicon/site.webmanifest" />
<link rel="mask-icon" href="./styles/favicon/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="apple-mobile-web-app-title" content="NASA ADS" />
<meta name="application-name" content="NASA ADS" />
<meta name="msapplication-TileColor" content="#ffc40d" />
<meta name="theme-color" content="#ffffff" />
<!-- /favicon -->
<script src="./libs/require.js"></script>
<script>
require.config({
Expand Down
29 changes: 29 additions & 0 deletions src/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@
<link rel="preload" href="./styles/css/styles.css" as="style" />
<link rel="preload" href="./libs/require.js" as="script" />
<link rel="stylesheet" href="./styles/css/styles.css" />
<!-- favicon -->
<link
rel="apple-touch-icon"
sizes="180x180"
href="./styles/favicon/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="./styles/favicon/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="./styles/favicon/favicon-16x16.png"
/>
<link rel="manifest" href="./styles/favicon/site.webmanifest" />
<link
rel="mask-icon"
href="./styles/favicon/safari-pinned-tab.svg"
color="#5bbad5"
/>
<meta name="apple-mobile-web-app-title" content="NASA ADS" />
<meta name="application-name" content="NASA ADS" />
<meta name="msapplication-TileColor" content="#ffc40d" />
<meta name="theme-color" content="#ffffff" />
<!-- /favicon -->
<script src="./libs/require.js"></script>
<script>
!window.requirejs &&
Expand Down
10 changes: 5 additions & 5 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
content="A powerful, streamlined new Astrophysics Data System"
/>
<!-- favicon -->
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5" />
<link rel="apple-touch-icon" sizes="180x180" href="./styles/favicon/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="./styles/favicon/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="./styles/favicon/favicon-16x16.png" />
<link rel="manifest" href="./styles/favicon/site.webmanifest" />
<link rel="mask-icon" href="./styles/favicon/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="apple-mobile-web-app-title" content="NASA ADS" />
<meta name="application-name" content="NASA ADS" />
<meta name="msapplication-TileColor" content="#ffc40d" />
Expand Down

0 comments on commit 6caf1d6

Please sign in to comment.