Commit 5206b4a9775c2fcd2b4c238f62b2b86e5476e9ca

Authored by Rémi Emonet
1 parent 6a1c1ca626
Exists in master

ind

Showing 1 changed file with 23 additions and 12 deletions

... ... @@ -15,15 +15,15 @@
15 15 h1 {color: gray; margin-bottom: 2em;}
16 16 h2 {color: white; background: black; margin:0; margin-top: 120px;}
17 17  
18   - a>a {flex: 1 1 auto; margin: 5px;}
  18 + .tile>a {flex: 1 1 auto; margin: 5px;}
19 19 a[href$=".pdf"] { box-shadow: black 2px 2px 2px; }
20   - a {background: rgb(225, 73, 56); color: white; text-decoration: none; font-weight: bold;}
  20 + a, .tile {background: rgb(225, 73, 56); color: white; text-decoration: none; font-weight: bold;}
21 21  
22   - div>a {display:flex; float: left; width: 165px; padding: 15px;}
23   - div>a {margin-left: 6px;}
24   - div>a:nth-child(4n+1) {margin-left:0;}
25   - div>a.proj {min-height: 65px;}
26   - div>a:hover {background: rgb(255, 127, 0);}
  22 + .tile {display:flex; float: left; width: 165px; padding: 15px;}
  23 + .tile {margin-left: 6px;}
  24 + .tile:nth-child(4n+1) {margin-left:0;}
  25 + .tile.proj {min-height: 65px;}
  26 + .tile:hover {background: rgb(255, 127, 0);}
27 27 .outlined {outline: 1px solid black;}
28 28 .vil {
29 29 outline: 2px solid black;
... ... @@ -36,7 +36,12 @@
36 36 <h2>Slides</h2>
37 37 <div>
38 38 <!--a class="outlined" href="more-slides-help.html">Viewing the slides?</a-->
39   - <a data-lesson="01">Intro</a>
  39 + <div data-lesson="01">Intro</div>
  40 + <div class="tile">
  41 + ancien slides en français
  42 + <a data-fr="1"></a>
  43 + <a data-fr="2"></a>
  44 + </div>
40 45  
41 46 <!--a href="all-slides-do-not-print.pdf">Slides as pdf <br/> (do not print) </a-->
42 47 <!--a href="../static/export_cours_1_2_3_4.pdf">Slides 1,2,3,4 <br/> en PDF</a-->
43 48  
44 49  
45 50  
46 51  
... ... @@ -78,18 +83,24 @@
78 83 <p style="clear:both; padding-top: 2em; text-align: left;">¹ from https://vimeo.com/140075655</p-->
79 84  
80 85 <script>
81   -forEachInSelector("a[data-lesson]", function(e, i) {
  86 +forEachInSelector("a[data-fr]", function(e, i) {
  87 + var l = e.getAttribute("data-fr");
  88 + e.textContent = l;
  89 + e.setAttribute("href", "fr/export-cours-"+l+".pdf");
  90 +});
  91 +forEachInSelector("div[data-lesson]", function(e, i) {
82 92 var l = e.getAttribute("data-lesson");
83   - var cont = document.createElement("a");
  93 + var cont = document.createElement("div");
84 94 var parent = e.parentElement;
85 95 parent.replaceChild(cont, e);
  96 + cont.classList.add("tile");
86 97 cont.textContent = e.textContent;
87 98  
88   - var html = e.cloneNode();
  99 + var html = document.createElement("a");
89 100 html.textContent = "[html]";
90 101 html.setAttribute("href", "lesson-"+l+".html");
91 102 cont.append(html)
92   - var pdf = e.cloneNode();
  103 + var pdf = document.createElement("a");
93 104 pdf.textContent = "[pdf]";
94 105 pdf.setAttribute("href", "export-lesson-"+l+".pdf");
95 106 cont.append(pdf);