Kaynağa Gözat

hero overlay post.title settings for non-list pages

tags/0.9.0
Alej 4 yıl önce
ebeveyn
işleme
878dcf3a1f
1 değiştirilmiş dosya ile 9 ekleme ve 5 silme
  1. 9
    5
      vue-theme/src/pages/mixin-post-types.js

+ 9
- 5
vue-theme/src/pages/mixin-post-types.js Dosyayı Görüntüle

@@ -55,16 +55,20 @@ const heroUtils = {
55 55
             }
56 56
             // No featured or youTube
57 57
             if (!json.url) { json.heroType = null }
58
+
58 59
             // Uncomment to set the hero text to the post title or excerpt
59 60
             // json.text = post && post.excerpt ? post.excerpt : post.title
60 61
             // json.text = post.title
61 62
             json.text = post && post.content ? post.content : post.title
62 63
             
63
-            if (post.type === 'page' && post.slug === 'center', 'about', 'board', 'mission', 'staff', 'contact' ) {
64
-                json.text = post.title
65
-            }
66
-
67
-
64
+            // hero title for non-list pages: center, about etc - needs a better method
65
+            if (post.type === 'page' && post.slug === 'center' ) { json.text = post.title }
66
+            if (post.type === 'page' && post.slug === 'about' ) { json.text = post.title }
67
+            if (post.type === 'page' && post.slug === 'contact' ) { json.text = post.title }
68
+            if (post.type === 'page' && post.slug === 'mission' ) { json.text = post.title }
69
+            if (post.type === 'page' && post.slug === 'staff' ) { json.text = post.title }
70
+            if (post.type === 'page' && post.slug === 'board' ) { json.text = post.title }
71
+            if (post.type === 'page' && post.slug === 'join-our-mailing-list' ) { json.text = post.title }
68 72
 
69 73
             return json
70 74
         },

Loading…
İptal
Kaydet