├── .gitignore ├── favicon.ico ├── images ├── menu.png ├── ascent-logo.png ├── Clouds-Color0.jpg ├── ascent-logo-wm.png └── ascent-logo-full.png ├── scss ├── .sass-cache │ └── d53221c15f636401557856ca9354a00229c0afbe │ │ └── asc.scssc ├── asc.css.map ├── asc.scss └── asc.css ├── style.css ├── parts ├── after-binder.php ├── headers.php ├── archive-layout-university-center.php ├── single-layout-university-center.php ├── before-binder.php └── single-layout-wsuwp_uc_person.php ├── gruntfile.js ├── js ├── cu.js ├── admin.js └── jQuery.videobg.js ├── taxonomy-wsuwp_uc_topics.php ├── category-notice-of-funding-opportunity.php ├── articles ├── post-wsuwp_uc_entity.php ├── post-wsuwp_uc_publication.php ├── post-notice-of-funding-opportunity.php ├── post-wsuwp_uc_person.php └── post-wsuwp_uc_project.php ├── single.php ├── functions.php ├── custom.js └── includes ├── plugin-swwrc-video.php └── ascent-uc-project.php /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .sass-cache -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/favicon.ico -------------------------------------------------------------------------------- /images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/images/menu.png -------------------------------------------------------------------------------- /images/ascent-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/images/ascent-logo.png -------------------------------------------------------------------------------- /images/Clouds-Color0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/images/Clouds-Color0.jpg -------------------------------------------------------------------------------- /images/ascent-logo-wm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/images/ascent-logo-wm.png -------------------------------------------------------------------------------- /images/ascent-logo-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/images/ascent-logo-full.png -------------------------------------------------------------------------------- /scss/.sass-cache/d53221c15f636401557856ca9354a00229c0afbe/asc.scssc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/washingtonstateuniversity/Ascent-Theme/master/scss/.sass-cache/d53221c15f636401557856ca9354a00229c0afbe/asc.scssc -------------------------------------------------------------------------------- /style.css: -------------------------------------------------------------------------------- 1 | /* 2 | Theme Name: Ascent - Aviation Sustainability Center 3 | Theme URI: https://web.wsu.edu/ 4 | Author: WSU University Communications 5 | Author URI: https://web.wsu.edu/ 6 | Description: A child theme of the WSU Web Communications Spine template. 7 | Template: spine 8 | Version: 0.12.3 9 | License: GPLv2 or later 10 | License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 | */ 12 | -------------------------------------------------------------------------------- /parts/after-binder.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | grunt.initConfig({ 3 | pkg: grunt.file.readJSON('package.json'), 4 | sass: { 5 | dist: { 6 | files: { 7 | 'style/asc.css' : 'sass/asc.scss' 8 | } 9 | } 10 | }, 11 | watch: { 12 | css: { 13 | files: '.css/.scss', 14 | tasks: ['sass'] 15 | } 16 | } 17 | }); 18 | grunt.loadNpmTasks('grunt-contrib-sass'); 19 | grunt.loadNpmTasks('grunt-contrib-watch'); 20 | grunt.registerTask('default',['watch']); 21 | }; -------------------------------------------------------------------------------- /js/cu.js: -------------------------------------------------------------------------------- 1 | WebFontConfig = { 2 | google: { families: [ 'Roboto:400,400italic,500,500italic,700,300,300italic:latin' ] } 3 | }; 4 | (function() { 5 | var wf = document.createElement('script'); 6 | wf.src = ('https:' == document.location.protocol ? 'https' : 'http') + 7 | '://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; 8 | wf.type = 'text/javascript'; 9 | wf.async = 'true'; 10 | var s = document.getElementsByTagName('script')[0]; 11 | s.parentNode.insertBefore(wf, s); 12 | 13 | })(); -------------------------------------------------------------------------------- /js/admin.js: -------------------------------------------------------------------------------- 1 | (function($,window){ 2 | $(document).ready(function(){ 3 | if ( 0 !== $('#ascent-assign-advisors').length) { 4 | window.wsuwp_uc_autocomplete_object( 'faa_advisors' ); 5 | $('#faa_advisors-results').on('click', '.uc-object-close','faa_advisors',window.wsuwp_uc_remove_object); 6 | } 7 | if ( 0 !== $('#ascent-assign-project-leads').length) { 8 | window.wsuwp_uc_autocomplete_object( 'project_leads' ); 9 | $('#project_leads-results').on('click', '.uc-object-close','project_leads',window.wsuwp_uc_remove_object); 10 | } 11 | }); 12 | }(jQuery,window)); -------------------------------------------------------------------------------- /taxonomy-wsuwp_uc_topics.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 |
8 |
9 |
10 |

11 |
12 |
13 | 14 | 15 | 16 | 17 | 18 |
19 |
20 |
21 | 22 | 2 | 3 |
4 | 5 |
6 |

Ascent Funding Opportunities

7 |
8 | 9 | 10 | 11 |
12 |
13 |
14 |

Notice of Funding Opportunity

15 | 16 |
17 | 18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 | 20 |
21 |

Ascent

22 |
23 | 2 | 16 |
17 |
18 |
19 |

20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 |
-------------------------------------------------------------------------------- /parts/single-layout-university-center.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 18 | 19 |
20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
-------------------------------------------------------------------------------- /articles/post-wsuwp_uc_entity.php: -------------------------------------------------------------------------------- 1 |
> 2 | 3 |
post_excerpt ) { 11 | echo get_the_excerpt(); 12 | } 13 | 14 | ?> 15 |
16 | 17 |
18 | 19 |

20 | 21 |

22 | 23 | 24 | 25 | 26 |
27 |

28 | 29 | '' ) ); ?> 30 |
31 | 32 | 33 |
34 | -------------------------------------------------------------------------------- /parts/before-binder.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 9 |
10 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /articles/post-wsuwp_uc_publication.php: -------------------------------------------------------------------------------- 1 |
> 2 | 3 |
4 |
5 | 6 |

