Przeglądaj źródła

hero overlay post.title settings for non-list pages

tags/0.9.0
Alej 4 lat temu
rodzic
commit
878dcf3a1f
1 zmienionych plików z 9 dodań i 5 usunięć
  1. 9
    5
      vue-theme/src/pages/mixin-post-types.js

+ 9
- 5
vue-theme/src/pages/mixin-post-types.js Wyświetl plik

55
             }
55
             }
56
             // No featured or youTube
56
             // No featured or youTube
57
             if (!json.url) { json.heroType = null }
57
             if (!json.url) { json.heroType = null }
58
+
58
             // Uncomment to set the hero text to the post title or excerpt
59
             // Uncomment to set the hero text to the post title or excerpt
59
             // json.text = post && post.excerpt ? post.excerpt : post.title
60
             // json.text = post && post.excerpt ? post.excerpt : post.title
60
             // json.text = post.title
61
             // json.text = post.title
61
             json.text = post && post.content ? post.content : post.title
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
             return json
73
             return json
70
         },
74
         },

Ładowanie…
Anuluj
Zapisz