Skip to content

Commit

Permalink
resync of theme
Browse files Browse the repository at this point in the history
  • Loading branch information
TamaraShopsin committed Apr 10, 2012
1 parent 236a07b commit 81394bb
Show file tree
Hide file tree
Showing 36 changed files with 612 additions and 50 deletions.
Binary file added fonts 1/futura/futurastd-medium-webfont.eot
Binary file not shown.
247 changes: 247 additions & 0 deletions fonts 1/futura/futurastd-medium-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added fonts 1/futura/futurastd-medium-webfont.ttf
Binary file not shown.
Binary file added fonts 1/futura/futurastd-medium-webfont.woff
Binary file not shown.
Empty file modified fonts/futura/futurastd-medium-webfont.eot
100755 → 100644
Empty file.
Empty file modified fonts/futura/futurastd-medium-webfont.svg
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified fonts/futura/futurastd-medium-webfont.ttf
100755 → 100644
Empty file.
Empty file modified fonts/futura/futurastd-medium-webfont.woff
100755 → 100644
Empty file.
10 changes: 8 additions & 2 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@
*/
?>

<hr />
<div id="footer" role="contentinfo">


<?php wp_footer(); ?>
<p class="nospnav">

</p>
</div>
</div>


<?php wp_footer(); ?>
</body>
</html>
10 changes: 7 additions & 3 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,20 @@

<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<script type="text/javascript" src="http://opencounter.org/wp-content/themes/opencounter/scripts/clock2.js"></script>


<?php wp_head(); ?>



</head>
<body <?php body_class(); ?>>
<div id="page">



<div id="header2">

<div id="header">
</div>

<hr />
13 changes: 8 additions & 5 deletions home.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
get_header(); ?>

<div id="content" class="narrowcolumn" role="main">
<div id="header3">
<div id="header4">
</div>

<?php if (have_posts()) : ?>
Expand All @@ -28,11 +28,14 @@
</div>

<?php endwhile; ?>
<div class="navigation">

<div class="navigation">
<div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries', 'kubrick')) ?></div>
<div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;', 'kubrick')) ?></div>
</div>

<div class="alignright"><a href="http://opencounter.org/welcome/">start</a></div>



</div>

<?php else : ?>

Expand Down
Binary file added images 1/audio.jpg
Loading
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 1/backarrow.png
Loading
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 1/clock.png
Loading
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 1/clockbig.png
Loading
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 1/diffscale.png
Loading
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 1/fwdarrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions images 1/header-img.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/

/** @ignore */
$img = 'kubrickheader.jpg';

// If we don't have image processing support, redirect.
if ( ! function_exists('imagecreatefromjpeg') )
die(header("Location: kubrickheader.jpg"));

// Assign and validate the color values
$default = false;
$vars = array('upper'=>array('r1', 'g1', 'b1'), 'lower'=>array('r2', 'g2', 'b2'));
foreach ( $vars as $var => $subvars ) {
if ( isset($_GET[$var]) ) {
foreach ( $subvars as $index => $subvar ) {
$length = strlen($_GET[$var]) / 3;
$v = substr($_GET[$var], $index * $length, $length);
if ( $length == 1 ) $v = '' . $v . $v;
$$subvar = hexdec( $v );
if ( $$subvar < 0 || $$subvar > 255 )
$default = true;
}
} else {
$default = true;
}
}

if ( $default )
list ( $r1, $g1, $b1, $r2, $g2, $b2 ) = array ( 105, 174, 231, 65, 128, 182 );

// Create the image
$im = imagecreatefromjpeg($img);

// Get the background color, define the rectangle height
$white = imagecolorat( $im, 15, 15 );
$h = 182;

// Define the boundaries of the rounded edges ( y => array ( x1, x2 ) )
$corners = array(
0 => array ( 25, 734 ),
1 => array ( 23, 736 ),
2 => array ( 22, 737 ),
3 => array ( 21, 738 ),
4 => array ( 21, 738 ),
177 => array ( 21, 738 ),
178 => array ( 21, 738 ),
179 => array ( 22, 737 ),
180 => array ( 23, 736 ),
181 => array ( 25, 734 ),
);

// Blank out the blue thing
for ( $i = 0; $i < $h; $i++ ) {
$x1 = 19;
$x2 = 740;
imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
}

