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

Make service-worker-status more obviously dynamic #21

Merged
merged 4 commits into from
Oct 6, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
11 changes: 11 additions & 0 deletions public/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ body {
.service-worker.loading {
display: block;
}

.service-worker-status-text {
text-align: center;
}

.service-worker-status {
font-size: 1.2em;
border: 1px solid black;
padding: 0 3px 0 3px;
}

[data-service-worker="ready"] .service-worker.ready {
display: block;
}
Expand Down
6 changes: 4 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@ <h2>Hey there! Thanks for stopping by!</h2>
</p>

<p>
Let’s jump right in: first off, let's get some fundamentals out of the way. This entire tutorial is being downloaded with the code you see below, so this page can be run offline, too. We use ServiceWorker for that. Your ServiceWorker status is:
<strong class="service-worker-status"></strong>
Let’s jump right in: first off, let's get some fundamentals out of the way. This entire tutorial is being downloaded with the code you see below, so this page can be run offline, too. We use ServiceWorker for that.
</p>

<p class="service-worker-status-text">Your ServiceWorker status is: <strong class="service-worker-status"></strong></p>


<script>

function setState(state) {
Expand Down