-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdiscussions_home
159 lines (156 loc) · 6.67 KB
/
discussions_home
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<section class="fw-sticky fw-searchbar-wrapper">
<div class="container">
<div class="row align-items-center py-8">
<div class="col-md-6">
{% element 'secondary_nav' %}
{
"breadcrumbs": [{ "label":"{{ 'portal_translations.header.tabs.home' | t }}", "url":"{{portal.home_url}}" },
{ "label":"{{ 'portal_translations.header.tabs.forums' | t }}", "url":"{{portal.discussions_home_url_home_url}}" }]
}
{% endelement %}
</div>
<div class="col-md-4 ms-auto">
{{ portal | search_element }}
</div>
</div>
</div>
</section>
<section class="container-fluid px-0 fw-page-title-wrapper">
<div class="container">
<div class="py-24 py-lg-60 mx-0 fw-search-meta-info g-0">
<div class="text-start">
<h1 class="fw-page-title">{{ 'portal_translations.header.tabs.forums' | t }}</h1>
<p>{{ 'portal_translations.forums.description' | t }}</p>
{{ portal | discussions_new_topic_button: 'btn mt-16 new-topic-button fw-primary-button' }}
</div>
</div>
</div>
</section>
<section class="container-fluid px-0 py-24">
<div class="container">
{{ page_message }}
{% if portal.my_topics.size > 0 %}
<section class="row fw-category-wrapper box-shadow br-12 mx-0 g-0 bg-dark">
<div class="col-12 fw-section-heading align-items-center">
<div class="fw-icon-holder pe-12">
<span class="icon-category"></span>
</div>
<div class="info">
<h2>
{% element 'link' %}
{
"url": "{{ portal.my_topics_url }}",
"content": "{{ 'portal_translations.forums.my_topics' | t }} ({{portal.my_topics.size}})"
}
{% endelement %}
</h2>
<p>{{ 'portal_translations.forums.my_topics_description' | t }}</p>
</div>
</div>
<div class="row mx-0 fw-section-content g-0">
<div class="col-md-6 fw-folder">
<ul class="fw-no-bullet ms-32">
{% for topic in portal.my_topics limit:3 %}
<li>
{% element 'link' %}
{
"url": "{{ topic.url }}",
"class": "d-flex",
"content": "<div class='pe-8'><span class='icon-topic'></span></div><div class='line-clamp-2'>{{ topic.title | escape_once }}</div>"
}
{% endelement %}
</li>
{% endfor %}
</ul>
</div>
{% if portal.my_topics.size > 3%}
<div class="col-md-6 fw-folder">
<ul class="fw-no-bullet ms-32">
{% for topic in portal.my_topics limit:3 offset: continue %}
<li>
{% element 'link' %}
{
"url": "{{ topic.url }}",
"class": "d-flex",
"content": "<div class='pe-8'><span class='icon-topic'></span></div><div class='line-clamp-2'>{{ topic.title | escape_once }}</div>"
}
{% endelement %}
</li>
{% endfor %}
</ul>
{% if portal.my_topics.size > 6 %}
{% element 'link' %}
{
"url": "{{ portal.my_topics_url }}",
"content": "{{ 'portal_translations.view_all' | t }} {{portal.my_topics.size}} {{ 'portal_translations.topics' | t }}",
"class": "ms-36 my-16 d-block"
}
{% endelement %}
{% endif %}
</div>
{% endif %}
</div>
</section>
{% endif %}
{% for category in portal.forum_categories %}
{% if category.forums_count > 0 %}
<section class="row fw-category-wrapper box-shadow br-12 mx-0 g-0 bg-dark">
<div class="col-12 fw-section-heading align-items-center">
<div class="fw-icon-holder pe-12">
<span class="icon-category"></span>
</div>
<div class="info">
<h2>
{% element 'link' %}
{
"url": "{{ category.url }}",
"content": "{{ category.name | escape_once}} ({{ category.forums_count }})"
}
{% endelement %}
</h2>
<p>{{ category.description | escape_once }}</p>
</div>
</div>
<div class="row mx-0 fw-section-content g-0">
{% for forum in category.forums %}
<div class="col-md-6 fw-folder">
<div class="fs-20 mb-24 semi-bold">
{% element 'link' %}
{
"url": "{{ forum.url }}",
"class": "fw-heading d-flex",
"content": "<div class='fw-folder-icon text-center me-8'><span class='icon-{{forum.type_class}}-forum'></span></div><div class='line-clamp-2'>{{ forum.name | escape_once }} ({{ forum.topics_count }})</div>",
"other_attributes": [{ "key":"role", "value":"heading" }]
}
{% endelement %}
</div>
<ul class="fw-no-bullet ms-36">
{% for topic in forum.topics limit:3 %}
<li>
{% element 'link' %}
{
"url": "{{ topic.url }}",
"class": "d-flex",
"content": "<div class='pe-8'><span class='icon-topic'></span></div><div class='line-clamp-2'>{{ topic.title | escape_once }}</div>"
}
{% endelement %}
</li>
{% endfor %}
</ul>
{% if forum.topics_count > 3 %}
{% element 'link' %}
{
"url": "{{ forum.url }}",
"content": "{{ 'portal_translations.view_all' | t }} {{ forum.topics_count }} {{ 'portal_translations.topics' | t }}",
"class": "ms-36 my-16 d-block"
}
{% endelement %}
{% endif %}
</div>
{% endfor %}
</div>
</section>
{% endif %}
{% endfor %}
</div>
</section>