-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from sumocoders/update-layout-to-bs4
Update layout to bootstrap 4
- Loading branch information
Showing
4 changed files
with
35 additions
and
48 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
src/Frontend/Modules/Quotes/Layout/Templates/Quote.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% macro quote(quote) %} | ||
<blockquote> | ||
<div class="row align-items-center"> | ||
{% if quote.image %} | ||
<div class="col-2"> | ||
<img src="{{ quote.imageDirectoryUrl }}/x150/{{ quote.image }}" alt="{{ quote.name }}" class="img-responsive"> | ||
</div> | ||
{% endif %} | ||
<div class="{% if quote.image %} col-10{% else %} col-12{% endif %}"> | ||
{{ quote.quote|raw }} | ||
<cite>{{ quote.name }}</cite> | ||
</div> | ||
</div> | ||
</blockquote> | ||
{% endmacro %} |
11 changes: 7 additions & 4 deletions
11
src/Frontend/Modules/Quotes/Layout/Widgets/AllQuotes.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
{% for quote in quotes %} | ||
<blockquote>{{ quote.quote|raw }}</blockquote> | ||
<p>{{ quote.name }}</p> | ||
{% endfor %} | ||
{% import 'Modules/Quotes/Layout/Templates/Quote.html.twig' as quotesTemplates %} | ||
|
||
<section id="quotesAllQuotesWidget" class="quotes quotes-widget"> | ||
{% for quote in quotes %} | ||
{{ quotesTemplates.quote(quote) }} | ||
{% endfor %} | ||
</section> |
28 changes: 6 additions & 22 deletions
28
src/Frontend/Modules/Quotes/Layout/Widgets/RandomQuote.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
{% if quote %} | ||
<blockquote> | ||
<div class="row"> | ||
{% if quote.image %} | ||
<div class="col-sm-4"> | ||
<img src="{{ quote.imageDirectoryUrl }}/x150/{{ quote.image }}" alt="{{ quote.name }}" class="img-responsive"> | ||
</div> | ||
<div class="col-sm-8"> | ||
{{ quote.quote|raw }} | ||
-- {{ quote.name }} | ||
</div> | ||
{% endif %} | ||
|
||
{% if not quote.image %} | ||
<div class="col-sm-12"> | ||
{{ quote.quote|raw }} | ||
-- {{ quote.name }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</blockquote> | ||
{% endif %} | ||
{% import 'Modules/Quotes/Layout/Templates/Quote.html.twig' as quotesTemplates %} | ||
|
||
<section id="quotesRandomQuoteWidget" class="quotes quotes-widget"> | ||
{% if quote %} | ||
{{ quotesTemplates.quote(quote) }} | ||
{% endif %} | ||
</section> |
29 changes: 7 additions & 22 deletions
29
src/Frontend/Modules/Quotes/Layout/Widgets/SingleQuote.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,7 @@ | ||
{% if quote %} | ||
<blockquote> | ||
<div class="row"> | ||
{% if quote.image %} | ||
<div class="col-sm-4"> | ||
<img src="{{ quote.imageDirectoryUrl }}/x150/{{ quote.image }}" alt="{{ quote.name }}" class="img-responsive"> | ||
</div> | ||
<div class="col-sm-8"> | ||
{{ quote.quote|raw }} | ||
-- {{ quote.name }} | ||
</div> | ||
{% endif %} | ||
|
||
{% if not quote.image %} | ||
<div class="col-sm-12"> | ||
{{ quote.quote|raw }} | ||
-- {{ quote.name }} | ||
</div> | ||
{% endif %} | ||
</div> | ||
</blockquote> | ||
{% endif %} | ||
{% import 'Modules/Quotes/Layout/Templates/Quote.html.twig' as quotesTemplates %} | ||
|
||
<section id="quotesSingleQuoteWidget" class="quotes quotes-widget"> | ||
{% if quote %} | ||
{{ quotesTemplates.quote(quote) }} | ||
{% endif %} | ||
</section> |