Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest.json robots.txt #125

Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions getting-started/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
<!-- Meta -->
<title>Dogecoin - Getting Started</title>
<meta charset="utf-8">
<meta content="Getting Started with Dogecoin is as easy as 1, 2, 3! It's simple, easy to set up, and free." name="description">
<meta content="width=device-width, initial-scale=1.0" name="viewport">


<meta content="Getting Started with Dogecoin is as easy as 1, 2, 3! It's simple, easy to set up, and free." name="description">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That change is not needed.


<!-- Scripts -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//code.jquery.com/ui/1.11.2/jquery-ui.min.js"></script>
Expand Down
Binary file added imgs/doge-ogimage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/filename.zip
Binary file not shown.
Binary file added imgs/icons/icon-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-144x144.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-152x152.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-384x384.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-72x72.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added imgs/icons/icon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 36 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,36 @@
-->

<!-- Meta -->
<title>Dogecoin</title>
<title>Dogecoin - #dogecoin - #doge</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can keep the webiste universal and don't need to add hashtags here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

<meta charset="utf-8">
<meta content="Dogecoin is an open source peer-to-peer digital currency, favored by Shiba Inus worldwide." name="description">
<meta content="width=device-width, initial-scale=1.0" name="viewport">

<!-- og:properties -->
<meta property="og:site_name" name="dogecoin.com" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Dogecoin is an open source peer-to-peer digital currency, favored by Shiba Inus worldwide.">
<meta property="og:title" content="dogecoin built on the principles of sound money - a transactional currency made for the internet" >
freelancing-solutions marked this conversation as resolved.
Show resolved Hide resolved
<meta property="og:url" content="https://dogecoin.com" />

<!-- og:image -->
<meta property="og:image" content="/imgs/doge-ogimage.png" />
<meta property="og:image:type" content="image/png" />
<meta property="og:image:width" content="1024" />
<meta property="og:image:height" content="1270" />
<meta property="og:image:alt" contect="dogecoin.com Shiba Inu" />

<!-- Twitter Card -->
<meta name="twitter:card" content='summary_large_image' />
<meta name="twitter:site" content="@dogecoin" />
<meta name="twitter:creator" content="@dogecoin_dev" />
<meta name="twitter:title" content="#dogecoin a transactional currency built for the internet" />
<meta name="twitter:description" content="Dogecoin is an open source peer-to-peer digital currency, favored by Shiba Inus worldwide." />
<meta name="twitter:domain" content='https://dogecoin.com' />
<meta name="twitter:image" content="/imgs/doge-ogimage.png" />
<meta name="twitter:image:alt" contect="dogecoin.com Shiba Inu" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot of these twitter attributes are duplicated and as far as I'm aware Twitter will work fine with most of them in the og namespace. So these should be reduced to only the missing ones.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not apparent to me and i am not sure of the route twitter will take however i find that twitter
does indeed performs better with its own tags...the og: properties works best with Facebook and other platforms
the way things changes this days i would advice to keep both

<!--- favicon -->
<link rel="shortcut icon" href="../imgs/avatar.png" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for this using a relative path contrary to all the others?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

its wrong my mistake..
fixed relative path


<!-- Scripts -->
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/fitvids/1.0.1/jquery.fitvids.min.js"></script>
Expand Down Expand Up @@ -61,6 +86,8 @@
<link rel="stylesheet" href="/css/font-mfizz/font-mfizz.css" type="text/css"/>
<link rel="stylesheet" type="text/css" href="/css/dogecoin.css">

<link rel="manifest" href="/manifest.json">

</head>

<body>
Expand Down Expand Up @@ -551,6 +578,13 @@ <h4 class="mobile-learn-padding" data-i18n="dgc-windows-wallet-modal-getting-sta
);
</script>
<script src="/js/dogecoin.min.js"></script>
<script>
if('serviceWorker' in navigator) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning behind a service worker? I'm not a webdev but for a simple static page it seems overkill?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i am with the thought pattern that i can and will support adding more futures on dogecoin , such as forums and a blog
i already have code from other projects in python but i can not commit all the changes at the same time
however for now it seems you are right let me remove or comment out the service worker.

Commented out until needed,

