Working version with boundling.

Awaiting Webpack
This commit is contained in:
Geoff Montel 2019-09-23 14:25:29 +02:00
parent 986c906072
commit d0a1d5760f
31 changed files with 27 additions and 4 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
templatemo_529_ramayana templatemo_529_ramayana
lessons.json lessons.json
node_modules/
package-lock.json
index.html

4
README.md Normal file
View File

@ -0,0 +1,4 @@
# Use
* Run ```npm run build``` to compute the code.
* Get in the root folder the website with an example of JSON inside.

16
package.json Normal file
View File

@ -0,0 +1,16 @@
{
"name": "projet_lulu",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "html-inline -i src/index-notbundled.html -o index.html -b src/ --ignore-external"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"html-inline": "git+https://github.com/alessioalex/html-inline.git"
}
}

View File

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

Before

Width:  |  Height:  |  Size: 307 KiB

After

Width:  |  Height:  |  Size: 307 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

1
src/assets/images Symbolic link
View File

@ -0,0 +1 @@
/home/yunohost.multimedia/bokrass/Share/Site_english/images/

View File

@ -10,11 +10,11 @@ $(document).ready(function(){
wordsHtml += ' <div style="display: none;" class="col-md-4 lesson lesson-' + lessonIndex + '">'; wordsHtml += ' <div style="display: none;" class="col-md-4 lesson lesson-' + lessonIndex + '">';
wordsHtml += ' <div class="service-item">'; wordsHtml += ' <div class="service-item">';
if('img' in word){ if('img' in word){
wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url(assets/images/'+ word.img +');"></div>'; wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url(images/'+ word.img +');"></div>';
} else if ('url' in word) { } else if ('url' in word) {
wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url('+ word.url +');"></div>'; wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url('+ word.url +');"></div>';
} else { } else {
wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url(http://img.icons8.com/'+ word.name +'.png);"></div>'; wordsHtml += ' <div class="icon" onclick="englishSay(\''+ word.name +'\')" style="background-image:url(https://img.icons8.com/'+ word.name +'.png);"></div>';
} }
wordsHtml += ' <h4 class="clickSay" onclick="englishSay(\''+ word.name +'\')">'+ word.name +'</h4>'; wordsHtml += ' <h4 class="clickSay" onclick="englishSay(\''+ word.name +'\')">'+ word.name +'</h4>';
if('example' in word){ if('example' in word){

View File

@ -8,6 +8,7 @@
<meta name="description" content=""> <meta name="description" content="">
<meta name="author" content=""> <meta name="author" content="">
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<title>Cours anglais CE2-CM1 Médan</title> <title>Cours anglais CE2-CM1 Médan</title>
@ -19,8 +20,6 @@ Ramayana CSS Template
https://templatemo.com/tm-529-ramayana https://templatemo.com/tm-529-ramayana
--> -->
<!-- Additional CSS Files -->
<link rel="stylesheet" href="assets/css/fontawesome.css">
<link rel="stylesheet" href="assets/css/templatemo-style.css"> <link rel="stylesheet" href="assets/css/templatemo-style.css">
<link rel="stylesheet" href="assets/css/owl.css"> <link rel="stylesheet" href="assets/css/owl.css">