Skip to content

Commit 8d717ed

Browse files
authored
Merge pull request #239 from 18F/155-add-instagram-block
Add Instagram block and refactor social media page
2 parents 005dc14 + 9da82c9 commit 8d717ed

11 files changed

+355
-66
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"drupal/entity_embed": "^1.0@beta",
3434
"drupal/features": "^3.5",
3535
"drupal/inline_entity_form": "^1.0@beta",
36+
"drupal/instagram_block": "^2.0",
3637
"drupal/media_entity": "^1.7",
3738
"drupal/pathauto": "^1.1",
3839
"drupal/rules": "^3.0@alpha",

composer.lock

Lines changed: 52 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ services:
3636
"BRIGHTCOVE_ACCOUNT": "SECRET",
3737
"BRIGHTCOVE_CLIENT": "SECRET",
3838
"BRIGHTCOVE_SECRET": "SECRET",
39+
"INSTAGRAM_ACCESS_TOKEN": "SECRET",
3940
"CRON_KEY": "SECRET",
4041
"HASH_SALT": "SECRET",
4142
"ROOT_USER_NAME": "root",

manifest-prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ default_config: &defaults
99
# "BRIGHTCOVE_ACCOUNT": ...
1010
# "BRIGHTCOVE_CLIENT": ...
1111
# "BRIGHTCOVE_SECRET": ...
12+
# "INSTAGRAM_ACCESS_TOKEN": ...
1213
# "CRON_KEY": ...
1314
# "HASH_SALT": ...
1415
# "ROOT_USER_NAME": ...,

manifest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ default_config: &defaults
99
# "BRIGHTCOVE_ACCOUNT": ...
1010
# "BRIGHTCOVE_CLIENT": ...
1111
# "BRIGHTCOVE_SECRET": ...
12+
# "INSTAGRAM_ACCESS_TOKEN": ...
1213
# "CRON_KEY": ...
1314
# "HASH_SALT": ...
1415
# "ROOT_USER_NAME": ...,
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
uuid: 4fe47205-ad99-41c4-b10e-a7303517f0b2
2+
langcode: en
3+
status: true
4+
dependencies:
5+
module:
6+
- instagram_block
7+
- system
8+
theme:
9+
- nsf
10+
id: instagramblock
11+
theme: nsf
12+
region: content
13+
weight: -5
14+
provider: null
15+
plugin: instagram_block_block
16+
settings:
17+
id: instagram_block_block
18+
label: 'NSF on Instagram'
19+
provider: instagram_block
20+
label_display: visible
21+
access_token: SECRET
22+
count: 6
23+
width: 250
24+
height: 250
25+
img_resolution: thumbnail
26+
cache_time_minutes: 1440
27+
visibility:
28+
request_path:
29+
id: request_path
30+
pages: '<front>'
31+
negate: false
32+
context_mapping: { }

web/sites/default/config/block.block.nsf_page_title.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,26 @@ uuid: 1f8d24dc-a5d7-4f72-b183-4432efefea2b
22
langcode: en
33
status: true
44
dependencies:
5+
module:
6+
- system
57
theme:
68
- nsf
79
_core:
810
default_config_hash: 1TQP4b3ZnlzvIH9bj6cpCz_SyUHdJjLQkZnHpikjjhw
911
id: nsf_page_title
1012
theme: nsf
1113
region: content
12-
weight: -5
14+
weight: -8
1315
provider: null
1416
plugin: page_title_block
1517
settings:
1618
id: page_title_block
1719
label: 'Page title'
1820
provider: core
1921
label_display: '0'
20-
visibility: { }
22+
visibility:
23+
request_path:
24+
id: request_path
25+
pages: '<front>'
26+
negate: true
27+
context_mapping: { }
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
uuid: 12a04aa3-6f99-4beb-8dfc-59881beed555
2+
langcode: en
3+
status: true
4+
dependencies:
5+
config:
6+
- views.view.nsf_blog
7+
module:
8+
- system
9+
- views
10+
theme:
11+
- nsf
12+
id: views_block__nsf_blog_block_1
13+
theme: nsf
14+
region: content
15+
weight: -4
16+
provider: null
17+
plugin: 'views_block:nsf_blog-block_1'
18+
settings:
19+
id: 'views_block:nsf_blog-block_1'
20+
label: ''
21+
provider: views
22+
label_display: visible
23+
views_label: ''
24+
items_per_page: none
25+
visibility:
26+
request_path:
27+
id: request_path
28+
pages: '<front>'
29+
negate: false
30+
context_mapping: { }

web/sites/default/config/core.extension.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ module:
4141
image: 0
4242
inline_entity_form: 0
4343
inline_form_errors: 0
44+
instagram_block: 0
4445
link: 0
4546
media_entity: 0
4647
media_entity_brightcove: 0

web/sites/default/config/views.view.nsf_blog.yml

Lines changed: 74 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ dependencies:
55
module:
66
- aggregator
77
id: nsf_blog
8-
label: Blog
8+
label: 'External blogs'
99
module: views
10-
description: 'NSF custom view. Displays blog entries imported from external blog.'
10+
description: 'NSF custom view. Displays blog entries imported from external sources.'
1111
tag: ''
1212
base_table: aggregator_item
1313
base_field: iid
@@ -148,7 +148,20 @@ display:
148148
plugin_id: date
149149
title: 'NSF on Tumblr'
150150
header: { }
151-
footer: { }
151+
footer:
152+
area:
153+
id: area
154+
table: views
155+
field: area
156+
relationship: none
157+
group_type: group
158+
admin_label: ''
159+
empty: false
160+
tokenize: false
161+
content:
162+
value: '<a href="https://www.nsf.gov/social/policies.jsp">Social Media Policies</a>'
163+
format: basic_html
164+
plugin_id: text
152165
empty: { }
153166
relationships: { }
154167
arguments: { }
@@ -162,26 +175,19 @@ display:
162175
block_1:
163176
display_plugin: block
164177
id: block_1
165-
display_title: Block
178+
display_title: 'Tumblr block'
166179
position: 3
167180
display_options:
168181
display_extenders: { }
169-
style:
170-
type: default
171182
defaults:
172-
style: false
173-
row: false
174-
pager: false
183+
style: true
184+
row: true
185+
pager: true
175186
fields: false
176187
footer: true
177-
row:
178-
type: fields
179-
pager:
180-
type: some
181-
options:
182-
items_per_page: 5
183-
offset: 0
184-
block_description: 'Blog entries (all)'
188+
filters: false
189+
filter_groups: false
190+
block_description: 'NSF on Tumblr'
185191
fields:
186192
title:
187193
table: aggregator_item
@@ -314,6 +320,57 @@ display:
314320
entity_type: aggregator_item
315321
entity_field: timestamp
316322
plugin_id: field
323+
display_description: ''
324+
block_category: 'Social Media'
325+
filters:
326+
fid:
327+
id: fid
328+
table: aggregator_item
329+
field: fid
330+
relationship: none
331+
group_type: group
332+
admin_label: ''
333+
operator: '<='
334+
value:
335+
min: ''
336+
max: ''
337+
value: '2'
338+
group: 1
339+
exposed: false
340+
expose:
341+
operator_id: ''
342+
label: ''
343+
description: ''
344+
use_operator: false
345+
operator: ''
346+
identifier: ''
347+
required: false
348+
remember: false
349+
multiple: false
350+
remember_roles:
351+
authenticated: authenticated
352+
placeholder: ''
353+
min_placeholder: ''
354+
max_placeholder: ''
355+
is_grouped: false
356+
group_info:
357+
label: ''
358+
description: ''
359+
identifier: ''
360+
optional: true
361+
widget: select
362+
multiple: false
363+
remember: false
364+
default_group: All
365+
default_group_multiple: { }
366+
group_items: { }
367+
entity_type: aggregator_item
368+
entity_field: fid
369+
plugin_id: numeric
370+
filter_groups:
371+
operator: AND
372+
groups:
373+
1: AND
317374
cache_metadata:
318375
max-age: -1
319376
contexts:
@@ -338,52 +395,6 @@ display:
338395
path: blog.xml
339396
displays:
340397
default: default
341-
page_1: page_1
342-
cache_metadata:
343-
max-age: -1
344-
contexts:
345-
- 'languages:language_content'
346-
- 'languages:language_interface'
347-
tags: { }
348-
page_1:
349-
display_plugin: page
350-
id: page_1
351-
display_title: Page
352-
position: 1
353-
display_options:
354-
display_extenders: { }
355-
path: blog
356-
filters: { }
357-
defaults:
358-
filters: false
359-
filter_groups: false
360-
use_more: false
361-
use_more_always: false
362-
use_more_text: false
363-
title: true
364-
footer: false
365-
filter_groups:
366-
operator: AND
367-
groups:
368-
1: AND
369-
enabled: true
370-
use_more: false
371-
use_more_always: false
372-
use_more_text: more
373-
footer:
374-
area:
375-
id: area
376-
table: views
377-
field: area
378-
relationship: none
379-
group_type: group
380-
admin_label: ''
381-
empty: false
382-
tokenize: false
383-
content:
384-
value: '<a href="https://www.nsf.gov/social/policies.jsp">Social Media Policies</a>'
385-
format: basic_html
386-
plugin_id: text
387398
cache_metadata:
388399
max-age: -1
389400
contexts:

0 commit comments

Comments
 (0)