Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:ghinch/ghinch.github.com

  • Loading branch information...
commit fd259a07175c0b6f27e3af35cfb3b76536e9280e 2 parents 8f51b0b + 8c159ca
@ghinch authored
Showing with 45 additions and 2 deletions.
  1. +17 −0 css/main.css
  2. +28 −2 js/main.js
View
17 css/main.css
@@ -96,3 +96,20 @@ a.contact-link {
.four-oh-four h3 {
text-align: center;
}
+
+.yui3-widget-mask {
+ background-color: #000;
+ opacity: 0.85;
+ filter: alpha(opacity=85);
+}
+
+#contact {
+ -moz-border-radius: 1em;
+ -webkit-border-radius: 1em;
+ border-radius: 1em;
+ background-color: #fff;
+}
+
+#contact .yui3-panel-content {
+ padding: 12px;
+}
View
30 js/main.js
@@ -1,10 +1,12 @@
YUI({
-
+ filter : 'raw'
}).use(
'node-base',
'node-event-delegate',
'transition',
'jsonp',
+ 'panel',
+ 'frame',
'jsonp-url',
'json-parse',
'substitute',
@@ -14,6 +16,15 @@ function (Y) {
listContainer = mainContainer.one('#lists'),
repos = [],
githubServ,
+ contactPanel = new Y.Panel({
+ visible : false,
+ id : 'contact',
+ centered : true,
+ width : 520,
+ height: 450,
+ modal : true
+ }),
+ contactFrame,
REPO_TEMPLATE = '<li><a href="{html_url}">{name}</a> <span class="lang">({language})</span></li>',
IGNORE_REPOS = [
@@ -25,7 +36,8 @@ function (Y) {
mainContainer.delegate('click', function (e) {
e.preventDefault();
if (e.currentTarget.hasClass('contact-link')) {
- window.location = 'mailto:greg@greghinch.com';
+ //window.location = 'mailto:greg@greghinch.com';
+ contactPanel.show();
} else {
window.open(e.currentTarget.get('href'));
}
@@ -49,4 +61,18 @@ function (Y) {
githubService = new Y.JSONPRequest(githubUrl, handleGithub);
githubService.send();
+
+ contactPanel.on('visibleChange', function (e) {
+ if (e.newVal) {
+ contactFrame = new Y.Frame({
+ src : 'http://greghinch.wufoo.com/embed/z7x3x5/'
+ });
+ contactFrame.render(contactPanel.get('contentBox'));
+ } else {
+ if (contactFrame) {
+ contactFrame.destroy();
+ }
+ }
+ });
+ contactPanel.render();
});
Please sign in to comment.
Something went wrong with that request. Please try again.