Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
107 lines (94 sloc) 4.13 KB
@using System.IO;
@using Microsoft.AspNet.Html.Abstractions
@using Microsoft.Framework.WebEncoders;
@functions
{
class SocialLink : IHtmlContent
{
readonly string _url;
readonly string _iconIdentifier;
public SocialLink(string url, string iconIdentifier)
{
_url = url;
_iconIdentifier = iconIdentifier;
}
public void WriteTo(TextWriter writer, IHtmlEncoder encoder)
{
writer.Write("<li>");
writer.Write("<a href=\""); writer.Write(_url); writer.Write("\">");
writer.Write("<i class=\"hawkicon-"); writer.Write(_iconIdentifier); writer.Write(" social-link\"></i>");
writer.Write("</a>");
writer.Write("</li>");
}
public static SocialLink Create(string url, string iconIdentifier)
{
return new SocialLink(url, iconIdentifier);
}
}
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DevHawk @ViewBag.Title</title>
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
<link href='//fonts.googleapis.com/css?family=Roboto:400,700|Roboto+Slab:400,700|Roboto+Condensed|Roboto+Mono|Audiowide' rel='stylesheet' type='text/css'>
<environment names="Development">
<link href="~/css/hawk.less" rel="stylesheet/less">
<link href="~/css/hawkicon.less" rel="stylesheet/less">
<link href="~/css/vs.less" rel="stylesheet/less">
</environment>
<environment names="Staging,Production">
<link rel="stylesheet" type="text/css" href="~/css/hawk.min.css" />
</environment>
@Html.ApplicationInsightsJavaScript(TelemetryConfiguration)
</head>
<body>
<div class="navbar navbar-default">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a asp-action="Index" asp-controller="Home" class="navbar-brand">DevHawk</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a asp-action="Index" asp-controller="Blog">Blog</a></li>
<li><a asp-action="Archives" asp-controller="Blog">Archives</a></li>
<li><a asp-action="Index" asp-controller="Feed">RSS</a></li>
</ul>
</div>
</div>
</div>
@RenderBody()
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
@SocialLink.Create("mailto:harry@devhawk.net", "mail")
@SocialLink.Create("skype:harrypierson", "skype")
@SocialLink.Create("http://twitter.com/devhawk", "twitter")
@SocialLink.Create("https://github.com/devhawk/", "github")
@SocialLink.Create("http://stackoverflow.com/users/1179731/devhawk", "stackoverflow")
@SocialLink.Create("http://facebook.com/devhawk", "facebook")
@SocialLink.Create("https://www.linkedin.com/in/harrypierson", "linkedin")
@SocialLink.Create("http://live.xbox.com/member/RayTracer", "xbox")
</ul>
<p class="copyright text-muted text-center">Copyright &copy; Harry Pierson @DateTime.Now.Year</p>
</div>
</div>
</div>
</footer>
<environment names="Development">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.1/less.js"></script>
</environment>
<script src="//code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</body>
</html>