-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
234 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
|
||
# Change these settings to your own preference | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
# We recommend you to keep these unchanged | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"name": "Your App Name (45 characters max)", | ||
"short_name": "Your App", | ||
"description": "Your App description", | ||
"default_locale": "en", | ||
"start_url": "index.html", | ||
"display": "standalone", | ||
"lang": "en-US", | ||
"icons": [ | ||
{ | ||
"src": "img/icon_48.png", | ||
"sizes": "48x48", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "img/icon_72.png", | ||
"sizes": "72x72", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "img/icon_96.png", | ||
"sizes": "96x96", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "img/icon_144.png", | ||
"sizes": "144x144", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "img/icon_168.png", | ||
"sizes": "168x168", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "img/icon_192.png", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
} | ||
], | ||
"background_color": "#4e8ef7", | ||
"theme_color": "#4e8ef7" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
$logoSize : $bar-height - (2 * $bar-padding-portrait); | ||
.bar { | ||
|
||
} | ||
.menu-bar.has-icon{ | ||
.icon{ | ||
width: $logoSize; | ||
height: $logoSize; | ||
} | ||
.title{ | ||
margin-left: $logoSize + 10; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -162,4 +162,5 @@ wphc-post { | |
} | ||
} | ||
@include post-item("../img/post-img-border.png"); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// tick this to make the cache invalidate and update | ||
const CACHE_VERSION = 1; | ||
const CURRENT_CACHES = { | ||
'read-through': 'read-through-cache-v' + CACHE_VERSION | ||
}; | ||
|
||
self.addEventListener('activate', (event) => { | ||
// Delete all caches that aren't named in CURRENT_CACHES. | ||
// While there is only one cache in this example, the same logic will handle the case where | ||
// there are multiple versioned caches. | ||
const expectedCacheNames = Object.keys(CURRENT_CACHES).map((key) => { | ||
return CURRENT_CACHES[key]; | ||
}); | ||
|
||
event.waitUntil( | ||
caches.keys().then((cacheNames) => { | ||
return Promise.all( | ||
cacheNames.map((cacheName) => { | ||
if (expectedCacheNames.indexOf(cacheName) === -1) { | ||
// If this cache name isn't present in the array of "expected" cache names, then delete it. | ||
console.log('Deleting out of date cache:', cacheName); | ||
return caches.delete(cacheName); | ||
} | ||
}) | ||
); | ||
}) | ||
); | ||
}); | ||
|
||
// This sample illustrates an aggressive approach to caching, in which every valid response is | ||
// cached and every request is first checked against the cache. | ||
// This may not be an appropriate approach if your web application makes requests for | ||
// arbitrary URLs as part of its normal operation (e.g. a RSS client or a news aggregator), | ||
// as the cache could end up containing large responses that might not end up ever being accessed. | ||
// Other approaches, like selectively caching based on response headers or only caching | ||
// responses served from a specific domain, might be more appropriate for those use cases. | ||
self.addEventListener('fetch', (event) => { | ||
|
||
event.respondWith( | ||
caches.open(CURRENT_CACHES['read-through']).then((cache) => { | ||
return cache.match(event.request).then((response) => { | ||
if (response) { | ||
// If there is an entry in the cache for event.request, then response will be defined | ||
// and we can just return it. | ||
|
||
return response; | ||
} | ||
|
||
// Otherwise, if there is no entry in the cache for event.request, response will be | ||
// undefined, and we need to fetch() the resource. | ||
console.log(' No response for %s found in cache. ' + | ||
'About to fetch from network...', event.request.url); | ||
|
||
// We call .clone() on the request since we might use it in the call to cache.put() later on. | ||
// Both fetch() and cache.put() "consume" the request, so we need to make a copy. | ||
// (see https://fetch.spec.whatwg.org/#dom-request-clone) | ||
return fetch(event.request.clone()).then((response) => { | ||
|
||
// Optional: add in extra conditions here, e.g. response.type == 'basic' to only cache | ||
// responses from the same domain. See https://fetch.spec.whatwg.org/#concept-response-type | ||
if (response.status < 400 && response.type === 'basic') { | ||
// We need to call .clone() on the response object to save a copy of it to the cache. | ||
// (https://fetch.spec.whatwg.org/#dom-request-clone) | ||
cache.put(event.request, response.clone()); | ||
} | ||
|
||
// Return the original response object, which will be used to fulfill the resource request. | ||
return response; | ||
}); | ||
}).catch((error) => { | ||
// This catch() will handle exceptions that arise from the match() or fetch() operations. | ||
// Note that a HTTP error response (e.g. 404) will NOT trigger an exception. | ||
// It will return a normal response object that has the appropriate error code set. | ||
console.error(' Read-through caching failed:', error); | ||
|
||
throw error; | ||
}); | ||
}) | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
<ion-header-bar class="bar-positive"> | ||
<h1 class="title">{{main.appTitle}}</h1> | ||
<ion-header-bar class="bar-positive menu-bar" ng-class="::{'has-icon': main.displayIcon}"> | ||
<img ng-if="::main.displayIcon" class="icon" ng-src="img/icon_48.png" /> | ||
<h1 class="title">{{main.appTitle}}</h1> | ||
</ion-header-bar> | ||
<ion-content> | ||
<wphc-menu list="menuCtrl.list"></wphc-menu> | ||
</ion-content> | ||
<wphc-menu list="menuCtrl.list"></wphc-menu> | ||
</ion-content> |
Oops, something went wrong.