Browse Source

images inserted in french data

Bachir Soussi Chiadmi 6 years ago
parent
commit
94765a1539

+ 2 - 0
assets/dist/main.css

@@ -877,6 +877,8 @@ main#content.inline section.enonce {
       main#content.inline section.enonce div.text div.paragraph section.enonce, main#content.inline section.enonce div.text div.paragraph section.item {
         padding-left: 2em;
         border-left: 1px solid #999; }
+      main#content.inline section.enonce div.text div.paragraph img {
+        float: left; }
 
 main#content.tree h1.part-title {
   margin: 0 0 0 70px; }

+ 10 - 0
assets/dist/main.js

@@ -3362,6 +3362,13 @@ function parseTextDom(nodes){
         // record the href attribute for cross reference
         n.attrs = {'href':nodes[i].attributes.href.value};
       }
+      if (n.tag == 'img') {
+        // record the href attribute for cross reference
+        n.attrs = {
+          'src':nodes[i].attributes.src.value,
+          'alt':nodes[i].attributes.alt.value
+        };
+      }
       if(nodes[i].childNodes.length){
         // again parse node's childs
         n.childs = parseTextDom(nodes[i].childNodes);
@@ -3412,6 +3419,9 @@ var _Text = {
     this.textdom = new DOMParser().parseFromString(this.texthtml, "text/html");
     // get the text nodes (avoid html document extra)
     this.textchilds = parseTextDom(this.textdom.getElementsByTagName('body')[0].childNodes);
+    if(this.id == "115sc"){
+      console.log(this.textchilds);
+    }
   },
   oninit: function(vn){
     this.id = vn.attrs.id;

File diff suppressed because it is too large
+ 0 - 0
assets/dist/main.js.map


BIN
assets/img/graph-01.png


BIN
assets/img/graph-02.png


BIN
assets/img/graph-03.png


File diff suppressed because it is too large
+ 0 - 0
assets/jsondb/2-Appuhn-FR-ethicadb.json


+ 3 - 0
assets/main.scss

@@ -233,6 +233,9 @@ main#content.inline{
           padding-left:2em;
           border-left: 1px solid #999;
         }
+        img{
+          float: left;
+        }
       }
 
     }

+ 10 - 0
assets/modules/inline.js

@@ -82,6 +82,13 @@ function parseTextDom(nodes){
         // record the href attribute for cross reference
         n.attrs = {'href':nodes[i].attributes.href.value};
       }
+      if (n.tag == 'img') {
+        // record the href attribute for cross reference
+        n.attrs = {
+          'src':nodes[i].attributes.src.value,
+          'alt':nodes[i].attributes.alt.value
+        };
+      }
       if(nodes[i].childNodes.length){
         // again parse node's childs
         n.childs = parseTextDom(nodes[i].childNodes);
@@ -132,6 +139,9 @@ var _Text = {
     this.textdom = new DOMParser().parseFromString(this.texthtml, "text/html");
     // get the text nodes (avoid html document extra)
     this.textchilds = parseTextDom(this.textdom.getElementsByTagName('body')[0].childNodes);
+    if(this.id == "115sc"){
+      console.log(this.textchilds);
+    }
   },
   oninit: function(vn){
     this.id = vn.attrs.id;

Some files were not shown because too many files changed in this diff