Skip to content

Commit 4cc0e1a

Browse files
committed
Added Coach K page quotes section
1 parent b49c40f commit 4cc0e1a

5 files changed

Lines changed: 62 additions & 1 deletion

File tree

app/assets/javascripts/beta.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,12 @@
1313
//= require common/local-time
1414
//= require_tree ./beta
1515

16-
$(document).foundation();
16+
$(document).foundation({
17+
tooltip: {
18+
tip_template: function (selector, content) {
19+
return '<span data-selector="' + selector + '" class="'
20+
+ Foundation.libs.tooltip.settings.tooltip_class.substring(1)
21+
+ '">' + content + '</span>';
22+
}
23+
}
24+
});

app/assets/stylesheets/beta/coach_k.css.sass

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,10 @@
2121
margin-bottom: 10px
2222
h2.wins
2323
text-align: center
24+
25+
.quote
26+
$tooltip-pip-size: 10px
27+
padding: 12px 0px
28+
text-align: center
29+
img
30+
+border-radius(150px)

app/assets/stylesheets/beta/variables.css.sass

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ $row-width: 1200px
7777
$topbar-breakpoint: "66.063em"
7878
$topbar-media-query: "only screen and (min-width: 66.063em)"
7979

80+
$has-tip-cursor-type: auto
81+
8082
@mixin text-underline($color, $pos)
8183
background-image: -webkit-linear-gradient(top, rgba($color, 0) 75%, rgba($color, 0.8) 75%)
8284
background-image: linear-gradient(to bottom, rgba($color, 0) 75%, rgba($color, 0.8) 75%)

app/models/page/layouts/coach_k.rb

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,33 @@ def schema
3535
}
3636
}
3737
},
38+
'quotes_preface' => {
39+
'label' => 'Quotes Section Preface',
40+
'required' => false,
41+
'extends' => markdown_schema,
42+
},
43+
'quotes' => {
44+
'label' => 'Quotes',
45+
'type' => 'array',
46+
'required' => false,
47+
'items' => {
48+
'type' => 'object',
49+
'properties' => {
50+
'name' => {
51+
'label' => 'Name',
52+
'type' => 'string',
53+
},
54+
'quote' => {
55+
'label' => 'Quote Text',
56+
'type' => 'string',
57+
},
58+
'image_url' => {
59+
'label' => 'Image URL',
60+
'type' => 'string',
61+
}
62+
}
63+
}
64+
},
3865
'stories' => {
3966
'label' => 'Recent Articles',
4067
'type' => 'array',

app/views/beta/pages/coach_k.html.slim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,25 @@
1818
header.columns.small-12
1919
h2 Slideshow
2020
#slideshow-wrapper= render partial: 'beta/partials/section_page-slideshow', locals: {articles: slideshow_articles, pages: [], pages_first: true}
21+
- if @model.quotes_preface or @model.quotes
22+
.row
23+
.columns.small-12
24+
h3.section-title Quotes
25+
- if @model.quotes_preface
26+
.coachk
27+
.note== @model.quotes_preface
28+
ul.small-block-grid-2.medium-block-grid-3
29+
- if @model.quotes
30+
- @model.quotes.each do |quote|
31+
li
32+
.quote
33+
span(data-tooltip='' aria-haspopup="true" class="has-tip" title=quote['quote'])
34+
img(src=quote['image_url'] width=150 height=150)
35+
h4= quote['name']
36+
section.row
2137
.columns.small-12
2238
= render partial: 'beta/containers/article-list', locals: { title: "Recent", articles: @model.stories, style: :teaser}
39+
.row
2340
.columns.small-12.medium-6
2441
.column-inner
2542
a(href="https://twitter.com/#{@model.twitter}")

0 commit comments

Comments
 (0)