Included dependencies to avoid requiring the network
This commit is contained in:
parent
386938389f
commit
6aaf5da47a
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,3 +5,7 @@ dist/css/*
|
|||||||
!dist/css/.gitkeep
|
!dist/css/.gitkeep
|
||||||
dist/html/*
|
dist/html/*
|
||||||
!dist/html/.gitkeep
|
!dist/html/.gitkeep
|
||||||
|
|
||||||
|
|
||||||
|
# Files
|
||||||
|
index.html
|
||||||
|
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "dist/lib/ldp-display"]
|
||||||
|
path = dist/lib/ldp-display
|
||||||
|
url = git@git.happy-dev.fr:happy-dev/ldp-display.git
|
@ -24,7 +24,7 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
dist: {
|
dist: {
|
||||||
src: ['src/html/header.html', 'src/html/*.html', '!src/html/footer.html', 'src/html/footer.html'],
|
src: ['src/html/header.html', 'src/html/*.html', '!src/html/footer.html', 'src/html/footer.html'],
|
||||||
dest: 'dist/html/index.html'
|
dest: 'index.html'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -37,6 +37,8 @@ module.exports = function(grunt) {
|
|||||||
//},
|
//},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
files: ['src/**/*'],
|
||||||
|
tasks: ['concat', 'sass'],
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -1,2 +1,3 @@
|
|||||||
**Requires**
|
**Requires**
|
||||||
- Grunt CLI
|
- Grunt CLI
|
||||||
|
- Install submodules
|
||||||
|
0
dist/html/.gitkeep
vendored
0
dist/html/.gitkeep
vendored
1
dist/lib/ldp-display
vendored
Submodule
1
dist/lib/ldp-display
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 12191b9bce13e7d68eb5415de7871543cfa123f4
|
74
dist/lib/webcomponents-loader.js
vendored
Normal file
74
dist/lib/webcomponents-loader.js
vendored
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/**
|
||||||
|
* @license
|
||||||
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
||||||
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||||
|
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||||
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||||
|
* Code distributed by Google as part of the polymer project is also
|
||||||
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||||
|
*/
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
// global for (1) existence means `WebComponentsReady` will file,
|
||||||
|
// (2) WebComponents.ready == true means event has fired.
|
||||||
|
window.WebComponents = window.WebComponents || {};
|
||||||
|
var name = 'webcomponents-loader.js';
|
||||||
|
// Feature detect which polyfill needs to be imported.
|
||||||
|
var polyfills = [];
|
||||||
|
if (!('import' in document.createElement('link'))) {
|
||||||
|
polyfills.push('hi');
|
||||||
|
}
|
||||||
|
if (!('attachShadow' in Element.prototype && 'getRootNode' in Element.prototype) ||
|
||||||
|
(window.ShadyDOM && window.ShadyDOM.force)) {
|
||||||
|
polyfills.push('sd');
|
||||||
|
}
|
||||||
|
if (!window.customElements || window.customElements.forcePolyfill) {
|
||||||
|
polyfills.push('ce');
|
||||||
|
}
|
||||||
|
// NOTE: any browser that does not have template or ES6 features
|
||||||
|
// must load the full suite (called `lite` for legacy reasons) of polyfills.
|
||||||
|
if (!('content' in document.createElement('template')) || !window.Promise || !Array.from ||
|
||||||
|
// Edge has broken fragment cloning which means you cannot clone template.content
|
||||||
|
!(document.createDocumentFragment().cloneNode() instanceof DocumentFragment)) {
|
||||||
|
polyfills = ['lite'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (polyfills.length) {
|
||||||
|
var script = document.querySelector('script[src*="' + name +'"]');
|
||||||
|
var newScript = document.createElement('script');
|
||||||
|
// Load it from the right place.
|
||||||
|
var replacement = 'webcomponents-' + polyfills.join('-') + '.js';
|
||||||
|
var url = script.src.replace(name, replacement);
|
||||||
|
newScript.src = url;
|
||||||
|
// NOTE: this is required to ensure the polyfills are loaded before
|
||||||
|
// *native* html imports load on older Chrome versions. This *is* CSP
|
||||||
|
// compliant since CSP rules must have allowed this script to run.
|
||||||
|
// In all other cases, this can be async.
|
||||||
|
if (document.readyState === 'loading' && ('import' in document.createElement('link'))) {
|
||||||
|
document.write(newScript.outerHTML);
|
||||||
|
} else {
|
||||||
|
document.head.appendChild(newScript);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Ensure `WebComponentsReady` is fired also when there are no polyfills loaded.
|
||||||
|
// however, we have to wait for the document to be in 'interactive' state,
|
||||||
|
// otherwise a rAF may fire before scripts in <body>
|
||||||
|
|
||||||
|
var fire = function() {
|
||||||
|
requestAnimationFrame(function() {
|
||||||
|
window.WebComponents.ready = true;
|
||||||
|
document.dispatchEvent(new CustomEvent('WebComponentsReady', {bubbles: true}));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
if (document.readyState !== 'loading') {
|
||||||
|
fire();
|
||||||
|
} else {
|
||||||
|
document.addEventListener('readystatechange', function wait() {
|
||||||
|
fire();
|
||||||
|
document.removeEventListener('readystatechange', wait);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})();
|
5
package-lock.json
generated
5
package-lock.json
generated
@ -193,6 +193,11 @@
|
|||||||
"hoek": "2.16.3"
|
"hoek": "2.16.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bootstrap": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-gulJE5dGFo6Q61V/whS6VM4WIyrlydXfCgkE+Gxe5hjrJ8rXLLZlALq7zq2RPhOc45PSwQpJkrTnc2KgD6cvmA=="
|
||||||
|
},
|
||||||
"brace-expansion": {
|
"brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||||
|
@ -11,5 +11,8 @@
|
|||||||
"grunt-contrib-uglify": "~0.5.0",
|
"grunt-contrib-uglify": "~0.5.0",
|
||||||
"grunt-contrib-watch": "~0.6.1",
|
"grunt-contrib-watch": "~0.6.1",
|
||||||
"grunt-sass": "^2.1.0"
|
"grunt-sass": "^2.1.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"bootstrap": "^4.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,19 +8,19 @@
|
|||||||
<title>Happy Dev App</title>
|
<title>Happy Dev App</title>
|
||||||
|
|
||||||
<!-- Font -->
|
<!-- Font -->
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Righteous">
|
<!--<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Righteous">-->
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
<!--<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">-->
|
||||||
|
|
||||||
<!-- Stylesheets -->
|
<!-- Stylesheets -->
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" />
|
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css" />
|
||||||
<link rel="stylesheet" href="../css/hd-app.css" />
|
<link rel="stylesheet" href="dist/css/hd-app.css" />
|
||||||
|
|
||||||
<!-- Javascript -->
|
<!-- Javascript -->
|
||||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.20/webcomponents-loader.js"></script>
|
<script type="text/javascript" src="dist/lib/webcomponents-loader.js"></script>
|
||||||
|
|
||||||
<link rel="import" href="https://cdn.happy-dev.fr/ldp-display/ldp-display.html" />
|
<link rel="import" href="dist/lib/ldp-display/ldp-display.html" />
|
||||||
<link rel="import" href="https://cdn.happy-dev.fr/ldp-display/ldp-router.html" />
|
<link rel="import" href="dist/lib/ldp-display/ldp-router.html" />
|
||||||
<link rel="import" href="https://cdn.happy-dev.fr/ldp-display/ldp-calendar.html" />
|
<link rel="import" href="dist/lib/ldp-display/ldp-calendar.html" />
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<ldp-route name="drive">Drive</ldp-route>
|
<ldp-route name="drive">Drive</ldp-route>
|
||||||
<!-- <ldp-route name="home">Home</ldp-route> -->
|
<!-- <ldp-route name="home">Home</ldp-route> -->
|
||||||
</ldp-router>
|
</ldp-router>
|
||||||
<div id="menu-placeholder" ><img src="https://dummyimage.com/220x300/666666/cccccc&text=Placeholder/20" alt="placeholder"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main id="ldp-root" class="col-md-10">
|
<main id="ldp-root" class="col-md-10">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user