-
Notifications
You must be signed in to change notification settings - Fork 75
/
index.html
79 lines (77 loc) · 4.45 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
layout: default
---
<div class="hero lazyloaded" data-bg="/assets/bg_lg.jpg" style="background-image: url("/assets/bg_lg.jpg");">
<div class="hero__wrap">
<h1 class="hero__title">اشتراکگذاری تجربهی کاری با همه!</h1>
<br/>
<h2 class="hero-search" onclick="window.location.href='/search'">جستجوی نام شرکت مورد نظر...</h2>
</div>
</div>
<main class="site__content">
<section class="blog">
<div class="container">
<div class="row"></div>
<div class="col-xs-12 col-sm-12 col-md-12">
<section class="o-box">
<table>
<tbody id="latest-review-body">
<tr><th colspan="2"><b>آخرین تجربهها</b></th></tr>
</tbody>
</table>
</section>
</div>
<div class="row"></div>
<div style="clear: both"></div>
{%- assign n = paginator.posts | size -%}
{%- assign posts = paginator.posts | sample: n -%}
{% for post in posts %}
<div class="col-md-4 col-lg-4 col-xl-4">
<a class="black-link" href="{{ site.baseurl }}{{ post.url }}"><div class="place-card place-card--small">
<div class="place-card__img">
<img src="/assets/company-logo.png" class="place-card__img-thumbnail" alt="{{ post.title }}">
</div>
<div class="place-card__content">
<h3 class="place-card__content_header">{{ post.title }}</h3>
<p class="mb-0"><i class="fa fa-map-marker"></i> <span class="text-muted">{{ post.city }}</span></p>
</div>
</div></a>
</div>
{% endfor %}
<div style="clear: both"></div>
{% if paginator.total_pages > 1 %}
<ul class="pagination justify-content-center flex-wrap">
{% if paginator.previous_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.previous_page_path | relative_url }}"><span aria-hidden="true">« </span></a></li>
{% else %}
<li class="page-item disabled"><a class="page-link" href="{{ paginator.previous_page_path | relative_url }}"><span aria-hidden="true">« </span></a></li>
{% endif %}
{% for page in (1..paginator.total_pages) %}
{% if page == paginator.page %}
<li class="page-item active"><a class="page-link" href="#" >{{ page }}</a></li>
{% elsif page == 1 %}
<li class="page-item"><a class="page-link" href="{{ '/' | relative_url }}">{{ page }}</a></li>
{% else %}
<li class="page-item "><a class="page-link" href="{{ site.paginate_path | relative_url | replace: ':num', page }}">{{ page }}</a></li>
{% endif %}
{% endfor %}
{% if paginator.next_page %}
<li class="page-item"><a class="page-link" href="{{ paginator.next_page_path | relative_url }}"><span aria-hidden="true"> »</span></a></li>
{% else %}
<li class="page-item disabled"><a class="page-link" href="{{ paginator.previous_page_path | relative_url }}"><span aria-hidden="true"> »</span></a></li>
{% endif %}
</ul>
{% endif %}
</div>
</section>
</main>
<script src="/assets/jalali-moment.browser-v3.3.11.js"></script>
<script>
let latestReviews = "";
fetch('https://api.github.com/repos/tajrobe/tajrobe.github.io/commits?per_page=20').then(res => res.json()).then(trees => {
for(let tree of trees)
if(tree.commit.message.includes("/") && !tree.commit.message.includes("/patch"))
latestReviews += "<tr><td><a href='/" + encodeURI(tree.commit.message.split("/")[1]) + "' target='_blank'>تجربهی کاری جدید در شرکت " + tree.commit.message.split("/")[1].replaceAll("-", " ") + "</a></td><td><small>" + moment.from(tree.commit.committer.date, 'en').locale('fa').fromNow() + "</small></td></tr>";
document.getElementById("latest-review-body").insertAdjacentHTML('beforeend',latestReviews);
});
</script>