Commit c3d932f6 authored by VoidOutput's avatar VoidOutput

Placeholder for empty submission pager

parent 1027c426
Pipeline #51070737 passed with stages
in 7 minutes and 6 seconds
.empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 20rem;
max-height: 50vh;
}
.empty__emoji {
font-size: 4em;
color: var(--fg-grey);
}
.empty__text {
color: var(--text-muted);
line-height: 2;
}
......@@ -12,6 +12,7 @@
@import '_components/comment';
@import '_components/diff-table';
@import '_components/dimmed';
@import '_components/empty';
@import '_components/form';
@import '_components/icon';
@import '_components/markdown-input';
......
......@@ -106,4 +106,8 @@ class SubmissionPager implements \IteratorAggregate {
throw new \InvalidArgumentException("Unexpected type '$type'");
}
}
public function isEmpty(): bool {
return empty($this->submissions);
}
}
......@@ -37,6 +37,25 @@
</ul>
</nav>
{% if submissions.isEmpty() %}
<div class="empty empty-forum">
<div class="empty__emoji">
{{ random([
'(・.・;)',
'(・_・;)',
'(._.)',
'( ̄□ ̄;)',
'( ゚Д゚)',
'(゚д゚)'
]) }}
</div>
<div class="empty__text">
{{ 'content.empty'|trans }}
</div>
</div>
{% endif %}
{% for submission in submissions %}
{{ submission(submission, {show_forum_name: false}) }}
{% endfor %}
......
......@@ -88,6 +88,9 @@ comment_form:
compose_message:
title: Composing a message to %username%
content:
empty: There's nothing here...
create_forum:
create_new_forum: Create new forum
......
......@@ -84,6 +84,9 @@ comment_form:
compose_message:
title: Écrire un message à %username%
content:
empty: Il n'y a rien ici...
create_forum:
create_new_forum: Créer un nouveau forum
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment