-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathfavorite.html
102 lines (102 loc) · 6.28 KB
/
favorite.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
layout: default
key: favorite
title: Favorite
---
<div class="main-contents container">
<div class="main-contents-inner">
<h1 class="page-header">{{ page.title }}</h1>
{%- assign favorite = site.data.favorite -%}
<ul class="nav nav-tabs">
<li class="nav-item"><a class="nav-link active" href="#favorite"><h5 class="tab-title">{{favorite.title}}</h5></a></li>
<li class="nav-item"><a class="nav-link" href="#library"><h5 class="tab-title">{{favorite.librarytitle}}</h5></a></li>
</ul>
<div class="tab-content">
<div id="favorite" class="tab-pane fade show active">
<p>{{favorite.description}}</p>
<div class="list">
{%- for bookmark in favorite.bookmarks -%}
{% assign idx1 = forloop.index %}
<div class="list-category">
<div class="list-category-title">{{ bookmark.category }}</div>
<div class="list-sublist">
{%- for link in bookmark.links -%}
{% assign col = forloop.index0 | modulo: 3 %}
{% if col == 0 %}
<div class="row">
{% endif %}
<div class="col-sm-4">
<span class="list-sub-index">{{ idx1 }}.{{ forloop.index }}</span>
<span class="list-sub-link"><a href="{{ link.url }}" data-container="body" data-toggle="tooltip" data-placement="right" title="{{ link.description }}">{{ link.name }} </a>{% if link.favorite == true %}<i class="fas fa-star" style='color:#ffcc00'></i>{% endif %}</span>
</div>
{% if col == 2 or forloop.last == true %}
</div>
{% endif %}
{%- endfor -%}
</div>
</div>
{%- endfor -%}
</div>
</div>
<div id="library" class="tab-pane fade">
<p>{{favorite.librarydesc}}</p>
<div class="list">
{% assign postings = site.algorithm | concat: site.programming | concat: site.architecture | concat: site.cloud | concat: site.tutorial | concat: site.project %}
{%- for bookmark in favorite.bookmarks -%}
{% assign idx1 = forloop.index %}
<div class="list-category">
<div class="list-category-title">{{ bookmark.category }}</div>
<div class="list-sublist">
{%- for link in bookmark.links -%}
{% assign col = forloop.index0 | modulo: 3 %}
{% if col == 0 %}
<div class="row">
{% endif %}
<div class="col-sm-4">
<span class="list-sub-index">{{ idx1 }}.{{ forloop.index }}</span>
{% assign counter = 0 %}
{% assign linkname = link.name | downcase %}
{% assign strlink = "<ul class='list-posting'>" %}
{% assign template = "" %}
{% for posting in postings %}
{% case posting.key %}
{% when 'portfolio' %}
{% assign template = "<li><a href='url' title='name'>name </a><i class='fas fa-briefcase' style='color:#3742d8'></i></li>" %}
{% when 'popular' %}
{% assign template = "<li><a href='url' title='name'>name </a><i class='fas fa-fire-alt' style='color:#3742d8'></i></li>" %}
{% when 'tutorial' %}
{% assign template = "<li><a href='url' title='name'>name </a><i class='fas fa-chalkboard-teacher' style='color:#3742d8'></i></li>" %}
{% else %}
{% assign template = "<li><a href='url' title='name'>name </a><i class='fas fa-blog' style='color:#3742d8'></i></li>" %}
{% endcase %}
{% for tag in posting.tags %}
{% assign lowercase_tag = tag | downcase %}
{% if lowercase_tag == linkname %}
{% assign counter = counter | plus:1 %}
{% assign currlink = template | replace: "url", posting.url | replace: "name", posting.title%}
{% assign strlink = strlink | append: currlink %}
{% endif %}
{%- endfor -%}
{%- endfor -%}
{% assign strlink = strlink | append: "</ul>" %}
{% assign popoverlink = "<a href='url' title='name'>name</a>" | replace: "url", link.url | replace: "name", link.url%}
{% if counter > 0 %}
{% assign strlink = strlink | append: "<hr>" %}
{% else %}
{% assign strlink = "" %}
{% endif %}
{% assign strlink = strlink | append: popoverlink %}
<span class="list-sub-link"><a href="{{ link.url }}" data-container="body" class="pop" data-toggle="popover" title="" data-trigger="hover" data-content="{{strlink}}" data-original-title="{{link.description}}">{{ link.name }} <span class="badge badge-pill badge-dark">{% if counter > 0 %}{{counter}}{% endif %}</span></a></span>
</div>
{% if col == 2 or forloop.last == true %}
</div>
{% endif %}
{%- endfor -%}
</div>
</div>
{%- endfor -%}
</div>
</div>
</div>
</div>
</div>