diff --git a/README.md b/README.md new file mode 100644 index 0000000..cfd8c6e --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +#[Stanford Jumpstart Homepage](https://github.com/SU-SWS/stanford_jumpstart_home) +##### Version: 7.x-1.0 + +Maintainers: [jbickar](https://github.com/jbickar), [sherakama](https://github.com/sherakama) + +The Stanford Homepage module provides custom homepage layouts functionality for [Stanford Jumpstart Sites](https://github.com/SU-SWS/stanford_sites_jumpstart). It has a collection of context layouts and blocks that can be quickly toggled on and off through a custom dashboard UI. + + +Layouts +--- + +**Superhero - Batman** +Description of layout goes here... + +**Sunset Delorean** +Description of layout goes here... + +**Koda Chrome** +Description of layout goes here... + +**Magazine - Glossy** +Description of layout goes here... + + +Installation +--- + +Install this module like any other module. [See Drupal Documentation](https://drupal.org/documentation/install/modules-themes/modules-7) + +Configuration +--- + +Nothing special needed. + +Troubleshooting +--- + +If you are experiencing issues with this module try reverting the feature first. If you are still experiencing issues try posting an issue on the GitHub issues page. + +Contribution / Collaboration +--- + +You are welcome to contribute functionality, bug fixes, or documentation to this module. If you would like to suggest a fix or new functionality you may add a new issue to the GitHub issue queue or you may fork this repository and submit a pull request. For more help please see [GitHub's article on fork, branch, and pull requests](https://help.github.com/articles/using-pull-requests) diff --git a/css/.gitkeep b/css/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/js/.gitkeep b/js/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/layouts/test_context_one.inc b/layouts/test_context_one.inc new file mode 100644 index 0000000..35c3cc7 --- /dev/null +++ b/layouts/test_context_one.inc @@ -0,0 +1,29 @@ +disabled = FALSE; /* Edit this to true to make a default context disabled initially */ +$context->api_version = 3; +$context->name = 'test_context_one'; +$context->description = 'test'; +$context->tag = 'Test Contexts'; +$context->conditions = array( + 'sitewide' => array( + 'values' => array( + 1 => 1, + ), + ), +); +$context->reactions = array( + 'debug' => array( + 'debug' => 1, + ), +); +$context->condition_mode = 0; + +// Translatables +// Included for use with string extractors like potx. +t('Test Contexts'); +t('test'); diff --git a/layouts/test_context_three.inc b/layouts/test_context_three.inc new file mode 100644 index 0000000..57ec692 --- /dev/null +++ b/layouts/test_context_three.inc @@ -0,0 +1,29 @@ +disabled = FALSE; /* Edit this to true to make a default context disabled initially */ +$context->api_version = 3; +$context->name = 'test_context_three'; +$context->description = 'test'; +$context->tag = 'Test Contexts'; +$context->conditions = array( + 'sitewide' => array( + 'values' => array( + 1 => 1, + ), + ), +); +$context->reactions = array( + 'debug' => array( + 'debug' => 1, + ), +); +$context->condition_mode = 0; + +// Translatables +// Included for use with string extractors like potx. +t('Test Contexts'); +t('test'); diff --git a/layouts/test_context_two.inc b/layouts/test_context_two.inc new file mode 100644 index 0000000..9cb53e1 --- /dev/null +++ b/layouts/test_context_two.inc @@ -0,0 +1,29 @@ +disabled = FALSE; /* Edit this to true to make a default context disabled initially */ +$context->api_version = 3; +$context->name = 'test_context_two'; +$context->description = 'test'; +$context->tag = 'Test Contexts'; +$context->conditions = array( + 'sitewide' => array( + 'values' => array( + 1 => 1, + ), + ), +); +$context->reactions = array( + 'debug' => array( + 'debug' => 1, + ), +); +$context->condition_mode = 0; + +// Translatables +// Included for use with string extractors like potx. +t('Test Contexts'); +t('test'); diff --git a/stanford_jumpstart_home.info b/stanford_jumpstart_home.info new file mode 100644 index 0000000..1a88f28 --- /dev/null +++ b/stanford_jumpstart_home.info @@ -0,0 +1,11 @@ +name = Stanford Jumpstart Homepage +description = Provides several layout options for the home page on Jumpstart sites. +core = 7.x +package = Stanford Sites Jumpstart +version = 7.x-1.0 +project = stanford_jumpstart_home +project status url = https://github.com/SU-SWS/stanford_jumpstart_home +# stylesheets[all][] = css/stanford_jumpstart_home.css +# scripts[] = js/stanford_jumpstart_home.js + +dependencies[] = context diff --git a/stanford_jumpstart_home.install b/stanford_jumpstart_home.install new file mode 100644 index 0000000..0c29028 --- /dev/null +++ b/stanford_jumpstart_home.install @@ -0,0 +1,30 @@ + + * Installation tasks. + */ + +/** + * Implements hook_install(). + */ +function stanford_jumpstart_home_install() { +} + +/** + * Implements hook_enable(). + */ +function stanford_jumpstart_home_enable() { +} + +/** + * Implements hook_disable(). + */ +function stanford_jumpstart_home_disable() { +} + +/** + * Implements hook_uninstall(). + */ +function stanford_jumpstart_home_uninstall() { +} diff --git a/stanford_jumpstart_home.module b/stanford_jumpstart_home.module new file mode 100644 index 0000000..fd48bb1 --- /dev/null +++ b/stanford_jumpstart_home.module @@ -0,0 +1,73 @@ + + * Provides the ability to offer several layouts on the home page via context. + * Provides a dashboard administrative page to toggle through those layouts + * + */ + +/** + * Implements hook_help(). + */ +function stanford_jumpstart_home_help($path, $arg) { + switch ($path) { + // Main module help for the block module + /* + *case 'admin/help#block': + * return '
' . t('Blocks are boxes of content rendered into an area, or region, of a web page. The default theme Bartik, for example, implements the regions "Sidebar first", "Sidebar second", "Featured", "Content", "Header", "Footer", etc., and a block may appear in any one of these areas. The blocks administration page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions.', array('@blocks' => url('admin/structure/block'))) . '
'; + */ + case 'admin/stanford-jumpstart-home': + return '' . t('For more help please contact %sws', array('%sws' => l('Stanford Web Services', 'mailto:sitesjumpstart-help@lists.stanford.edu'))) . '
'; + } +} + +/** + * Implements hook_permission(). + */ +function stanford_jumpstart_home_permission() { + return array( + /* + *'administer my module' => array( + * 'title' => t('Administer my module'), + * 'description' => t('Perform administration tasks for my module.'), + *), + */ + 'administer stanford homepage' => array( + 'title' => t('Administer Stanford Homepage'), + 'description' => t('Allow user to change and modify the homepage settings'), + ), + ); +} + +/** + * Implements hook_menu(). + */ +function stanford_jumpstart_home_menu() { + /* + *$items['blog'] = array( + * 'title' => 'blogs', + * 'page callback' => 'blog_page', + * 'access arguments' => array('access content'), + * 'type' => MENU_SUGGESTED_ITEM, + *); + */ + $items['admin/config/stanford/homepage'] = array( + 'title' => 'Homepage Dashboard', + 'page callback' => 'stanford_jumpstart_home_dashboard', + 'access arguments' => array('administer stanford homepage'), + 'type' => MENU_NORMAL_ITEM, + ); + + return $items; +} + +/** + * The dashboard functionality for the home page. + * @return [type] [description] + */ +function stanford_jumpstart_home_dashboard() { + $output = "Please create this functionality
"; + + return $output; +}