@shift72/core-template 0.3.0 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -87,6 +87,17 @@
87
87
  }
88
88
  }
89
89
 
90
+ &.btn-social-letterboxd {
91
+ background-color: $letterboxd-color;
92
+ border-color: $letterboxd-color;
93
+
94
+ path {
95
+ fill: $body-bg;
96
+ stroke: $body-bg;
97
+ stroke-width: 1;
98
+ }
99
+ }
100
+
90
101
  &:hover,
91
102
  &:active,
92
103
  &:focus {
@@ -134,5 +145,15 @@
134
145
  color: $youtube-color;
135
146
  }
136
147
  }
148
+
149
+ &.btn-social-letterboxd {
150
+ background-color: $primary;
151
+ border-color: $primary;
152
+
153
+ path {
154
+ fill: $letterboxd-color;
155
+ stroke: $letterboxd-color;
156
+ }
157
+ }
137
158
  }
138
159
  }
@@ -104,8 +104,8 @@ $signup-background-hover: $button-background-hover !default;
104
104
 
105
105
  $signout-background: rgba($body-color, 0.1) !default;
106
106
  $signout-background-hover: rgba($body-color, 0.2) !default;
107
- $signout-text-color: $button-text-color !default;
108
- $signout-text-color-hover: $button-text-color-hover !default;
107
+ $signout-text-color: $body-color !default;
108
+ $signout-text-color-hover: $body-color !default;
109
109
 
110
110
  $link-color: $body-color !default;
111
111
 
@@ -143,6 +143,7 @@ $instagram-color: $body-color !default;
143
143
  $twitter-color: $body-color !default;
144
144
  $youtube-color: $body-color !default;
145
145
  $linkedin-color: $body-color !default;
146
+ $letterboxd-color: $body-color !default;
146
147
 
147
148
  // Meta Items
148
149
  // ------------------------------------
@@ -1,4 +1,4 @@
1
- {{block socialMediaButtons(path="", title="")}}
1
+ {{block socialMediaButtons(path="", title="", letterboxdID="")}}
2
2
  <div class="social-media-buttons">
3
3
  <div class="social-media-buttons-title">
4
4
  <h2>{{i18n("social_media_buttons_title")}}</h2>
@@ -13,6 +13,21 @@
13
13
  <a class="btn btn-social btn-social-linkedin" aria-label="{{i18n("wcag_aria_label_linkedin")}}" href="https://www.linkedin.com/shareArticle?mini=true&url={{site.SiteConfig.SiteURL + path | url}}&title={{title|url}}" target="_blank">
14
14
  <i class="fa fa-linkedin" title="Share on LinkedIn" aria-hidden="true"></i>
15
15
  </a>
16
+
17
+ {{if letterboxdID}}
18
+ <a class="btn btn-social btn-social-letterboxd" aria-label="{{i18n("wcag_aria_label_letterboxd")}}" href="https://boxd.it/{{letterboxdID}}" target="_blank">
19
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="28px" height="28px" viewBox="0 0 334.79999 128" version="1.1">
20
+ <title>{{i18n("wcag_aria_label_letterboxd")}}</title>
21
+ <g transform="matrix(1.3333333,0,0,-1.3333333,0,128)">
22
+ <g transform="scale(0.1)">
23
+ <path d="M 857.793,735.43 C 775.559,870.309 630.23,960 464.551,960 207.984,960 0,745.098 0,480 0,214.902 207.984,0 464.551,0 630.23,0 775.559,89.6914 857.793,224.574 812.684,298.559 786.488,386.098 786.488,480 c 0,93.906 26.196,181.441 71.305,255.43"/>
24
+ <path d="M 1648.76,728.125 C 1567.38,867.098 1419.72,960 1251.04,960 1085.36,960 940.031,870.309 857.793,735.43 902.902,661.441 929.102,573.906 929.102,480 c 0,-93.902 -26.2,-181.441 -71.309,-255.426 C 940.031,89.6914 1085.36,0 1251.04,0 c 168.68,0 316.34,92.9023 397.72,231.875 -42.4,72.41 -66.82,157.316 -66.82,248.125 0,90.809 24.42,175.719 66.82,248.125"/>
25
+ <path d="m 2046.49,960 c -168.68,0 -316.34,-92.902 -397.73,-231.875 42.41,-72.406 66.83,-157.316 66.83,-248.125 0,-90.809 -24.42,-175.715 -66.83,-248.125 C 1730.15,92.9023 1877.81,0 2046.49,0 c 256.56,0 464.55,214.902 464.55,480 0,265.098 -207.99,480 -464.55,480"/>
26
+ </g>
27
+ </g>
28
+ </svg>
29
+ </a>
30
+ {{end}}
16
31
  </div>
17
32
  </div>
18
33
  {{end}}
@@ -34,7 +34,7 @@
34
34
  </div>
35
35
  {{end}}
36
36
  <div class="meta-detail-content">
