<commit_before>{% extends 'site.twig' %} 
{% block urltile %}Research Projects{% endblock %}
{% block pagetile %}Research Projects{% endblock %} 

{% block breadcrumb %}
 <ol class="breadcrumb">
	<li><a title="Home" href="{{ urlFor('home') }}">Home</a></li>
    <li class="active">Projects</li>
</ol>
{% endblock %}   


{% block content %}
<section class="white-section">
	<!-- container -->
	<div class="container">
		<!-- row -->
		<div class="row">

			<!-- col-md-12 -->
			<div class="col-md-12">

				<!-- section-title -->
				<div class="section-title">

					<!-- main-title -->
					<div class="main-title">
						<h2>Research Project History</h2>
					</div>
					<!-- /main-title -->



				</div>
				<!-- /section-title -->

				<!-- timeline-graph -->
				<ul class="timeline-graph">

				{% for project in projects %}
					<li id="{{ project.id }}" style="display: none;min-height: 150px" data-url="{{ urlFor('api.project.named',{'name':project.id }   ) }}">
						<div class="tm-dt">
						<!-- date --> 
							<time class="prj-start"><span></span></time>
							
							<time class="prj-end"><span></span></time>
						</div>
						<!-- icon -->
						<div class="tm-icon">
							<i class="fa fa-briefcase"></i>
						</div> <!-- content -->
						<div class="tm-label" >
							<!-- title -->
							<h4>{{ project.title }}
							</h4>
							<!-- post -->
							<div class="post-content" style="height: 150px">
								<p> </p>
							</div>
							<div class="post-meta">
								<span class="post-author"><a title="See more" href="{{ urlFor('project.named',{'name':project.id}) }}">See More ...</a></span>
							</div>	
						</div>
						
						<!-- /content -->
					</li>
					{% endfor %}

				</ul>
				<!-- /timeline-graph -->

			</div>
			<!-- /col-md-12 -->

		</div>
		<!-- /row -->
	</div>
	<!-- /container -->
</section>


{% endblock %}


{% block injectJS %}
    <script src="//cdn.jsdelivr.net/jquery.dotdotdot/1.6.13/jquery.dotdotdot.min.js"></script>

<script>
$(document).ready(function()
{
    "use strict";
	$(".timeline-graph li").each(function( index ) {
		console.log( index + ": " + $(this).attr('id') );

		var that = this

		$.getJSON($(this).attr('data-url'), function( data,b,c )
		{   console.log(data.description );
			$(that).find(".post-content").html(data.description);
			$(that).find(".prj-start span").html(data.start);
			$(that).find(".prj-end span").html(data.end);
			$(that).find(".tm-label h4").html(data.title);
		}).always(function() {
			$(that).slideDown();
			$(that).find(".post-content").dotdotdot({
					ellipsis : ' [...] ',
			        watch: "window"
			    });
			$("html").getNiceScroll().resize();
		});
		
	});


	


});
</script>
{% endblock %}<commit_msg>- refactored template to use new project handler - removed ajax-based project handling - a bit of cleaning and sub-editing<commit_after>{% extends 'site.twig' %} 
{% block urltile %}Research Projects{% endblock %}
{% block pagetile %}Research Projects{% endblock %} 

{% block breadcrumb %}
 <ol class="breadcrumb">
	<li><a title="Home" href="{{ urlFor('home') }}">Home</a></li>
    <li class="active">Projects</li>
</ol>
{% endblock %}   


{% block content %}
<section class="white-section">
	<!-- container -->
	<div class="container">
		<!-- row -->
		<div class="row">

			<!-- col-md-12 -->
			<div class="col-md-12">

				<!-- section-title -->
				<div class="section-title">

					<!-- main-title -->
					<div class="main-title">
						<h2>Research Projects - History</h2>
					</div>
					<!-- /main-title -->



				</div>
				<!-- /section-title -->

				<!-- timeline-graph -->
				<ul class="timeline-graph">

				{% for project in projects %}
					<li id="{{ project.id }}" data-url="{{ urlFor('api.project.named',{'name':project.id }   ) }}">
						<div class="tm-dt">
						<!-- date --> 
							<time class="prj-start"><span>{{ project.start }}</span></time>
							
							<time class="prj-end"><span>{{ project.end }}</span></time>
						</div>
						<!-- icon -->
						<div class="tm-icon">
							<i class="fa fa-briefcase"></i>
						</div> <!-- content -->
						<div class="tm-label" >
							<!-- title -->
							<h4>{{ project.title }}
							</h4>
							<!-- post -->
							<div class="post-content" >
								<p>{{ project.description }}</p>
							</div>
							<div class="post-meta">
								<span class="post-author"><a title="See more" href="{{ urlFor('project.named',{'name':project.id}) }}">See More ...</a></span>
							</div>	
						</div>
						
						<!-- /content -->
					</li>
					{% endfor %}

				</ul>
				<!-- /timeline-graph -->

			</div>
			<!-- /col-md-12 -->

		</div>
		<!-- /row -->
	</div>
	<!-- /container -->
</section>


{% endblock %}


{% block injectJS %}
<script>
$(document).ready(function() {
});
</script>
{% endblock %}
{'fraction_non_alphanumeric': 0.25181046968756465, 'fraction_numerical': 0.006414235464514794, 'mean_word_length': 2.255218855218855, 'pattern_counts': {'":': 1, '<': 153, '<?xml version=': 0, '>': 153, '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': '6620348', 'n_tokens_mistral': 2165, 'n_tokens_neox': 1596, 'n_words': 306}