add ask, duck duck go support

This commit is contained in:
Tommy Parnell
2015-08-02 14:23:42 -04:00
parent 439141fbb2
commit 88f77f7f8c
36 changed files with 714 additions and 108 deletions

3
.gitignore vendored
View File

@@ -6,7 +6,8 @@
*.user *.user
*.userosscache *.userosscache
*.sln.docstates *.sln.docstates
*.pubxml
*.pubxml.user
# User-specific files (MonoDevelop/Xamarin Studio) # User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs *.userprefs

View File

@@ -23,10 +23,20 @@ namespace lmltfy
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include( bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js", "~/Scripts/bootstrap.js",
"~/Scripts/respond.js")); "~/Scripts/respond.js"));
bundles.Add(new ScriptBundle("~/bundles/home")
.Include(
"~/Scripts/app/highlight.js",
"~/Scripts/app/Home.js"));
bundles.Add(new ScriptBundle("~/bundles/search")
.Include(
"~/Scripts/underscore.min.js",
"~/Scripts/app/Search.js"));
bundles.Add(new StyleBundle("~/Content/css").Include( bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css", "~/Content/bootstrap.css",
"~/Content/site.css")); "~/Content/site.css"));
} }
} }
} }

View File

@@ -15,10 +15,6 @@
.dl-horizontal dt { .dl-horizontal dt {
white-space: normal; white-space: normal;
} }
footer {
/* Set width on the form input elements since they're 100% wide by default */ padding-top: 100px;
input, }
select,
textarea {
max-width: 280px;
}

View File

