Browse files

Merge branch 'gh-pages' of github.com:SUSE/hackweek into gh-pages

  • Loading branch information...
2 parents b82d1ba + 1b6ceeb commit baf189514d2abdda0cb39078c02b895dee232277 @digitaltom digitaltom committed Mar 12, 2013
View
124 css/hackweek.css
@@ -477,12 +477,132 @@ li {
/** ******/
#where{
background-color: #FFF;
+ z-index: 50;
+ position: relative;
+}
+#world-map{
+ background-color: #FFF;
background: url('../images/world-map.png');
/*background-size: 70% auto;*/
background-repeat: no-repeat;
background-position: center center;
- z-index: 50;
- position: relative;
+ left: 50%;
+ margin-left: -600px;
+ position: absolute;
+ width: 1200px;
+ height: 578px;
+ top: 50%;
+ margin-top: -274px;
+}
+#provo{
+ background: url('../images/pin.png');
+ width: 33px;
+ height: 38px;
+ position: inherit;
+ margin-left: 196px;
+ margin-top: 209px;
+}
+#provo-zoom{
+ background: url('../images/provo.png');
+ width: 232px;
+ height: 232px;
+ position: inherit;
+ margin-left: 96px;
+ margin-top: 129px;
+ display: none;
+}
+#nuremberg{
+ background: url('../images/pin.png');
+ height: 38px;
+ left: 50%;
+ margin-left: -19px;
+ margin-top: 177px;
+ position: inherit;
+ width: 33px;
+}
+#nuremberg-zoom{
+ background: url('../images/nuremberg.png');
+ left: 50%;
+ margin-left: -139px;
+ margin-top: 47px;
+ position: inherit;
+ width: 232px;
+ height: 232px;
+ display: none;
+}
+#prague{
+ background: url('../images/pin.png');
+ height: 38px;
+ left: 50%;
+ margin-left: 10px;
+ margin-top: 180px;
+ position: inherit;
+ width: 33px;
+}
+#prague-zoom{
+ background: url('../images/prague.png');
+ left: 50%;
+ margin-left: -50px;
+ margin-top: 80px;
+ position: inherit;
+ width: 232px;
+ height: 232px;
+ display: none;
+}
+#beijing{
+ background: url('../images/pin.png');
+ height: 38px;
+ margin-right: 250px;
+ margin-top: 205px;
+ position: inherit;
+ right: 0;
+ width: 33px;
+}
+#beijing-zoom{
+ background: url('../images/beijing.png');
+ margin-right: 150px;
+ margin-top: 175px;
+ position: inherit;
+ right: 0;
+ width: 232px;
+ height: 232px;
+ display: none;
+}
+.office-location {
+ color: #7C817F;
+ font-size: 25px;
+ font-weight: bold;
+ margin-top: 90px;
+ position: inherit;
+ text-align: center;
+ width: 232px;
+}
+.office-address {
+ color: #7C817F;
+ font-size: 15px;
+ font-weight: normal;
+ margin-top: 122px;
+ position: inherit;
+ text-align: center;
+ width: 232px;
+}
+.office-phone {
+ color: #7C817F;
+ font-size: 15px;
+ font-weight: normal;
+ margin-top: 145px;
+ position: inherit;
+ text-align: center;
+ width: 232px;
+}
+.office-map {
+ color: #7C817F;
+ font-size: 15px;
+ font-weight: normal;
+ margin-top: 172px;
+ position: inherit;
+ text-align: center;
+ width: 232px;
}
#where-title{
position: absolute;
View
BIN images/beijing.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/nuremberg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/pin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/prague.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN images/provo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
49 index.html
@@ -246,6 +246,55 @@
<span class="claim-where">SUSE Hack week is happening</span>
<span class="claim-where">in all offices around the world!</span>
</div>
+
+ <div id="world-map">
+
+ <div id="provo">
+
+ </div>
+
+ <div id="nuremberg">
+
+ </div>
+
+ <div id="prague">
+
+ </div>
+
+ <div id="beijing">
+
+ </div>
+
+ <div id="provo-zoom">
+ <span class="office-location">Provo</span>
+ <span class="office-address">1800 South Novell Place</span>
+ <span class="office-phone">+1 (801) 861-4272</span>
+ <span class="office-map">Local map</span>
+ </div>
+
+ <div id="nuremberg-zoom">
+ <span class="office-location">Nuremberg</span>
+ <span class="office-address">Maxfeldstr. 5</span>
+ <span class="office-phone">+49 (0)911-740 53-0</span>
+ <span class="office-map">Local map</span>
+ </div>
+
+ <div id="prague-zoom">
+ <span class="office-location">Prague</span>
+ <span class="office-address">Lihovarska 1060/12</span>
+ <span class="office-phone">+420 28 40 84000</span>
+ <span class="office-map">Local map</span>
+ </div>
+
+ <div id="beijing-zoom">
+ <span class="office-location">Beijing</span>
+ <span class="office-address">Room3603-3606</span>
+ <span class="office-phone">+86 10 6533 9000</span>
+ <span class="office-map">Local map</span>
+ </div>
+
+ </div>
+
<div id="map-info">
select one location to meet all suse offices
</div>
View
2 js/hackweek.js
@@ -148,7 +148,7 @@ $(function () {
}
- function toggle_terminal() {
+ window.toggle_terminal = function() {
if ($('#terminal').is(":visible")) {
$('#terminal').slideUp('fast');
$('#wterm').find('div:last form input').blur()
View
58 js/terminal_logic.js
@@ -1,4 +1,13 @@
$(function () {
+
+ var set_directory_prompt = function(dirs) {
+ if(dirs.length === 0) {
+ $.set_prompt("geeko@hackweek:~ >");
+ } else {
+ $.set_prompt("geeko@hackweek:~/" + dirs.join("/") + " >");
+ }
+ };
+
var projects = [
{
title: "<span class='welcome-message'>Make a nifty hackweek website</span>"
@@ -8,11 +17,52 @@ $(function () {
}
];
+ var directory_stack = [];
+
$.register_command('ls', function(){
- titles = $.map(projects, function(project, i){
- return project.title;
- });
- return titles.join('<br>');
+ if(directory_stack.length == 0) {
+ return ["agenda", "projects"].join("<br>");
+ } else if(directory_stack[0] == "agenda") {
+ if(directory_stack.length == 1) {
+ return Object.keys(agenda_content).join("<br>");
+ } else {
+ return Object.keys(agenda_content[directory_stack[1]]).join("<br>");
+ }
+ } else if(directory_stack[0] == "projects") {
+ titles = $.map(projects, function(project, i){
+ return project.title;
+ });
+ }
+ });
+
+ $.register_command('cd', function(args){
+ if(directory_stack.length === 0 && (args[1] === "agenda" || args[1] === "projects")) {
+ directory_stack.push(args[1]);
+ } else if(directory_stack.length === 1 &&
+ directory_stack[0] === "agenda" &&
+ $.inArray(args[1], Object.keys(agenda_content)) >= 0) {
+ directory_stack.push(args[1]);
+ } else if(args[1] === "..") {
+ directory_stack.pop();
+ } else {
+ return "No such file or directory."
+ }
+ set_directory_prompt(directory_stack);
+ return " ";
+ });
+
+ $.register_command('cat', function(args){
+ if(directory_stack.length == 2 &&
+ directory_stack[0] == "agenda" &&
+ $.inArray(args[1], Object.keys(agenda_content[directory_stack[1]])) >= 0) {
+ return agenda_content[directory_stack[1]][args[1]].replace(/\n/g, "<br>");
+ } else {
+ return "No such file or directory."
+ }
+ });
+
+ $.register_command('exit', function(){
+ toggle_terminal();
});
$.register_command( 'help', function() {
View
12 js/wterm.jquery.js
@@ -119,6 +119,7 @@
**/
var dispatch = {
};
+ var settings;
/**
@@ -133,7 +134,7 @@
// Merge defaults with options
- var settings = get_defaults();
+ settings = get_defaults();
$.extend( true, settings, options );
// JQ Plugin surprised??
@@ -203,6 +204,7 @@
**/
var update_content = function( p, cmd, data ) {
content.append( '<div><span>' + p + ' ' + cmd + '</span><div>' + ( ( data ) ? data : '' ) + '</div></div>' );
+ $('#wterm')[0].scrollTop = $('#wterm')[0].scrollHeight
};
/**
@@ -261,10 +263,11 @@
}
var _dispatch = function( key, tokens ) {
+ var ps1 = settings.PS1;
if( typeof key === 'function' ) {
data = key( tokens );
- if( data ) { update_content( get_current_prompt(), value, data ) }
+ if( data ) { update_content( ps1, value, data ) }
} else if( typeof key === 'string' ) {
var to_send = { };
to_send[ settings.AJAX_PARAM ] = tokens.join( ' ' );
@@ -410,4 +413,9 @@
}
};
+ $.set_prompt = function(ps1) {
+ $( '.' + settings.PROMPT_CLASS).html( ps1 + '&nbsp;' );
+ settings.PS1 = ps1;
+ }
+
})( jQuery );

0 comments on commit baf1895

Please sign in to comment.