added analytics link, robots.txt route, and meta stuff
This commit is contained in:
parent
cb48be9903
commit
e9ab708fca
@ -56,6 +56,13 @@ namespace VideoGameQuotes.Web.Controllers {
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult Robots() {
|
||||
const string robotsTxt = @"User-Agent: *
|
||||
Disallow: /search/
|
||||
";
|
||||
return Content(robotsTxt, "text/plain", Encoding.UTF8);
|
||||
}
|
||||
|
||||
public ActionResult Favicon() {
|
||||
return File("/media/images/favicon.png", "image/png");
|
||||
}
|
||||
|
@ -52,6 +52,7 @@ namespace VideoGameQuotes.Web {
|
||||
routes.IgnoreRoute("media/{*anything}");
|
||||
|
||||
routes.MapRoute("favicon", "favicon.ico", new { controller = "Home", action = "Favicon" });
|
||||
routes.MapRoute("robots", "robots.txt", new { controller = "Home", action = "Robots" });
|
||||
|
||||
//bullshit route so that RenderAction works
|
||||
routes.MapSmartRoute("mainmenu", "home/mainmenu", new { controller = "Home", action = "MainMenu" });
|
||||
|
@ -249,8 +249,9 @@
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Views\Home\Index.aspx" />
|
||||
<Content Include="Views\Shared\Site.Master" />
|
||||
<Content Include="Views\Shared\PageWithoutAnalytics.Master" />
|
||||
<Content Include="Views\Web.config" />
|
||||
<Content Include="Views\Shared\Site.master" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
|
@ -5,9 +5,10 @@
|
||||
|
||||
<p>
|
||||
<strong>Video Game Quotes</strong> is a little project that I decided to tackle one day. I gave
|
||||
myself a week to implement everything and throw it up on the internet. It actually took three
|
||||
myself a week to implement everything and throw it up on the internet. It actually took three and a half
|
||||
weeks as I struggled with <a href="http://incubator.apache.org/lucene.net/" class="external">Lucene</a> and my
|
||||
obviously poor graphic design skills.
|
||||
obviously poor graphic design skills. <a href="http://www.mono-project.com/" class="external">Mono</a> was also
|
||||
a bit more of a disaster area than I expected.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@ -29,7 +30,8 @@
|
||||
<a href="http://unity.codeplex.com/" class="external">Unity</a> and <a href="http://nhforge.org/" class="external">NHibernate</a>.
|
||||
It runs on <a href="http://nginx.org/" class="external">nginx</a> using <a href="http://www.mono-project.com/" class="external">Mono</a>
|
||||
via FastCGI on Ubuntu. It uses MySQL for the backend and
|
||||
<a href="http://incubator.apache.org/lucene.net/" class="external">Lucene.NET</a> for search indexing.
|
||||
<a href="http://incubator.apache.org/lucene.net/" class="external">Lucene.NET</a> for search indexing. This was my first
|
||||
foray into ASP.NET on Linux.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<VideoGameQuotes.Web.Models.SearchModel>" MasterPageFile="~/Views/Shared/Site.Master" %>
|
||||
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage<VideoGameQuotes.Web.Models.SearchModel>" MasterPageFile="~/Views/Shared/PageWithoutAnalytics.Master" %>
|
||||
<%@ Import Namespace="VideoGameQuotes.Web.Models" %>
|
||||
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent">Search<%= !string.IsNullOrEmpty(Model.SearchQuery) ? " - " + Model.SearchQuery : "" %></asp:Content>
|
||||
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">
|
||||
|
@ -1,17 +0,0 @@
|
||||
<%@ Master Language="C#" MasterPageFile="PageWithoutAnalytics.Master" %>
|
||||
<asp:Content runat="server" ID="Title" ContentPlaceHolderID="TitleContent"><asp:ContentPlaceHolder runat="server" ID="TitleContent" /></asp:Content>
|
||||
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent"><asp:ContentPlaceHolder runat="server" ID="MainContent" /></asp:Content>
|
||||
<asp:Content runat="server" ID="Deferrable" ContentPlaceHolderID="DeferrableScripts">
|
||||
<asp:ContentPlaceHolder runat="server" ID="DeferrableScripts" />
|
||||
<script type="text/javascript">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', 'UA-6733824-10']);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
</asp:Content>
|
@ -6,8 +6,10 @@
|
||||
<head>
|
||||
<title>Video Game Quotes :: <asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<meta name="description" content="A database of video game quotes: everybody’s dream come true." />
|
||||
<link rel="stylesheet" type="text/css" href="/media/css/vgquotes.css" />
|
||||
<link rel="shortcut icon" type="image/png" href="/media/images/favicon.png" />
|
||||
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
@ -1,53 +0,0 @@
|
||||
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
|
||||
<head>
|
||||
<title>Video Game Quotes :: <asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
||||
<link rel="stylesheet" type="text/css" href="/media/css/vgquotes.css" />
|
||||
<link rel="shortcut icon" type="image/png" href="/media/images/favicon.png" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="header">
|
||||
<div class="content-container">
|
||||
<div id="logo">
|
||||
<h1 class="mir"><%= Html.ActionLink("Video Game Quotes", "Index", "Home", null, new { title = "Video Game Quotes" })%></h1>
|
||||
</div>
|
||||
|
||||
<div id="main-menu">
|
||||
<ul class="clearfix menu">
|
||||
<% Html.RenderAction("MainMenu", "Home"); %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-container">
|
||||
<div id="main">
|
||||
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<p>
|
||||
© <%= DateTime.UtcNow.Year %> <a href="http://tommymontgomery.com/" title="Who is this man?">Tommy Montgomery</a><br />
|
||||
<%= Html.ActionLink("about", "about", "Home") %> |
|
||||
<%= Html.ActionLink("credits", "about", "Home", null, null, "credits", null, null) %> |
|
||||
<% if (!Request.IsAuthenticated) { %>
|
||||
<a href="#" id="login-link">login</a>
|
||||
<% } else { %>
|
||||
<%= Html.ActionLink("logout", "logout", "Home", new { redirectUrl = Request.Path }, null)%>
|
||||
<% } %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
|
||||
<script type="text/javascript" src="/media/js/vgquotes.compressed.js"></script>
|
||||
<asp:ContentPlaceHolder ID="DeferrableScripts" runat="server" />
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user