7 | 8 |

9 | 10 |
11 |
12 | 13 | 14 |
15 |
post_excerpt ) { 23 | echo get_the_excerpt(); 24 | } 25 | 26 | ?> 27 |
28 | 29 |
30 | 31 | '' ) ); ?> 32 |
33 | 34 | 35 |
-------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 | 14 | 27 | 30 | 35 | 36 | 37 | 38 | 39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /articles/post-notice-of-funding-opportunity.php: -------------------------------------------------------------------------------- 1 | 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 | -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | '; 29 | } -------------------------------------------------------------------------------- /parts/single-layout-wsuwp_uc_person.php: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 |
6 |

Office
Email:
Phone:
26 |
27 | 28 |
29 | 30 |
31 | 32 |
33 | 34 | 35 | 36 |
37 | 38 |
39 |
40 | " > 2 | 3 | 4 |
5 |
26 | 27 |

33 |
34 | 35 |
36 | post_excerpt ) { 39 | echo get_the_excerpt(); 40 | } 41 | ?> 42 |
43 | 44 |
45 | 46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /articles/post-wsuwp_uc_project.php: -------------------------------------------------------------------------------- 1 |
> 2 |
3 |
4 |
5 |

ASCENT No.

6 |

7 |
8 | 9 |

10 | 11 |

12 | 13 |
14 |
15 | 16 |
17 |
post_excerpt ) { 25 | echo get_the_excerpt(); 26 | } 27 | 28 | ?> 29 |
30 | 31 |
32 | 33 | 34 | 1, 37 | ) ); 38 | 39 | // Calculate the last updated display based on our current timezone. 40 | $current_time = time() + ( get_option( 'gmt_offset', 0 ) * HOUR_IN_SECONDS ); 41 | 42 | foreach ( $revisions as $revision ) { 43 | echo '

Last Updated: '; 44 | 45 | // If within 24 hours, show a human readable version instead 46 | if ( ( $current_time - strtotime( $revision->post_date ) ) < DAY_IN_SECONDS ) { 47 | echo esc_html( human_time_diff( $current_time, strtotime( $revision->post_date ) ) . ' ago' ); 48 | } else { 49 | echo esc_html( date( 'm/d/Y', strtotime( $revision->post_date ) ) ); 50 | } 51 | 52 | echo '