This was my rationale
I have created a proposal which if successfull would mean we can upgrade dogecoin.com to using modern frameworks example react.js
see here -> #126
if this proposal ends up with support from others , we would eventually need a service worker, in order to support the added functionality

navigator.serviceWorker
.register('/sw.js')
.then(function() { console.log("Service Worker Registered"); });
}
</script>

</body>
</html>
8 changes: 4 additions & 4 deletions js/dogecoin-i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ function enablei18n() {
'use strict';
var i18n = $.i18n();
var localeFromURL = getUrlParameter('lng');
if(localeFromURL) {
if(localeFromURL) {
i18n.locale = localeFromURL;
}

i18n.load('/i18n', i18n.locale).done(
function() {
$('[data-i18n]').each(function(index) {
Expand All @@ -18,10 +18,10 @@ function getUrlParameter(sParam)
{
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++)
for (var i = 0; i < sURLVariables.length; i++)
{
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam)
if (sParameterName[0] == sParam)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in this file are note necessary.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there was no changes , could have been an auto formated that line..
however its ok.

{
return sParameterName[1];
}
Expand Down
52 changes: 52 additions & 0 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"name": "dogecoin.com",
"short_name": "dogecoin.com",
"theme_color": "#fff",
"background_color": "#fff",
"display": "browser",
"orientation": "portrait",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "imgs/icons/icon-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "imgs/icons/icon-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "imgs/icons/icon-128x128.png",
"sizes": "128x128",
"type": "image/png"
},
{
"src": "imgs/icons/icon-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "imgs/icons/icon-152x152.png",
"sizes": "152x152",
"type": "image/png"
},
{
"src": "imgs/icons/icon-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "imgs/icons/icon-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "imgs/icons/icon-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
3 changes: 3 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
User-agent: *
Allow: /
Sitemap: https://dogecoin.com/sitemap.xml
13 changes: 13 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<url>
<loc>https://dogecoin.com/</loc>
</url>
<url>
<loc>https://dogecoin.com/getting-started</loc>
</url>
</urlset>
76 changes: 76 additions & 0 deletions sw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*
Copyright 2015, 2019 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Incrementing OFFLINE_VERSION will kick off the install event and force
// previously cached resources to be updated from the network.
const OFFLINE_VERSION = 1;
const CACHE_NAME = 'offline';
// Customize this with a different URL if needed.
const OFFLINE_URL = 'offline.html';

self.addEventListener('install', (event) => {
event.waitUntil((async () => {
const cache = await caches.open(CACHE_NAME);
// Setting {cache: 'reload'} in the new request will ensure that the response
// isn't fulfilled from the HTTP cache; i.e., it will be from the network.
await cache.add(new Request(OFFLINE_URL, {cache: 'reload'}));
})());
});

self.addEventListener('activate', (event) => {
event.waitUntil((async () => {
// Enable navigation preload if it's supported.
// See https://developers.google.com/web/updates/2017/02/navigation-preload
if ('navigationPreload' in self.registration) {
await self.registration.navigationPreload.enable();
}
})());

// Tell the active service worker to take control of the page immediately.
self.clients.claim();
});

self.addEventListener('fetch', (event) => {
// We only want to call event.respondWith() if this is a navigation request
// for an HTML page.
if (event.request.mode === 'navigate') {
event.respondWith((async () => {
try {
// First, try to use the navigation preload response if it's supported.
const preloadResponse = await event.preloadResponse;
if (preloadResponse) {
return preloadResponse;
}

const networkResponse = await fetch(event.request);
return networkResponse;
} catch (error) {
// catch is only triggered if an exception is thrown, which is likely
// due to a network error.
// If fetch() returns a valid HTTP response with a response code in
// the 4xx or 5xx range, the catch() will NOT be called.
console.log('Fetch failed; returning offline page instead.', error);

const cache = await caches.open(CACHE_NAME);
const cachedResponse = await cache.match(OFFLINE_URL);
return cachedResponse;
}
})());
}

// If our if() condition is false, then this fetch handler won't intercept the
// request. If there are any other fetch handlers registered, they will get a
// chance to call event.respondWith(). If no fetch handlers call
// event.respondWith(), the request will be handled by the browser as if there
// were no service worker involvement.
});