windhamdavid 4 years ago
parent
commit
8d302cedaf
8 changed files with 196 additions and 56 deletions
  1. 12 8
      footer-home.php
  2. 96 3
      inc/analytics.php
  3. 12 3
      js/analytics.js
  4. 10 29
      page-about.php
  5. 30 9
      page-analytics.php
  6. 20 1
      page-bio.php
  7. 15 0
      page-cv.php
  8. 1 3
      style.css

+ 12 - 8
footer-home.php

@@ -4,17 +4,19 @@
 			<div class="col-md-2">
 				<ul>
 					<li><a href="<?php echo home_url( '/' ); ?>about"><span class="fa fa-file-text-o fa-fw"></span> About</a></li>
-					<li><a href="<?php echo home_url( '/' ); ?>desk"><span class="fa fa-pencil-square-o fa-fw"></span> Notebook</a></li>
+					<li><a href="<?php echo home_url( '/' ); ?>desk"><span class="fa fa-pencil-square-o fa-fw"></span> Desk</a></li>
+					<li><a href="http://code.davidawindham.com"><span class="fa fa-code fa-fw"></span> Code</a></li>
 					<li><a href="<?php echo home_url( '/' ); ?>studio"><span class="fa fa-paint-brush fa-fw"></span> Studio</a></li>
-					<li><a href="<?php echo home_url( '/' ); ?>contact"><span class="fa fa-lightbulb-o fa-fw"></span> Projects</a></li>
-					<li><a href="<?php echo home_url( '/' ); ?>sitemap"><span class="fa fa-sitemap fa-fw"></span> Sitemap</a></li>
+					<li><a href="<?php echo home_url( '/' ); ?>studio/work"><span class="fa fa-lightbulb-o fa-fw"></span> Projects</a></li>
+					<li><a href="<?php echo home_url( '/' ); ?>contact"><span class="fa fa-envelope-o fa-fw"></span> Contact</a></li>
+					
 				</ul>
 			</div>
 			<div class="col-md-4">
 				<ul>
-					<li class="dim"><a href="<?php echo home_url( '/' ); ?>"><span class="fa fa-home fa-fw"></span> Address</a>: South Carolina USA</li>
-					<li class="dim"><a href="<?php echo home_url( '/' ); ?>"><span class="fa fa-phone fa-fw"></span> Phone</a>: 803-712-3283</li>
-					<li class="dim"><a href="<?php echo home_url( '/' ); ?>"><span class="fa fa-envelope-o fa-fw"></span> Email</a>: 
+					<li class="dim"><a href="<?php echo home_url( '/' ); ?>contact"><span class="fa fa-home fa-fw"></span> Address</a>: South Carolina USA</li>
+					<li class="dim"><a href="<?php echo home_url( '/' ); ?>contact"><span class="fa fa-phone fa-fw"></span> Phone</a>: 803-712-3283</li>
+					<li class="dim"><a href="<?php echo home_url( '/' ); ?>contact"><span class="fa fa-envelope-o fa-fw"></span> Email</a>: 
 					<span class="email"><script type="text/javascript"> 
 						//<![CDATA[
 
@@ -38,11 +40,13 @@
 						//]]>
 						</script></span>
 					</li>
-					<li class="dim"><a href="<?php echo home_url( '/' ); ?>"><span class="fa fa-group fa-fw"></span> Client</a>: sandbox.davidawindham.com</li>
-					<li class="dim"><a href="<?php echo home_url( '/' ); ?>"><span class="fa fa-calculator fa-fw"></span> Billing</a>: billing.davidawindham.com</li>
+					<li class="dim"><a href="<?php echo home_url( '/' ); ?>client"><span class="fa fa-group fa-fw"></span> Client</a>: sandbox.davidawindham.com</li>
+					<li class="dim"><a href="<?php echo home_url( '/' ); ?>client/billing"><span class="fa fa-calculator fa-fw"></span> Billing</a>: billing.davidawindham.com</li>
+					<li><a href="<?php echo home_url( '/' ); ?>sitemap"><span class="fa fa-sitemap fa-fw"></span> Sitemap</a></li>
 				</ul>
 			</div>
 			<div class="col-md-3">
+				<h5 class="dim cm-sans wow fadeIn">Social</h5>
 				<ul class="social">
 					<li><a href="https://github.com/windhamdavid" class="" rel="me"><span class="fa fa-2x fa-github-square"></span></a></li>
 					<li><a href="http://www.last.fm/user/windhamdavid" class=""><span class="fa fa-2x fa-lastfm-square"></span></a></li>

+ 96 - 3
inc/analytics.php

@@ -18,15 +18,108 @@ function dw_wik_places() {
 	foreach ($content as $row) {
 	    $location = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
 	    $hits = $row['nb_visits'];
-		$actions = $row['nb_actions'];
 		$logo = $row['logo'];
 		$length = $row['sum_visit_length'];
-	    print("<li class='list-group-item'><img src='https://davidawindham.com/wik/$logo'/> $location ( $hits hits ) <span class='badge'> $actions </span></li>");
+	    print("<li class='list-group-item small'><img src='https://davidawindham.com/wik/$logo'/> &nbsp; $location  <span class='badge'> $hits </span></li>");
 	}
 }
 
-function dw_wik() {
+
+function dw_wik_url() {
 	
+	$url = "https://davidawindham.com/wik/";
+	$url .= "?module=API&method=Actions.getPageUrls";
+	$url .= "&idSite=1&period=month&date=yesterday";
+	$url .= "&format=PHP&filter_limit=20";
+	$url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
+
+	$fetched = file_get_contents($url);
+	$content = unserialize($fetched);
+
+	if (!$content) {
+	    print("Error, content fetched = " . $fetched);
+	}
+
+	foreach ($content as $row) {
+	    $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
+		$label = $row['label'];
+		$hits = $row['nb_hits'];
+		$time = $row['avg_time_on_page'];
+	    print("<li class='list-group-item small'> <a href='https://davidawindham.com/$label'>$label</a> <span class='badge'> $hits </span></li>");
+	}
+
+}
+
+function dw_wik_users() {
+	
+	$url = "https://davidawindham.com/wik/";
+	$url .= "?module=API&method=UserSettings.getConfiguration";
+	$url .= "&idSite=1&period=month&date=yesterday";
+	$url .= "&format=PHP&filter_limit=10";
+	$url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
+
+	$fetched = file_get_contents($url);
+	$content = unserialize($fetched);
+
+	if (!$content) {
+	    print("Error, content fetched = " . $fetched);
+	}
+
+	foreach ($content as $row) {
+	    $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
+		$label = $row['label'];
+		$hits = $row['nb_visits'];
+	    print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
+	}
+
+}
+
+
+function dw_wik_keys() {
+	
+	$url = "https://davidawindham.com/wik/";
+	$url .= "?module=API&method=Referrers.getKeywords";
+	$url .= "&idSite=1&period=month&date=yesterday";
+	$url .= "&format=PHP&filter_limit=20";
+	$url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
+
+	$fetched = file_get_contents($url);
+	$content = unserialize($fetched);
+
+	if (!$content) {
+	    print("Error, content fetched = " . $fetched);
+	}
+
+	foreach ($content as $row) {
+	    $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
+		$label = $row['label'];
+		$hits = $row['nb_visits'];
+	    print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
+	}
+
+}
+
+function dw_wik_refs() {
+	
+	$url = "https://davidawindham.com/wik/";
+	$url .= "?module=API&method=Referrers.getAll";
+	$url .= "&idSite=1&period=month&date=yesterday";
+	$url .= "&format=PHP&filter_limit=20";
+	$url .= "&token_auth=d97e3e8f34071515ad1f6e345f6035af";
+
+	$fetched = file_get_contents($url);
+	$content = unserialize($fetched);
+
+	if (!$content) {
+	    print("Error, content fetched = " . $fetched);
+	}
+
+	foreach ($content as $row) {
+	    $urls = htmlspecialchars(html_entity_decode(urldecode($row['label']), ENT_QUOTES), ENT_QUOTES);
+		$label = $row['label'];
+		$hits = $row['nb_visits'];
+	    print("<li class='list-group-item small'> $label <span class='badge'> $hits </span></li>");
+	}
 
 }
 

File diff suppressed because it is too large
+ 12 - 3
js/analytics.js


+ 10 - 29
page-about.php

@@ -15,18 +15,12 @@ get_header('home'); ?>
 					<div class="container first-slide">
 						<h1 class="light super cm-sans" data-wow-duration="4s">There are 400,000,000,000</h1>
 						<h2 class="light cm-concrete">Stars in the Milky Way Galaxy</h2>
-						<svg id="stars" width="300" viewBox="0 0 300 200">
-							<path fill="none" stroke="#777" stroke-width="1px" stroke-miterlimit="10" d="M23.6,3.7l155.1,37.4L295,8.3l-7.6,174.4l-9.3-146.9L171.9,159.6l-24.9-97L36.2,137.1l24.1-59.4l-49.7,8l7.4-80.3"/>
-						</svg>
 					</div>
 			    </div>
 				<div class="item web" data-id="2">
 					<div class="container">
 						<h1 class="light super cm-sans">There are 1,028,932,208</h1>
 						<h2 class="light cm-concrete">Web Sites on the Internet <small>(October 2014)</small></h2>
-						<div class="carousel-caption">
-							<p>Some sort of captions</p>
-						</div>
 						<svg id="sites" width="300px" viewBox="0 0 300 200">
 						</svg>
 					</div>
@@ -77,7 +71,7 @@ get_header('home'); ?>
 	</div>
 	<div class="container-fluid posts-front">
 		<div class="container">
-			<h2 class="dim cm-sans wow fadeIn" data-wow-offset="600">Recent Posts</h2>
+			<h3 class="dim cm-sans wow fadeIn" data-wow-offset="600">Recently</h3>
 			<div class="row">
 				<div class="col-sm-4 wow fadeInLeft" data-wow-offset="500">
 					<article id="main" class="home">
@@ -136,44 +130,31 @@ get_header('home'); ?>
 				<div class="col-sm-6">
 					<h4>Who</h4>
 						<p><img class="me" src="<?php echo get_template_directory_uri();?>/img/me.png">
-							Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie quis urna sit amet vulputate. Pellentesque non venenatis dolor, ut commodo eros. Suspendisse a ultricies nisi, vitae blandit mauris. Sed leo magna, hendrerit ut eleifend eu, rhoncus id lorem. Pellentesque est nunc, venenatis a elementum at, euismod placerat dui. Cras et enim ultrices, accumsan quam in, eleifend sapien. Take a look at my <a href="resume">Bio</a> and <a href="resume">Resume</a></p>
+							Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis molestie quis urna sit amet vulputate. Pellentesque non venenatis dolor, ut commodo eros. Suspendisse a ultricies nisi, vitae blandit mauris. Sed leo magna, hendrerit ut eleifend eu, rhoncus id lorem. Pellentesque est nunc, venenatis a elementum at, euismod placerat dui. Cras et enim ultrices, accumsan quam in, eleifend sapien. Take a look at my <a href="bio">Bio</a> and <a href="CV">CV</a></p>
 					<p>&nbsp;</p>
 					<p>&nbsp;</p>
 				</div>
 				<div class="col-xs-6">
 					<div class="row">
-						<div class="col-sm-6">
+						<div class="col-sm-4">
 							<h4>What</h4>
-							<div class="col-sm-6">
 								<ul>
-									<li>Artist</li>
-									<li>Illustrator</li>
-									<li>Designer</li>
-									<li>Writer</li>
-									<li>Developer</li>
+									<li>Full Stack Developer</li>
+									<li>Artist &amp; Designer</li>
+									<li>Problem Solver</li>
+									<li>Team Player</li>
 									<li>Think-tank</li>
 								</ul>
-							</div>
-							<div class="col-sm-6">
-								<ul>
-									<li>Full Stack</li>
-									<li>Web Developer</li>
-									<li>UX Designer</li>
-									<li>Dev Ops</li>
-									<li>Application</li>
-									<li>Something Else</li>
-								</ul>
-							</div>
 						</div>
-						<div class="col-sm-6">
+						<div class="col-sm-8">
 							<h4>How</h4>
 							<div class="col-sm-4">
 								<ul>
 									<li><img src="" alt="HTML"/></li>
 									<li><img src="" alt="CSS"/></li>
 									<li><img src="" alt="JavaScript"/></li>
-									<li><img src="" alt="PHP"/></li>
 									<li><img src="" alt="Ruby"/></li>
+									<li><img src="" alt="PHP"/></li>
 									<li><img src="" alt="Python"/></li>
 								</ul>
 							</div>
@@ -191,7 +172,7 @@ get_header('home'); ?>
 								<ul>
 									<li><img src="" alt="Adobe CC"/></li>
 									<li><img src="" alt="FCP"/></li>
-									<li><img src="" alt=""/></li>
+									<li><img src="" alt="Illustrator"/></li>
 									<li><img src="" alt=""/></li>
 									<li><img src="" alt=""/></li>
 									<li><img src="" alt=""/></li>

+ 30 - 9
page-analytics.php

@@ -1,29 +1,50 @@
 <?php get_header(); ?>
-
+	<div class="container-full" style="margin:80px 0 -100px">
+		<iframe id="map" width="100%" height="600px" scrolling="yes" frameborder="0"  style="background:#fff" src="https://davidawindham.com/wik/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=UserCountryMap&actionToWidgetize=realtimeMap&idSite=1&period=day&date=today&disableLink=1&widget=1&token_auth=d97e3e8f34071515ad1f6e345f6035af" /></iframe>
+	</div>
 	<div class="container" role="main">
-		<div id="content" class="single" >
+		<article  id="content" class="single" >
+			<div class="row">
+				<div class="col-sm-12">
+					<h4>Analytics</h4>
+					<p>I just put this page together as a simple way to monitor and share traffic on this website using <a href="http://piwik.org/">Piwik</a>. Above is a real time map of geo-located web traffic including the last 24 hours and below are some other statistics from the last month.</p>
+					</div>
+			</div>
 			<div class="row">
 				<div class="col-sm-6">
-					<h4>Recent Visitors</h4>
+					<h4>Rencent Visitors</h4>
 					<ul class="list-group">	
 						<?php echo dw_wik_places()?>
 					</ul>
 				</div>
 				<div class="col-sm-6">
-					<h4>Monthly</h4>
-					
+					<h4>Content</h4>
+					<?php echo dw_wik_url()?>
 				</div>
 			</div>
 			<div class="row">
 				<p>&nbsp;</p>
 			</div>
 			<div class="row">
-				<div class="col-sm-12">
-					<h4>Real Time Map</h4>
-					<iframe id="map" width="100%" height="500px" scrolling="yes" frameborder="0"  style="background:transparent" src="https://davidawindham.com/wik/index.php?module=Widgetize&action=iframe&widget=1&moduleToWidgetize=UserCountryMap&actionToWidgetize=realtimeMap&idSite=1&period=day&date=today&disableLink=1&widget=1&token_auth=d97e3e8f34071515ad1f6e345f6035af" /></iframe>
+				<div class="col-sm-6">
+					<h4>Users</h4>
+					<ul class="list-group">	
+						<?php echo dw_wik_users()?>
+					</ul>
+				</div>
+				<div class="col-sm-6">
+					<h4>Keywords</h4>
+					<ul class="list-group">	
+						<?php echo dw_wik_keys()?>
+					</ul>
+					<h4>Referrals</h4>
+					<ul class="list-group">	
+						<?php echo dw_wik_refs()?>
+					</ul>
 				</div>
 			</div>
-		</div>
+			
+		</article>
 	</div>
 
 <?php get_footer(); ?>

+ 20 - 1
page-bio.php

@@ -15,9 +15,28 @@
 							<p class="dim right"><small>December, 2014</small></p>		
 						</div>
 						<div class="col-md-6">
-							<?php the_content(); ?>
+							I am 41 years old<br>
+							I am married to Ginny<br>
+							I live in Greenwood South Carolina.<br>
+							I lived in Charleston, SC for 18 years<br>
+							I lived in Columbia, SC for 18 years<br>
+							I’ve been to every state except Texas and Alaska<br>
+							I’ve been to Canada, U.K., Germany, and India<br>
+							I have two dogs – Boozie &amp; Zeke<br>
+							I have two cats – Cotton &amp; Peanut<br>
+							I enjoy playing tennis and golf<br>
+							I enjoy cooking and gardening<br>
+							I enjoy learning, solving puzzles, and games<br>
+							I enjoy traveling and meeting people<br>
+							I enjoy art and music<br>
+							I enjoy life<br>
 						</div>
 					</div>	
+					<div class="row">
+						<div class="col-md-12">
+							<?php the_content(); ?>
+						</div>
+					</div>
 				</div>
 			</div>
 			<?php endwhile; ?>

+ 15 - 0
page-cv.php

@@ -0,0 +1,15 @@
+<?php get_header(); ?>
+
+	<div class="container">
+		<article id="content" class="single" role="main">
+			<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
+			<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
+				<div class="entry-content">
+					<?php the_content(); ?>
+				</div>
+			</div>
+			<?php endwhile; ?>
+		</article>
+	</div>
+	
+<?php get_footer(); ?>

+ 1 - 3
style.css

@@ -1306,9 +1306,7 @@ h2.entry-title {
 .entry-content p {
 	font-family: "Computer Modern";
 }
-.entry-content h5 {
-	font: 14px "Courier New", Courier, mono;
-}
+
 .signature {
 	float: right;
 	margin: 10px 150px 40px 0px;