<commit_before>{% extends "layout.html" %}

<!--css file used-->
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/jquery-ui-1.11.2/jquery-ui.css" />
<link href="{{ url_for('static', filename='css/square.css') }}" rel='stylesheet' type='text/css'/> 
<link href="{{ url_for('static', filename='css/homepage.css') }}" rel='stylesheet' type='text/css'/> 
{% endblock %}

<!--content-->
{% block content %}

{% block home_page_content %}

{% endblock %}
	<!-- 文章列表 -->
	<div class="square-part2" id="home-article-list">
		<!-- 内容 -->
		<div class="square-part2-left" style="width:703px;">
			<div id="home-select">
				<label>排序方式：</label>
				<select name="sorting">
					<option id="sorting-by-time" value="time" selected="selected">时 间</option>
					<option id="sorting-by-heat" value="heat">热 度</option>
				</select>
			</div>

			<div id="ajax-field">
			<div id="ajax-inner-field">
			<table id="square-part1-content" style="width:703px; margin-top: 60px;">
				{% for article in article_pagination.items %}
				<tr>
					<td class="square-col-1" style="width:500px;"><a href="{{url_for('article', article_id = article.article_id)}}">{{article.title}}</a></td>
					<td class="square-col-3"><img src="{{ url_for('static', filename='images/coins.png') }}"></td>
					<td class="square-col-4" style="width: 80px;">{{article.coins}}</td>
					<td class="square-col-final">{{article.time|time_split}}</td>
				</tr>
				{% endfor %}
			</table>
			</div>

			<div class="home-paging">
				{% if article_pagination.has_prev %}
				<a href="javascript:void(0);" id="home-left-arrow">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;
				{% else %}
				<a href="javascript:void(0);" id="home-left-arrow" style="display:none;">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;
				{% endif %}

				{% if article_pagination.pages %}
				Page&nbsp;<font id="home-current-page">{{ article_pagination.page }}</font>&nbsp;/&nbsp;{{ article_pagination.pages }}
				{% endif %}
				
				{% if article_pagination.has_next %}
				&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="home-right-arrow">&gt;&gt;</a>
				{% else %}
				&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="home-right-arrow" style="display:none;">&gt;&gt;</a>
				{% endif %}
			</div>
			</div>
		</div>
	
		<!-- 标题图片 -->
		<div class="square-part2-right">
			<h2 style="line-height: 40px">文章列表</h2>
			<img id="square-part2-img" src="{{ url_for('static', filename='images/transparent-circle.png') }}"/>
			<div></div>
		</div>
	
	</div>

	{% if current_user != user %}
	<!-- 关注作者 -->
	<div id="home-star">
		<h2>关注的作者：</h2>
		<div style="margin-top: 30px"></div>
		<div class="home-star-row">
		{% for author in collection_author_list%}
			<div><img src="{{url_for('static', filename='images/transparent-circle.png')}}" style="background-image: url('{{author.photo}}')"/><div class="home-star-name"><a href="{{url_for('view_home_page', nick=author.nick)}}">{{author.nick}}</a></div></div>
		{% endfor %}
		</div>

	</div>

	{% endif %}

{% endblock %}

