Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions _layouts/department.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,26 @@
<p><b>Время работы</b></p>
{{page.working-time}}
{% endif %}

Список экспертов и студентов онлайн:
<ul>
{%- for person in site.persons -%}
{% if person.type contains "expert" -%}
{%- assign present = false -%}
{%- for md5mac in person.md5macs -%}
{%- for kvs in site.data.onlinemd5sums -%}
{% capture onlinemd5sums %}{{ kvs[1]|map: "onlinemd5sums"|compact|join: "," }}{% endcapture %}
{% if onlinemd5sums contains md5mac -%}
{% capture present %}{{ kvs[0] }}{% endcapture %}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
<li>
<b>{{ "" | append: person.title }}</b>@ <a href="{{ person.url }}">{{ person.surname }} {{ person.name }}</a>
{% if present -%}<span class="online" title="Прямо сейчас находится на площадке"></span>{%- endif -%}
</li>
{%- endif -%}
{%- endfor -%}
</ul>

</section>
26 changes: 19 additions & 7 deletions _layouts/students.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,23 @@ <h1 id="h-students">Студенты</h1>
{{ content }}
</section>
Список наших студентов:
<ul>
{%- for person in site.persons -%}
{% if person.type contains "student" -%}
<li><b>{{ person.title }}</b>@ <a href="{{ person.url}}">{{ person.surname }} {{ person.name }}</a></li>
{%- endif -%}
{%- endfor -%}
</ul>
<ul>
{%- for person in site.persons -%}
{% if person.type contains "student" -%}
{%- assign present = false -%}
{%- for md5mac in person.md5macs -%}
{%- for kvs in site.data.onlinemd5sums -%}
{% capture onlinemd5sums %}{{ kvs[1]|map: "onlinemd5sums"|compact|join: "," }}{% endcapture %}
{% if onlinemd5sums contains md5mac -%}
{% capture present %}{{ kvs[0] }}{% endcapture %}
{%- endif -%}
{%- endfor -%}
{%- endfor -%}
<li>
<b>{{ "" | append: person.title }}</b>@ <a href="{{ person.url }}">{{ person.surname }} {{ person.name }}</a>
{% if present -%}<span class="online" title="Прямо сейчас находится на площадке '{{ present }}'">&#8226;</span>{%- endif -%}
</li>
{%- endif -%}
{%- endfor -%}
</ul>
</section>