[www] Resurrect global message, promote ChefConf and NYC Meetup

The global message was removed during the redesign. Adding it back
to promote ChefConf. Also adding the upcoming NYC meetup to the
front screen.

Signed-off-by: Adam Leff <adam@leff.co>
This commit is contained in:
Adam Leff 2017-03-29 17:09:13 -04:00
parent 0e187f6117
commit 0cbedb1579
No known key found for this signature in database
GPG key ID: 7A5136DE1C1112F8
5 changed files with 87 additions and 40 deletions

View file

@ -18,11 +18,11 @@ header.blue-gradient.margin-top-offset
img src="/images/circ-arrow.svg" /
/! Event Details go here
/!.code-pop
/! .strict-center
/! p.t-white
/! | Hartford Compliance Automation: InSpec + Chef Automate
/! a href="https://events.chef.io/events/hartford-compliance-automation-inspec-chef-automate/" View the Event
.code-pop
.strict-center
p.t-white
| Chef NYC Meetup on April 20: Compliance as Code with InSpec
a href="https://www.meetup.com/Chef-NYC/events/238272428/" target="_blank" Join us!
/! Second Content
.row.margin-both

View file

@ -67,37 +67,37 @@ $(window).scroll(function() {
// handle nav when global message exists
// gm_session_id is set on at template level
//var globalMessageHeight;
//const $globalMessage = $("#global-message");
var globalMessageHeight;
const $globalMessage = $("#global-message");
//function adjustNavPosition() {
// globalMessageHeight = $globalMessage.outerHeight();
function adjustNavPosition() {
globalMessageHeight = $globalMessage.outerHeight();
// if ($globalMessage.is(":visible")) {
// $mainNav.css('top', globalMessageHeight);
// $mainNavCtas.css('top', globalMessageHeight);
// $mainContent.css('margin-top', globalMessageHeight + 100);
// }
//}
if ($globalMessage.is(":visible")) {
$mainNav.css('top', globalMessageHeight);
$mainNavCtas.css('top', globalMessageHeight);
$mainContent.css('margin-top', globalMessageHeight + 80);
}
}
//if(!localStorage.getItem(gm_session_id)) {
// $globalMessage.addClass('is-visible');
// adjustNavPosition();
//}
if(!localStorage.getItem(gm_session_id)) {
$globalMessage.addClass('is-visible');
adjustNavPosition();
}
//$(document).ready(function() {
// $("#global-message .dismiss-button").click(function(e) {
// $globalMessage.removeClass('is-visible')
// $mainNav.css('top', '');
// $mainNavCtas.css('top', '');
// $mainContent.css('margin-top', 100);
// localStorage.setItem(gm_session_id, "true");
// return false;
// });
//});
$(document).ready(function() {
$("#global-message .dismiss-button").click(function(e) {
$globalMessage.removeClass('is-visible')
$mainNav.css('top', '');
$mainNavCtas.css('top', '');
$mainContent.css('margin-top', 80);
localStorage.setItem(gm_session_id, "true");
return false;
});
});
//$(window).resize(function() {
// if(!localStorage.getItem(gm_session_id)) {
// adjustNavPosition();
// }
//});
$(window).resize(function() {
if(!localStorage.getItem(gm_session_id)) {
adjustNavPosition();
}
});

View file

@ -1,12 +1,13 @@
/ If you update the content, you need to update the value of gm_session_id
/ in order for the Div to show.
#global-message
#global-message.blue-gradient
.container
.row
.columns.small-8.medium-8.medium-push-2.medium-text-center
a href="https://www.chef.io/webinars/?commid=225819" target="_blank"
strong Webinar - Compliance as Code with InSpec 1.0 - Watch the Recording Now
a href="https://chefconf.chef.io/2017/" target="_blank"
strong Join us in May at ChefConf to learn more about compliance automation!
.columns.small-4.medium-2.text-right
span.dismiss-button
@ -14,4 +15,4 @@
| Dismiss
javascript:
gm_session_id = 'inspecGlobalMessage4';
gm_session_id = 'inspecGlobalMessage8';

View file

@ -1 +1,47 @@
///Deleted old global message
#global-message {
position: fixed;
z-index: 95;
top: -200px;
right: 0;
left: 0;
padding: 15px 0;
background-color: $color_blue_shade_2;
color: $color_white;
font-size: 15px;
transition: top 0.3s ease;
&.is-visible {
top: 0;
}
.dismiss-button {
margin: 3px;
color: $color_white;
cursor: pointer;
font-weight: 700;
.fa {
margin-right: 5px;
}
}
a, a:hover, a:visited, a:active, a:link {
color: $color_white;
text-decoration: none;
}
@media (max-width: 649px) {
font-size: 13px;
}
@include nav-small {
position: fixed;
top: -200px;
right: 0;
left: 0;
}
@include nav-large {
z-index: 1100;
}
}

View file

@ -4,7 +4,7 @@
@import "settings";
@import "buttons";
@import "nav";
//@import "global-message";
@import "global-message";
@import "sidebar";
@import "footer";
@import "layout";