Commit 9c161558 authored by Antoine-Gelgon's avatar Antoine-Gelgon
Browse files

[visual-langage] wrap articles for print

parent a068d3ec
......@@ -65,6 +65,13 @@ body {
line-height: 1.2em;
}
#btn_print {
position: fixed;
left: 10px;
bottom: 10px;
}
p {
margin: 2mm 3mm 2mm 4mm;
}
......
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="css/style.css" title="" type="text/css" />
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="content"></div>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/less.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="js/main.js"></script>
......@@ -7,6 +7,7 @@
</head>
<body>
<div class="content"></div>
<button id="btn_print" onclick="pageprint()" value="print">print</button>
</body>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/less.min.js"></script>
......
$(document).ready(function(){
// let group = '-' + window.location.hash.substring(1)
// let urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement' + group + '/export/txt'
let urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement/export/txt'
let dt = $.get(urlMd)
$.get( urlMd, function( data ) {
......@@ -25,6 +26,7 @@ $(document).ready(function(){
// })
})
})
function loadSvg(svg, src, clss) {
......@@ -32,6 +34,13 @@ function loadSvg(svg, src, clss) {
console.log(svg_content)
console.log(svg_content.responseText)
svg.wrap('<div class="svg ' + clss + '" >'+ svg_content+'</div>')
}
function pageprint() {
var divs = $("article");
console.log(divs)
for(var i = 0; i < divs.length; i+=3) {
divs.slice(i, i+2).wrapAll("<div class='row'></div>");
}
window.print()
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment