Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request nsf-open#239 from 18F/155-add-instagram-block
Browse files Browse the repository at this point in the history
Add Instagram block and refactor social media page
  • Loading branch information
fureigh committed Sep 25, 2018
2 parents 005dc14 + 9da82c9 commit 8d717ed
Show file tree
Hide file tree
Showing 11 changed files with 355 additions and 66 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"drupal/entity_embed": "^1.0@beta",
"drupal/features": "^3.5",
"drupal/inline_entity_form": "^1.0@beta",
"drupal/instagram_block": "^2.0",
"drupal/media_entity": "^1.7",
"drupal/pathauto": "^1.1",
"drupal/rules": "^3.0@alpha",
Expand Down
53 changes: 52 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ services:
"BRIGHTCOVE_ACCOUNT": "SECRET",
"BRIGHTCOVE_CLIENT": "SECRET",
"BRIGHTCOVE_SECRET": "SECRET",
"INSTAGRAM_ACCESS_TOKEN": "SECRET",
"CRON_KEY": "SECRET",
"HASH_SALT": "SECRET",
"ROOT_USER_NAME": "root",
Expand Down
1 change: 1 addition & 0 deletions manifest-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ default_config: &defaults
# "BRIGHTCOVE_ACCOUNT": ...
# "BRIGHTCOVE_CLIENT": ...
# "BRIGHTCOVE_SECRET": ...
# "INSTAGRAM_ACCESS_TOKEN": ...
# "CRON_KEY": ...
# "HASH_SALT": ...
# "ROOT_USER_NAME": ...,
Expand Down
1 change: 1 addition & 0 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ default_config: &defaults
# "BRIGHTCOVE_ACCOUNT": ...
# "BRIGHTCOVE_CLIENT": ...
# "BRIGHTCOVE_SECRET": ...
# "INSTAGRAM_ACCESS_TOKEN": ...
# "CRON_KEY": ...
# "HASH_SALT": ...
# "ROOT_USER_NAME": ...,
Expand Down
32 changes: 32 additions & 0 deletions web/sites/default/config/block.block.instagramblock.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
uuid: 4fe47205-ad99-41c4-b10e-a7303517f0b2
langcode: en
status: true
dependencies:
module:
- instagram_block
- system
theme:
- nsf
id: instagramblock
theme: nsf
region: content
weight: -5
provider: null
plugin: instagram_block_block
settings:
id: instagram_block_block
label: 'NSF on Instagram'
provider: instagram_block
label_display: visible
access_token: SECRET
count: 6
width: 250
height: 250
img_resolution: thumbnail
cache_time_minutes: 1440
visibility:
request_path:
id: request_path
pages: '<front>'
negate: false
context_mapping: { }
11 changes: 9 additions & 2 deletions web/sites/default/config/block.block.nsf_page_title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,26 @@ uuid: 1f8d24dc-a5d7-4f72-b183-4432efefea2b
langcode: en
status: true
dependencies:
module:
- system
theme:
- nsf
_core:
default_config_hash: 1TQP4b3ZnlzvIH9bj6cpCz_SyUHdJjLQkZnHpikjjhw
id: nsf_page_title
theme: nsf
region: content
weight: -5
weight: -8
provider: null
plugin: page_title_block
settings:
id: page_title_block
label: 'Page title'
provider: core
label_display: '0'
visibility: { }
visibility:
request_path:
id: request_path
pages: '<front>'
negate: true
context_mapping: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 12a04aa3-6f99-4beb-8dfc-59881beed555
langcode: en
status: true
dependencies:
config:
- views.view.nsf_blog
module:
- system
- views
theme:
- nsf
id: views_block__nsf_blog_block_1
theme: nsf
region: content
weight: -4
provider: null
plugin: 'views_block:nsf_blog-block_1'
settings:
id: 'views_block:nsf_blog-block_1'
label: ''
provider: views
label_display: visible
views_label: ''
items_per_page: none
visibility:
request_path:
id: request_path
pages: '<front>'
negate: false
context_mapping: { }
1 change: 1 addition & 0 deletions web/sites/default/config/core.extension.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ module:
image: 0
inline_entity_form: 0
inline_form_errors: 0
instagram_block: 0
link: 0
media_entity: 0
media_entity_brightcove: 0
Expand Down
137 changes: 74 additions & 63 deletions web/sites/default/config/views.view.nsf_blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ dependencies:
module:
- aggregator
id: nsf_blog
label: Blog
label: 'External blogs'
module: views
description: 'NSF custom view. Displays blog entries imported from external blog.'
description: 'NSF custom view. Displays blog entries imported from external sources.'
tag: ''
base_table: aggregator_item
base_field: iid
Expand Down Expand Up @@ -148,7 +148,20 @@ display:
plugin_id: date
title: 'NSF on Tumblr'
header: { }
footer: { }
footer:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
empty: false
tokenize: false
content:
value: '<a href="https://www.nsf.gov/social/policies.jsp">Social Media Policies</a>'
format: basic_html
plugin_id: text
empty: { }
relationships: { }
arguments: { }
Expand All @@ -162,26 +175,19 @@ display:
block_1:
display_plugin: block
id: block_1
display_title: Block
display_title: 'Tumblr block'
position: 3
display_options:
display_extenders: { }
style:
type: default
defaults:
style: false
row: false
pager: false
style: true
row: true
pager: true
fields: false
footer: true
row:
type: fields
pager:
type: some
options:
items_per_page: 5
offset: 0
block_description: 'Blog entries (all)'
filters: false
filter_groups: false
block_description: 'NSF on Tumblr'
fields:
title:
table: aggregator_item
Expand Down Expand Up @@ -314,6 +320,57 @@ display:
entity_type: aggregator_item
entity_field: timestamp
plugin_id: field
display_description: ''
block_category: 'Social Media'
filters:
fid:
id: fid
table: aggregator_item
field: fid
relationship: none
group_type: group
admin_label: ''
operator: '<='
value:
min: ''
max: ''
value: '2'
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
placeholder: ''
min_placeholder: ''
max_placeholder: ''
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
entity_type: aggregator_item
entity_field: fid
plugin_id: numeric
filter_groups:
operator: AND
groups:
1: AND
cache_metadata:
max-age: -1
contexts:
Expand All @@ -338,52 +395,6 @@ display:
path: blog.xml
displays:
default: default
page_1: page_1
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
tags: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
position: 1
display_options:
display_extenders: { }
path: blog
filters: { }
defaults:
filters: false
filter_groups: false
use_more: false
use_more_always: false
use_more_text: false
title: true
footer: false
filter_groups:
operator: AND
groups:
1: AND
enabled: true
use_more: false
use_more_always: false
use_more_text: more
footer:
area:
id: area
table: views
field: area
relationship: none
group_type: group
admin_label: ''
empty: false
tokenize: false
content:
value: '<a href="https://www.nsf.gov/social/policies.jsp">Social Media Policies</a>'
format: basic_html
plugin_id: text
cache_metadata:
max-age: -1
contexts:
Expand Down

0 comments on commit 8d717ed

Please sign in to comment.