'; 53 | } 54 | ?> 55 | 56 | '' ) ); ?> 57 |
58 | 59 |
60 | -------------------------------------------------------------------------------- /custom.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | //Dynamically assign height 3 | function sizeContent() { 4 | var newHeight = ( $(window).height() *.7 ) + "px"; 5 | $(".banner-container").css("height", newHeight); 6 | $("#videobg" ).css('height',newHeight ); 7 | } 8 | 9 | $(document).ready(function() { 10 | var menuul = $('.main-menu ul'); 11 | var newHeight = ( $(window).height() *.7 ) + "px"; 12 | 13 | $(".banner-container").css("height", newHeight); 14 | 15 | if ( 0 < $('.home').length ) { 16 | // Fire the videoBG plugin using data stored with the pageview. 17 | $('#' + window.wsu_video_background.id).css('height', newHeight ).videoBG({ 18 | mp4: window.wsu_video_background.mp4, 19 | ogv: window.wsu_video_background.ogv, 20 | webm: window.wsu_video_background.webm, 21 | poster: window.wsu_video_background.poster, 22 | scale: window.wsu_video_background.scale, 23 | zIndex: window.wsu_video_background.zIndex 24 | }); 25 | } 26 | 27 | // Size the content areas on every resize of the window. 28 | $(window).resize(sizeContent); 29 | 30 | // Toggle the mobile menu when it's "clicked". 31 | $('.mobilenav').click(function() { 32 | menuul.toggleClass('shownav'); 33 | return false; 34 | }); 35 | }); 36 | 37 | if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) { 38 | function checkposi(e,jObj){ 39 | if ( typeof e.touches === "undefined" && typeof e.changedTouches === "undefined" ) { 40 | return; 41 | } 42 | 43 | var distance = $('.videobg').height() + $('.home nav').height(); 44 | var touch = e.touches[0] || e.changedTouches[0]; 45 | var y = touch.pageY - touch.clientY; 46 | 47 | if(y>distance) { 48 | $('.home nav').removeClass('navreg').addClass('navfix'); 49 | } else { 50 | $('.home nav').removeClass('navfix').addClass('navreg'); 51 | } 52 | } 53 | document.addEventListener('scroll', function(e){checkposi(e,$("html"))}); 54 | document.addEventListener('touchstart', function(e){checkposi(e,$("html"))}); 55 | document.addEventListener('touchmove', function(e){checkposi(e,$("html"))}); 56 | document.addEventListener('touchend', function(e){checkposi(e,$("html"))}); 57 | }else{ 58 | $(window).scroll(function() { 59 | var distance = $('.videobg').height() + $('.home nav').height(); 60 | if($(this).scrollTop() > distance) { 61 | $('.home nav').removeClass('navreg').addClass('navfix'); 62 | } else { 63 | $('.home nav').removeClass('navfix').addClass('navreg'); 64 | } 65 | }); 66 | } 67 | }(jQuery)); 68 | -------------------------------------------------------------------------------- /includes/plugin-swwrc-video.php: -------------------------------------------------------------------------------- 1 | ID, $this->headline_meta_key, true ); 40 | wp_nonce_field( 'cob-headlines-nonce', '_cob_headlines_nonce' ); 41 | ?> 42 | 43 | 44 |

Primary headline to be used for the top of the page, under the logo.

