View Source Code For This Page | View Resume.xml

PowerShell Pages Source Code for Resume.psh

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<% 
	$detailLevel = $Request.QueryString["detailLevel"]
	if ($detailLevel -eq $null) {
		$detailLevel = 1
	}

	$resumeXml = [xml](gc resume.xml)
	$resume = $resumeXml.resume
	
	function testDetail($detail) {
		return $detail -le $detailLevel
	}
 %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title><%= $resume.contact.firstName + " " + $resume.contact.lastName %> - Resume</title>
	<link rel="stylesheet" type="text/css" href="Style.css"/>
	<!--[if IE]> <link rel="stylesheet" type="text/css" href="IEStyle.css"/><![endif]-->
</head>
<body>
	<div>
	<div id="Navigation">
		<div id="NavigationLinks">
			<a href="http://www.codeplex.com/PowerShellPages">Resume Made Using PowerShell Pages</a> |
			<a href="ViewSource.psh?page=Resume.psh">View Source Code</a> |
			<a href="Resume.xml">View Resume.xml</a> |
			<% if ($detailLevel -ne 1) { %>
				<a href="Resume.psh">Summary View</a>
			<% } %>
			<% if ($detailLevel -ne 4) { %>
				<a href="Resume.psh?detailLevel=4">Detailed View</a>
			<% } %>
		</div>
	</div>
	<div id="MainContent">
		<div id="ContactInformation">
			<% if ($resume.contact.address -ne $null) { %>
			<address>
				<% $address = $resume.contact.address %>
				$($address.street)<br/>
				$($address.city), $($address.state) $($address.postalCode)
			</address>
			<% } %>
			<% if (-not [string]::IsNullOrEmpty($resume.contact.phoneNumber)) { %>
			<div>$($resume.contact.phoneNumber)</div>
			<% } %>
			<a href="mailto:$($resume.contact.email)">$($resume.contact.email)</a><br/>
			<a href="$($resume.contact.url)">$($resume.contact.url)</a>
		</div>
		<h1><%= $resume.contact.firstName + " " + $resume.contact.lastName %></h1>
		<div>
			<h2><%= $resume.objective.title %></h2>
			<div>
				<%= $resume.objective.get_innerText() %>
			</div>
		</div> 
		<div>
			<% $resume.skillSet.skillGroup | % { %>
				<div>
					<h3><%= $_.name %></h3>
					<ul>
						<% $_.skill | ? { testDetail($_.detailLevel) } | % { %>
							<li>
								<b><%= $_.name %></b>
								<% if ($_.description -ne $null) { %>
									- <%= $_.description %>
								<% } %>
								<% if ($_.startDate -ne $null) {
									$endDate = $_.lastUsedDate
									if ($endDate -eq $null) {
										$endDate = [DateTime]::UtcNow
									}
									$monthCount = [Math]::Ceiling(([DateTime]::Parse($endDate) - [DateTime]::Parse($_.startDate)).TotalDays / 30)
									$suffix = "months"
									if ($monthCount -eq 1) {
										$suffix = "month"
									}
									
									if ($monthCount -ge 12) {
										$monthCount = [math]::Round($monthCount/12)
										$suffix = "years"
										if ($monthCount -eq 1) {
											$suffix = "year"
										}
									}
								%>
									($monthCount $suffix)
								<% } %>
							</li>
						<% } %>
					</ul>
				<div>
			<% } %>
		</div>
		<div>
			<h3>Employment History</h3>
			<ul id="JobHistory">
				<% $resume.employmentHistory.job | ? { testDetail($_.detailLevel) } | % { 
					$endDate = "Present"
					if (-not [string]::IsNullOrEmpty($_.endDate)) {					
						$endDate = [DateTime]::Parse($_.endDate).ToString('MMMM yyyy')
					}
				%>
					<li class="JobListing">
						<div>
							<div style="float:right">
								<%= [DateTime]::Parse($_.startDate).ToString('MMMM yyyy') %> - <%= $endDate %>
							</div> 
							<h3 class="HeaderGroup"><%= $_.employer.name + ", " + $_.employer.location %></h3>
							<h4 class="HeaderGroup">$($_.title)</h4>
							<div style="clear:both"</div>
							<div>$($_.description)</div>
							<% if (($_.keyPoints.keyPoint | ? { testDetail($_.detailLevel) }).Length -gt 0) { %>
								<ul class="KeyPoints">
									<% $_.keyPoints.keyPoint | ? { testDetail($_.detailLevel) } | % { %>
										<li><%= $_.description %></li>
									<% } %>
								</ul>					
							<% } %>
		<!--					<div>
								<%
									#$_.technologies.technology | ? { testDetail($_.detailLevel) } | select name | sv techNames
									#"(" + [string]::Join(", ", $techNames) + ")" | write-host
								%>
							</div> -->
							<% if ($_.links -ne $null) { %>
								<ul class="ListOfLinks">
									<% $_.links.link | % { %>
										<li>$($_.name): <a href="$($_.url)">$($_.url)</a></li>
									<% } %>	
								</ul>
							<% } %>
						</div>
					</li>
				<% } %>
			</ul>
		</div>
	</div>
	</div>
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-1751576-2";
urchinTracker();
</script>

</body>
</html>