Skip to content

Instantly share code, notes, and snippets.

Avatar

Yulia Seredich YSeredich

View GitHub Profile
View sw.js
const CACHE = 'v1';
self.addEventListener('install', function (event) {
console.log('The service worker is being installed.');
event.waitUntil(precache());
});
self.addEventListener('fetch', function (event) {
console.log('The service worker is serving the assets.');
event.respondWith(fromProxy(event.request));
View maps
let CopyrightsLayoutHack = ymaps.templateLayoutFactory.createClass('');
ymaps.map.Copyrights.prototype._setupLayout = function() {
this._layout = new CopyrightsLayoutHack({});
this._layout.setParentElement(this._map.panes.get('copyrights').getElement());
};
let {points} = this.options;
let map = new ymaps.Map(this.el, {
center: [55.76, 37.64],
View gist:4d77ae6654e2d05e2c0fc366a36430f5
<div class="c-rest-info-photo">
<div class="c-rest-info-title">Фотогалерея</div>
<a href="{{root}}assets/img/rest-info/1.jpg" class="fancybox" rel="restgallery"><img src="{{root}}assets/img/info_gal_5.jpg" alt=""></a>
<a href="{{root}}assets/img/rest-info/2.jpg" class="fancybox" rel="restgallery"><img src="{{root}}assets/img/info_gal_5.jpg" alt=""></a>
<a href="{{root}}assets/img/rest-info/3.jpg" class="fancybox" rel="restgallery"><img src="{{root}}assets/img/info_gal_5.jpg" alt=""></a>
<a href="{{root}}assets/img/rest-info/4.jpg" class="fancybox" rel="restgallery"><img src="{{root}}assets/img/info_gal_5.jpg" alt=""></a>
<a href="{{root}}assets/img/rest-info/5.jpg" class="fancybox" rel="restgallery"><img src="{{root}}assets/img/info_gal_5.jpg" alt=""></a>
</div>
You can’t perform that action at this time.