medix-ai/documents.html

38 lines
1013 B
HTML

<script>
var papers = {}
papers.render = function (_data){
_index = 0
_data.documents.forEach(_item => {
css = (_index % 2 ==0)?'shadow': ''
var _html = (['<div class="cell ',css,'">',_item.name,'</div><div class="cell ',css,'" align="right">',_item.page,'</div>']).join('')
_html = $(_html)
$('.documents').append(_html)
_index += 1
});
}
$(document).ready(function(){
var _data = JSON.parse(sessionStorage['llm'])
papers.render(_data)
})
</script>
<style>
.documents {
display: grid;
grid-template-columns: auto 64px;
gap:4px;
width:650px;
font-weight:lighter;
font-size:14px;
line-height: 1.5;
font-family: sans-serif;
}
.cell {padding:4px;}
.shadow {background-color: #f3f3f3;}
</style>
<div>
<div class="documents">
<div class="cell bold border-bottom" >Documents</div><div class="cell bold border-bottom" align="right">Page</div>
</div>
</div>