@@ -1,55 +1,57 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using CsQuery;
using lmltfy.Models;
using lmltfy.Factories; using lmltfy.Factories;
using lmltfy.Models;
using lmltfy.Util;
namespace lmltfy.Controllers namespace lmltfy.Controllers
{ {
public class HomeController : Controller public class HomeController : Controller
{ {
private lmltfyContext db = new lmltfyContext(); private lmltfyContext db = new lmltfyContext();
private Regex reg = new Regex(@"(\$\('#keyvol'\).val\('(?<key>.*)\'\)\;)", RegexOptions.Compiled);
[Route("")] [Route("")]
public ActionResult Index() [Route("h/{application}")]
public ActionResult Index(string application = AppNames.Lycos)
{ {
return View(); var app = application.ToAppEnum();
if (!app.HasValue)
{
return new HttpStatusCodeResult(404);
}
return View(new ApplicationBrandingFactory().ResoleBrand(app.Value));
} }
[HttpPost] [HttpPost]
[Route("")] [Route("")]
public string Index([Bind(Include = "Search")] SearchModel searchModel) public string Index([Bind(Include = "Search,Brand")] SearchModel searchModel)
{ {
searchModel.Url = new UrlGeneration().Generate(); searchModel.Url = new UrlGeneration().Generate();
while (db.SearchModels.Any(a => a.Url == searchModel.Url)) while (db.SearchModels.Any(a => a.Url == searchModel.Url))
{ {
searchModel.Url = new UrlGeneration().Generate(); searchModel.Url = new UrlGeneration().Generate();
} }
if (!ModelState.IsValid) throw new HttpException(500, "Error parsing query");
db.SearchModels.Add(searchModel); db.SearchModels.Add(searchModel);
db.SaveChanges(); db.SaveChanges();
return Url.Action("Search", "Home", new { url = searchModel.Url}, Request.Url.Scheme); return Url.Action("Search", "Home", new { url = searchModel.Url }, Request.Url.Scheme);
} }
[HttpGet] [HttpGet]
[Route("{url}")] [Route("{url}")]
// [OutputCache(Duration = 86400, Location = System.Web.UI.OutputCacheLocation.ServerAndClient, VaryByParam = "url")]
public ActionResult Search(string url) public ActionResult Search(string url)
{ {
var model = db.SearchModels.FirstOrDefault(a => a.Url == url); var model = db.SearchModels.FirstOrDefault(a => a.Url == url);
if(model == null) if (model == null)
{ {
return new HttpStatusCodeResult(404, "Not found"); return new HttpStatusCodeResult(404, "Not found");
} }
WebClient client = new WebClient();
string downloadString = client.DownloadString("http://lycos.com"); return View(new SearchResultsViewModel(model, new UrlResolverFactory().UrlGenerate(model.Brand, model.Search), new ApplicationBrandingFactory().ResoleBrand(model.Brand)));
var key = reg.Match(downloadString).Groups["key"].Value;
return View(new SearchResultsViewModel(model, key));
} }
protected override void Dispose(bool disposing) protected override void Dispose(bool disposing)

View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using lmltfy.Models;
namespace lmltfy.Factories
{
public class ApplicationBrandingFactory
{
public ApplicationBrandingModel ResoleBrand(ApplicationBrandEnum application)
{
if (application == ApplicationBrandEnum.Ask)
{
return new ApplicationBrandingModel { LogoImageUrl = "/Images/ask.png", Brand = application, LogoImageAlt= "Ask Jeeves" };
}
if (application == ApplicationBrandEnum.Lycos)
{
return new ApplicationBrandingModel {LogoImageUrl = "/Images/logo-homepage.png", Brand = application, LogoImageAlt = "Lycos" };
}
if(application == ApplicationBrandEnum.DuckDuckGo)
{
return new ApplicationBrandingModel { LogoImageUrl = "/Images/ddgo.png", Brand = application, LogoImageAlt = "Duck Duck go" };
}
throw new NotImplementedException();
}
}
}

View File

@@ -7,12 +7,12 @@ namespace lmltfy.Factories
{ {
public class UrlGeneration public class UrlGeneration
{ {
private static readonly List<string> EnumedChars = Enumerable.Repeat("abcdefghijklmnopqrstuvwxyz0123456789", 8).ToList();
public string Generate() public string Generate()
{ {
var chars = "abcdefghijklmnopqrstuvwxyz0123456789";
var random = new Random(); var random = new Random();
return new string( return new string(
Enumerable.Repeat(chars, 8) EnumedChars
.Select(s => s[random.Next(s.Length)]) .Select(s => s[random.Next(s.Length)])
.ToArray()); .ToArray());
} }

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Web;
using lmltfy.Models;
namespace lmltfy.Factories
{
public class UrlResolverFactory
{
Regex lycosRegex = new Regex(@"(\$\('#keyvol'\).val\('(?<key>.*)\'\)\;)", RegexOptions.Compiled);
/// <summary>
/// Generates a url for a given application
/// </summary>
/// <param name="app"></param>
/// <param name="query"></param>
/// <returns></returns>
public RedirectModel UrlGenerate(ApplicationBrandEnum app, string query)
{
if (app == ApplicationBrandEnum.Lycos)
{
return GenerateLycosUrl(query);
}
if (app == ApplicationBrandEnum.Ask)
{
return new RedirectModel($"http://www.ask.com/web?q={query}");
}
if(app == ApplicationBrandEnum.DuckDuckGo)
{
return new RedirectModel($"https://duckduckgo.com/?q={query}");
}
throw new NotImplementedException("Unknown app passed");
}
public RedirectModel GenerateLycosUrl(string query)
{
using (WebClient client = new WebClient())
{
var downloadString = client.DownloadString("http://lycos.com");
var key = lycosRegex.Match(downloadString).Groups["key"].Value;
return new RedirectModel($"http://search.lycos.com/web/?q={query}", $"&keyvol={key}");
}
}
}
}

View File

@@ -5,6 +5,8 @@ using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Optimization; using System.Web.Optimization;
using System.Web.Routing; using System.Web.Routing;
using lmltfy.Factories;
using lmltfy.Models;
namespace lmltfy namespace lmltfy
{ {
@@ -16,6 +18,14 @@ namespace lmltfy
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
RouteConfig.RegisterRoutes(RouteTable.Routes); RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles); BundleConfig.RegisterBundles(BundleTable.Bundles);
//Access the db to JIT the EF dll, and generate a URL to JIT parts of our DLL (improve page loads on subsequent first time app starts)
using (var db = new lmltfyContext())
{
var res = db.SearchModels.FirstOrDefault();
res = res ?? new SearchModel() ;
Console.Write(new UrlGeneration().Generate() + res);
}
} }
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
lmltfy/Images/ask.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

BIN
lmltfy/Images/ddgo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

151
lmltfy/Images/ddgo.svg Normal file
View File

@@ -0,0 +1,151 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="250px" height="200px" viewBox="0 0 250 200" enable-background="new 0 0 250 200" xml:space="preserve">
<g>
<circle fill="#DE5833" cx="127.332" cy="78.966" r="51.15"/>
<g>
<g>
<path fill="#4C4C4C" d="M22.564,180.574v-24.598h8.914c8.487,0,12.352,6.234,12.352,12.031c0,6.256-3.819,12.562-12.352,12.562
L22.564,180.574L22.564,180.574z M25.398,177.74h6.08c6.575,0,9.518-4.904,9.518-9.766c0-4.467-2.979-9.271-9.518-9.271h-6.08
V177.74L25.398,177.74z"/>
</g>
<g>
<path fill="#4C4C4C" d="M55.055,180.857c-4.554,0-7.497-3.137-7.497-7.992v-9.551h2.657v9.516c0,3.496,2.034,5.584,5.442,5.584
c3.195-0.035,5.513-2.488,5.513-5.832v-9.268h2.657v17.26h-2.414l-0.152-3.002l-0.412,0.518
C59.417,179.891,57.468,180.822,55.055,180.857z"/>
</g>
<g>
<path fill="#4C4C4C" d="M76.786,180.893c-4.49,0-9.02-2.771-9.02-8.949c0-5.354,3.625-8.947,9.02-8.947
c2.361,0,4.436,0.842,6.168,2.502l-1.67,1.732c-1.175-1.096-2.781-1.721-4.427-1.721c-3.768,0-6.399,2.646-6.399,6.434
c0,4.445,3.196,6.438,6.364,6.438c1.782,0,3.4-0.636,4.573-1.791l1.736,1.736C81.384,180.029,79.25,180.893,76.786,180.893z"/>
</g>
<g>
<polygon fill="#4C4C4C" points="97.683,180.574 89.248,172.139 89.248,180.574 86.626,180.574 86.626,156.012 89.248,156.012
89.248,170.869 96.621,163.314 100.058,163.314 91.924,171.448 101.051,180.539 101.051,180.574 "/>
</g>
<g>
<path fill="#4C4C4C" d="M104.317,180.574v-24.598h8.913c8.487,0,12.354,6.234,12.354,12.031c0,6.256-3.815,12.562-12.354,12.562
L104.317,180.574L104.317,180.574z M107.15,177.74h6.08c6.575,0,9.519-4.904,9.519-9.766c0-4.467-2.979-9.271-9.519-9.271h-6.08
V177.74z"/>
</g>
<g>
<path fill="#4C4C4C" d="M136.807,180.857c-4.556,0-7.496-3.137-7.496-7.992v-9.551h2.656v9.516c0,3.496,2.034,5.584,5.441,5.584
c3.189-0.035,5.514-2.488,5.514-5.832v-9.268h2.656v17.26h-2.416l-0.15-3.002l-0.412,0.518
C141.168,179.891,139.219,180.822,136.807,180.857z"/>
</g>
<g>
<path fill="#4C4C4C" d="M158.539,180.893c-4.49,0-9.021-2.771-9.021-8.949c0-5.354,3.625-8.947,9.021-8.947
c2.359,0,4.438,0.842,6.168,2.502l-1.67,1.732c-1.176-1.096-2.781-1.721-4.428-1.721c-3.77,0-6.398,2.646-6.398,6.434
c0,4.445,3.197,6.438,6.363,6.438c1.781,0,3.4-0.636,4.572-1.791l1.686,1.688l-0.088,0.091l0.049,0.049
C163.062,180.059,160.961,180.893,158.539,180.893z"/>
</g>
<g>
<polygon fill="#4C4C4C" points="179.436,180.574 171,172.139 171,180.574 168.379,180.574 168.379,156.012 171,156.012
171,170.869 178.373,163.314 181.811,163.314 173.678,171.448 182.803,180.539 182.803,180.574 "/>
</g>
<g>
<path fill="#4C4C4C" d="M196.719,181.035c-9.457,0-12.812-6.75-12.812-12.529c-0.021-3.765,1.256-7.125,3.584-9.467
c2.293-2.305,5.473-3.523,9.192-3.523c3.366,0,6.537,1.279,8.938,3.604l-1.604,1.869c-1.89-1.763-4.685-2.853-7.33-2.853
c-6.854,0-9.979,5.375-9.979,10.367c0,4.908,3.104,9.873,10.051,9.873c2.527,0,4.886-0.865,6.812-2.518l0.091-0.072v-6.062
h-7.729v-2.479h10.276v9.646C203.555,179.691,200.463,181.035,196.719,181.035z"/>
</g>
<g>
<path fill="#4C4C4C" d="M218.453,180.893c-5.188,0-8.949-3.748-8.949-8.914c0-5.246,3.77-9.055,8.949-9.055
c5.289,0,8.982,3.723,8.982,9.055C227.436,177.145,223.658,180.893,218.453,180.893z M218.486,165.332
c-3.727,0-6.326,2.734-6.326,6.646c0,3.729,2.646,6.436,6.293,6.436c3.709,0,6.326-2.646,6.361-6.434
C224.814,168.127,222.154,165.332,218.486,165.332z"/>
</g>
</g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<g>
<defs>
<path id="SVGID_1_" d="M178.684,78.824c0,28.316-23.035,51.354-51.354,51.354c-28.313,0-51.348-23.039-51.348-51.354
c0-28.313,23.036-51.349,51.348-51.349C155.648,27.475,178.684,50.511,178.684,78.824z"/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" overflow="visible"/>
</clipPath>
<g clip-path="url(#SVGID_2_)">
<path fill="#D5D7D8" d="M148.293,155.158c-1.801-8.285-12.262-27.039-16.23-34.969
c-3.965-7.932-7.938-19.11-6.129-26.322c0.328-1.312-3.436-11.308-2.354-12.015
c8.416-5.489,10.632,0.599,14.002-1.862c1.734-1.273,4.09,1.047,4.689-1.06c2.158-7.567-3.006-20.76-8.771-26.526
c-1.885-1.879-4.771-3.06-8.03-3.687c-1.254-1.713-3.275-3.36-6.138-4.879c-3.188-1.697-10.121-3.938-13.717-4.535
c-2.492-0.41-3.055,0.287-4.119,0.461c0.992,0.088,5.699,2.414,6.615,2.549c-0.916,0.619-3.607-0.028-5.324,0.742
c-0.865,0.392-1.512,1.877-1.506,2.58c4.91-0.496,12.574-0.016,17.1,2c-3.602,0.41-9.08,0.867-11.436,2.105
c-6.848,3.608-9.873,12.035-8.07,22.133c1.804,10.075,9.738,46.85,12.262,59.129
c2.525,12.264-5.408,20.189-10.455,22.354l5.408,0.363l-1.801,3.967c6.484,0.719,13.695-1.439,13.695-1.439
c-1.438,3.965-11.176,5.412-11.176,5.412s4.691,1.438,12.258-1.447c7.578-2.883,12.263-4.688,12.263-4.688
l3.604,9.373l6.854-6.847l2.885,7.211C144.686,165.26,150.096,163.453,148.293,155.158z"/>
<path fill="#FFFFFF" d="M150.471,153.477c-1.795-8.289-12.256-27.043-16.228-34.979
c-3.97-7.936-7.935-19.112-6.13-26.321c0.335-1.309,0.341-6.668,1.429-7.379c8.411-5.494,7.812-0.184,11.187-2.645
c1.74-1.271,3.133-2.806,3.738-4.912c2.164-7.572-3.006-20.76-8.773-26.529c-1.879-1.879-4.768-3.062-8.023-3.686
c-1.252-1.718-3.271-3.361-6.13-4.882c-5.391-2.862-12.074-4.006-18.266-2.883c0.99,0.09,3.256,2.138,4.168,2.273
c-1.381,0.936-5.053,0.815-5.029,2.896c4.916-0.492,10.303,0.285,14.834,2.297c-3.602,0.41-6.955,1.3-9.311,2.543
c-6.854,3.603-8.656,10.812-6.854,20.914c1.807,10.097,9.742,46.873,12.256,59.126
c2.527,12.26-5.402,20.188-10.449,22.354l5.408,0.359l-1.801,3.973c6.484,0.721,13.695-1.439,13.695-1.439
c-1.438,3.974-11.176,5.406-11.176,5.406s4.686,1.439,12.258-1.445c7.581-2.883,12.269-4.688,12.269-4.688
l3.604,9.373L144,156.35l2.891,7.215C146.875,163.572,152.279,161.768,150.471,153.477z"/>
<path fill="#2D4F8E" d="M109.021,70.691c0-2.093,1.693-3.787,3.789-3.787c2.09,0,3.785,1.694,3.785,3.787
c0,2.094-1.695,3.786-3.785,3.786C110.714,74.478,109.021,72.785,109.021,70.691z"/>
<path fill="#FFFFFF" d="M113.507,69.429c0-0.545,0.441-0.983,0.98-0.983c0.543,0,0.984,0.438,0.984,0.983
c0,0.543-0.441,0.984-0.984,0.984C113.949,70.414,113.507,69.972,113.507,69.429z"/>
<path fill="#2D4F8E" d="M134.867,68.445c0-1.793,1.461-3.25,3.252-3.25c1.801,0,3.256,1.457,3.256,3.25
c0,1.801-1.455,3.258-3.256,3.258C136.328,71.703,134.867,70.246,134.867,68.445z"/>
<path fill="#FFFFFF" d="M138.725,67.363c0-0.463,0.379-0.843,0.838-0.843c0.479,0,0.846,0.38,0.846,0.843
c0,0.469-0.367,0.842-0.846,0.842C139.104,68.205,138.725,67.832,138.725,67.363z"/>
<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="1893.3184" y1="-2381.9795" x2="1901.8867" y2="-2381.9795" gradientTransform="matrix(1 0 0 -1 -1788 -2321)">
<stop offset="0.0056" style="stop-color:#6176B9"/>
<stop offset="0.691" style="stop-color:#394A9F"/>
</linearGradient>
<path fill="url(#SVGID_3_)" d="M113.886,59.718c0,0-2.854-1.291-5.629,0.453c-2.77,1.742-2.668,3.523-2.668,3.523
s-1.473-3.283,2.453-4.892C111.972,57.193,113.886,59.718,113.886,59.718z"/>
<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="1920.2734" y1="-2379.3711" x2="1928.0781" y2="-2379.3711" gradientTransform="matrix(1 0 0 -1 -1788 -2321)">
<stop offset="0.0056" style="stop-color:#6176B9"/>
<stop offset="0.691" style="stop-color:#394A9F"/>
</linearGradient>
<path fill="url(#SVGID_4_)" d="M140.078,59.458c0,0-2.051-1.172-3.643-1.152c-3.271,0.043-4.162,1.488-4.162,1.488
s0.549-3.445,4.732-2.754C139.273,57.417,140.078,59.458,140.078,59.458z"/>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
</g>
<path fill="#FDD20A" d="M124.4,85.295c0.379-2.291,6.299-6.625,10.491-6.887c4.201-0.265,5.51-0.205,9.01-1.043
c3.51-0.838,12.535-3.088,15.033-4.242c2.504-1.156,13.104,0.572,5.631,4.738c-3.232,1.809-11.943,5.131-18.172,6.987
c-6.219,1.861-9.99-1.776-12.06,1.281c-1.646,2.432-0.334,5.762,7.099,6.453c10.037,0.93,19.66-4.521,20.719-1.625
c1.064,2.895-8.625,6.508-14.525,6.623c-5.893,0.111-17.771-3.896-19.555-5.137C126.285,91.205,123.906,88.313,124.4,85.295z"/>
</g>
<g>
<path fill="#65BC46" d="M128.943,115.592c0,0-14.102-7.521-14.332-4.47c-0.238,3.056,0,15.509,1.643,16.451
c1.646,0.938,13.396-6.108,13.396-6.108L128.943,115.592z"/>
<path fill="#65BC46" d="M134.346,115.118c0,0,9.635-7.285,11.754-6.815c2.111,0.479,2.582,15.51,0.701,16.229
c-1.881,0.69-12.908-3.813-12.908-3.813L134.346,115.118z"/>
<path fill="#43A244" d="M125.529,116.389c0,4.932-0.709,7.049,1.41,7.519c2.109,0.473,6.104,0,7.518-0.938
c1.41-0.938,0.232-7.279-0.232-8.465C133.748,113.331,125.529,114.273,125.529,116.389z"/>
<path fill="#65BC46" d="M126.426,115.292c0,4.933-0.707,7.05,1.409,7.519c2.106,0.479,6.104,0,7.519-0.938
c1.41-0.941,0.231-7.279-0.236-8.466C134.645,112.234,126.426,113.18,126.426,115.292z"/>
</g>
</g>
<circle fill="none" stroke="#DE5833" stroke-width="5" stroke-miterlimit="10" cx="127.331" cy="78.965" r="57.5"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 9.8 KiB

View File

@@ -0,0 +1,29 @@
// <auto-generated />
namespace lmltfy.Migrations
{
using System.CodeDom.Compiler;
using System.Data.Entity.Migrations;
using System.Data.Entity.Migrations.Infrastructure;
using System.Resources;
[GeneratedCode("EntityFramework.Migrations", "6.1.3-40302")]
public sealed partial class _2 : IMigrationMetadata
{
private readonly ResourceManager Resources = new ResourceManager(typeof(_2));
string IMigrationMetadata.Id
{
get { return "201507270340540_2"; }
}
string IMigrationMetadata.Source
{
get { return null; }
}
string IMigrationMetadata.Target
{
get { return Resources.GetString("Target"); }
}
}
}

View File

@@ -0,0 +1,18 @@
namespace lmltfy.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class _2 : DbMigration
{
public override void Up()
{
AddColumn("dbo.lmltfy_SearchModel", "Brand", c => c.Int(nullable: false));
}
public override void Down()
{
DropColumn("dbo.lmltfy_SearchModel", "Brand");
}
}
}

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Target" xml:space="preserve">
<value>H4sIAAAAAAAEAM1X224bNxB9L9B/WOyzI0ryS2qsEiiyVRi17CBr57Wgd0cyEV62JNfQflsf8kn9hQ73fpMsOwFa+MVLzpyZOTwcjv75+3vwcS+49wzaMCUX/mwy9T2QkYqZ3C381G7fvfc/fvj1l+AqFnvva2V37uzQU5qF/2RtckGIiZ5AUDMRLNLKqK2dREoQGisyn05/I7MZAYTwEcvzgi+ptExA/oGfKyUjSGxK+UbFwE25jjthjurdUgEmoREsfC643WaTwtD3lpxRTCIEvvU9KqWy1GKKFw8GQquV3IUJLlB+nyWAdlvKDZSpXzTmp1YxnbsqSONYQUWpsUq8EnB2XtJC+u5vItevaUPirpBgm7mqc/IcQ1RHTzltvtePd7Hi2tn26J20nM68YuusVgGKxf2deauU21TDQkJqNUXLz+kjZ9EfkN2rbyAXMuW8nRymh3udBVz6rFUC2mZfYFum/KAxVdJ1JH3P2q/tVNSCAkAZ+96G7m9A7uwTCnz+3vfWbA9xtVIq4kEyVD06WZ3i5y2mTB851PvkaNCCpyNx8ZimJwU+HueTpjKuw6DmJ8skQarzQ8w3r2QqXkg/II04upJJRUsw48jXZs3prrlJpyppDO1HJYXcxaB5hmQXIa+lPZ/3lLYB8Qi6rOkmixQ2ja+Up/g1HdDdMV6ab7XpbEhhQdbwzmEzs5TJGqao0a3C3o4Qhp2q5MyUIujmVKCGYIcXGUtpjrIUROeejx17nV/TZUnRZqt2TA7042BDkwTJbvXncsULi+a8ehe+vnWJAoNEZqSD1dnWkazSdAe9XQyNma6ZNvaSWvpInTZXsRiYdU/jANNVrBHC+12r4b9ycv+3T36kl/ZRGiLXWJsAafMyoU6o274H3vlDSTnVY71wpXgq5MGOesy/amttiGrtdJSyabVByqUhRkB6RPT5JgPCe+9D/xCP3YC+SR29vgk9xQel+l4eUwZyLEx8D8l5ZrGTYpgZC2LiDCbhX3zFGdbbGGyoZFswtmh4+ILM5r1x5/8zehBjYn76/PEfzALy2YWnejgN/NBTPwpbPPYN7qtfduZ08MY3fOwJGvbGk5+Yl16YQtYLP35UmH2Rb9H3/vwZL9HwvgWk/eMhuATDdg2E+ykhIXJCbkArm2u5VRXtWGw7o8qkdyobsDRGzpbasi2NLG5HYEw+3ZWTwRVODPG1vEttktqlMThB8Kxdb0COx8+f227OwV3ivszPKAHTZFgC3MlPKeNxnfd6RFQHIJx8fgdczxsETrcIt8tqpFslTwQq6buEBHByk/YeRMIRzNzJkD7DW3LD6ekGdjTKqrZ5GOTlg+jSHlwyutNUmBKj8Xc/iIn7RfzhX4LHP3FDDwAA</value>
</data>
<data name="DefaultSchema" xml:space="preserve">
<value>dbo</value>
</data>
</root>

View File

@@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace lmltfy.Models
{
public enum ApplicationBrandEnum
{
Lycos = 0,
Ask = 1,
DuckDuckGo = 2
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace lmltfy.Models
{
public class ApplicationBrandingModel : IApplicationBrandingModel
{
public string LogoImageUrl { get; set; }
public string LogoImageAlt { get; set; }
public ApplicationBrandEnum Brand { get; set; }
public IList<string> StyleSheetUrl { get; set; } = new List<string>();
public IList<string> ScriptUrls { get; set; } = new List<string>();
}
}

View File

@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace lmltfy.Models
{
public interface IApplicationBrandingModel
{
string LogoImageUrl { get; set; }
string LogoImageAlt { get; set; }
ApplicationBrandEnum Brand { get; set; }
IList<string> StyleSheetUrl { get; set; }
IList<string> ScriptUrls { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace lmltfy.Models
{
public class RedirectModel
{
public string RedirectUrl { get; set; }
public string Key { get; set; }
public RedirectModel(string redirectUrl, string redirectKey = "")
{
RedirectUrl = redirectUrl;
Key = redirectKey;
}
}
}

View File

@@ -6,9 +6,12 @@ namespace lmltfy.Models
public class SearchModel public class SearchModel
{ {
[AllowHtml] [AllowHtml]
[StringLength(maximumLength: 2000, ErrorMessage = "No more than 2000 characters", MinimumLength = 1)] [StringLength(2000, ErrorMessage = "No more than 2000 characters", MinimumLength = 1)]
public string Search { get; set; } public string Search { get; set; }
[Key] [Key]
public string Url { get; set; } public string Url { get; set; }
[Required]
public ApplicationBrandEnum Brand { get; set; }
} }
} }

View File

@@ -8,8 +8,11 @@ namespace lmltfy.Models
public class SearchResultsViewModel public class SearchResultsViewModel
{ {
public SearchModel SearchModel { get; set; } public SearchModel SearchModel { get; set; }
public string LycosToken { get; set; } public RedirectModel RedirectModel { get; set; }
public SearchResultsViewModel(SearchModel searchModel, string lycosToken)
public IApplicationBrandingModel BrandingModel { get; set; }
public SearchResultsViewModel(SearchModel searchModel, RedirectModel redirectModel, IApplicationBrandingModel brandingModel)
{ {
if (string.IsNullOrWhiteSpace(searchModel.Search)) if (string.IsNullOrWhiteSpace(searchModel.Search))
{ {
@@ -19,12 +22,13 @@ namespace lmltfy.Models
{ {
throw new ArgumentNullException(); throw new ArgumentNullException();
} }
if (string.IsNullOrWhiteSpace(lycosToken)) if (redirectModel == null)
{ {
throw new ArgumentNullException(); throw new ArgumentNullException();
} }
SearchModel = searchModel; SearchModel = searchModel;
LycosToken = lycosToken; RedirectModel = redirectModel;
BrandingModel = brandingModel;
} }
} }

Binary file not shown.

View File

@@ -0,0 +1,11 @@
function showResults(data) {
$("#mainGrp").hide();
$("#resultsDiv").show();
$("#results").val(data.responseText);
$("#resultsDiv").highlight();
}
function disableBtn() {
$("#submitBtn").prop("disabled", true);
$("#LoadingGif").show();
}

View File

@@ -0,0 +1,27 @@
$(document).ready(function () {
var playSearch = function () {
var txt = $("#SearchQuery").val();
var txtLength = txt.length;
var currentText = $("#Search").val();
var currentTextLength = currentText.length;
$("#Search").val(txt.substr(0, currentTextLength + 1));
if (txtLength > currentTextLength) {
_.delay(function () {
$("#Search").focus();
playSearch();
$("#Search").focus();
}, 200);
} else {
_.delay(function () {
window.location.href = $("#RedirUrl").val() + $("#Key").val();
}, 300);
}
}
playSearch();
});

View File

@@ -0,0 +1,15 @@
jQuery.fn.highlight = function () {
$(this).each(function () {
var el = $(this);
el.before("<div/>");
el.prev()
.width(el.width())
.height(el.height())
.css({
"position": "absolute",
"background-color": "#ffff99",
"opacity": ".9"
})
.fadeOut(1200);
});
}

14
lmltfy/Util/AppNames.cs Normal file
View File

@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace lmltfy.Util
{
public struct AppNames
{
public const string Lycos = "Lycos";
public const string Ask = "Ask";
public const string DuckDuckGo = "DuckDuckGo";
}
}

29
lmltfy/Util/Extensions.cs Normal file
View File

@@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using lmltfy.Models;
namespace lmltfy.Util
{
public static class Extensions
{
public static ApplicationBrandEnum? ToAppEnum(this string current)
{
//don't use enum.parse as its slow (reflection and all)
if (string.Equals(current, AppNames.Lycos, StringComparison.CurrentCultureIgnoreCase))
{
return ApplicationBrandEnum.Lycos;
}
if (string.Equals(current, AppNames.Ask, StringComparison.CurrentCultureIgnoreCase))
{
return ApplicationBrandEnum.Ask;
}
if(string.Equals(current, AppNames.DuckDuckGo, StringComparison.CurrentCultureIgnoreCase))
{
return ApplicationBrandEnum.DuckDuckGo;
}
return null;
}
}
}

View File

@@ -1,10 +1,11 @@
@model lmltfy.Models.SearchModel @using lmltfy.Models
@model ApplicationBrandingModel
@using (Ajax.BeginForm(new AjaxOptions() { OnComplete = "showResults", OnBegin = "disableBtn"})) @using (Ajax.BeginForm("Index",new AjaxOptions() { OnComplete = "showResults", OnBegin = "disableBtn" }))
{ {
@Html.DisplayFor(a=>a)
@Html.Partial("SearchBarParitalView") @Html.Partial("SearchBarParitalView", new SearchModel() {Brand = Model.Brand})
} }
@@ -19,31 +20,5 @@
@section Scripts { @section Scripts {
@Scripts.Render("~/bundles/jqueryval") @Scripts.Render("~/bundles/jqueryval")
<script> @Scripts.Render("~/bundles/home")
jQuery.fn.highlight = function () {
$(this).each(function () {
var el = $(this);
el.before("<div/>");
el.prev()
.width(el.width())
.height(el.height())
.css({
"position": "absolute",
"background-color": "#ffff99",
"opacity": ".9"
})
.fadeOut(1200);
});
}
function showResults(data) {
$('#mainGrp').hide();
$('#resultsDiv').show();
$('#results').val(data.responseText);
$('#resultsDiv').highlight();
}
function disableBtn() {
$('#submitBtn').prop('disabled', true);
}
</script>
} }

View File

@@ -1,39 +1,16 @@
@using lmltfy.Models @using lmltfy.Models
@model lmltfy.Models.SearchResultsViewModel @model lmltfy.Models.SearchResultsViewModel
@Html.DisplayFor(a=>a.BrandingModel)
@Html.Partial("SearchBarParitalView", new SearchModel()) @Html.Partial("SearchBarParitalView", new SearchModel())
@Html.HiddenFor(a=>a.SearchModel.Search, new {@Id = "SearchQuery"}) @Html.HiddenFor(a=>a.SearchModel.Search, new {@Id = "SearchQuery"})
@Html.HiddenFor(a=>a.LycosToken, new { @Id = "LycosToken" }) @Html.HiddenFor(a=>a.RedirectModel.RedirectUrl, new { @Id = "RedirUrl" })
@Html.HiddenFor(a => a.RedirectModel.Key, new { @Id = "Key" })
@section Scripts @section Scripts
{ {
<script src="~/Scripts/underscore.min.js"></script> @Scripts.Render("~/bundles/search")
<script>
$(document).ready(function() {
var playSearch = function() {
var txt = $('#SearchQuery').val();
var txtLength = txt.length;
var currentText = $('#Search').val();
var currentTextLength = currentText.length;
$('#Search').val(txt.substr(0, currentTextLength + 1));
if (txtLength > currentTextLength) {
_.delay(playSearch, 200);
} else {
_.delay(function() {
window.location.href = "http://search.lycos.com/web/?q=" + txt + "&keyvol=" + $('#LycosToken').val();
}, 300);
}
}
playSearch();
});
</script>
} }

View File

@@ -0,0 +1,21 @@
@model lmltfy.Models.ApplicationBrandingModel
<h2 class="text-center" style="margin-bottom: 50px">Let Me <img src="@Model.LogoImageUrl" alt="@Model.LogoImageAlt" /> That for you</h2>
@section styles
{
@foreach (var sheet in Model.StyleSheetUrl)
{
<link rel="stylesheet" href="@sheet"/>
}
}
@section scripts
{
@foreach (var script in Model.ScriptUrls)
{
<script src="@script"></script>
}
}

View File

@@ -1,14 +1,18 @@
@model lmltfy.Models.SearchModel @model lmltfy.Models.SearchModel
<h2 class="text-center" style="margin-bottom: 50px">Let Me <img src="~/Images/logo-homepage.png" alt="lycos" /> That for you</h2> <div class="col-sm-offset-2" id="mainGrp">
<div class="col-md-offset-4" id="mainGrp"> <div class="form">
<div class="form-inline"> <div class="form-group col-sm-8">
<div class="form-group"> @Html.EditorFor(model => model.Search, new {htmlAttributes = new {@class = "form-control", @placeholder = "Search"}})
@Html.EditorFor(model => model.Search, new { htmlAttributes = new { @class = "form-control", @placeholder = "Search" } })
</div>
<button type="submit" class="btn btn-default" id="submitBtn" style="vertical-align: bottom">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search
</button>
</div>
<div class="col-sm-2">
<button type="submit" class="btn btn-default" id="submitBtn" style="vertical-align: bottom">
<span class="glyphicon glyphicon-search" aria-hidden="true"></span> Search
</button><img src="~/Images/ajax-loader.gif" id="LoadingGif" style="display: none" />
@Html.ValidationMessageFor(model => model.Search)
@Html.HiddenFor(a=>a.Brand)
</div>
</div> </div>
</div> </div>

View File

@@ -3,22 +3,27 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="A website to generate lycos searches automagically">
<title>lmltfy</title> <title>lmltfy</title>
@Styles.Render("~/Content/css") @Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr") @Scripts.Render("~/bundles/modernizr")
@RenderSection("styles", required: false)
</head> </head>
<body> <body>
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="navbar-header">
@Html.ActionLink("lmltfy", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" }) @Html.ActionLink("Lycos", "Index", "Home", new { area = "", application = lmltfy.Util.AppNames.Lycos }, new { @class = "navbar-brand" })
@Html.ActionLink("Ask", "Index", "Home", new { area = "", application = lmltfy.Util.AppNames.Ask }, new { @class = "navbar-brand" })
@Html.ActionLink("Duck Duck Go", "Index", "Home", new { area = "", application = lmltfy.Util.AppNames.DuckDuckGo }, new { @class = "navbar-brand" })
</div> </div>
</div> </div>
</div> </div>
<div class="container body-content"> <div class="container body-content">
@RenderBody() @RenderBody()
<hr />
<footer> <footer>
<hr />
<p>&copy; @DateTime.Now.Year</p> <p>&copy; @DateTime.Now.Year</p>
</footer> </footer>
</div> </div>

View File

@@ -0,0 +1 @@
google-site-verification: google2ad737791aece819.html

View File

@@ -45,10 +45,6 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="CsQuery, Version=1.3.3.249, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\CsQuery.1.3.4\lib\net40\CsQuery.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath> <HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private> <Private>True</Private>
@@ -158,7 +154,9 @@
<Compile Include="App_Start\FilterConfig.cs" /> <Compile Include="App_Start\FilterConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="Controllers\HomeController.cs" /> <Compile Include="Controllers\HomeController.cs" />
<Compile Include="Factories\ApplicationBrandingFactory.cs" />
<Compile Include="Factories\UrlGeneration.cs" /> <Compile Include="Factories\UrlGeneration.cs" />
<Compile Include="Factories\UrlResolverFactory.cs" />
<Compile Include="Global.asax.cs"> <Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon> <DependentUpon>Global.asax</DependentUpon>
</Compile> </Compile>
@@ -166,11 +164,21 @@
<Compile Include="Migrations\201507251954543_1.Designer.cs"> <Compile Include="Migrations\201507251954543_1.Designer.cs">
<DependentUpon>201507251954543_1.cs</DependentUpon> <DependentUpon>201507251954543_1.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Migrations\201507270340540_2.cs" />
<Compile Include="Migrations\201507270340540_2.Designer.cs">
<DependentUpon>201507270340540_2.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" /> <Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\ApplicationBrandingModel.cs" />
<Compile Include="Models\ApplicationBrandEnum.cs" />
<Compile Include="Models\IApplicationBrandingModel.cs" />
<Compile Include="Models\lmltfyContext.cs" /> <Compile Include="Models\lmltfyContext.cs" />
<Compile Include="Models\RedirectModel.cs" />
<Compile Include="Models\SearchModel.cs" /> <Compile Include="Models\SearchModel.cs" />
<Compile Include="Models\SearchResultsViewModel.cs" /> <Compile Include="Models\SearchResultsViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Util\AppNames.cs" />
<Compile Include="Util\Extensions.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Content\bootstrap.css" /> <Content Include="Content\bootstrap.css" />
@@ -179,7 +187,15 @@
<Content Include="fonts\glyphicons-halflings-regular.svg" /> <Content Include="fonts\glyphicons-halflings-regular.svg" />
<Content Include="Global.asax" /> <Content Include="Global.asax" />
<Content Include="Content\Site.css" /> <Content Include="Content\Site.css" />
<Content Include="google2ad737791aece819.html" />
<Content Include="Images\ajax-loader.gif" />
<Content Include="Images\ask.png" />
<Content Include="Images\ddgo.png" />
<Content Include="Images\ddgo.svg" />
<Content Include="Images\logo-homepage.png" /> <Content Include="Images\logo-homepage.png" />
<Content Include="Scripts\app\highlight.js" />
<Content Include="Scripts\app\Home.js" />
<Content Include="Scripts\app\Search.js" />
<Content Include="Scripts\bootstrap.js" /> <Content Include="Scripts\bootstrap.js" />
<Content Include="Scripts\bootstrap.min.js" /> <Content Include="Scripts\bootstrap.min.js" />
<Content Include="ApplicationInsights.config" /> <Content Include="ApplicationInsights.config" />
@@ -215,9 +231,11 @@
<Content Include="Views\Shared\SearchBarParitalView.cshtml" /> <Content Include="Views\Shared\SearchBarParitalView.cshtml" />
<Content Include="Scripts\underscore.min.map" /> <Content Include="Scripts\underscore.min.map" />
<Content Include="Service References\Application Insights\ConnectedService.json" /> <Content Include="Service References\Application Insights\ConnectedService.json" />
<Content Include="Views\Shared\DisplayTemplates\ApplicationBrandingModel.cshtml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="App_Data\" /> <Folder Include="App_Data\" />
<Folder Include="Properties\PublishProfiles\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="fonts\glyphicons-halflings-regular.woff" /> <Content Include="fonts\glyphicons-halflings-regular.woff" />
@@ -230,6 +248,9 @@
<EmbeddedResource Include="Migrations\201507251954543_1.resx"> <EmbeddedResource Include="Migrations\201507251954543_1.resx">
<DependentUpon>201507251954543_1.cs</DependentUpon> <DependentUpon>201507251954543_1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Migrations\201507270340540_2.resx">
<DependentUpon>201507270340540_2.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<WCFMetadata Include="Service References\" /> <WCFMetadata Include="Service References\" />

View File

@@ -2,7 +2,6 @@
<packages> <packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net452" /> <package id="Antlr" version="3.4.1.9004" targetFramework="net452" />
<package id="bootstrap" version="3.0.0" targetFramework="net452" /> <package id="bootstrap" version="3.0.0" targetFramework="net452" />
<package id="CsQuery" version="1.3.4" targetFramework="net452" />
<package id="EntityFramework" version="6.1.3" targetFramework="net452" /> <package id="EntityFramework" version="6.1.3" targetFramework="net452" />
<package id="jQuery" version="1.10.2" targetFramework="net452" /> <package id="jQuery" version="1.10.2" targetFramework="net452" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net452" /> <package id="jQuery.Validation" version="1.11.1" targetFramework="net452" />

4
readme.md Normal file
View File

@@ -0,0 +1,4 @@
## What is this?
This is the code for [Let me lycos that for you](http://lmltfy.xyz)