added analytics link, robots.txt route, and meta stuff

This commit is contained in:
tmont 2011-03-05 23:49:19 +00:00
parent cb48be9903
commit e9ab708fca
8 changed files with 18 additions and 75 deletions

View File

@ -56,6 +56,13 @@ namespace VideoGameQuotes.Web.Controllers {
return View(); return View();
} }
public ActionResult Robots() {
const string robotsTxt = @"User-Agent: *
Disallow: /search/
";
return Content(robotsTxt, "text/plain", Encoding.UTF8);
}
public ActionResult Favicon() { public ActionResult Favicon() {
return File("/media/images/favicon.png", "image/png"); return File("/media/images/favicon.png", "image/png");
} }

View File

@ -52,6 +52,7 @@ namespace VideoGameQuotes.Web {
routes.IgnoreRoute("media/{*anything}"); routes.IgnoreRoute("media/{*anything}");
routes.MapRoute("favicon", "favicon.ico", new { controller = "Home", action = "Favicon" }); 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 //bullshit route so that RenderAction works
routes.MapSmartRoute("mainmenu", "home/mainmenu", new { controller = "Home", action = "MainMenu" }); routes.MapSmartRoute("mainmenu", "home/mainmenu", new { controller = "Home", action = "MainMenu" });

View File

@ -249,8 +249,9 @@
<DependentUpon>Web.config</DependentUpon> <DependentUpon>Web.config</DependentUpon>
</Content> </Content>
<Content Include="Views\Home\Index.aspx" /> <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\Web.config" />
<Content Include="Views\Shared\Site.master" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<ItemGroup> <ItemGroup>

View File

@ -5,9 +5,10 @@
<p> <p>
<strong>Video Game Quotes</strong> is a little project that I decided to tackle one day. I gave <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 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>
<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>. <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> 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 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>
<p> <p>

View File

@ -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" %> <%@ 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="Title" ContentPlaceHolderID="TitleContent">Search<%= !string.IsNullOrEmpty(Model.SearchQuery) ? " - " + Model.SearchQuery : "" %></asp:Content>
<asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent"> <asp:Content runat="server" ID="Main" ContentPlaceHolderID="MainContent">

View File

@ -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>

View File

@ -6,8 +6,10 @@
<head> <head>
<title>Video Game Quotes :: <asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title> <title>Video Game Quotes :: <asp:ContentPlaceHolder ID="TitleContent" runat="server" /></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/> <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="description" content="A database of video game quotes: everybody&rsquo;s dream come true." />
<link rel="stylesheet" type="text/css" href="/media/css/vgquotes.css" /> <link rel="stylesheet" type="text/css" href="/media/css/vgquotes.css" />
<link rel="shortcut icon" type="image/png" href="/media/images/favicon.png" /> <link rel="shortcut icon" type="image/png" href="/media/images/favicon.png" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server" />
</head> </head>
<body> <body>

View File

@ -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>
&copy; <%= 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>