Skip to content

Commit

Permalink
Quote tweaks (#105)
Browse files Browse the repository at this point in the history
* Created quote element within elements directory based on design Kerri made for the Engineering project

* tweak Quote template to make it easier to include directly into themes

* don't hardcode path to quote's image
  • Loading branch information
JBCSU authored and Joe Knox committed Apr 23, 2018
1 parent e2b7795 commit a29ae8b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 24 deletions.
2 changes: 1 addition & 1 deletion css/decanter.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added img/headshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion scss/utilities/mixins/quote/_quote.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
margin-bottom: .5em;
}

.decanter-quote__detail {
.decanter-quote__bio {
margin: 0;
}

Expand Down
16 changes: 8 additions & 8 deletions styleguide/item-elements-quote.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ <h2 class="kss-title kss-title--level-2">

<div class="kss-modifier__example">
<div class="decanter-quote">
<img class="decanter-quote__img " src="../../../img/circle.png" alt="Please provide alt text">
<img class="decanter-quote__img " src="../../../img/headshot.jpg" alt="Jane Doe">
<div class="decanter-quote__body ">
<p class="decanter-quote__heading">John Doe</p>
<p class="decanter-quote__detail">Detail 1<br>Detail 2</p>
<p class="decanter-quote__quote">"This is the quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et..."</p>
<p class="decanter-quote__heading">Jane Doe</p>
<p class="decanter-quote__bio">Jane Doe's title<br/>Jane Doe's company</p>
<p class="decanter-quote__quote">"This is the actual quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et..."</p>
</div>
</div>

Expand All @@ -153,11 +153,11 @@ <h2 class="kss-title kss-title--level-2">
Markup: <code>../templates/elements/quote/quote.html.twig</code>
</summary>
<pre class="prettyprint linenums lang-html"><code data-language="html">&lt;div class=&quot;decanter-quote&quot;&gt;
&lt;img class=&quot;decanter-quote__img &quot; src=&quot;../../../img/circle.png&quot; alt=&quot;Please provide alt text&quot;&gt;
&lt;img class=&quot;decanter-quote__img &quot; src=&quot;../../../img/headshot.jpg&quot; alt=&quot;Jane Doe&quot;&gt;
&lt;div class=&quot;decanter-quote__body &quot;&gt;
&lt;p class=&quot;decanter-quote__heading&quot;&gt;John Doe&lt;/p&gt;
&lt;p class=&quot;decanter-quote__detail&quot;&gt;Detail 1&lt;br&gt;Detail 2&lt;/p&gt;
&lt;p class=&quot;decanter-quote__quote&quot;&gt;&quot;This is the quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...&quot;&lt;/p&gt;
&lt;p class=&quot;decanter-quote__heading&quot;&gt;Jane Doe&lt;/p&gt;
&lt;p class=&quot;decanter-quote__bio&quot;&gt;Jane Doe&#039;s title&lt;br/&gt;Jane Doe&#039;s company&lt;/p&gt;
&lt;p class=&quot;decanter-quote__quote&quot;&gt;&quot;This is the actual quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...&quot;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
Expand Down
16 changes: 8 additions & 8 deletions styleguide/section-elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,11 @@ <h2 class="kss-title kss-title--level-2">

<div class="kss-modifier__example">
<div class="decanter-quote">
<img class="decanter-quote__img " src="../../../img/circle.png" alt="Please provide alt text">
<img class="decanter-quote__img " src="../../../img/headshot.jpg" alt="Jane Doe">
<div class="decanter-quote__body ">
<p class="decanter-quote__heading">John Doe</p>
<p class="decanter-quote__detail">Detail 1<br>Detail 2</p>
<p class="decanter-quote__quote">"This is the quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et..."</p>
<p class="decanter-quote__heading">Jane Doe</p>
<p class="decanter-quote__bio">Jane Doe's title<br/>Jane Doe's company</p>
<p class="decanter-quote__quote">"This is the actual quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et..."</p>
</div>
</div>

Expand All @@ -703,11 +703,11 @@ <h2 class="kss-title kss-title--level-2">
Markup: <code>../templates/elements/quote/quote.html.twig</code>
</summary>
<pre class="prettyprint linenums lang-html"><code data-language="html">&lt;div class=&quot;decanter-quote&quot;&gt;
&lt;img class=&quot;decanter-quote__img &quot; src=&quot;../../../img/circle.png&quot; alt=&quot;Please provide alt text&quot;&gt;
&lt;img class=&quot;decanter-quote__img &quot; src=&quot;../../../img/headshot.jpg&quot; alt=&quot;Jane Doe&quot;&gt;
&lt;div class=&quot;decanter-quote__body &quot;&gt;
&lt;p class=&quot;decanter-quote__heading&quot;&gt;John Doe&lt;/p&gt;
&lt;p class=&quot;decanter-quote__detail&quot;&gt;Detail 1&lt;br&gt;Detail 2&lt;/p&gt;
&lt;p class=&quot;decanter-quote__quote&quot;&gt;&quot;This is the quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...&quot;&lt;/p&gt;
&lt;p class=&quot;decanter-quote__heading&quot;&gt;Jane Doe&lt;/p&gt;
&lt;p class=&quot;decanter-quote__bio&quot;&gt;Jane Doe&#039;s title&lt;br/&gt;Jane Doe&#039;s company&lt;/p&gt;
&lt;p class=&quot;decanter-quote__quote&quot;&gt;&quot;This is the actual quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...&quot;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</code></pre>
Expand Down
9 changes: 5 additions & 4 deletions templates/elements/quote/quote.html.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "John Doe",
"detail1": "Detail 1",
"detail2": "Detail 2",
"text": "This is the quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et..."
"name": "Jane Doe",
"bio": "Jane Doe's title<br/>Jane Doe's company",
"text": "This is the actual quote. Lorem ipsur adipisicing elit, sed do eiusmod tempor incididunt ut labore et...",
"image": "../../../img/headshot.jpg",
"altText": "Jane Doe"
}
4 changes: 2 additions & 2 deletions templates/elements/quote/quote.html.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="decanter-quote">
<img class="decanter-quote__img " src="../../../img/circle.png" alt="Please provide alt text">
<img class="decanter-quote__img " src="{{ image }}" alt="{{ altText }}">
<div class="decanter-quote__body ">
<p class="decanter-quote__heading">{{ name }}</p>
<p class="decanter-quote__detail">{{ detail1 }}<br>{{ detail2 }}</p>
<p class="decanter-quote__bio">{{ bio }}</p>
<p class="decanter-quote__quote">"{{ text }}"</p>
</div>
</div>

0 comments on commit a29ae8b

Please sign in to comment.