37
- <h1>{{ film.Title }} {{if film.ReleaseDate.Year() > 1}}<small>({{film.ReleaseDate.Year()}})</small>{{end}}</h1>
37
+ <h1>{{ film.Title }}</h1>
38
38
  <div class="meta-detail-tagline-and-classification">
39
39
  <div class="meta-detail-tagline">
40
40
  {{yield metaItemTagline() film}}
@@ -59,7 +59,7 @@
59
59
  <s72-modal-player src="{{film.Trailers[0].URL}}" class="s72-btn-trailer" data-slug="{{film.Slug}}" data-label="{{i18n("play_trailer")}}" autoplay="querystring"></s72-modal-player>
60
60
  {{end}}
61
61
  <s72-userwishlist-button data-slug="{{film.Slug}}" class="btn-wishlist"></s72-userwishlist-button>
62
- {{yield socialMediaButtons(path=currentUrlPath)}}
62
+ {{yield socialMediaButtons(path=currentUrlPath, letterboxdID=film.Refs.LetterboxdID)}}
63
63
  </div>
64
64
  <div class="meta-detail-cast">
65
65
  {{if len(film.Cast) > 0 }}
@@ -15,11 +15,7 @@
15
15
  <s72-userwishlist-button data-slug="{{item.Slug}}" class="btn-wishlist" data-layout="quick-button"></s72-userwishlist-button>
16
16
 
17
17
  <div class="meta-item-body featured-meta-item-body">
18
- <div class="meta-item-title">{{item.Title}}
19
- {{if isset(item.InnerItem["ReleaseDate"]) && item.InnerItem.ReleaseDate.Year() > 1}}
20
- <small>({{item.InnerItem.ReleaseDate.Year()}})</small>
21
- {{end}}
22
- </div>
18
+ <div class="meta-item-title">{{item.Title}}</div>
23
19
 
24
20
  <div class="meta-item-text">
25
21
  {{yield metaItemTagline() item.InnerItem}}
@@ -47,11 +47,7 @@
47
47
 
48
48
  {{ if !displayTitleAndGenreBelowPosters }}
49
49
  <div class="titles">
50
- <h4 title="{{item.Title}}">{{title|raw}}
51
- {{if isset(item.InnerItem["ReleaseDate"]) && item.InnerItem.ReleaseDate.Year() > 1}}
52
- <small>({{item.InnerItem.ReleaseDate.Year()}})</small>
53
- {{end}}
54
- </h4>
50
+ <h4 title="{{item.Title}}">{{title|raw}}</h4>
55
51
  <div class="strap">
56
52
  <s72-classification-label data-slug="{{item.Slug}}"></s72-classification-label>
57
53
  {{yield metaItemTagline(genres=true, genresLimit=genresLimit, classification=false) item.InnerItem}}
@@ -75,11 +71,7 @@
75
71
 
76
72
  {{if displayTitleAndGenreBelowPosters}}
77
73
  <div class="caption">
78
- <div class="title" title="{{item.Title}}">{{title|raw}}
79
- {{if isset(item.InnerItem["ReleaseDate"]) && item.InnerItem.ReleaseDate.Year() > 1}}
80
- <small>({{item.InnerItem.ReleaseDate.Year()}})</small>
81
- {{end}}
82
- </div>
74
+ <div class="title" title="{{item.Title}}">{{title|stripHTML}}</div>
83
75
  {{yield metaItemTagline(genres=true, genresLimit=genresLimit, classification=false) item.InnerItem}}
84
76
  </div>
85
77
  {{end}}
@@ -1,48 +1,90 @@
1
1
  {{block metaItemTagline(genres=true, genresLimit=-1, classification=true)}}
2
2
  <div class="meta-item-tagline">
3
- {{if classification==true}}
4
- <s72-classification-label data-slug="{{.Slug}}" data-layout="tooltip"></s72-classification-label>
5
- {{end}}
6
-
7
- {{if genres == true}}
8
- {{if isset(.Genres) && len(.Genres) > 0}}
9
- {{itemGenres := .Genres}}
10
- {{if genresLimit > -1 && len(itemGenres) > genresLimit}}
11
- {{itemGenres = itemGenres[:genresLimit]}}
12
- {{end}}
13
-
14
- {{if isset(itemGenres)}}
15
- <span class="meta-item-tagline-item">{{itemGenres}}</span>
16
- {{end}}
17
-
18
- {{if isset(.Runtime) || isset(.Episodes)}}
19
- <span class="meta-item-tagline-divider">•</span>
20
- {{end}}
3
+ {{itemGenres := makeSlice()}}
4
+ {{if genres}}
5
+ {{if isset(.Genres)}}
6
+ {{itemGenres = .Genres}}
7
+ {{else if isset(.ShowInfo) && isset(.ShowInfo.Genres)}}
8
+ {{itemGenres = .ShowInfo.Genres}}
21
9
  {{end}}
10
+ {{end}}
22
11
 
