From 5724fffe5a7d18d2e13f483393dde258c9d50439 Mon Sep 17 00:00:00 2001 From: Steve Sutton Date: Fri, 16 Jan 2015 12:20:23 -0500 Subject: [PATCH] Add files from the CCEOEM theme --- footer.php | 22 +++++++ front-page.php | 43 +++++++++++++ functions.php | 153 ++++++++++++++++++++++++++++++++++++++++++++++ header.php | 76 +++++++++++++++++++++++ index.html | 163 ------------------------------------------------- index.php | 20 ++++++ page.php | 27 ++++++++ sidebar.php | 9 +++ style.css | 7 +++ 9 files changed, 357 insertions(+), 163 deletions(-) create mode 100755 footer.php create mode 100755 front-page.php create mode 100755 functions.php create mode 100755 header.php create mode 100755 index.php create mode 100755 page.php create mode 100755 sidebar.php create mode 100755 style.css diff --git a/footer.php b/footer.php new file mode 100755 index 0000000..790169c --- /dev/null +++ b/footer.php @@ -0,0 +1,22 @@ + + + + + +
+
+
+
+ +
+
+ + + + + + diff --git a/front-page.php b/front-page.php new file mode 100755 index 0000000..7bc151c --- /dev/null +++ b/front-page.php @@ -0,0 +1,43 @@ + +
+
+ +
+
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
+ +
+ + + +

