Skip to content

Commit

Permalink
First
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Thompson committed Sep 10, 2019
1 parent e40abe7 commit dbcad9f
Showing 1 changed file with 4 additions and 37 deletions.
41 changes: 4 additions & 37 deletions resources/views/partials/messages.twig
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
<section id="messages" class="fixed bottom-0 right-0">

<div class="p-6 w-72 bg-green-500 text-green-100 color-white rounded mr-3 mb-3">
<p>This is the message right here.</p>
<p>This is a <a href="#" class="font-bold underline">link</a>.</p>
</div>

<!-- Success Messages -->
{% if message_exists('success') %}
<div class="alert alert-success alert-dismissible">
<button type="button" class="close" data-dismiss="alert">
<span>&times;</span><span class="sr-only">Close</span>
</button>

<div class="p-6 w-72 bg-green-500 text-green-100 color-white rounded mr-3 mb-3">
{% for message in message_pull('success') %}
{{ trans(message)|markdown }}
{% endfor %}
Expand All @@ -20,49 +11,25 @@

<!-- Informational Messages -->
{% if message_exists('info') %}
<div class="alert alert-info alert-dismissible">
<button type="button" class="close" data-dismiss="alert">
<span>&times;</span><span class="sr-only">Close</span>
</button>

<div class="p-6 w-72 bg-info-500 text-info-100 color-white rounded mr-3 mb-3">
{% for message in message_pull('info') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>
{% endif %}


<!-- Warning Messages -->
{% if message_exists('warning') %}
<div class="alert alert-warning alert-dismissible">
<button type="button" class="close" data-dismiss="alert">
<span>&times;</span><span class="sr-only">Close</span>
</button>

<div class="p-6 w-72 bg-orange-500 text-orange-100 color-white rounded mr-3 mb-3">
{% for message in message_pull('warning') %}
{{ trans(message)|markdown }}
{% endfor %}
</div>
{% endif %}


<!-- Error Messages -->
{#{% if message_exists('error') %}#}
{#<div class="alert alert-danger alert-dismissible">#}
{#<button type="button" class="close" data-dismiss="alert">#}
{#<span>&times;</span><span class="sr-only">Close</span>#}
{#</button>#}

{#{% for message in message_pull('error') %}#}
{#{{ trans(message)|markdown }}#}
{#{% endfor %}#}
{#</div>#}
{#{% endif %}#}

{% if message_exists('error') %}
<div class="flex items-center bg-red-500 text-white text-sm font-bold px-4 py-3" role="alert">
<svg class="fill-current w-4 h-4 mr-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
<path d="M12.432 0c1.34 0 2.01.912 2.01 1.957 0 1.305-1.164 2.512-2.679 2.512-1.269 0-2.009-.75-1.974-1.99C9.789 1.436 10.67 0 12.432 0zM8.309 20c-1.058 0-1.833-.652-1.093-3.524l1.214-5.092c.211-.814.246-1.141 0-1.141-.317 0-1.689.562-2.502 1.117l-.528-.88c2.572-2.186 5.531-3.467 6.801-3.467 1.057 0 1.233 1.273.705 3.23l-1.391 5.352c-.246.945-.141 1.271.106 1.271.317 0 1.357-.392 2.379-1.207l.6.814C12.098 19.02 9.365 20 8.309 20z"/></svg>
<div class="p-6 w-72 bg-orange-500 text-orange-100 color-white rounded mr-3 mb-3">
{% for message in message_pull('error') %}
{{ trans(message)|markdown }}
{% endfor %}
Expand Down

0 comments on commit dbcad9f

Please sign in to comment.