// Draw a new color thing
for ( $i = 0; $i < $h; $i++ ) {
$x1 = 20;
$x2 = 739;
$r = ( $r2 - $r1 != 0 ) ? $r1 + ( $r2 - $r1 ) * ( $i / $h ) : $r1;
$g = ( $g2 - $g1 != 0 ) ? $g1 + ( $g2 - $g1 ) * ( $i / $h ) : $g1;
$b = ( $b2 - $b1 != 0 ) ? $b1 + ( $b2 - $b1 ) * ( $i / $h ) : $b1;
$color = imagecolorallocate( $im, $r, $g, $b );
if ( array_key_exists($i, $corners) ) {
imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $white );
list ( $x1, $x2 ) = $corners[$i];
}
imageline( $im, $x1, 18 + $i, $x2, 18 + $i, $color );
}

//die;
header("Content-Type: image/jpeg");
imagejpeg($im, '', 92);
imagedestroy($im);
?>
Binary file added images 1/kubrickbg-ltr.jpg
Loading
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 1/kubrickbg-rtl.jpg
Loading
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 1/kubrickbgcolor.jpg
Loading
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 1/kubrickbgwide.jpg
Loading
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 1/kubrickfooter.jpg
Loading
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 1/kubrickheader.jpg
Loading
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 1/microsoft-staff-1978.jpeg
Loading
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 1/santa-cruz-city-seal.png
Loading
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 1/sprites.png
Loading
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 1/sprites_src.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/clockbig2.png
Binary file not shown.
Binary file removed images/forward_enabled.png
Binary file not shown.
16 changes: 12 additions & 4 deletions page.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@
*/

get_header(); ?>
<div id="header4">
<div id="header3">
<a href="http://opencounter.org">
<canvas id="clockcanvas" width="50" height="50"></canvas>
</a>



</div>
<div id="content" class="narrowcolumn" role="main">