+ +
+
+ +
+
+
+
+
+ \ No newline at end of file diff --git a/functions.php b/functions.php new file mode 100755 index 0000000..f27dec6 --- /dev/null +++ b/functions.php @@ -0,0 +1,153 @@ + __('Left Sidebar'), + 'id' => 'sidebar-l', + 'description' => __('Appears in Left Sidebar') + )); + register_sidebar(array( + 'name' => __('Footer'), + 'id' => 'sidebar-f', + 'description' => __('Appears in Footer Area') + )); + } + +} + +/** + * glm_page_menu + * + * Grab the top level pages and their sub pages as the main navigation + */ +function glm_page_menu($parent = 0, $class = '') +{ + $frontPageId = get_option('page_on_front'); + $parents = array(); + $pages = get_pages(array( + 'post_type' => 'page', + 'parent' => $parent, + 'number' => '', + 'exclude' => $frontPageId, + 'post_status' => 'publish', + 'sort_order' => 'asc', + 'sort_column' => 'menu_order' + )); + echo ''."\n"; + foreach ($pages as $page) { + $childs = get_pages('child_of=' . $page->ID); + if (count($childs) > 0) { + echo '
  • '."\n"; + echo ''.$page->post_title.''."\n"; + echo glm_page_menu($page->ID, 'sub-menu dropdown'); + echo '
  • '."\n"; + } else { + echo '
  • '.$page->post_title.'
  • '."\n"; + } + } + echo ''."\n"; +} + + +function SearchFilter($query) { + if(isset($_GET['searchType'])) { + $searchType = $_GET['searchType']; + if ($searchType == 'blog' && !is_admin()) { + $query->set('post_type', 'post'); + } + } + return $query; +} +add_filter('pre_get_posts','SearchFilter'); + +/** + * glm_offcanvas_menu + * + * Generate the list of pages as nested ul li list + */ +function glm_offcanvas_menu() +{ + wp_page_menu(array( + 'depth' => 0, + 'sort_column' => 'menu_order', + 'menu_class' => 'left-off-canvas-list' + )); +} + +add_theme_support('post-thumbnails'); +set_post_thumbnail_size(120, 100, true); +/** + * cceoem_scripts + * + * Add the scripts that we'll need for any home page stuff + */ +function cceoem_scripts() +{ + wp_enqueue_script( + 'modernizr', + get_template_directory_uri() . '/js/vendor/modernizr.js' + ); + wp_enqueue_script( + 'jquery', + get_template_directory_uri() . '/js/vendor/jquery.js' + ); + wp_enqueue_script( + 'dollarsign', + get_template_directory_uri() . '/js/dollarsign.js' + ); + wp_enqueue_script( + 'foundation', + get_template_directory_uri() . '/js/foundation.min.js', + 'jquery', + '1.0', + true + ); + wp_enqueue_script( + 'pageSetup', + get_template_directory_uri() . '/js/pageSetup.js', + 'foundation', + '1.0', + true + ); + if(is_front_page()) { + wp_enqueue_script( + 'glm_google_map_code', + 'http://maps.google.com/maps/api/js?sensor=false', + 'jquery', + '1', + true + ); + wp_enqueue_script( + 'glm_google_map', + get_template_directory_uri() . '/js/google-map.js', + 'jquery', + '1', + true + ); + } + +} +/** + * Output the div for the google map + * + * @param type $w Width of the div + * @param type $h Height of the div + * + * @return type + */ +function glm_google_map($w = '500px', $h = '200px') +{ + $format = '
    Loading...
    '; + return sprintf($format, $w, $h); +} +add_action('wp_enqueue_scripts', 'cceoem_scripts'); +?> \ No newline at end of file diff --git a/header.php b/header.php new file mode 100755 index 0000000..6b7430a --- /dev/null +++ b/header.php @@ -0,0 +1,76 @@ + + + + + + <?php wp_title(); ?> + + + + + + +
    +
    + + +
    +
    +
    +
    + +
    +

    + Charlevoix - Cheboygan - Emmet
    Tri-County
    Office of Emergency Management +

    +
    +
    +
    +
    + +
    +
    +
    +

    855-515-1624

    +
    +
    +

    Contact

    +
    +
    + +
    + +
    + +
    +
    +
    +
    + +
    +
    + +
    + + +
    + \ No newline at end of file diff --git a/index.html b/index.html index 5ac0b5e..e69de29 100644 --- a/index.html +++ b/index.html @@ -1,163 +0,0 @@ - - - - - - Foundation - - - - -
    -
    -

    Welcome to Foundation

    -
    -
    - -
    -
    -
    -

    We’re stoked you want to try Foundation!

    -

    To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.

    -

    Once you've exhausted the fun in this document, you should check out:

    -
    -
    -

    Foundation Documentation
    Everything you need to know about using the framework.

    -
    -
    -

    Foundation on Github
    Latest code, issue reports, feature requests and more.

    -
    -
    -

    @foundationzurb
    Ping us on Twitter if you have questions. If you build something with this we'd love to see it (and send you a totally boss sticker).

    -
    -
    -
    -
    -
    - -
    -
    -
    Here’s your basic grid:
    - - -
    -
    -
    -

    This is a twelve column section in a row. Each of these includes a div.panel element so you can see where the columns are - it's not required at all for the grid.

    -
    -
    -
    -
    -
    -
    -

    Six columns

    -
    -
    -
    -
    -

    Six columns

    -
    -
    -
    -
    -
    -
    -

    Four columns

    -
    -
    -
    -
    -

    Four columns

    -
    -
    -
    -
    -

    Four columns

    -
    -
    -
    - -
    - -
    We bet you’ll need a form somewhere:
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    - - -
    -
    -
    - -
    - -
    -
    - .com -
    -
    -
    -
    -
    -
    - - -
    -
    -
    -
    - - - -
    -
    - - - -
    -
    -
    -
    - - -
    -
    -
    -
    - -
    -
    Try one of these buttons:
    -

    Simple Button
    - Radius Button
    - Round Button
    - Success Btn
    - Alert Btn
    - Secondary Btn

    -
    -
    So many components, girl!
    -

    A whole kitchen sink of goodies comes with Foundation. Check out the docs to see them all, along with details on making them your own.

    - Go to Foundation Docs -
    -
    -
    - - - - - - diff --git a/index.php b/index.php new file mode 100755 index 0000000..ca4347c --- /dev/null +++ b/index.php @@ -0,0 +1,20 @@ + + + diff --git a/page.php b/page.php new file mode 100755 index 0000000..50e1ac8 --- /dev/null +++ b/page.php @@ -0,0 +1,27 @@ + +
    +
    +
    +
    +
    + +
    +
    +
    +
    + +
    + + + +

    + +
    +
    + +
    +
    +
    +
    +
    + \ No newline at end of file diff --git a/sidebar.php b/sidebar.php new file mode 100755 index 0000000..ed13863 --- /dev/null +++ b/sidebar.php @@ -0,0 +1,9 @@ + + diff --git a/style.css b/style.css new file mode 100755 index 0000000..5d866b4 --- /dev/null +++ b/style.css @@ -0,0 +1,7 @@ +/* +Theme Name: QuickSite +Author: Gaslight Media +Author URI: http://www.gaslightmedia.com +Description: A theme created for QuickSites +Version: 1.0 +*/ -- 2.17.1