Categories now have their background color and font color, which effects the client and admin side
This commit is contained in:
@@ -22,24 +22,27 @@
|
||||
{% block body %}
|
||||
|
||||
<main class="documentation">
|
||||
<div style="background:#fff;text-align:left;width:100%;padding:80px 0 0;">
|
||||
<div style="text-align:left;width:100%;">
|
||||
|
||||
{% if privilege == "" %}
|
||||
<div id="slidr-div">
|
||||
{% if not posts %}
|
||||
<div style="background:#fff;text-align:left;width:100vw;padding:10vh 0 0;">
|
||||
<h1 class="fitty">Tidak ada pengumuman</h1>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="slidr-div">
|
||||
{% for post in posts %}
|
||||
<div data-slidr="{{ post.id }}" style="width: 100%;">
|
||||
<div class="fitty" style="padding: 0 5rem">
|
||||
<div data-slidr="{{ post.id }}" style="color:{{ post.foreground }};background-color:{{ post.background }};width:100%;height:100vh;padding:15vh 0;">
|
||||
<div class="fitty" style="padding:0 5rem">
|
||||
{{ post.content|rendermd }}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% else %}
|
||||
<div style="background:#fff;text-align:left;width:100vw;padding:10vh 0 0;">
|
||||
<div class="filter flex six-600 four grow">
|
||||
<div class="sixth-600 none"></div>
|
||||
<a href="/" class="navy noFitty">Semua</a>
|
||||
@@ -54,57 +57,57 @@
|
||||
</a>
|
||||
|
||||
{% for post in posts %}
|
||||
<div class="fourth-900 half-600 card box">
|
||||
<span class="stack" style="font-size:smaller;color:rgba(17,17,17,.4);margin-bottom:.6em;">[{{ post.valid_at|date("d/m/Y") }} - {{ post.expired_at|date("d/m/Y") }}]</span>
|
||||
<span class="stack">{{ post.content|rendermd }}</span>
|
||||
<form method="post">
|
||||
<footer class="flex full grow">
|
||||
{% if post.status != 0 %}
|
||||
<div class="half-900">
|
||||
<a href="/posts/edit/{{ post.id }}" class="button full">
|
||||
<i class="fa fa-edit fa-fw"></i>
|
||||
<span style="font-size:smaller;">Ubah</span>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="half-900">
|
||||
<span class="button pseudo full" style="color:rgba(17,17,17,.3)">Nonaktif</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if (post.status == 1 and editor_now.id == creator.id) %}
|
||||
<div class="half-900">
|
||||
<input type="hidden" name="id" value="{{ post.id }}">
|
||||
<input type="hidden" name="status" value="0">
|
||||
<!-- Method -->
|
||||
<input type="hidden" name="_method" value="delete">
|
||||
<!-- Token -->
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
<button type="submit" class="error full">
|
||||
<i class="fa fa-times-circle-o fa-fw" aria-hidden="true"></i>
|
||||
<span style="font-size:smaller;">Matikan</span>
|
||||
</button>
|
||||
</div>
|
||||
{% elseif (post.status == 2 and editor_now.id == creator.id) %}
|
||||
<div class="half-900">
|
||||
<input type="hidden" name="id" value="{{ post.id }}">
|
||||
<input type="hidden" name="valid_at" value="##date##">
|
||||
<!-- Method -->
|
||||
<input type="hidden" name="_method" value="put">
|
||||
<!-- Token -->
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
<button type="submit" class="success full">
|
||||
<i class="fa fa-check fa-fw" aria-hidden="true"></i>
|
||||
<span style="font-size:smaller;">Aktifkan</span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</form>
|
||||
<div class="fourth-900 half-600 card box" style="background-color:{{ post.background }};">
|
||||
<span class="stack" style="font-size:smaller;color:rgba(17,17,17,.4);margin-bottom:.6em;">[{{ post.valid_at|date("d/m/Y") }} - {{ post.expired_at|date("d/m/Y") }}]</span>
|
||||
<span class="stack" style="color:{{ post.foreground }};">{{ post.content|rendermd }}</span>
|
||||
<form method="post">
|
||||
<footer class="flex full grow">
|
||||
{% if post.status != 0 %}
|
||||
<div class="half-900">
|
||||
<a href="/posts/edit/{{ post.id }}" class="button full">
|
||||
<i class="fa fa-edit fa-fw"></i>
|
||||
<span style="font-size:smaller;">Ubah</span>
|
||||
</a>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="half-900">
|
||||
<span class="button pseudo full" style="color:rgba(17,17,17,.3)">Nonaktif</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if (post.status == 1 and editor_now.id == creator.id) %}
|
||||
<div class="half-900">
|
||||
<input type="hidden" name="id" value="{{ post.id }}">
|
||||
<input type="hidden" name="status" value="0">
|
||||
<!-- Method -->
|
||||
<input type="hidden" name="_method" value="delete">
|
||||
<!-- Token -->
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
<button type="submit" class="error full">
|
||||
<i class="fa fa-times-circle-o fa-fw" aria-hidden="true"></i>
|
||||
<span style="font-size:smaller;">Matikan</span>
|
||||
</button>
|
||||
</div>
|
||||
{% elseif (post.status == 2 and editor_now.id == creator.id) %}
|
||||
<div class="half-900">
|
||||
<input type="hidden" name="id" value="{{ post.id }}">
|
||||
<input type="hidden" name="valid_at" value="##date##">
|
||||
<!-- Method -->
|
||||
<input type="hidden" name="_method" value="put">
|
||||
<!-- Token -->
|
||||
<input type="hidden" name="_token" value="{{ token }}">
|
||||
<button type="submit" class="success full">
|
||||
<i class="fa fa-check fa-fw" aria-hidden="true"></i>
|
||||
<span style="font-size:smaller;">Aktifkan</span>
|
||||
</button>
|
||||
</div>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</form>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user