<!--js file used-->
{% block js %}
<script src="{{ url_for('static', filename='layer-v1.8.5/layer/layer.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.idTabs.min.js') }}"></script>
<script type="text/javascript">
	$(document).ready(function()
	{
		
	{#仅在看别人主页时会出现#}
	{% if current_user != user %}
		if ('{{collection}}'=='yes'){
			flag=true;
		}
		else{
			flag=false;
		}
		$("#collection_user").click(function()
		{
			if (flag) {url='/collection_cancel/user';}
			else{url='/collection/user';}
			$.post(url,
			{
				_csrf_token:"{{ csrf_token() }}",
				user_id: {{user.user_id}}
			},
			function(data){
			if (data=='success'){
				var follow_num = parseInt($('#home_be_followed_num').html());
				if (flag) {
					layer.msg("取消关注成功",1,1);
					$("#collection_user").val("关注");
					var newstr = (follow_num-1);
					$('#home_be_followed_num').html(newstr);
					flag=false;
				}
				else{
					layer.msg("关注成功",1,1);
					$("#collection_user").val("取消关注");<commit_msg>no cache when ajax get<commit_after>{% extends "layout.html" %}

<!--css file used-->
{% block css %}
<link rel="stylesheet" type="text/css" href="/static/jquery-ui-1.11.2/jquery-ui.css" />
<link href="{{ url_for('static', filename='css/square.css') }}" rel='stylesheet' type='text/css'/> 
<link href="{{ url_for('static', filename='css/homepage.css') }}" rel='stylesheet' type='text/css'/> 
{% endblock %}

<!--content-->
{% block content %}

{% block home_page_content %}

{% endblock %}
	<!-- 文章列表 -->
	<div class="square-part2" id="home-article-list">
		<!-- 内容 -->
		<div class="square-part2-left" style="width:703px;">
			<div id="home-select">
				<label>排序方式：</label>
				<select name="sorting">
					<option id="sorting-by-time" value="time" selected="selected">时 间</option>
					<option id="sorting-by-heat" value="heat">热 度</option>
				</select>
			</div>

			<div id="ajax-field">
			<div id="ajax-inner-field">
			<table id="square-part1-content" style="width:703px; margin-top: 60px;">
				{% for article in article_pagination.items %}
				<tr>
					<td class="square-col-1" style="width:500px;"><a href="{{url_for('article', article_id = article.article_id)}}">{{article.title}}</a></td>
					<td class="square-col-3"><img src="{{ url_for('static', filename='images/coins.png') }}"></td>
					<td class="square-col-4" style="width: 80px;">{{article.coins}}</td>
					<td class="square-col-final">{{article.time|time_split}}</td>
				</tr>
				{% endfor %}
			</table>
			</div>

			<div class="home-paging">
				{% if article_pagination.has_prev %}
				<a href="javascript:void(0);" id="home-left-arrow">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;
				{% else %}
				<a href="javascript:void(0);" id="home-left-arrow" style="display:none;">&lt;&lt;</a>&nbsp;&nbsp;&nbsp;
				{% endif %}

				{% if article_pagination.pages %}
				Page&nbsp;<font id="home-current-page">{{ article_pagination.page }}</font>&nbsp;/&nbsp;{{ article_pagination.pages }}
				{% endif %}
				
				{% if article_pagination.has_next %}
				&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="home-right-arrow">&gt;&gt;</a>
				{% else %}
				&nbsp;&nbsp;&nbsp;<a href="javascript:void(0);" id="home-right-arrow" style="display:none;">&gt;&gt;</a>
				{% endif %}
			</div>
			</div>
		</div>
	
		<!-- 标题图片 -->
		<div class="square-part2-right">
			<h2 style="line-height: 40px">文章列表</h2>
			<img id="square-part2-img" src="{{ url_for('static', filename='images/transparent-circle.png') }}"/>
			<div></div>
		</div>
	
	</div>

	{% if current_user != user %}
	<!-- 关注作者 -->
	<div id="home-star">
		<h2>关注的作者：</h2>
		<div style="margin-top: 30px"></div>
		<div class="home-star-row">
		{% for author in collection_author_list%}
			<div><img src="{{url_for('static', filename='images/transparent-circle.png')}}" style="background-image: url('{{author.photo}}')"/><div class="home-star-name"><a href="{{url_for('view_home_page', nick=author.nick)}}">{{author.nick}}</a></div></div>
		{% endfor %}
		</div>

	</div>

	{% endif %}

{% endblock %}

<!--js file used-->
{% block js %}
<script src="{{ url_for('static', filename='layer-v1.8.5/layer/layer.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/jquery.idTabs.min.js') }}"></script>
<script type="text/javascript">
	$(document).ready(function()
	{
	$.ajaxSetup({cache:false});
	{#仅在看别人主页时会出现#}
	{% if current_user != user %}
		if ('{{collection}}'=='yes'){
			flag=true;
		}
		else{
			flag=false;
		}
		$("#collection_user").click(function()
		{
			if (flag) {url='/collection_cancel/user';}
			else{url='/collection/user';}
			$.post(url,
			{
				_csrf_token:"{{ csrf_token() }}",
				user_id: {{user.user_id}}
			},
			function(data){
			if (data=='success'){
				var follow_num = parseInt($('#home_be_followed_num').html());
				if (flag) {
					layer.msg("取消关注成功",1,1);
					$("#collection_user").val("关注");
					var newstr = (follow_num-1);
					$('#home_be_followed_num').html(newstr);
					flag=false;
				}
				else{
					layer.msg("关注成功",1,1);
					$("#collection_user").val("取消关注");
{'fraction_non_alphanumeric': 0.24897502795378307, 'fraction_numerical': 0.011181513231457324, 'mean_word_length': 4.104629042485732, 'pattern_counts': {'":': 0, '<': 167, '<?xml version=': 0, '>': 167, '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': '6330509', 'n_tokens_mistral': 3545, 'n_tokens_neox': 3005, 'n_words': 452}