Skip to content

Commit

Permalink
Merge branch 'gh-pages' of github.com:SUSE/hackweek into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaltom committed Mar 12, 2013
2 parents b82d1ba + 1b6ceeb commit baf1895
Show file tree
Hide file tree
Showing 10 changed files with 236 additions and 9 deletions.
124 changes: 122 additions & 2 deletions css/hackweek.css
Expand Up @@ -476,13 +476,133 @@ 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;
Expand Down
Binary file added images/beijing.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/nuremberg.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pin.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/prague.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/provo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions index.html
Expand Up @@ -246,6 +246,55 @@ <h3>
<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>
Expand Down
2 changes: 1 addition & 1 deletion js/hackweek.js
Expand Up @@ -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()
Expand Down
58 changes: 54 additions & 4 deletions 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>"
Expand All @@ -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() {
Expand Down
12 changes: 10 additions & 2 deletions js/wterm.jquery.js
Expand Up @@ -119,6 +119,7 @@
**/
var dispatch = {
};
var settings;


/**
Expand All @@ -133,7 +134,7 @@


// Merge defaults with options
var settings = get_defaults();
settings = get_defaults();
$.extend( true, settings, options );

// JQ Plugin surprised??
Expand Down Expand Up @@ -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
};

/**
Expand Down Expand Up @@ -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( ' ' );
Expand Down Expand Up @@ -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.