<commit_before>{% extends "base_layout.html" %}
{% block content %}

<style >
h2.ui-bar{
	font-size: 13px;
	margin: 0.5em 0;
}
.listThumbnail{
	width:100px;
	height:145px;
}
div.indexContent, div.indexContent div {
	min-height: auto;
}

div.sumbnail div.ui-bar {
	font-size: 13px !important;
	padding: 0.3em 0.5em;
}

div.sumbnail div.ui-bar .ui-btn {
	margin: 0 auto;
}

.listTitle {
	font-weight: 400;
	font-size: x-small;
	white-space: normal;
	overflow: hidden;
	text-align: center;
	height:3em;
}
.listGenre {
	font-weight: 400;
	font-size: xx-small;
	max-height: 1em;
}

.listShowDate {
	font-weight: 400;
	font-size: xx-small;
}

.pageArea {
	margin-top: 10px;

}

#pageBack,#pageNext{
	height:80px;
	line-height: 80px;
	font-size: 21px;
}

</style>
<script type="text/javascript">
var page = 1;
var searchFlag = false;

var successCallBack = function(msg){
	$(".indexContent").children("h2.ui-bar").remove();
	$(".indexContent").children("fieldset.ui-grid-a").remove();

	var thumNailList = JSON.parse(msg.list);
	$.each(thumNailList, function( index, file){
		var $div = $("<div class='ui-bar'><span href='' class='ui-btn ui-btn-corner-all ui-shadow ui-btn-hover-c ui-btn-up-c' data-theme='c' style='width:100%'><span class='ui-btn-inner ui-btn-corner-all'><span class='ui-btn-text'><div><a href='/Viewer?page=" + file.folderName + "' class='ui-link'><div align='center' style='width:100%'><div class='listTmnArea'><img class='listThumbnail' src='/" + file.thumbnailPath + "' alt=''></div></div></a><div class='listTitle'><strong>" + file.name + "</strong></div><div class='listGenre'>" + file.category + "</div><span class='listShowDate'>" + file.updateDate + "</span></div></span></span></span></div>");
		var $divBlock;
		var $fieldset;
		if ( index%2 == 0) {
			$fieldset = $("<fieldset class='ui-grid-a'></fieldset>")
			$divBlock = $("<div class='sumbnail ui-block-a'></div>");
		} else {
			$fieldset = $(".indexContent fieldset:last");
			$divBlock = $("<div class='sumbnail ui-block-b'></div>");
		}
		$div.click(function(){
			var $link = $(this).find("a.ui-link");
			console.log("click "+$link.attr("href"));
			window.location.href = $link.attr("href");
		});
		
		$divBlock.append($div);
		
		$fieldset.append($divBlock);
		$(".indexContent").append($fieldset);
		
		$fieldset.ready(hideLoading());
	});
	if (thumNailList.length < 1) {
		hideLoading()
	}
	
	if (page >= msg.maxSize) {
		$("#pageNext").hide();
	} else {
		$("#pageNext").show();
	}
};

var latestList = function(){
	showLoading();
	$.ajax({
		type: "POST",
		url: "/Latest/list",
		contentType: "application/json",<commit_msg>検索時の戻るボタンの挙動を修正 検索0件のメッセージを設定した<commit_after>{% extends "base_layout.html" %}
{% block content %}

<style >
h2.ui-bar{
	font-size: 13px;
	margin: 0.5em 0;
}
.listThumbnail{
	width:100px;
	height:145px;
}
div.indexContent, div.indexContent div {
	min-height: auto;
}

div.sumbnail div.ui-bar {
	font-size: 13px !important;
	padding: 0.3em 0.5em;
}

div.sumbnail div.ui-bar .ui-btn {
	margin: 0 auto;
}

.listTitle {
	font-weight: 400;
	font-size: x-small;
	white-space: normal;
	overflow: hidden;
	text-align: center;
	height:3em;
}
.listGenre {
	font-weight: 400;
	font-size: xx-small;
	max-height: 1em;
}

.listShowDate {
	font-weight: 400;
	font-size: xx-small;
}

.pageArea {
	margin-top: 10px;

}

#pageBack,#pageNext{
	height:80px;
	line-height: 80px;
	font-size: 21px;
}

</style>
<script type="text/javascript">
var page = 1;
var searchFlag = false;

var successCallBack = function(msg){
	$(".indexContent").children("h2.ui-bar").remove();
	$(".indexContent").children("fieldset.ui-grid-a").remove();
	$(".indexContent").children("fieldset.ui-grid-solo").remove();

	var thumNailList = JSON.parse(msg.list);
	$.each(thumNailList, function( index, file){
		var $div = $("<div class='ui-bar'><span href='' class='ui-btn ui-btn-corner-all ui-shadow ui-btn-hover-c ui-btn-up-c' data-theme='c' style='width:100%'><span class='ui-btn-inner ui-btn-corner-all'><span class='ui-btn-text'><div><a href='/Viewer?page=" + file.folderName + "' class='ui-link'><div align='center' style='width:100%'><div class='listTmnArea'><img class='listThumbnail' src='/" + file.thumbnailPath + "' alt=''></div></div></a><div class='listTitle'><strong>" + file.name + "</strong></div><div class='listGenre'>" + file.category + "</div><span class='listShowDate'>" + file.updateDate + "</span></div></span></span></span></div>");
		var $divBlock;
		var $fieldset;
		if ( index%2 == 0) {
			$fieldset = $("<fieldset class='ui-grid-a'></fieldset>")
			$divBlock = $("<div class='sumbnail ui-block-a'></div>");
		} else {
			$fieldset = $(".indexContent fieldset:last");
			$divBlock = $("<div class='sumbnail ui-block-b'></div>");
		}
		$div.click(function(){
			var $link = $(this).find("a.ui-link");
			console.log("click "+$link.attr("href"));
			window.location.href = $link.attr("href");
		});
		
		$divBlock.append($div);
		
		$fieldset.append($divBlock);
		$(".indexContent").append($fieldset);
		
		$fieldset.ready(hideLoading());
	});
	if (thumNailList.length < 1) {
		hideLoading();
		$fieldset = $("<fieldset class='ui-grid-solo'><div class='ui-block-a noData'>対象のデータがありません。</div></fieldset>");
		$(".indexContent").append($fieldset);
	}
	
	if (page >= msg.maxSize) {
		$("#pageNext").hide();
	}  else {
		$("#pageNext").show();
	}
	 if(page == 1) {
		$("#pageBack").hide();
	} else {
		$("#pageBack").show();
	}
};

var latestList = function(){
	showLoading();
	$.ajax({
		type: "POST",
		url: "/Latest/list",
		contentType: "application/json",
{'fraction_non_alphanumeric': 0.22764960346070656, 'fraction_numerical': 0.01802451333813987, 'mean_word_length': 4.494059405940594, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5897468', 'n_tokens_mistral': 2352, 'n_tokens_neox': 2177, 'n_words': 366}