45 | ID, '_swwrc_home_mp4', true ); 56 | $ogv = get_post_meta( $post->ID, '_swwrc_home_ogv', true ); 57 | $web = get_post_meta( $post->ID, '_swwrc_home_webm', true ); 58 | $poster = get_post_meta( $post->ID, '_swwrc_home_poster', true ); 59 | ?> 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | post_type, array( 'page', 'post' ) ) ) { 83 | return; 84 | } 85 | 86 | if ( 'auto-draft' === $post->post_status ) { 87 | return; 88 | } 89 | 90 | if ( ! isset( $_POST['_cob_headlines_nonce'] ) || false === wp_verify_nonce( $_POST['_cob_headlines_nonce'], 'cob-headlines-nonce' ) ) { 91 | return; 92 | } 93 | 94 | if ( isset( $_POST['cob_page_headline'] ) ) { 95 | update_post_meta( $post_id, $this->headline_meta_key, strip_tags( $_POST['cob_page_headline'], '
' ) ); 96 | } 97 | 98 | if ( isset( $_POST['swwrc_home_mp4'] ) && ! empty( trim( $_POST['swwrc_home_mp4'] ) ) ) { 99 | update_post_meta( $post_id, '_swwrc_home_mp4', esc_url( $_POST['swwrc_home_mp4'] ) ); 100 | } else { 101 | delete_post_meta( $post_id, '_swwrc_home_mp4' ); 102 | } 103 | 104 | if ( isset( $_POST['swwrc_home_ogv'] ) && ! empty( trim( $_POST['swwrc_home_ogv'] ) ) ) { 105 | update_post_meta( $post_id, '_swwrc_home_ogv', esc_url( $_POST['swwrc_home_ogv'] ) ); 106 | } else { 107 | delete_post_meta( $post_id, '_swwrc_home_ogv' ); 108 | } 109 | 110 | if ( isset( $_POST['swwrc_home_web'] ) && ! empty( trim( $_POST['swwrc_home_web'] ) ) ) { 111 | update_post_meta( $post_id, '_swwrc_home_webm', esc_url( $_POST['swwrc_home_web'] ) ); 112 | } else { 113 | delete_post_meta( $post_id, '_swwrc_home_webm' ); 114 | } 115 | 116 | if ( isset( $_POST['swwrc_home_poster'] ) && ! empty( trim( $_POST['swwrc_home_poster'] ) ) ) { 117 | update_post_meta( $post_id, '_swwrc_home_poster', esc_url( $_POST['swwrc_home_poster'] ) ); 118 | } else { 119 | delete_post_meta( $post_id, '_swwrc_home_poster' ); 120 | } 121 | } 122 | 123 | /** 124 | * Retrieve the assigned headline of a page. 125 | * 126 | * @param $post_id 127 | * 128 | * @return mixed 129 | */ 130 | public function get_headline( $post_id ) { 131 | return get_post_meta( $post_id, $this->headline_meta_key, true ); 132 | } 133 | 134 | /** 135 | * Retrieve the JSON data for a page containing video background information. 136 | * 137 | * @param $post_id 138 | * 139 | * @return string 140 | */ 141 | public function get_json_data( $post_id ) { 142 | $mp4 = get_post_meta( $post_id, '_swwrc_home_mp4', true ); 143 | $ogv = get_post_meta( $post_id, '_swwrc_home_ogv', true ); 144 | $web = get_post_meta( $post_id, '_swwrc_home_webm', true ); 145 | $poster = get_post_meta( $post_id, '_swwrc_home_poster', true ); 146 | 147 | $data = array( 148 | 'id' => 'videobg', 149 | 'scale' => '1', 150 | 'zIndex' => '0', 151 | ); 152 | 153 | if ( ! empty( $mp4 ) ) { 154 | $data['mp4'] = esc_url( $mp4 ); 155 | } else { 156 | $data['mp4'] = ''; 157 | } 158 | 159 | if ( ! empty( $ogv ) ) { 160 | $data['ogv'] = esc_url( $ogv ); 161 | } else { 162 | $data['ogv'] = ''; 163 | } 164 | 165 | if ( ! empty( $web ) ) { 166 | $data['webm'] = esc_url( $web ); 167 | } else { 168 | $data['webm'] = ''; 169 | } 170 | 171 | if ( ! empty( $poster ) ) { 172 | $data['poster'] = esc_url( $poster ); 173 | } else { 174 | $data['poster'] = ''; 175 | } 176 | 177 | return json_encode( $data ); 178 | } 179 | } 180 | $wsu_swwrc_video = new WSU_SWWRC_Video(); 181 | 182 | /** 183 | * Wrapper to retrieve an assigned page headline. Will fallback to the current page if 184 | * a post ID is not specified. 185 | * 186 | * @param int $post_id 187 | * 188 | * @return mixed 189 | */ 190 | function swwrc_get_page_headline( $post_id = 0 ) { 191 | global $wsu_swwrc_video; 192 | if ( is_404() ) { 193 | return "We're sorry. We can't find the page you're looking for."; 194 | } 195 | $post_id = absint( $post_id ); 196 | if ( 0 === $post_id ) { 197 | $post_id = get_the_ID(); 198 | } 199 | return $wsu_swwrc_video->get_headline( $post_id ); 200 | } 201 | 202 | /** 203 | * Wrapper to retrieve assigned video data for the home page. 204 | * 205 | * @param int $post_id 206 | * 207 | * @return bool|string False if 404, JSON string if available. 208 | */ 209 | function swwrc_get_video_json_data( $post_id = 0 ) { 210 | global $wsu_swwrc_video; 211 | if ( is_404() ) { 212 | return false; 213 | } 214 | $post_id = absint( $post_id ); 215 | if ( 0 === $post_id ) { 216 | $post_id = get_the_ID(); 217 | } 218 | return $wsu_swwrc_video->get_json_data( $post_id ); 219 | } -------------------------------------------------------------------------------- /js/jQuery.videobg.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve Copyright 2011 Syd Lawrence ( www.sydlawrence.com ). 3 | * Version: 0.2 4 | * 5 | * Licensed under MIT and GPLv2. 6 | * 7 | * Usage: $('body').videoBG(options); 8 | * 9 | */ 10 | 11 | (function( $ ){ 12 | 13 | $.fn.videoBG = function( selector, options ) { 14 | if (options === undefined) { 15 | options = {}; 16 | } 17 | if (typeof selector === "object") { 18 | options = $.extend({}, $.fn.videoBG.defaults, selector); 19 | } 20 | else if (!selector) { 21 | options = $.fn.videoBG.defaults; 22 | } 23 | else { 24 | return $(selector).videoBG(options); 25 | } 26 | 27 | var container = $(this); 28 | 29 | // check if elements available otherwise it will cause issues 30 | if (!container.length) { 31 | return; 32 | } 33 | 34 | // container to be at least relative 35 | if (container.css('position') == 'static' || !container.css('position')) { 36 | container.css('position','relative'); 37 | } 38 | 39 | // we need a width 40 | if (options.width === 0) { 41 | options.width = container.width(); 42 | } 43 | 44 | // we need a height 45 | if (options.height === 0) { 46 | options.height = container.height(); 47 | } 48 | 49 | // get the wrapper 50 | var wrap = $.fn.videoBG.wrapper(); 51 | wrap.height(options.height) 52 | .width(options.width); 53 | 54 | // if is a text replacement 55 | if (options.textReplacement) { 56 | 57 | // force sizes 58 | options.scale = true; 59 | 60 | // set sizes and forcing text out 61 | container.width(options.width) 62 | .height(options.height) 63 | .css('text-indent','-9999px'); 64 | } 65 | else { 66 | 67 | // set the wrapper above the video 68 | wrap.css('z-index',options.zIndex+1); 69 | } 70 | 71 | // move the contents into the wrapper 72 | wrap.html(container.clone(true)); 73 | 74 | // get the video 75 | var video = $.fn.videoBG.video(options); 76 | 77 | // if we are forcing width / height 78 | if (options.scale) { 79 | 80 | // overlay wrapper 81 | wrap.height(options.height) 82 | .width(options.width); 83 | 84 | // video 85 | video.height(options.height) 86 | .width(options.width); 87 | } 88 | 89 | // add it all to the container 90 | container.html(wrap); 91 | container.append(video); 92 | 93 | return video.find("video")[0]; 94 | }; 95 | 96 | // set to fullscreen 97 | $.fn.videoBG.setFullscreen = function($el) { 98 | var windowWidth = $(window).width(), 99 | windowHeight = $(window).height(); 100 | 101 | $el.css('min-height',0).css('min-width',0); 102 | $el.parent().width(windowWidth).height(windowHeight); 103 | // if by width 104 | var shift = 0; 105 | if (windowWidth / windowHeight > $el.aspectRatio) { 106 | $el.width(windowWidth).height('auto'); 107 | // shift the element up 108 | var height = $el.height(); 109 | shift = (height - windowHeight) / 2; 110 | if (shift < 0) { 111 | shift = 0; 112 | } 113 | $el.css("top",-shift); 114 | } else { 115 | $el.width('auto').height(windowHeight); 116 | // shift the element left 117 | var width = $el.width(); 118 | shift = (width - windowWidth) / 2; 119 | if (shift < 0) { 120 | shift = 0; 121 | } 122 | $el.css("left",-shift); 123 | 124 | // this is a hack mainly due to the iphone 125 | if (shift === 0) { 126 | var t = setTimeout(function() { 127 | $.fn.videoBG.setFullscreen($el); 128 | },500); 129 | } 130 | } 131 | 132 | $('body > .videoBG_wrapper').width(windowWidth).height(windowHeight); 133 | 134 | }; 135 | 136 | // get the formatted video element 137 | $.fn.videoBG.video = function(options) { 138 | 139 | $('html, body').scrollTop(-1); 140 | 141 | // video container 142 | var $div = $('
'); 143 | $div.addClass('videoBG') 144 | .css('position',options.position) 145 | .css('z-index',options.zIndex) 146 | .css('top',0) 147 | .css('left',0) 148 | .css('height',options.height) 149 | .css('width',options.width) 150 | .css('opacity',options.opacity) 151 | .css('overflow','hidden'); 152 | 153 | // video element 154 | var $video = $('