HubSpot / offline

Automatically display online/offline indication to your users
http://github.hubspot.com/offline/docs/welcome
MIT License
8.65k stars 847 forks source link

Connection status never show up #244

Open IsaacHub opened 7 years ago

IsaacHub commented 7 years ago

I'm developing locally using localhost. Included these two files and also the language css file, offline-theme-dark.css and offline.min.js I DON'T have favicon.ico

Offline.options = {checks: {image: {url: 'http://www.thekrausemouse.com/wp-content/uploads/2016/03/sample-1.jpg'}, active: 'image'}}

The following elements have been appended to <body> tag.

<div class="offline-ui offline-ui-up">
<div class="offline-ui-content"></div>
<a href="" class="offline-ui-retry"></a>
</div>

.offline-ui is always set to display:none It never indicates whether I'm online or offline. I thought it should slide down while page loading, and it should slide again whenever the device internet connection changes (lost/connect)

What am I missing? Readme says just to include those three files, but nothing happens, why?

GeekDenCode commented 7 years ago

I have this problem too. Why author doesnt support him project...

wolfmaster8 commented 7 years ago

Hello @IsaacHub AND @MerDenchik , just add this code on the head of the page:

<link rel="stylesheet" type="text/css"  href="/themes/offline-theme-slide.css">
<link rel="stylesheet" type="text/css" href="/themes/offline-language-spanish-indicator.css">
<script src="/offline.min.js" type="text/javascript" charset="utf-8" ></script>

Just remember to change the paths. You must put the css files into themes folder.

Can you provide your test link? I've created a folder inside my Child theme in WP named offlineJS, added a index.html with the code I've provided above.