Expand All @@ -18,11 +24,13 @@
<?php wp_link_pages(array('before' => '<p><strong>' . __('Pages:', 'kubrick') . '</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<div class="navigation">

<div class="alignleft" <?php previous_post_link('<strong>%link</strong>'); ?></div>
<div class="alignright"><?php next_post_link('<strong>%link</strong>'); ?> </div>
<?php previous_link(); ?>
<?php next_link(); ?>



</div>
</div>

</div>
<?php endwhile; endif; ?>
<?php edit_post_link(__('Edit this entry.', 'kubrick'), '<p>', '</p>'); ?>
Expand Down
Binary file modified screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions scripts/clock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
var clockCanvColor = ["#000", "#000"];
function hoverClock(){
clockCanvColor = ["rgb(0,124,196)", "rgb(0,124,196)"];
draw();
}
function unhoverClock(){
clockCanvColor = ["#000","#000"];
draw();
}

function draw() {
var canvas = document.getElementById('clockcanvas');
if (canvas.getContext) {
var c2d=canvas.getContext('2d');
c2d.clearRect(0,0,30,30);
//Define gradients for 3D / shadow effect
var grad1=c2d.createLinearGradient(0,0,30,30);
grad1.addColorStop(0,clockCanvColor[1]);
grad1.addColorStop(1,clockCanvColor[0]);
var grad2=c2d.createLinearGradient(0,0,30,30);
grad2.addColorStop(0,clockCanvColor[0]);
grad2.addColorStop(1,clockCanvColor[1]);
c2d.font="Bold 14px Arial";
c2d.textBaseline="middle";
c2d.textAlign="center";
c2d.lineWidth=3;
c2d.save();
//Outer bezel
c2d.strokeStyle=grad1;
c2d.lineWidth=3;
c2d.beginPath();
c2d.arc(15,15,13,0,Math.PI*2,true);


c2d.stroke();
//Inner bezel
c2d.restore();
c2d.strokeStyle=grad2;
c2d.lineWidth=3;
c2d.beginPath();
c2d.arc(15,15,13,0,Math.PI*2,true);
c2d.stroke();
c2d.save();
c2d.translate(15,15);

var now=new Date();
var hrs=now.getHours();
var min=now.getMinutes();
var sec=now.getSeconds();

c2d.lineWidth=2;
c2d.save();
//Draw clock pointers but this time rotate the canvas rather than
//calculate x/y start/end positions.
//
//Draw hour hand
c2d.rotate(Math.PI/6*(hrs+(min/60)+(sec/3600)));
c2d.beginPath();
c2d.moveTo(0,4);
c2d.lineTo(0,-6);
c2d.stroke();
c2d.restore();
c2d.save();
//Draw minute hand
c2d.rotate(Math.PI/30*(min+(sec/60)));
c2d.beginPath();
c2d.moveTo(0,4);
c2d.lineTo(0,-10);
c2d.stroke();
c2d.restore();
c2d.save();
c2d.restore();

//Additional restore to go back to state before translate
//Alternative would be to simply reverse the original translate
c2d.restore();
}
}

window.onload = function(){
document.getElementById("clockcanvas").onmouseover = hoverClock;
document.getElementById("clockcanvas").onmouseout = unhoverClock;
setInterval(draw, 60000);
draw();
};
109 changes: 109 additions & 0 deletions scripts/clock2.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
var clockCanvColor = ["#000", "#000"];
function hoverClock(){
clockCanvColor = ["rgb(0,124,196)", "rgb(0,124,196)"];
draw();
}
function unhoverClock(){
clockCanvColor = ["#000","#000"];
draw();
}

function draw() {
var canvas = document.getElementById('clockcanvas');
if (canvas.getContext) {
var c2d=canvas.getContext('2d');
c2d.clearRect(0,0,50,50);
//Define gradients for 3D / shadow effect
var grad1=c2d.createLinearGradient(0,0,50,50);
grad1.addColorStop(0,clockCanvColor[1]);
grad1.addColorStop(1,clockCanvColor[0]);
var grad2=c2d.createLinearGradient(0,0,50,50);
grad2.addColorStop(0,clockCanvColor[0]);
grad2.addColorStop(1,clockCanvColor[1]);
c2d.font="Bold 14px Arial";
c2d.textBaseline="middle";
c2d.textAlign="center";
c2d.lineWidth=2;
c2d.save();
//Outer bezel
c2d.strokeStyle=grad1;
c2d.lineWidth=4;
c2d.beginPath();
c2d.arc(25,25,23,0,Math.PI*2,true);


c2d.stroke();
//Inner bezel
c2d.restore();
c2d.strokeStyle=grad2;
c2d.lineWidth=2;
c2d.beginPath();
c2d.arc(25,25,22,0,Math.PI*2,true);
c2d.stroke();
//c2d.strokeStyle="#222";
c2d.save();
c2d.translate(25,25);
//Markings/Numerals
/*for (i=1;i<=12;i++) {
ang=Math.PI/30*i*5;
sang=Math.sin(ang);
cang=Math.cos(ang);
sx=sang*19;
sy=cang*-19;
ex=sang*24;
ey=cang*-24;
nx=sang*16;
ny=cang*-16;
c2d.fillText(i/5,nx,ny);
}*/

var now=new Date();
var hrs=now.getHours();
var min=now.getMinutes();
var sec=now.getSeconds();
//c2d.strokeStyle="#000";


c2d.lineWidth=2;
c2d.save();
//Draw clock pointers but this time rotate the canvas rather than
//calculate x/y start/end positions.
//
//Draw hour hand
c2d.rotate(Math.PI/6*(hrs+(min/60)+(sec/3600)));
c2d.beginPath();
c2d.moveTo(0,4);
c2d.lineTo(0,-10);
c2d.stroke();
c2d.restore();
c2d.save();
//Draw minute hand
c2d.rotate(Math.PI/30*(min+(sec/60)));
c2d.beginPath();
c2d.moveTo(0,4);
c2d.lineTo(0,-18);
c2d.stroke();
c2d.restore();
c2d.save();
/*Draw second hand
c2d.rotate(Math.PI/30*sec);
c2d.strokeStyle="#E33";
c2d.lineWidth=1;
c2d.beginPath();
c2d.moveTo(0,3);
c2d.lineTo(0,-18);
c2d.stroke();*/
c2d.restore();

//Additional restore to go back to state before translate
//Alternative would be to simply reverse the original translate
c2d.restore();
}
}

window.onload = function(){
document.getElementById("clockcanvas").onmouseover = hoverClock;
document.getElementById("clockcanvas").onmouseout = unhoverClock;
setInterval(draw, 60000);
draw();
};
Loading

0 comments on commit 81394bb

Please sign in to comment.