Commit 403df7c6 authored by Antoine-Gelgon's avatar Antoine-Gelgon
Browse files

[visual-langage] #group

parent 47260947
$(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)
var group = window.location.hash.substring(1)
if(group == 'OSP') {
var urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement/export/txt'
} else {
var urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement-' + group + '/export/txt'
}
$.get( urlMd, function( data ) {
$( ".content" ).html(marked(data));
let h1 = $('hr')
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css" media="all">
.content {
display: flex;
flex-wrap: wrap;
}
.block_img {
width: 300px;
height: 300px;
text-align: center;
margin: 20px;
}
.copy {
font-family: monospace;
font-size: 10px;
display: inline-block;
position: absolute;
margin-bottom: 0;
}
img {
width: 100%;
height: auto;
background: white;
}
</style>
</head>
<body>
<div class="content"></div>
</body>
</html>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script charset="utf-8">
$(document).ready(function(){
let urlMd = 'http://pads.osp.kitchen/p/caveat-visual-language/export/txt'
// let urlMd = 'http://pads.osp.kitchen/p/collaboration-agreement/export/txt'
$.get( urlMd, function( data ) {
let imgs = $( ".content" ).html(marked(data)).find('a')
$('.content').html('')
imgs.each(function(){
var img = $('<img />', {
'src': $(this).attr('href'),
})
var copy = $('<input />', {
type: 'text',
value: '![](' + $(this).attr('href') + ')',
class: 'copy'
})
console.log(img[0].outerHTML)
$('<div />', {
class: 'block_img',
html: img[0].outerHTML + '<div>↓</div>' + copy[0].outerHTML
}).appendTo('.content');
})
})
})
</script>
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