This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnucivic_data_hopscotch.module
66 lines (55 loc) · 1.72 KB
/
nucivic_data_hopscotch.module
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* @file
* Adds hopscotch demo to dkan.
*/
/**
* Implements hook_page_build().
*/
function nucivic_data_hopscotch_page_build() {
drupal_add_js(drupal_get_path('module', 'nucivic_data_hopscotch') . '/hopscotch/dist/js/hopscotch.js');
drupal_add_js(drupal_get_path('module', 'nucivic_data_hopscotch') . '/nucivic_data_hopscotch.js');
drupal_add_css(drupal_get_path('module', 'nucivic_data_hopscotch') . '/hopscotch/dist/css/hopscotch.css');
drupal_add_css(drupal_get_path('module', 'nucivic_data_hopscotch') . '/nucivic_data_hopscotch.css');
}
/**
* Implements hook_block_info().
*/
function nucivic_data_hopscotch_block_info() {
$blocks['nucivic_data_hopscotch_one'] = array(
'info' => t('NuCivic Hopscoth Uno'),
'cache' => DRUPAL_CACHE_PER_PAGE,
);
return $blocks;
}
/**
* Implements hook_block_view().
*/
function nucivic_data_hopscotch_block_view($delta) {
$block = array();
switch ($delta) {
case 'nucivic_data_hopscotch_one':
$block['subject'] = '';
$block['content'] = array(
'#markup' => nucivic_data_hopscotch_content(),
'#attached' => array(
'css' => array(
drupal_get_path('module', 'nucivic_data_hopscotch') . '/hopscotch/dist/css/hopscotch.css',
drupal_get_path('module', 'nucivic_data_hopscotch') . '/nucivic_data_hopscotch.css',
),
'js' => array(
drupal_get_path('module', 'nucivic_data_hopscotch') . '/hopscotch/dist/js/hopscotch.js',
drupal_get_path('module', 'nucivic_data_hopscotch') . '/nucivic_data_hopscotch.js',
),
),
);
break;
}
return $block;
}
/**
* Embeds hopscotch ride.
*/
function nucivic_data_hopscotch_content() {
return '';
}