23
- {{if isset(.ShowInfo) && isset(.ShowInfo.Genres)}}
24
- <span class="meta-item-tagline-item">{{.ShowInfo.Genres}}</span>
12
+ {*{ Figure out how many dividers. }*}
13
+ {{dividers := 0}}
14
+ {{if genres && len(itemGenres) > 0}}
15
+ {{dividers = dividers + 1}}
16
+ {{end}}
17
+ {{if isset(.Runtime)}}
18
+ {{dividers = dividers + 1}}
19
+ {{end}}
20
+ {{if isset(.Items)}}
21
+ {{dividers = dividers + 1}}
22
+ {{end}}
23
+ {{if isset(.Episodes)}}
24
+ {{dividers = dividers + 1}}
25
+ {{end}}
26
+ {{if isset(.ReleaseDate) && .ReleaseDate.Year() > 1}}
27
+ {{dividers = dividers + 1}}
28
+ {{end}}
29
+ {*{ There should be one less dividers than tagline items. }*}
30
+ {{dividers = dividers - 1}}
31
+
32
+ {{if classification}}
33
+ <s72-classification-label data-slug="{{.Slug}}" data-layout="tooltip"></s72-classification-label>
34
+ {{end}}
25
35
 
26
- {{if isset(.Runtime) || isset(.Episodes)}}
27
- <span class="meta-item-tagline-divider">•</span>
28
- {{end}}
36
+ {{if genres && len(itemGenres) > 0}}
37
+ {{yield taglineItem() content}}
38
+ {{itemGenres}}
29
39
  {{end}}
40
+ {{yield taglineDivider(dividers=dividers)}}
41
+ {{dividers = dividers - 1}}
30
42
  {{end}}
31
43
 
32
44
  {{if isset(.Runtime)}}
33
- {{if .Runtime > 60}}
34
- <span class="meta-item-tagline-item">{{.Runtime.Hours()}}{{i18n("runtime_hours")}} {{.Runtime.Minutes()}}{{i18n("runtime_minutes")}}</span>
35
- {{else}}
36
- <span class="meta-item-tagline-item">{{.Runtime}}{{i18n("runtime_minutes")}}</span>
45
+ {{yield taglineItem() content}}
46
+ {{if .Runtime > 60}}
47
+ {{.Runtime.Hours()}}{{i18n("runtime_hours")}} {{.Runtime.Minutes()}}{{i18n("runtime_minutes")}}
48
+ {{else}}
49
+ {{.Runtime}}{{i18n("runtime_minutes")}}
50
+ {{end}}
37
51
  {{end}}
52
+ {{yield taglineDivider(dividers=dividers)}}
53
+ {{dividers = dividers - 1}}
38
54
  {{end}}
39
55
 
40
56
  {{if isset(.Items)}}
41
- <span class="meta-item-tagline-item">{{i18n("bundle_items_all_films", len(.Items))}}</span>
57
+ {{yield taglineItem() content}}
58
+ {{i18n("bundle_items_all_films", len(.Items))}}
59
+ {{end}}
60
+ {{yield taglineDivider(dividers=dividers)}}
61
+ {{dividers = dividers - 1}}
42
62
  {{end}}
43
63
 
44
64
  {{if isset(.Episodes)}}
45
- <span class="meta-item-tagline-item">{{i18n("episode_count", len(.Episodes))}}</span>
65
+ {{yield taglineItem() content}}
66
+ {{i18n("episode_count", len(.Episodes))}}
67
+ {{end}}
68
+ {{yield taglineDivider(dividers=dividers)}}
69
+ {{dividers = dividers - 1}}
70
+ {{end}}
71
+
72
+ {{if isset(.ReleaseDate) && .ReleaseDate.Year() > 1}}
73
+ {{yield taglineItem() content}}
74
+ {{.ReleaseDate.Year()}}
75
+ {{end}}
76
+ {{yield taglineDivider(dividers=dividers)}}
77
+ {{dividers = dividers - 1}}
46
78
  {{end}}
47
79
  </div>
48
80
  {{end}}
81
+
82
+ {{block taglineItem()}}
83
+ <span class="meta-item-tagline-item">{{yield content}}</span>
84
+ {{end}}
85
+
86
+ {{block taglineDivider(dividers)}}
87
+ {{if dividers > 0}}
88
+ <span class="meta-item-tagline-divider">•</span>
89
+ {{end}}
90
+ {{end}}
@@ -17,7 +17,8 @@
17
17
 
18
18
  {{block body()}}
19
19
  <h1 class="sr-only">{{i18n("wcag_homepage_h1")}}</h1>
20
- <main id="main" class="page page-{{page.PageType|lower}}">
20
+
21
+ <main id="main" class="page page-{{page.PageType|lower}} carousel-len-{{len(page.PageCollections[0].Items)}}">
21
22
  {{yield pageCollectionCarousel() page.PageCollections[0]}}
22
23
 
23
24
  <div class="other-sliders">