Begin developing new UI
parent
88c384a0bf
commit
ecdf7569db
|
@ -1,20 +0,0 @@
|
|||
using System.Web.Optimization;
|
||||
|
||||
namespace BuildFeed
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||
"~/Scripts/jquery-{version}.js"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/jsrender").Include(
|
||||
"~/Scripts/jsrender*"));
|
||||
|
||||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||
"~/Scripts/jquery.validate*"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -48,10 +48,6 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="HtmlAgilityPack, Version=1.4.9.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\HtmlAgilityPack.1.4.9\lib\Net45\HtmlAgilityPack.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
|
@ -171,14 +167,7 @@
|
|||
</Reference>
|
||||
<Reference Include="System.Net.Http.WebRequest">
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="X.Web.RSS">
|
||||
<HintPath>..\packages\xwebrss.1.2.1.130\lib\net40-client\X.Web.RSS.dll</HintPath>
|
||||
</Reference>
|
||||
|
@ -190,15 +179,15 @@
|
|||
<Compile Include="Code\CustomContentTypeAttribute.cs" />
|
||||
<Compile Include="Code\DateTimeModelBinder.cs" />
|
||||
<Compile Include="Code\DisplayHelpers.cs" />
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\MongoConfig.cs" />
|
||||
<Compile Include="App_Start\FilterConfig.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Areas\admin\adminAreaRegistration.cs" />
|
||||
<Compile Include="Areas\admin\Controllers\usersController.cs" />
|
||||
<Compile Include="Code\LocalController.cs" />
|
||||
<Compile Include="Code\SiteLocale.cs" />
|
||||
<Compile Include="Code\MvcIntrinsics.cs" />
|
||||
<Compile Include="Code\Options\Locale.cs" />
|
||||
<Compile Include="Code\Options\Theme.cs" />
|
||||
<Compile Include="Controllers\ApiController.cs" />
|
||||
<Compile Include="Controllers\FrontController.cs" />
|
||||
<Compile Include="Controllers\RssController.cs" />
|
||||
|
@ -781,22 +770,32 @@
|
|||
<Content Include="content\card\Redstone.png" />
|
||||
<Content Include="content\card\Threshold2.png" />
|
||||
<Content Include="content\card\Threshold.png" />
|
||||
<Content Include="content\dark.css">
|
||||
<DependentUpon>dark.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\dark.min.css">
|
||||
<DependentUpon>dark.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\default.css">
|
||||
<DependentUpon>default.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\default.min.css">
|
||||
<DependentUpon>default.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\icons-2x.png" />
|
||||
<Content Include="content\icons.png" />
|
||||
<Content Include="content\rtl.css">
|
||||
<DependentUpon>rtl.scss</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\rtl.min.css">
|
||||
<DependentUpon>rtl.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\style.min.css">
|
||||
<DependentUpon>style.css</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="content\tile\wide.png" />
|
||||
<Content Include="content\tile\large.png" />
|
||||
<Content Include="content\tile\square.png" />
|
||||
<Content Include="content\tile\tiny.png" />
|
||||
<Content Include="content\rtl.css" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="content\style.css" />
|
||||
<Content Include="Areas\admin\Views\web.config" />
|
||||
<Content Include="Areas\admin\Views\users\index.cshtml" />
|
||||
<Content Include="Areas\admin\Views\_ViewStart.cshtml" />
|
||||
|
@ -810,12 +809,26 @@
|
|||
<Content Include="Areas\admin\Views\meta\index.cshtml" />
|
||||
<Content Include="Areas\admin\Views\meta\create.cshtml" />
|
||||
<Content Include="robots.txt" />
|
||||
<Content Include="Scripts\Chart.js" />
|
||||
<Content Include="Scripts\Chart.min.js" />
|
||||
<Content Include="App_Code\PaginationHelpers.cshtml" />
|
||||
<Content Include="content\default.scss" />
|
||||
<None Include="bundleconfig.json" />
|
||||
<None Include="compilerconfig.json" />
|
||||
<None Include="compilerconfig.json.defaults">
|
||||
<DependentUpon>compilerconfig.json</DependentUpon>
|
||||
</None>
|
||||
<Content Include="content\rtl.scss" />
|
||||
<Content Include="content\dark.scss" />
|
||||
<None Include="Properties\PublishProfiles\Milestone 1 [DEV].pubxml" />
|
||||
<Content Include="Scripts\bfs.js">
|
||||
<DependentUpon>bfs.ts</DependentUpon>
|
||||
</Content>
|
||||
<None Include="Scripts\jquery-2.2.3.intellisense.js" />
|
||||
<Content Include="Scripts\bfs.js.map">
|
||||
<DependentUpon>bfs.ts</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Scripts\bfs.min.js">
|
||||
<DependentUpon>bfs.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Scripts\jquery-2.2.3.js" />
|
||||
<Content Include="Scripts\jquery-2.2.3.min.js" />
|
||||
<Content Include="Scripts\jquery-2.2.3.min.map" />
|
||||
|
@ -890,11 +903,6 @@
|
|||
<None Include="Properties\PublishProfiles\Local Folder.pubxml" />
|
||||
<None Include="Properties\PublishProfiles\Milestone 1 FTP.pubxml" />
|
||||
<Content Include="googleacffc6da14c53e15.html" />
|
||||
<Content Include="Scripts\bfs.js" />
|
||||
<Content Include="Scripts\excanvas.compiled.js" />
|
||||
<Content Include="Scripts\excanvas.js" />
|
||||
<Content Include="Scripts\jsrender.js" />
|
||||
<Content Include="Scripts\jsrender.min.js" />
|
||||
<Content Include="Scripts\_references.js" />
|
||||
<Content Include="Web.config">
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -918,7 +926,6 @@
|
|||
<Content Include="Views\support\thanks_register.cshtml" />
|
||||
<Content Include="Views\support\rss.cshtml" />
|
||||
<Content Include="Views\support\sitemap.cshtml" />
|
||||
<Content Include="Scripts\jsrender.min.js.map" />
|
||||
<Content Include="Views\support\stats.cshtml" />
|
||||
<Content Include="smtp.config">
|
||||
<SubType>Designer</SubType>
|
||||
|
@ -958,6 +965,7 @@
|
|||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<TypeScriptCompile Include="Scripts\bfs.ts" />
|
||||
<TypeScriptCompile Include="Scripts\typings\jquery\jquery.d.ts" />
|
||||
<TypeScriptCompile Include="Scripts\typings\jsrender\jsrender.d.ts" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -2,19 +2,64 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace BuildFeed
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public static class DisplayHelpers
|
||||
public static class MvcExtensions
|
||||
{
|
||||
public static IHtmlString CheckboxListForEnum<T>(this HtmlHelper html, string id, T currentItem) where T : struct
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
foreach (T enumItem in Enum.GetValues(typeof(T)).Cast<T>())
|
||||
{
|
||||
long enumValue = Convert.ToInt64(enumItem);
|
||||
long currentValue = Convert.ToInt64(currentItem);
|
||||
|
||||
if (enumValue == 0)
|
||||
{
|
||||
// skip 0-valued bitflags, they're for display only.
|
||||
continue;
|
||||
}
|
||||
|
||||
TagBuilder wrapper = new TagBuilder("div");
|
||||
wrapper.Attributes.Add("class", "checkbox");
|
||||
|
||||
TagBuilder label = new TagBuilder("label");
|
||||
|
||||
TagBuilder input = new TagBuilder("input");
|
||||
if ((enumValue & currentValue) != 0)
|
||||
{
|
||||
input.MergeAttribute("checked", "checked");
|
||||
}
|
||||
input.MergeAttribute("type", "checkbox");
|
||||
input.MergeAttribute("value", enumValue.ToString());
|
||||
input.MergeAttribute("name", id);
|
||||
|
||||
label.InnerHtml = input.ToString(TagRenderMode.SelfClosing);
|
||||
label.InnerHtml += GetDisplayTextForEnum(enumItem);
|
||||
|
||||
wrapper.InnerHtml = label.ToString(TagRenderMode.Normal);
|
||||
|
||||
sb.Append(wrapper.ToString(TagRenderMode.Normal));
|
||||
}
|
||||
|
||||
return new HtmlString(sb.ToString());
|
||||
}
|
||||
|
||||
public static string GetDisplayTextForEnum(object o)
|
||||
{
|
||||
string result = null as string;
|
||||
DisplayAttribute display = o.GetType()
|
||||
.GetMember(o.ToString()).First()
|
||||
.GetCustomAttributes(false)
|
||||
.OfType<DisplayAttribute>()
|
||||
.LastOrDefault();
|
||||
string result = null;
|
||||
DisplayAttribute display =
|
||||
o.GetType()
|
||||
.GetMember(o.ToString())
|
||||
.First()
|
||||
.GetCustomAttributes(false)
|
||||
.OfType<DisplayAttribute>()
|
||||
.LastOrDefault();
|
||||
|
||||
if (display != null)
|
||||
{
|
||||
|
@ -28,7 +73,7 @@ namespace BuildFeed
|
|||
{
|
||||
string s = CultureInfo.CurrentUICulture.DateTimeFormat.LongDatePattern;
|
||||
s = s.Replace("dddd", "").Replace("ddd", "");
|
||||
s = s.Trim(new char[] { ' ', ',' });
|
||||
s = s.Trim(' ', ',');
|
||||
|
||||
return dt.ToString(s);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
using System.Globalization;
|
||||
|
||||
namespace BuildFeed.Code.Options
|
||||
{
|
||||
public class Locale
|
||||
{
|
||||
public static readonly Locale[] AvailableLocales = {
|
||||
new Locale("ar"),
|
||||
new Locale("bn"),
|
||||
new Locale("cs"),
|
||||
new Locale("de"),
|
||||
new Locale("el"),
|
||||
new Locale("en"),
|
||||
new Locale("es"),
|
||||
new Locale("fi"),
|
||||
new Locale("fr"),
|
||||
new Locale("he"),
|
||||
new Locale("hr"),
|
||||
new Locale("id"),
|
||||
new Locale("it"),
|
||||
new Locale("ko"),
|
||||
new Locale("nl"),
|
||||
new Locale("pl"),
|
||||
new Locale("pt"),
|
||||
new Locale("pt-br"),
|
||||
new Locale("qps-ploc"),
|
||||
new Locale("ro"),
|
||||
new Locale("ru"),
|
||||
new Locale("sk"),
|
||||
new Locale("sl"),
|
||||
new Locale("sv"),
|
||||
new Locale("tr"),
|
||||
new Locale("zh-cn"),
|
||||
new Locale("zh-tw")
|
||||
};
|
||||
|
||||
public string DisplayName => Info.NativeName;
|
||||
|
||||
public CultureInfo Info { get; set; }
|
||||
public string LocaleId { get; set; }
|
||||
|
||||
public Locale(string localeId)
|
||||
{
|
||||
LocaleId = localeId;
|
||||
Info = CultureInfo.GetCultureInfo(localeId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using BuildFeed.Local;
|
||||
|
||||
namespace BuildFeed.Code.Options
|
||||
{
|
||||
public class Theme
|
||||
{
|
||||
public static Theme[] AvailableThemes = (from st in Enum.GetValues(typeof(SiteTheme)).Cast<SiteTheme>()
|
||||
select new Theme(st)).ToArray();
|
||||
|
||||
private readonly SiteTheme _siteTheme;
|
||||
|
||||
public string CookieValue => _siteTheme.ToString();
|
||||
public string CssPath => $"~/content/{_siteTheme.ToString().ToLower()}.min.css";
|
||||
public string DisplayName => MvcExtensions.GetDisplayTextForEnum(_siteTheme);
|
||||
|
||||
public Theme(SiteTheme st) { _siteTheme = st; }
|
||||
}
|
||||
|
||||
public enum SiteTheme
|
||||
{
|
||||
[Display(ResourceType = typeof(Common), Name = nameof(Common.ThemeLight))]
|
||||
Light = 0,
|
||||
|
||||
[Display(ResourceType = typeof(Common), Name = nameof(Common.ThemeDark))]
|
||||
Dark
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
using System.Globalization;
|
||||
|
||||
namespace BuildFeed.Code
|
||||
{
|
||||
public class SiteLocale
|
||||
{
|
||||
public static readonly SiteLocale[] AvailableLocales = new SiteLocale[]
|
||||
{
|
||||
new SiteLocale("ar"),
|
||||
new SiteLocale("bn"),
|
||||
new SiteLocale("cs"),
|
||||
new SiteLocale("de"),
|
||||
new SiteLocale("el"),
|
||||
new SiteLocale("en"),
|
||||
new SiteLocale("es"),
|
||||
new SiteLocale("fi"),
|
||||
new SiteLocale("fr"),
|
||||
new SiteLocale("he"),
|
||||
new SiteLocale("hr"),
|
||||
new SiteLocale("id"),
|
||||
new SiteLocale("it"),
|
||||
new SiteLocale("ko"),
|
||||
new SiteLocale("nl"),
|
||||
new SiteLocale("pl"),
|
||||
new SiteLocale("pt"),
|
||||
new SiteLocale("pt-br"),
|
||||
new SiteLocale("qps-ploc"),
|
||||
new SiteLocale("ro"),
|
||||
new SiteLocale("ru"),
|
||||
new SiteLocale("sk"),
|
||||
new SiteLocale("sl"),
|
||||
new SiteLocale("sv"),
|
||||
new SiteLocale("tr"),
|
||||
new SiteLocale("zh-cn"),
|
||||
new SiteLocale("zh-tw")
|
||||
};
|
||||
|
||||
public CultureInfo Info { get; set; }
|
||||
public string LocaleId { get; set; }
|
||||
|
||||
public string DisplayName => Info.NativeName;
|
||||
|
||||
public SiteLocale(string localeId)
|
||||
{
|
||||
LocaleId = localeId;
|
||||
Info = CultureInfo.GetCultureInfo(localeId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -8,6 +8,7 @@ using System.Linq;
|
|||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using System.Web.Security;
|
||||
using BuildFeed.Code;
|
||||
|
||||
namespace BuildFeed.Controllers
|
||||
{
|
||||
|
@ -100,7 +101,7 @@ namespace BuildFeed.Controllers
|
|||
|
||||
List<SearchResult> results = new List<SearchResult>();
|
||||
|
||||
var sourceResults = from s in Enum.GetValues(typeof(TypeOfSource)).Cast<TypeOfSource>().Select(s => new { Text = DisplayHelpers.GetDisplayTextForEnum(s), Value = s })
|
||||
var sourceResults = from s in Enum.GetValues(typeof(TypeOfSource)).Cast<TypeOfSource>().Select(s => new { Text = MvcExtensions.GetDisplayTextForEnum(s), Value = s })
|
||||
where s.Text.ToLower().Contains(id.ToLower())
|
||||
orderby s.Text.ToLower().IndexOf(id.ToLower(), StringComparison.Ordinal) ascending
|
||||
select new SearchResult()
|
||||
|
|
|
@ -142,7 +142,7 @@ namespace BuildFeed.Controllers
|
|||
|
||||
gp.AddString("BUILDFEED", new FontFamily("Segoe UI"), (int) FontStyle.Bold, 32, new Point(40, 32),
|
||||
StringFormat.GenericTypographic);
|
||||
gp.AddString($"{DisplayHelpers.GetDisplayTextForEnum(b.Family)} (WinNT {b.MajorVersion}.{b.MinorVersion})",
|
||||
gp.AddString($"{MvcExtensions.GetDisplayTextForEnum(b.Family)} (WinNT {b.MajorVersion}.{b.MinorVersion})",
|
||||
new FontFamily("Segoe UI"), 0, 48, new Point(40, 80), StringFormat.GenericTypographic);
|
||||
gp.AddString(b.Number.ToString(), new FontFamily("Segoe UI Light"), 0, 280, new Point(32, 96),
|
||||
StringFormat.GenericTypographic);
|
||||
|
@ -222,7 +222,7 @@ namespace BuildFeed.Controllers
|
|||
Type = MetaType.Source,
|
||||
Value = source.ToString()
|
||||
});
|
||||
ViewBag.ItemId = DisplayHelpers.GetDisplayTextForEnum(source);
|
||||
ViewBag.ItemId = MvcExtensions.GetDisplayTextForEnum(source);
|
||||
|
||||
var builds = await _bModel.SelectSource(source, PageSize, (page - 1) * PageSize);
|
||||
|
||||
|
|
|
@ -24,10 +24,7 @@ namespace BuildFeed.Controllers
|
|||
}
|
||||
|
||||
[Route("login/")]
|
||||
public ActionResult Login()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public ActionResult Login() => View();
|
||||
|
||||
[HttpPost, Route("login/")]
|
||||
public ActionResult Login(LoginUser ru)
|
||||
|
@ -226,7 +223,7 @@ namespace BuildFeed.Controllers
|
|||
orderby bv.Key
|
||||
select new SitemapPagedAction()
|
||||
{
|
||||
Name = DisplayHelpers.GetDisplayTextForEnum(bv.Key),
|
||||
Name = MvcExtensions.GetDisplayTextForEnum(bv.Key),
|
||||
UrlParams = new RouteValueDictionary(new
|
||||
{
|
||||
controller = "Front",
|
||||
|
@ -320,75 +317,6 @@ namespace BuildFeed.Controllers
|
|||
return new EmptyResult();
|
||||
}
|
||||
|
||||
[Route("statistics/")]
|
||||
#if !DEBUG
|
||||
// [OutputCache(Duration = 3600, VaryByParam = "none", VaryByCustom = "userName")]
|
||||
#endif
|
||||
public async Task<ActionResult> Stats()
|
||||
{
|
||||
var builds = await _bModel.Select();
|
||||
|
||||
List<MonthCount> additions = new List<MonthCount>();
|
||||
var rawAdditions = (from b in builds
|
||||
where b.Added > DateTime.Now.AddYears(-1)
|
||||
group b by new
|
||||
{
|
||||
Year = b.Added.Year,
|
||||
Week = Convert.ToInt32(Math.Floor(b.Added.DayOfYear / 7m))
|
||||
} into bm
|
||||
select new MonthCount()
|
||||
{
|
||||
Month = bm.Key.Week,
|
||||
Year = bm.Key.Year,
|
||||
Count = bm.Count()
|
||||
}).ToArray();
|
||||
|
||||
for (int i = -52; i <= 0; i++)
|
||||
{
|
||||
DateTime dt = DateTime.Now.AddDays(i * 7);
|
||||
additions.Add(new MonthCount()
|
||||
{
|
||||
Month = Convert.ToInt32(Math.Floor(dt.DayOfYear / 7m)),
|
||||
Year = dt.Year,
|
||||
Count = rawAdditions.SingleOrDefault(a => a.Month == Convert.ToInt32(Math.Floor(dt.DayOfYear / 7m)) && a.Year == dt.Year).Count
|
||||
});
|
||||
}
|
||||
|
||||
List<MonthCount> compiles = new List<MonthCount>();
|
||||
double logScale = 1.0 / Math.E;
|
||||
var rawCompiles = from b in builds
|
||||
where b.BuildTime.HasValue
|
||||
group b by new
|
||||
{
|
||||
Year = b.BuildTime.Value.Year,
|
||||
Month = Convert.ToInt32(Math.Floor((b.BuildTime.Value.Month - 0.1m) / 3m) * 3) + 1
|
||||
} into bm
|
||||
select new MonthCount()
|
||||
{
|
||||
Month = bm.Key.Month,
|
||||
Year = bm.Key.Year,
|
||||
Count = Math.Pow(Convert.ToDouble(bm.Count()), logScale)
|
||||
};
|
||||
|
||||
|
||||
var rawLabCounts = from bl in (from b in builds
|
||||
where !string.IsNullOrEmpty(b.Lab)
|
||||
group b by b.Lab into bl
|
||||
select bl)
|
||||
where bl.Count() > 99
|
||||
orderby bl.Count() descending
|
||||
select new Tuple<string, int>(bl.Key, bl.Count());
|
||||
|
||||
StatsPage m = new StatsPage()
|
||||
{
|
||||
AdditionsByMonth = additions,
|
||||
CompilesByMonth = rawCompiles.OrderBy(r => r.Year).ThenBy(r => r.Month),
|
||||
BuildsByLab = rawLabCounts
|
||||
};
|
||||
|
||||
return View(m);
|
||||
}
|
||||
|
||||
[Route("credits/")]
|
||||
public ActionResult Credits() => View();
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
using System.Globalization;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
|
||||
namespace BuildFeed
|
||||
|
@ -21,7 +20,6 @@ namespace BuildFeed
|
|||
AreaRegistration.RegisterAllAreas();
|
||||
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||
|
||||
DateTimeModelBinder db = new DateTimeModelBinder();
|
||||
|
||||
|
|
|
@ -132,6 +132,24 @@ namespace BuildFeed.Local {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Language.
|
||||
/// </summary>
|
||||
public static string NavigationLanguage {
|
||||
get {
|
||||
return ResourceManager.GetString("NavigationLanguage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Theme.
|
||||
/// </summary>
|
||||
public static string NavigationTheme {
|
||||
get {
|
||||
return ResourceManager.GetString("NavigationTheme", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to | Page {0}.
|
||||
/// </summary>
|
||||
|
@ -267,6 +285,24 @@ namespace BuildFeed.Local {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Dark.
|
||||
/// </summary>
|
||||
public static string ThemeDark {
|
||||
get {
|
||||
return ResourceManager.GetString("ThemeDark", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Light.
|
||||
/// </summary>
|
||||
public static string ThemeLight {
|
||||
get {
|
||||
return ResourceManager.GetString("ThemeLight", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Toggle navigation.
|
||||
/// </summary>
|
||||
|
|
|
@ -195,4 +195,16 @@
|
|||
<data name="TypeToSearch" xml:space="preserve">
|
||||
<value>type to search...</value>
|
||||
</data>
|
||||
<data name="ThemeDark" xml:space="preserve">
|
||||
<value>Dark</value>
|
||||
</data>
|
||||
<data name="ThemeLight" xml:space="preserve">
|
||||
<value>Light</value>
|
||||
</data>
|
||||
<data name="NavigationTheme" xml:space="preserve">
|
||||
<value>Theme</value>
|
||||
</data>
|
||||
<data name="NavigationLanguage" xml:space="preserve">
|
||||
<value>Language</value>
|
||||
</data>
|
||||
</root>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1,13 +1,9 @@
|
|||
/// <autosync enabled="true" />
|
||||
/// <reference path="bfs.js" />
|
||||
/// <reference path="chart.min.js" />
|
||||
/// <reference path="excanvas.compiled.js" />
|
||||
/// <reference path="excanvas.js" />
|
||||
/// <reference path="jquery.validate.min.js" />
|
||||
/// <reference path="jquery.validate.unobtrusive.min.js" />
|
||||
/// <reference path="jquery-2.2.3.js" />
|
||||
/// <reference path="jquery-2.2.3.min.js" />
|
||||
/// <reference path="jsrender.min.js" />
|
||||
/// <reference path="trumbowyg/langs/ar.min.js" />
|
||||
/// <reference path="trumbowyg/langs/ca.min.js" />
|
||||
/// <reference path="trumbowyg/langs/cs.min.js" />
|
||||
|
|
|
@ -1,44 +1,26 @@
|
|||
var bfsAjax;
|
||||
var bfsTimeout;
|
||||
|
||||
$(function() {
|
||||
$("#page-navigation-search").click(function(event) {
|
||||
event.preventDefault();
|
||||
$("#search-modal").modal("show");
|
||||
});
|
||||
$("#search-input").keyup(function() {
|
||||
$(this).parent().find(".list-group").remove();
|
||||
|
||||
if (typeof bfsTimeout != "undefined") {
|
||||
clearTimeout(bfsTimeout);
|
||||
}
|
||||
|
||||
if (typeof bfsAjax != "undefined" && bfsAjax.readyState != 4) {
|
||||
bfsAjax.abort();
|
||||
}
|
||||
|
||||
bfsTimeout = setTimeout(function(object) {
|
||||
bfsAjax = $.ajax("/api/GetSearchResult/" + $("#search-input").val() + "/").done(function(data) {
|
||||
var template = $.templates("#result-template");
|
||||
var content = $("<div class='list-group'></div>");
|
||||
|
||||
var item = template.render(data);
|
||||
content.append(item);
|
||||
|
||||
$("#search-results").html(content);
|
||||
|
||||
$("#search-results a.list-group-item").click(function() {
|
||||
ga("send", "pageview", "/api/GetSearchResult/" + $("#search-input").val() + "/");
|
||||
});
|
||||
});
|
||||
}, 200);
|
||||
});
|
||||
|
||||
$("#lang-switcher a").click(function(event) {
|
||||
event.preventDefault();
|
||||
var lang = $(this).data("lang");
|
||||
document.cookie = "lang=" + lang + "; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
|
||||
|
||||
location.reload(true);
|
||||
});
|
||||
});
|
||||
var BuildFeed;
|
||||
(function (BuildFeed) {
|
||||
function DropdownClick(ev) {
|
||||
ev.preventDefault();
|
||||
var link = this;
|
||||
var menus = link.parentElement.getElementsByClassName("dropdown-menu");
|
||||
if (menus.length > 0) {
|
||||
menus[0].classList.toggle("open");
|
||||
}
|
||||
}
|
||||
BuildFeed.DropdownClick = DropdownClick;
|
||||
function BuildFeedSetup(ev) {
|
||||
var ddParents = document.getElementsByClassName("dropdown-parent");
|
||||
for (var i = 0; i < ddParents.length; i++) {
|
||||
for (var j = 0; j < ddParents[i].childNodes.length; j++) {
|
||||
var el = ddParents[i].childNodes[j];
|
||||
if (el.nodeName === "A") {
|
||||
el.addEventListener("click", DropdownClick);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BuildFeed.BuildFeedSetup = BuildFeedSetup;
|
||||
})(BuildFeed || (BuildFeed = {}));
|
||||
window.addEventListener("load", BuildFeed.BuildFeedSetup);
|
||||
//# sourceMappingURL=bfs.js.map
|
|
@ -0,0 +1 @@
|
|||
{"version":3,"file":"bfs.js","sourceRoot":"","sources":["bfs.ts"],"names":[],"mappings":"AAAA,IAAO,SAAS,CAgCf;AAhCD,WAAO,SAAS,EAChB,CAAC;IACE,uBAA8B,EAAc;QAEzC,EAAE,CAAC,cAAc,EAAE,CAAC;QAEpB,IAAI,IAAI,GAAG,IAAyB,CAAC;QACrC,IAAI,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC,eAAe,CAAC,CAAC;QAEvE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CACrB,CAAC;YACE,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;IACJ,CAAC;IAXe,uBAAa,gBAW5B,CAAA;IAED,wBAA+B,EAAS;QAErC,IAAM,SAAS,GAAG,QAAQ,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,CAAC;QAErE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,EAAE,EACzC,CAAC;YACE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EACvD,CAAC;gBACE,IAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;gBAEtC,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,KAAK,GAAG,CAAC,CACxB,CAAC;oBACE,EAAE,CAAC,gBAAgB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;gBAC/C,CAAC;YACJ,CAAC;QACJ,CAAC;IACJ,CAAC;IAhBe,wBAAc,iBAgB7B,CAAA;AACJ,CAAC,EAhCM,SAAS,KAAT,SAAS,QAgCf;AAED,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC"}
|
|
@ -0,0 +1 @@
|
|||
var BuildFeed;(function(n){function t(n){n.preventDefault();var i=this,t=i.parentElement.getElementsByClassName("dropdown-menu");t.length>0&&t[0].classList.toggle("open")}function i(){for(var i,u,r=document.getElementsByClassName("dropdown-parent"),n=0;n<r.length;n++)for(i=0;i<r[n].childNodes.length;i++)u=r[n].childNodes[i],u.nodeName==="A"&&u.addEventListener("click",t)}n.DropdownClick=t;n.BuildFeedSetup=i})(BuildFeed||(BuildFeed={}));window.addEventListener("load",BuildFeed.BuildFeedSetup);
|
|
@ -0,0 +1,35 @@
|
|||
module BuildFeed
|
||||
{
|
||||
export function DropdownClick(ev: MouseEvent)
|
||||
{
|
||||
ev.preventDefault();
|
||||
|
||||
var link = this as HTMLAnchorElement;
|
||||
var menus = link.parentElement.getElementsByClassName("dropdown-menu");
|
||||
|
||||
if (menus.length > 0)
|
||||
{
|
||||
menus[0].classList.toggle("open");
|
||||
}
|
||||
}
|
||||
|
||||
export function BuildFeedSetup(ev: Event)
|
||||
{
|
||||
const ddParents = document.getElementsByClassName("dropdown-parent");
|
||||
|
||||
for (let i = 0; i < ddParents.length; i++)
|
||||
{
|
||||
for (let j = 0; j < ddParents[i].childNodes.length; j++)
|
||||
{
|
||||
const el = ddParents[i].childNodes[j];
|
||||
|
||||
if (el.nodeName === "A")
|
||||
{
|
||||
el.addEventListener("click", DropdownClick);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.addEventListener("load", BuildFeed.BuildFeedSetup);
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright 2006 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
document.createElement("canvas").getContext||(function(){var s=Math,j=s.round,F=s.sin,G=s.cos,V=s.abs,W=s.sqrt,k=10,v=k/2;function X(){return this.context_||(this.context_=new H(this))}var L=Array.prototype.slice;function Y(b,a){var c=L.call(arguments,2);return function(){return b.apply(a,c.concat(L.call(arguments)))}}var M={init:function(b){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var a=b||document;a.createElement("canvas");a.attachEvent("onreadystatechange",Y(this.init_,this,a))}},init_:function(b){b.namespaces.g_vml_||
|
||||
b.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");b.namespaces.g_o_||b.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");if(!b.styleSheets.ex_canvas_){var a=b.createStyleSheet();a.owningElement.id="ex_canvas_";a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}var c=b.getElementsByTagName("canvas"),d=0;for(;d<c.length;d++)this.initElement(c[d])},
|
||||
initElement:function(b){if(!b.getContext){b.getContext=X;b.innerHTML="";b.attachEvent("onpropertychange",Z);b.attachEvent("onresize",$);var a=b.attributes;if(a.width&&a.width.specified)b.style.width=a.width.nodeValue+"px";else b.width=b.clientWidth;if(a.height&&a.height.specified)b.style.height=a.height.nodeValue+"px";else b.height=b.clientHeight}return b}};function Z(b){var a=b.srcElement;switch(b.propertyName){case "width":a.style.width=a.attributes.width.nodeValue+"px";a.getContext().clearRect();
|
||||
break;case "height":a.style.height=a.attributes.height.nodeValue+"px";a.getContext().clearRect();break}}function $(b){var a=b.srcElement;if(a.firstChild){a.firstChild.style.width=a.clientWidth+"px";a.firstChild.style.height=a.clientHeight+"px"}}M.init();var N=[],B=0;for(;B<16;B++){var C=0;for(;C<16;C++)N[B*16+C]=B.toString(16)+C.toString(16)}function I(){return[[1,0,0],[0,1,0],[0,0,1]]}function y(b,a){var c=I(),d=0;for(;d<3;d++){var f=0;for(;f<3;f++){var h=0,g=0;for(;g<3;g++)h+=b[d][g]*a[g][f];c[d][f]=
|
||||
h}}return c}function O(b,a){a.fillStyle=b.fillStyle;a.lineCap=b.lineCap;a.lineJoin=b.lineJoin;a.lineWidth=b.lineWidth;a.miterLimit=b.miterLimit;a.shadowBlur=b.shadowBlur;a.shadowColor=b.shadowColor;a.shadowOffsetX=b.shadowOffsetX;a.shadowOffsetY=b.shadowOffsetY;a.strokeStyle=b.strokeStyle;a.globalAlpha=b.globalAlpha;a.arcScaleX_=b.arcScaleX_;a.arcScaleY_=b.arcScaleY_;a.lineScale_=b.lineScale_}function P(b){var a,c=1;b=String(b);if(b.substring(0,3)=="rgb"){var d=b.indexOf("(",3),f=b.indexOf(")",d+
|
||||
1),h=b.substring(d+1,f).split(",");a="#";var g=0;for(;g<3;g++)a+=N[Number(h[g])];if(h.length==4&&b.substr(3,1)=="a")c=h[3]}else a=b;return{color:a,alpha:c}}function aa(b){switch(b){case "butt":return"flat";case "round":return"round";case "square":default:return"square"}}function H(b){this.m_=I();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=k*1;this.globalAlpha=1;this.canvas=b;
|
||||
var a=b.ownerDocument.createElement("div");a.style.width=b.clientWidth+"px";a.style.height=b.clientHeight+"px";a.style.overflow="hidden";a.style.position="absolute";b.appendChild(a);this.element_=a;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}var i=H.prototype;i.clearRect=function(){this.element_.innerHTML=""};i.beginPath=function(){this.currentPath_=[]};i.moveTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};
|
||||
i.lineTo=function(b,a){var c=this.getCoords_(b,a);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};i.bezierCurveTo=function(b,a,c,d,f,h){var g=this.getCoords_(f,h),l=this.getCoords_(b,a),e=this.getCoords_(c,d);Q(this,l,e,g)};function Q(b,a,c,d){b.currentPath_.push({type:"bezierCurveTo",cp1x:a.x,cp1y:a.y,cp2x:c.x,cp2y:c.y,x:d.x,y:d.y});b.currentX_=d.x;b.currentY_=d.y}i.quadraticCurveTo=function(b,a,c,d){var f=this.getCoords_(b,a),h=this.getCoords_(c,d),g={x:this.currentX_+
|
||||
0.6666666666666666*(f.x-this.currentX_),y:this.currentY_+0.6666666666666666*(f.y-this.currentY_)};Q(this,g,{x:g.x+(h.x-this.currentX_)/3,y:g.y+(h.y-this.currentY_)/3},h)};i.arc=function(b,a,c,d,f,h){c*=k;var g=h?"at":"wa",l=b+G(d)*c-v,e=a+F(d)*c-v,m=b+G(f)*c-v,r=a+F(f)*c-v;if(l==m&&!h)l+=0.125;var n=this.getCoords_(b,a),o=this.getCoords_(l,e),q=this.getCoords_(m,r);this.currentPath_.push({type:g,x:n.x,y:n.y,radius:c,xStart:o.x,yStart:o.y,xEnd:q.x,yEnd:q.y})};i.rect=function(b,a,c,d){this.moveTo(b,
|
||||
a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath()};i.strokeRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.stroke();this.currentPath_=f};i.fillRect=function(b,a,c,d){var f=this.currentPath_;this.beginPath();this.moveTo(b,a);this.lineTo(b+c,a);this.lineTo(b+c,a+d);this.lineTo(b,a+d);this.closePath();this.fill();this.currentPath_=f};i.createLinearGradient=function(b,
|
||||
a,c,d){var f=new D("gradient");f.x0_=b;f.y0_=a;f.x1_=c;f.y1_=d;return f};i.createRadialGradient=function(b,a,c,d,f,h){var g=new D("gradientradial");g.x0_=b;g.y0_=a;g.r0_=c;g.x1_=d;g.y1_=f;g.r1_=h;return g};i.drawImage=function(b){var a,c,d,f,h,g,l,e,m=b.runtimeStyle.width,r=b.runtimeStyle.height;b.runtimeStyle.width="auto";b.runtimeStyle.height="auto";var n=b.width,o=b.height;b.runtimeStyle.width=m;b.runtimeStyle.height=r;if(arguments.length==3){a=arguments[1];c=arguments[2];h=g=0;l=d=n;e=f=o}else if(arguments.length==
|
||||
5){a=arguments[1];c=arguments[2];d=arguments[3];f=arguments[4];h=g=0;l=n;e=o}else if(arguments.length==9){h=arguments[1];g=arguments[2];l=arguments[3];e=arguments[4];a=arguments[5];c=arguments[6];d=arguments[7];f=arguments[8]}else throw Error("Invalid number of arguments");var q=this.getCoords_(a,c),t=[];t.push(" <g_vml_:group",' coordsize="',k*10,",",k*10,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;");if(this.m_[0][0]!=1||this.m_[0][1]){var E=[];E.push("M11=",
|
||||
this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",j(q.x/k),",","Dy=",j(q.y/k),"");var p=q,z=this.getCoords_(a+d,c),w=this.getCoords_(a,c+f),x=this.getCoords_(a+d,c+f);p.x=s.max(p.x,z.x,w.x,x.x);p.y=s.max(p.y,z.y,w.y,x.y);t.push("padding:0 ",j(p.x/k),"px ",j(p.y/k),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",E.join(""),", sizingmethod='clip');")}else t.push("top:",j(q.y/k),"px;left:",j(q.x/k),"px;");t.push(' ">','<g_vml_:image src="',b.src,
|
||||
'"',' style="width:',k*d,"px;"," height:",k*f,'px;"',' cropleft="',h/n,'"',' croptop="',g/o,'"',' cropright="',(n-h-l)/n,'"',' cropbottom="',(o-g-e)/o,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",t.join(""))};i.stroke=function(b){var a=[],c=P(b?this.fillStyle:this.strokeStyle),d=c.color,f=c.alpha*this.globalAlpha;a.push("<g_vml_:shape",' filled="',!!b,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0 0" coordsize="',k*10," ",k*10,'"',' stroked="',
|
||||
!b,'"',' path="');var h={x:null,y:null},g={x:null,y:null},l=0;for(;l<this.currentPath_.length;l++){var e=this.currentPath_[l];switch(e.type){case "moveTo":a.push(" m ",j(e.x),",",j(e.y));break;case "lineTo":a.push(" l ",j(e.x),",",j(e.y));break;case "close":a.push(" x ");e=null;break;case "bezierCurveTo":a.push(" c ",j(e.cp1x),",",j(e.cp1y),",",j(e.cp2x),",",j(e.cp2y),",",j(e.x),",",j(e.y));break;case "at":case "wa":a.push(" ",e.type," ",j(e.x-this.arcScaleX_*e.radius),",",j(e.y-this.arcScaleY_*e.radius),
|
||||
" ",j(e.x+this.arcScaleX_*e.radius),",",j(e.y+this.arcScaleY_*e.radius)," ",j(e.xStart),",",j(e.yStart)," ",j(e.xEnd),",",j(e.yEnd));break}if(e){if(h.x==null||e.x<h.x)h.x=e.x;if(g.x==null||e.x>g.x)g.x=e.x;if(h.y==null||e.y<h.y)h.y=e.y;if(g.y==null||e.y>g.y)g.y=e.y}}a.push(' ">');if(b)if(typeof this.fillStyle=="object"){var m=this.fillStyle,r=0,n={x:0,y:0},o=0,q=1;if(m.type_=="gradient"){var t=m.x1_/this.arcScaleX_,E=m.y1_/this.arcScaleY_,p=this.getCoords_(m.x0_/this.arcScaleX_,m.y0_/this.arcScaleY_),
|
||||
z=this.getCoords_(t,E);r=Math.atan2(z.x-p.x,z.y-p.y)*180/Math.PI;if(r<0)r+=360;if(r<1.0E-6)r=0}else{var p=this.getCoords_(m.x0_,m.y0_),w=g.x-h.x,x=g.y-h.y;n={x:(p.x-h.x)/w,y:(p.y-h.y)/x};w/=this.arcScaleX_*k;x/=this.arcScaleY_*k;var R=s.max(w,x);o=2*m.r0_/R;q=2*m.r1_/R-o}var u=m.colors_;u.sort(function(ba,ca){return ba.offset-ca.offset});var J=u.length,da=u[0].color,ea=u[J-1].color,fa=u[0].alpha*this.globalAlpha,ga=u[J-1].alpha*this.globalAlpha,S=[],l=0;for(;l<J;l++){var T=u[l];S.push(T.offset*q+
|
||||
o+" "+T.color)}a.push('<g_vml_:fill type="',m.type_,'"',' method="none" focus="100%"',' color="',da,'"',' color2="',ea,'"',' colors="',S.join(","),'"',' opacity="',ga,'"',' g_o_:opacity2="',fa,'"',' angle="',r,'"',' focusposition="',n.x,",",n.y,'" />')}else a.push('<g_vml_:fill color="',d,'" opacity="',f,'" />');else{var K=this.lineScale_*this.lineWidth;if(K<1)f*=K;a.push("<g_vml_:stroke",' opacity="',f,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',aa(this.lineCap),
|
||||
'"',' weight="',K,'px"',' color="',d,'" />')}a.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",a.join(""))};i.fill=function(){this.stroke(true)};i.closePath=function(){this.currentPath_.push({type:"close"})};i.getCoords_=function(b,a){var c=this.m_;return{x:k*(b*c[0][0]+a*c[1][0]+c[2][0])-v,y:k*(b*c[0][1]+a*c[1][1]+c[2][1])-v}};i.save=function(){var b={};O(this,b);this.aStack_.push(b);this.mStack_.push(this.m_);this.m_=y(I(),this.m_)};i.restore=function(){O(this.aStack_.pop(),
|
||||
this);this.m_=this.mStack_.pop()};function ha(b){var a=0;for(;a<3;a++){var c=0;for(;c<2;c++)if(!isFinite(b[a][c])||isNaN(b[a][c]))return false}return true}function A(b,a,c){if(!!ha(a)){b.m_=a;if(c)b.lineScale_=W(V(a[0][0]*a[1][1]-a[0][1]*a[1][0]))}}i.translate=function(b,a){A(this,y([[1,0,0],[0,1,0],[b,a,1]],this.m_),false)};i.rotate=function(b){var a=G(b),c=F(b);A(this,y([[a,c,0],[-c,a,0],[0,0,1]],this.m_),false)};i.scale=function(b,a){this.arcScaleX_*=b;this.arcScaleY_*=a;A(this,y([[b,0,0],[0,a,
|
||||
0],[0,0,1]],this.m_),true)};i.transform=function(b,a,c,d,f,h){A(this,y([[b,a,0],[c,d,0],[f,h,1]],this.m_),true)};i.setTransform=function(b,a,c,d,f,h){A(this,[[b,a,0],[c,d,0],[f,h,1]],true)};i.clip=function(){};i.arcTo=function(){};i.createPattern=function(){return new U};function D(b){this.type_=b;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}D.prototype.addColorStop=function(b,a){a=P(a);this.colors_.push({offset:b,color:a.color,alpha:a.alpha})};function U(){}G_vmlCanvasManager=
|
||||
M;CanvasRenderingContext2D=H;CanvasGradient=D;CanvasPattern=U})();
|
|
@ -1,924 +0,0 @@
|
|||
// Copyright 2006 Google Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
|
||||
// Known Issues:
|
||||
//
|
||||
// * Patterns are not implemented.
|
||||
// * Radial gradient are not implemented. The VML version of these look very
|
||||
// different from the canvas one.
|
||||
// * Clipping paths are not implemented.
|
||||
// * Coordsize. The width and height attribute have higher priority than the
|
||||
// width and height style values which isn't correct.
|
||||
// * Painting mode isn't implemented.
|
||||
// * Canvas width/height should is using content-box by default. IE in
|
||||
// Quirks mode will draw the canvas using border-box. Either change your
|
||||
// doctype to HTML5
|
||||
// (http://www.whatwg.org/specs/web-apps/current-work/#the-doctype)
|
||||
// or use Box Sizing Behavior from WebFX
|
||||
// (http://webfx.eae.net/dhtml/boxsizing/boxsizing.html)
|
||||
// * Non uniform scaling does not correctly scale strokes.
|
||||
// * Optimize. There is always room for speed improvements.
|
||||
|
||||
// Only add this code if we do not already have a canvas implementation
|
||||
if (!document.createElement('canvas').getContext) {
|
||||
|
||||
(function() {
|
||||
|
||||
// alias some functions to make (compiled) code shorter
|
||||
var m = Math;
|
||||
var mr = m.round;
|
||||
var ms = m.sin;
|
||||
var mc = m.cos;
|
||||
var abs = m.abs;
|
||||
var sqrt = m.sqrt;
|
||||
|
||||
// this is used for sub pixel precision
|
||||
var Z = 10;
|
||||
var Z2 = Z / 2;
|
||||
|
||||
/**
|
||||
* This funtion is assigned to the <canvas> elements as element.getContext().
|
||||
* @this {HTMLElement}
|
||||
* @return {CanvasRenderingContext2D_}
|
||||
*/
|
||||
function getContext() {
|
||||
return this.context_ ||
|
||||
(this.context_ = new CanvasRenderingContext2D_(this));
|
||||
}
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
|
||||
/**
|
||||
* Binds a function to an object. The returned function will always use the
|
||||
* passed in {@code obj} as {@code this}.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* g = bind(f, obj, a, b)
|
||||
* g(c, d) // will do f.call(obj, a, b, c, d)
|
||||
*
|
||||
* @param {Function} f The function to bind the object to
|
||||
* @param {Object} obj The object that should act as this when the function
|
||||
* is called
|
||||
* @param {*} var_args Rest arguments that will be used as the initial
|
||||
* arguments when the function is called
|
||||
* @return {Function} A new function that has bound this
|
||||
*/
|
||||
function bind(f, obj, var_args) {
|
||||
var a = slice.call(arguments, 2);
|
||||
return function() {
|
||||
return f.apply(obj, a.concat(slice.call(arguments)));
|
||||
};
|
||||
}
|
||||
|
||||
var G_vmlCanvasManager_ = {
|
||||
init: function(opt_doc) {
|
||||
if (/MSIE/.test(navigator.userAgent) && !window.opera) {
|
||||
var doc = opt_doc || document;
|
||||
// Create a dummy element so that IE will allow canvas elements to be
|
||||
// recognized.
|
||||
doc.createElement('canvas');
|
||||
doc.attachEvent('onreadystatechange', bind(this.init_, this, doc));
|
||||
}
|
||||
},
|
||||
|
||||
init_: function(doc) {
|
||||
// create xmlns
|
||||
if (!doc.namespaces['g_vml_']) {
|
||||
doc.namespaces.add('g_vml_', 'urn:schemas-microsoft-com:vml',
|
||||
'#default#VML');
|
||||
|
||||
}
|
||||
if (!doc.namespaces['g_o_']) {
|
||||
doc.namespaces.add('g_o_', 'urn:schemas-microsoft-com:office:office',
|
||||
'#default#VML');
|
||||
}
|
||||
|
||||
// Setup default CSS. Only add one style sheet per document
|
||||
if (!doc.styleSheets['ex_canvas_']) {
|
||||
var ss = doc.createStyleSheet();
|
||||
ss.owningElement.id = 'ex_canvas_';
|
||||
ss.cssText = 'canvas{display:inline-block;overflow:hidden;' +
|
||||
// default size is 300x150 in Gecko and Opera
|
||||
'text-align:left;width:300px;height:150px}' +
|
||||
'g_vml_\\:*{behavior:url(#default#VML)}' +
|
||||
'g_o_\\:*{behavior:url(#default#VML)}';
|
||||
|
||||
}
|
||||
|
||||
// find all canvas elements
|
||||
var els = doc.getElementsByTagName('canvas');
|
||||
for (var i = 0; i < els.length; i++) {
|
||||
this.initElement(els[i]);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Public initializes a canvas element so that it can be used as canvas
|
||||
* element from now on. This is called automatically before the page is
|
||||
* loaded but if you are creating elements using createElement you need to
|
||||
* make sure this is called on the element.
|
||||
* @param {HTMLElement} el The canvas element to initialize.
|
||||
* @return {HTMLElement} the element that was created.
|
||||
*/
|
||||
initElement: function(el) {
|
||||
if (!el.getContext) {
|
||||
|
||||
el.getContext = getContext;
|
||||
|
||||
// Remove fallback content. There is no way to hide text nodes so we
|
||||
// just remove all childNodes. We could hide all elements and remove
|
||||
// text nodes but who really cares about the fallback content.
|
||||
el.innerHTML = '';
|
||||
|
||||
// do not use inline function because that will leak memory
|
||||
el.attachEvent('onpropertychange', onPropertyChange);
|
||||
el.attachEvent('onresize', onResize);
|
||||
|
||||
var attrs = el.attributes;
|
||||
if (attrs.width && attrs.width.specified) {
|
||||
// TODO: use runtimeStyle and coordsize
|
||||
// el.getContext().setWidth_(attrs.width.nodeValue);
|
||||
el.style.width = attrs.width.nodeValue + 'px';
|
||||
} else {
|
||||
el.width = el.clientWidth;
|
||||
}
|
||||
if (attrs.height && attrs.height.specified) {
|
||||
// TODO: use runtimeStyle and coordsize
|
||||
// el.getContext().setHeight_(attrs.height.nodeValue);
|
||||
el.style.height = attrs.height.nodeValue + 'px';
|
||||
} else {
|
||||
el.height = el.clientHeight;
|
||||
}
|
||||
//el.getContext().setCoordsize_()
|
||||
}
|
||||
return el;
|
||||
}
|
||||
};
|
||||
|
||||
function onPropertyChange(e) {
|
||||
var el = e.srcElement;
|
||||
|
||||
switch (e.propertyName) {
|
||||
case 'width':
|
||||
el.style.width = el.attributes.width.nodeValue + 'px';
|
||||
el.getContext().clearRect();
|
||||
break;
|
||||
case 'height':
|
||||
el.style.height = el.attributes.height.nodeValue + 'px';
|
||||
el.getContext().clearRect();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
function onResize(e) {
|
||||
var el = e.srcElement;
|
||||
if (el.firstChild) {
|
||||
el.firstChild.style.width = el.clientWidth + 'px';
|
||||
el.firstChild.style.height = el.clientHeight + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
G_vmlCanvasManager_.init();
|
||||
|
||||
// precompute "00" to "FF"
|
||||
var dec2hex = [];
|
||||
for (var i = 0; i < 16; i++) {
|
||||
for (var j = 0; j < 16; j++) {
|
||||
dec2hex[i * 16 + j] = i.toString(16) + j.toString(16);
|
||||
}
|
||||
}
|
||||
|
||||
function createMatrixIdentity() {
|
||||
return [
|
||||
[1, 0, 0],
|
||||
[0, 1, 0],
|
||||
[0, 0, 1]
|
||||
];
|
||||
}
|
||||
|
||||
function matrixMultiply(m1, m2) {
|
||||
var result = createMatrixIdentity();
|
||||
|
||||
for (var x = 0; x < 3; x++) {
|
||||
for (var y = 0; y < 3; y++) {
|
||||
var sum = 0;
|
||||
|
||||
for (var z = 0; z < 3; z++) {
|
||||
sum += m1[x][z] * m2[z][y];
|
||||
}
|
||||
|
||||
result[x][y] = sum;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
function copyState(o1, o2) {
|
||||
o2.fillStyle = o1.fillStyle;
|
||||
o2.lineCap = o1.lineCap;
|
||||
o2.lineJoin = o1.lineJoin;
|
||||
o2.lineWidth = o1.lineWidth;
|
||||
o2.miterLimit = o1.miterLimit;
|
||||
o2.shadowBlur = o1.shadowBlur;
|
||||
o2.shadowColor = o1.shadowColor;
|
||||
o2.shadowOffsetX = o1.shadowOffsetX;
|
||||
o2.shadowOffsetY = o1.shadowOffsetY;
|
||||
o2.strokeStyle = o1.strokeStyle;
|
||||
o2.globalAlpha = o1.globalAlpha;
|
||||
o2.arcScaleX_ = o1.arcScaleX_;
|
||||
o2.arcScaleY_ = o1.arcScaleY_;
|
||||
o2.lineScale_ = o1.lineScale_;
|
||||
}
|
||||
|
||||
function processStyle(styleString) {
|
||||
var str, alpha = 1;
|
||||
|
||||
styleString = String(styleString);
|
||||
if (styleString.substring(0, 3) == 'rgb') {
|
||||
var start = styleString.indexOf('(', 3);
|
||||
var end = styleString.indexOf(')', start + 1);
|
||||
var guts = styleString.substring(start + 1, end).split(',');
|
||||
|
||||
str = '#';
|
||||
for (var i = 0; i < 3; i++) {
|
||||
str += dec2hex[Number(guts[i])];
|
||||
}
|
||||
|
||||
if (guts.length == 4 && styleString.substr(3, 1) == 'a') {
|
||||
alpha = guts[3];
|
||||
}
|
||||
} else {
|
||||
str = styleString;
|
||||
}
|
||||
|
||||
return {color: str, alpha: alpha};
|
||||
}
|
||||
|
||||
function processLineCap(lineCap) {
|
||||
switch (lineCap) {
|
||||
case 'butt':
|
||||
return 'flat';
|
||||
case 'round':
|
||||
return 'round';
|
||||
case 'square':
|
||||
default:
|
||||
return 'square';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This class implements CanvasRenderingContext2D interface as described by
|
||||
* the WHATWG.
|
||||
* @param {HTMLElement} surfaceElement The element that the 2D context should
|
||||
* be associated with
|
||||
*/
|
||||
function CanvasRenderingContext2D_(surfaceElement) {
|
||||
this.m_ = createMatrixIdentity();
|
||||
|
||||
this.mStack_ = [];
|
||||
this.aStack_ = [];
|
||||
this.currentPath_ = [];
|
||||
|
||||
// Canvas context properties
|
||||
this.strokeStyle = '#000';
|
||||
this.fillStyle = '#000';
|
||||
|
||||
this.lineWidth = 1;
|
||||
this.lineJoin = 'miter';
|
||||
this.lineCap = 'butt';
|
||||
this.miterLimit = Z * 1;
|
||||
this.globalAlpha = 1;
|
||||
this.canvas = surfaceElement;
|
||||
|
||||
var el = surfaceElement.ownerDocument.createElement('div');
|
||||
el.style.width = surfaceElement.clientWidth + 'px';
|
||||
el.style.height = surfaceElement.clientHeight + 'px';
|
||||
el.style.overflow = 'hidden';
|
||||
el.style.position = 'absolute';
|
||||
surfaceElement.appendChild(el);
|
||||
|
||||
this.element_ = el;
|
||||
this.arcScaleX_ = 1;
|
||||
this.arcScaleY_ = 1;
|
||||
this.lineScale_ = 1;
|
||||
}
|
||||
|
||||
var contextPrototype = CanvasRenderingContext2D_.prototype;
|
||||
contextPrototype.clearRect = function() {
|
||||
this.element_.innerHTML = '';
|
||||
};
|
||||
|
||||
contextPrototype.beginPath = function() {
|
||||
// TODO: Branch current matrix so that save/restore has no effect
|
||||
// as per safari docs.
|
||||
this.currentPath_ = [];
|
||||
};
|
||||
|
||||
contextPrototype.moveTo = function(aX, aY) {
|
||||
var p = this.getCoords_(aX, aY);
|
||||
this.currentPath_.push({type: 'moveTo', x: p.x, y: p.y});
|
||||
this.currentX_ = p.x;
|
||||
this.currentY_ = p.y;
|
||||
};
|
||||
|
||||
contextPrototype.lineTo = function(aX, aY) {
|
||||
var p = this.getCoords_(aX, aY);
|
||||
this.currentPath_.push({type: 'lineTo', x: p.x, y: p.y});
|
||||
|
||||
this.currentX_ = p.x;
|
||||
this.currentY_ = p.y;
|
||||
};
|
||||
|
||||
contextPrototype.bezierCurveTo = function(aCP1x, aCP1y,
|
||||
aCP2x, aCP2y,
|
||||
aX, aY) {
|
||||
var p = this.getCoords_(aX, aY);
|
||||
var cp1 = this.getCoords_(aCP1x, aCP1y);
|
||||
var cp2 = this.getCoords_(aCP2x, aCP2y);
|
||||
bezierCurveTo(this, cp1, cp2, p);
|
||||
};
|
||||
|
||||
// Helper function that takes the already fixed cordinates.
|
||||
function bezierCurveTo(self, cp1, cp2, p) {
|
||||
self.currentPath_.push({
|
||||
type: 'bezierCurveTo',
|
||||
cp1x: cp1.x,
|
||||
cp1y: cp1.y,
|
||||
cp2x: cp2.x,
|
||||
cp2y: cp2.y,
|
||||
x: p.x,
|
||||
y: p.y
|
||||
});
|
||||
self.currentX_ = p.x;
|
||||
self.currentY_ = p.y;
|
||||
}
|
||||
|
||||
contextPrototype.quadraticCurveTo = function(aCPx, aCPy, aX, aY) {
|
||||
// the following is lifted almost directly from
|
||||
// http://developer.mozilla.org/en/docs/Canvas_tutorial:Drawing_shapes
|
||||
|
||||
var cp = this.getCoords_(aCPx, aCPy);
|
||||
var p = this.getCoords_(aX, aY);
|
||||
|
||||
var cp1 = {
|
||||
x: this.currentX_ + 2.0 / 3.0 * (cp.x - this.currentX_),
|
||||
y: this.currentY_ + 2.0 / 3.0 * (cp.y - this.currentY_)
|
||||
};
|
||||
var cp2 = {
|
||||
x: cp1.x + (p.x - this.currentX_) / 3.0,
|
||||
y: cp1.y + (p.y - this.currentY_) / 3.0
|
||||
};
|
||||
|
||||
bezierCurveTo(this, cp1, cp2, p);
|
||||
};
|
||||
|
||||
contextPrototype.arc = function(aX, aY, aRadius,
|
||||
aStartAngle, aEndAngle, aClockwise) {
|
||||
aRadius *= Z;
|
||||
var arcType = aClockwise ? 'at' : 'wa';
|
||||
|
||||
var xStart = aX + mc(aStartAngle) * aRadius - Z2;
|
||||
var yStart = aY + ms(aStartAngle) * aRadius - Z2;
|
||||
|
||||
var xEnd = aX + mc(aEndAngle) * aRadius - Z2;
|
||||
var yEnd = aY + ms(aEndAngle) * aRadius - Z2;
|
||||
|
||||
// IE won't render arches drawn counter clockwise if xStart == xEnd.
|
||||
if (xStart == xEnd && !aClockwise) {
|
||||
xStart += 0.125; // Offset xStart by 1/80 of a pixel. Use something
|
||||
// that can be represented in binary
|
||||
}
|
||||
|
||||
var p = this.getCoords_(aX, aY);
|
||||
var pStart = this.getCoords_(xStart, yStart);
|
||||
var pEnd = this.getCoords_(xEnd, yEnd);
|
||||
|
||||
this.currentPath_.push({type: arcType,
|
||||
x: p.x,
|
||||
y: p.y,
|
||||
radius: aRadius,
|
||||
xStart: pStart.x,
|
||||
yStart: pStart.y,
|
||||
xEnd: pEnd.x,
|
||||
yEnd: pEnd.y});
|
||||
|
||||
};
|
||||
|
||||
contextPrototype.rect = function(aX, aY, aWidth, aHeight) {
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aWidth, aY);
|
||||
this.lineTo(aX + aWidth, aY + aHeight);
|
||||
this.lineTo(aX, aY + aHeight);
|
||||
this.closePath();
|
||||
};
|
||||
|
||||
contextPrototype.strokeRect = function(aX, aY, aWidth, aHeight) {
|
||||
var oldPath = this.currentPath_;
|
||||
this.beginPath();
|
||||
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aWidth, aY);
|
||||
this.lineTo(aX + aWidth, aY + aHeight);
|
||||
this.lineTo(aX, aY + aHeight);
|
||||
this.closePath();
|
||||
this.stroke();
|
||||
|
||||
this.currentPath_ = oldPath;
|
||||
};
|
||||
|
||||
contextPrototype.fillRect = function(aX, aY, aWidth, aHeight) {
|
||||
var oldPath = this.currentPath_;
|
||||
this.beginPath();
|
||||
|
||||
this.moveTo(aX, aY);
|
||||
this.lineTo(aX + aWidth, aY);
|
||||
this.lineTo(aX + aWidth, aY + aHeight);
|
||||
this.lineTo(aX, aY + aHeight);
|
||||
this.closePath();
|
||||
this.fill();
|
||||
|
||||
this.currentPath_ = oldPath;
|
||||
};
|
||||
|
||||
contextPrototype.createLinearGradient = function(aX0, aY0, aX1, aY1) {
|
||||
var gradient = new CanvasGradient_('gradient');
|
||||
gradient.x0_ = aX0;
|
||||
gradient.y0_ = aY0;
|
||||
gradient.x1_ = aX1;
|
||||
gradient.y1_ = aY1;
|
||||
return gradient;
|
||||
};
|
||||
|
||||
contextPrototype.createRadialGradient = function(aX0, aY0, aR0,
|
||||
aX1, aY1, aR1) {
|
||||
var gradient = new CanvasGradient_('gradientradial');
|
||||
gradient.x0_ = aX0;
|
||||
gradient.y0_ = aY0;
|
||||
gradient.r0_ = aR0;
|
||||
gradient.x1_ = aX1;
|
||||
gradient.y1_ = aY1;
|
||||
gradient.r1_ = aR1;
|
||||
return gradient;
|
||||
};
|
||||
|
||||
contextPrototype.drawImage = function(image, var_args) {
|
||||
var dx, dy, dw, dh, sx, sy, sw, sh;
|
||||
|
||||
// to find the original width we overide the width and height
|
||||
var oldRuntimeWidth = image.runtimeStyle.width;
|
||||
var oldRuntimeHeight = image.runtimeStyle.height;
|
||||
image.runtimeStyle.width = 'auto';
|
||||
image.runtimeStyle.height = 'auto';
|
||||
|
||||
// get the original size
|
||||
var w = image.width;
|
||||
var h = image.height;
|
||||
|
||||
// and remove overides
|
||||
image.runtimeStyle.width = oldRuntimeWidth;
|
||||
image.runtimeStyle.height = oldRuntimeHeight;
|
||||
|
||||
if (arguments.length == 3) {
|
||||
dx = arguments[1];
|
||||
dy = arguments[2];
|
||||
sx = sy = 0;
|
||||
sw = dw = w;
|
||||
sh = dh = h;
|
||||
} else if (arguments.length == 5) {
|
||||
dx = arguments[1];
|
||||
dy = arguments[2];
|
||||
dw = arguments[3];
|
||||
dh = arguments[4];
|
||||
sx = sy = 0;
|
||||
sw = w;
|
||||
sh = h;
|
||||
} else if (arguments.length == 9) {
|
||||
sx = arguments[1];
|
||||
sy = arguments[2];
|
||||
sw = arguments[3];
|
||||
sh = arguments[4];
|
||||
dx = arguments[5];
|
||||
dy = arguments[6];
|
||||
dw = arguments[7];
|
||||
dh = arguments[8];
|
||||
} else {
|
||||
throw Error('Invalid number of arguments');
|
||||
}
|
||||
|
||||
var d = this.getCoords_(dx, dy);
|
||||
|
||||
var w2 = sw / 2;
|
||||
var h2 = sh / 2;
|
||||
|
||||
var vmlStr = [];
|
||||
|
||||
var W = 10;
|
||||
var H = 10;
|
||||
|
||||
// For some reason that I've now forgotten, using divs didn't work
|
||||
vmlStr.push(' <g_vml_:group',
|
||||
' coordsize="', Z * W, ',', Z * H, '"',
|
||||
' coordorigin="0,0"' ,
|
||||
' style="width:', W, 'px;height:', H, 'px;position:absolute;');
|
||||
|
||||
// If filters are necessary (rotation exists), create them
|
||||
// filters are bog-slow, so only create them if abbsolutely necessary
|
||||
// The following check doesn't account for skews (which don't exist
|
||||
// in the canvas spec (yet) anyway.
|
||||
|
||||
if (this.m_[0][0] != 1 || this.m_[0][1]) {
|
||||
var filter = [];
|
||||
|
||||
// Note the 12/21 reversal
|
||||
filter.push('M11=', this.m_[0][0], ',',
|
||||
'M12=', this.m_[1][0], ',',
|
||||
'M21=', this.m_[0][1], ',',
|
||||
'M22=', this.m_[1][1], ',',
|
||||
'Dx=', mr(d.x / Z), ',',
|
||||
'Dy=', mr(d.y / Z), '');
|
||||
|
||||
// Bounding box calculation (need to minimize displayed area so that
|
||||
// filters don't waste time on unused pixels.
|
||||
var max = d;
|
||||
var c2 = this.getCoords_(dx + dw, dy);
|
||||
var c3 = this.getCoords_(dx, dy + dh);
|
||||
var c4 = this.getCoords_(dx + dw, dy + dh);
|
||||
|
||||
max.x = m.max(max.x, c2.x, c3.x, c4.x);
|
||||
max.y = m.max(max.y, c2.y, c3.y, c4.y);
|
||||
|
||||
vmlStr.push('padding:0 ', mr(max.x / Z), 'px ', mr(max.y / Z),
|
||||
'px 0;filter:progid:DXImageTransform.Microsoft.Matrix(',
|
||||
filter.join(''), ", sizingmethod='clip');")
|
||||
} else {
|
||||
vmlStr.push('top:', mr(d.y / Z), 'px;left:', mr(d.x / Z), 'px;');
|
||||
}
|
||||
|
||||
vmlStr.push(' ">' ,
|
||||
'<g_vml_:image src="', image.src, '"',
|
||||
' style="width:', Z * dw, 'px;',
|
||||
' height:', Z * dh, 'px;"',
|
||||
' cropleft="', sx / w, '"',
|
||||
' croptop="', sy / h, '"',
|
||||
' cropright="', (w - sx - sw) / w, '"',
|
||||
' cropbottom="', (h - sy - sh) / h, '"',
|
||||
' />',
|
||||
'</g_vml_:group>');
|
||||
|
||||
this.element_.insertAdjacentHTML('BeforeEnd',
|
||||
vmlStr.join(''));
|
||||
};
|
||||
|
||||
contextPrototype.stroke = function(aFill) {
|
||||
var lineStr = [];
|
||||
var lineOpen = false;
|
||||
var a = processStyle(aFill ? this.fillStyle : this.strokeStyle);
|
||||
var color = a.color;
|
||||
var opacity = a.alpha * this.globalAlpha;
|
||||
|
||||
var W = 10;
|
||||
var H = 10;
|
||||
|
||||
lineStr.push('<g_vml_:shape',
|
||||
' filled="', !!aFill, '"',
|
||||
' style="position:absolute;width:', W, 'px;height:', H, 'px;"',
|
||||
' coordorigin="0 0" coordsize="', Z * W, ' ', Z * H, '"',
|
||||
' stroked="', !aFill, '"',
|
||||
' path="');
|
||||
|
||||
var newSeq = false;
|
||||
var min = {x: null, y: null};
|
||||
var max = {x: null, y: null};
|
||||
|
||||
for (var i = 0; i < this.currentPath_.length; i++) {
|
||||
var p = this.currentPath_[i];
|
||||
var c;
|
||||
|
||||
switch (p.type) {
|
||||
case 'moveTo':
|
||||
c = p;
|
||||
lineStr.push(' m ', mr(p.x), ',', mr(p.y));
|
||||
break;
|
||||
case 'lineTo':
|
||||
lineStr.push(' l ', mr(p.x), ',', mr(p.y));
|
||||
break;
|
||||
case 'close':
|
||||
lineStr.push(' x ');
|
||||
p = null;
|
||||
break;
|
||||
case 'bezierCurveTo':
|
||||
lineStr.push(' c ',
|
||||
mr(p.cp1x), ',', mr(p.cp1y), ',',
|
||||
mr(p.cp2x), ',', mr(p.cp2y), ',',
|
||||
mr(p.x), ',', mr(p.y));
|
||||
break;
|
||||
case 'at':
|
||||
case 'wa':
|
||||
lineStr.push(' ', p.type, ' ',
|
||||
mr(p.x - this.arcScaleX_ * p.radius), ',',
|
||||
mr(p.y - this.arcScaleY_ * p.radius), ' ',
|
||||
mr(p.x + this.arcScaleX_ * p.radius), ',',
|
||||
mr(p.y + this.arcScaleY_ * p.radius), ' ',
|
||||
mr(p.xStart), ',', mr(p.yStart), ' ',
|
||||
mr(p.xEnd), ',', mr(p.yEnd));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// TODO: Following is broken for curves due to
|
||||
// move to proper paths.
|
||||
|
||||
// Figure out dimensions so we can do gradient fills
|
||||
// properly
|
||||
if (p) {
|
||||
if (min.x == null || p.x < min.x) {
|
||||
min.x = p.x;
|
||||
}
|
||||
if (max.x == null || p.x > max.x) {
|
||||
max.x = p.x;
|
||||
}
|
||||
if (min.y == null || p.y < min.y) {
|
||||
min.y = p.y;
|
||||
}
|
||||
if (max.y == null || p.y > max.y) {
|
||||
max.y = p.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
lineStr.push(' ">');
|
||||
|
||||
if (!aFill) {
|
||||
var lineWidth = this.lineScale_ * this.lineWidth;
|
||||
|
||||
// VML cannot correctly render a line if the width is less than 1px.
|
||||
// In that case, we dilute the color to make the line look thinner.
|
||||
if (lineWidth < 1) {
|
||||
opacity *= lineWidth;
|
||||
}
|
||||
|
||||
lineStr.push(
|
||||
'<g_vml_:stroke',
|
||||
' opacity="', opacity, '"',
|
||||
' joinstyle="', this.lineJoin, '"',
|
||||
' miterlimit="', this.miterLimit, '"',
|
||||
' endcap="', processLineCap(this.lineCap), '"',
|
||||
' weight="', lineWidth, 'px"',
|
||||
' color="', color, '" />'
|
||||
);
|
||||
} else if (typeof this.fillStyle == 'object') {
|
||||
var fillStyle = this.fillStyle;
|
||||
var angle = 0;
|
||||
var focus = {x: 0, y: 0};
|
||||
|
||||
// additional offset
|
||||
var shift = 0;
|
||||
// scale factor for offset
|
||||
var expansion = 1;
|
||||
|
||||
if (fillStyle.type_ == 'gradient') {
|
||||
var x0 = fillStyle.x0_ / this.arcScaleX_;
|
||||
var y0 = fillStyle.y0_ / this.arcScaleY_;
|
||||
var x1 = fillStyle.x1_ / this.arcScaleX_;
|
||||
var y1 = fillStyle.y1_ / this.arcScaleY_;
|
||||
var p0 = this.getCoords_(x0, y0);
|
||||
var p1 = this.getCoords_(x1, y1);
|
||||
var dx = p1.x - p0.x;
|
||||
var dy = p1.y - p0.y;
|
||||
angle = Math.atan2(dx, dy) * 180 / Math.PI;
|
||||
|
||||
// The angle should be a non-negative number.
|
||||
if (angle < 0) {
|
||||
angle += 360;
|
||||
}
|
||||
|
||||
// Very small angles produce an unexpected result because they are
|
||||
// converted to a scientific notation string.
|
||||
if (angle < 1e-6) {
|
||||
angle = 0;
|
||||
}
|
||||
} else {
|
||||
var p0 = this.getCoords_(fillStyle.x0_, fillStyle.y0_);
|
||||
var width = max.x - min.x;
|
||||
var height = max.y - min.y;
|
||||
focus = {
|
||||
x: (p0.x - min.x) / width,
|
||||
y: (p0.y - min.y) / height
|
||||
};
|
||||
|
||||
width /= this.arcScaleX_ * Z;
|
||||
height /= this.arcScaleY_ * Z;
|
||||
var dimension = m.max(width, height);
|
||||
shift = 2 * fillStyle.r0_ / dimension;
|
||||
expansion = 2 * fillStyle.r1_ / dimension - shift;
|
||||
}
|
||||
|
||||
// We need to sort the color stops in ascending order by offset,
|
||||
// otherwise IE won't interpret it correctly.
|
||||
var stops = fillStyle.colors_;
|
||||
stops.sort(function(cs1, cs2) {
|
||||
return cs1.offset - cs2.offset;
|
||||
});
|
||||
|
||||
var length = stops.length;
|
||||
var color1 = stops[0].color;
|
||||
var color2 = stops[length - 1].color;
|
||||
var opacity1 = stops[0].alpha * this.globalAlpha;
|
||||
var opacity2 = stops[length - 1].alpha * this.globalAlpha;
|
||||
|
||||
var colors = [];
|
||||
for (var i = 0; i < length; i++) {
|
||||
var stop = stops[i];
|
||||
colors.push(stop.offset * expansion + shift + ' ' + stop.color);
|
||||
}
|
||||
|
||||
// When colors attribute is used, the meanings of opacity and o:opacity2
|
||||
// are reversed.
|
||||
lineStr.push('<g_vml_:fill type="', fillStyle.type_, '"',
|
||||
' method="none" focus="100%"',
|
||||
' color="', color1, '"',
|
||||
' color2="', color2, '"',
|
||||
' colors="', colors.join(','), '"',
|
||||
' opacity="', opacity2, '"',
|
||||
' g_o_:opacity2="', opacity1, '"',
|
||||
' angle="', angle, '"',
|
||||
' focusposition="', focus.x, ',', focus.y, '" />');
|
||||
} else {
|
||||
lineStr.push('<g_vml_:fill color="', color, '" opacity="', opacity,
|
||||
'" />');
|
||||
}
|
||||
|
||||
lineStr.push('</g_vml_:shape>');
|
||||
|
||||
this.element_.insertAdjacentHTML('beforeEnd', lineStr.join(''));
|
||||
};
|
||||
|
||||
contextPrototype.fill = function() {
|
||||
this.stroke(true);
|
||||
}
|
||||
|
||||
contextPrototype.closePath = function() {
|
||||
this.currentPath_.push({type: 'close'});
|
||||
};
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
contextPrototype.getCoords_ = function(aX, aY) {
|
||||
var m = this.m_;
|
||||
return {
|
||||
x: Z * (aX * m[0][0] + aY * m[1][0] + m[2][0]) - Z2,
|
||||
y: Z * (aX * m[0][1] + aY * m[1][1] + m[2][1]) - Z2
|
||||
}
|
||||
};
|
||||
|
||||
contextPrototype.save = function() {
|
||||
var o = {};
|
||||
copyState(this, o);
|
||||
this.aStack_.push(o);
|
||||
this.mStack_.push(this.m_);
|
||||
this.m_ = matrixMultiply(createMatrixIdentity(), this.m_);
|
||||
};
|
||||
|
||||
contextPrototype.restore = function() {
|
||||
copyState(this.aStack_.pop(), this);
|
||||
this.m_ = this.mStack_.pop();
|
||||
};
|
||||
|
||||
function matrixIsFinite(m) {
|
||||
for (var j = 0; j < 3; j++) {
|
||||
for (var k = 0; k < 2; k++) {
|
||||
if (!isFinite(m[j][k]) || isNaN(m[j][k])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setM(ctx, m, updateLineScale) {
|
||||
if (!matrixIsFinite(m)) {
|
||||
return;
|
||||
}
|
||||
ctx.m_ = m;
|
||||
|
||||
if (updateLineScale) {
|
||||
// Get the line scale.
|
||||
// Determinant of this.m_ means how much the area is enlarged by the
|
||||
// transformation. So its square root can be used as a scale factor
|
||||
// for width.
|
||||
var det = m[0][0] * m[1][1] - m[0][1] * m[1][0];
|
||||
ctx.lineScale_ = sqrt(abs(det));
|
||||
}
|
||||
}
|
||||
|
||||
contextPrototype.translate = function(aX, aY) {
|
||||
var m1 = [
|
||||
[1, 0, 0],
|
||||
[0, 1, 0],
|
||||
[aX, aY, 1]
|
||||
];
|
||||
|
||||
setM(this, matrixMultiply(m1, this.m_), false);
|
||||
};
|
||||
|
||||
contextPrototype.rotate = function(aRot) {
|
||||
var c = mc(aRot);
|
||||
var s = ms(aRot);
|
||||
|
||||
var m1 = [
|
||||
[c, s, 0],
|
||||
[-s, c, 0],
|
||||
[0, 0, 1]
|
||||
];
|
||||
|
||||
setM(this, matrixMultiply(m1, this.m_), false);
|
||||
};
|
||||
|
||||
contextPrototype.scale = function(aX, aY) {
|
||||
this.arcScaleX_ *= aX;
|
||||
this.arcScaleY_ *= aY;
|
||||
var m1 = [
|
||||
[aX, 0, 0],
|
||||
[0, aY, 0],
|
||||
[0, 0, 1]
|
||||
];
|
||||
|
||||
setM(this, matrixMultiply(m1, this.m_), true);
|
||||
};
|
||||
|
||||
contextPrototype.transform = function(m11, m12, m21, m22, dx, dy) {
|
||||
var m1 = [
|
||||
[m11, m12, 0],
|
||||
[m21, m22, 0],
|
||||
[dx, dy, 1]
|
||||
];
|
||||
|
||||
setM(this, matrixMultiply(m1, this.m_), true);
|
||||
};
|
||||
|
||||
contextPrototype.setTransform = function(m11, m12, m21, m22, dx, dy) {
|
||||
var m = [
|
||||
[m11, m12, 0],
|
||||
[m21, m22, 0],
|
||||
[dx, dy, 1]
|
||||
];
|
||||
|
||||
setM(this, m, true);
|
||||
};
|
||||
|
||||
/******** STUBS ********/
|
||||
contextPrototype.clip = function() {
|
||||
// TODO: Implement
|
||||
};
|
||||
|
||||
contextPrototype.arcTo = function() {
|
||||
// TODO: Implement
|
||||
};
|
||||
|
||||
contextPrototype.createPattern = function() {
|
||||
return new CanvasPattern_;
|
||||
};
|
||||
|
||||
// Gradient / Pattern Stubs
|
||||
function CanvasGradient_(aType) {
|
||||
this.type_ = aType;
|
||||
this.x0_ = 0;
|
||||
this.y0_ = 0;
|
||||
this.r0_ = 0;
|
||||
this.x1_ = 0;
|
||||
this.y1_ = 0;
|
||||
this.r1_ = 0;
|
||||
this.colors_ = [];
|
||||
}
|
||||
|
||||
CanvasGradient_.prototype.addColorStop = function(aOffset, aColor) {
|
||||
aColor = processStyle(aColor);
|
||||
this.colors_.push({offset: aOffset,
|
||||
color: aColor.color,
|
||||
alpha: aColor.alpha});
|
||||
};
|
||||
|
||||
function CanvasPattern_() {}
|
||||
|
||||
// set up externs
|
||||
G_vmlCanvasManager = G_vmlCanvasManager_;
|
||||
CanvasRenderingContext2D = CanvasRenderingContext2D_;
|
||||
CanvasGradient = CanvasGradient_;
|
||||
CanvasPattern = CanvasPattern_;
|
||||
|
||||
})();
|
||||
|
||||
} // if
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,6 @@
|
|||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Optimization"/>
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="BuildFeed" />
|
||||
</namespaces>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
@using BuildFeed.Local
|
||||
@using BuildFeed.Code
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Local
|
||||
@using BuildFeed.Models.ViewModel.Front
|
||||
@using Humanizer
|
||||
@model IEnumerable<BuildFeed.Models.ViewModel.Front.FrontBuildGroup>
|
||||
|
@ -18,22 +20,15 @@
|
|||
}
|
||||
|
||||
<h1>@Front.HomepageH1</h1>
|
||||
<h3>@Front.Share</h3>
|
||||
<div class="addthis_sharing_toolbox"></div>
|
||||
<h3>@Front.Listing</h3>
|
||||
<div class="row">
|
||||
<div class="build-group-listing">
|
||||
@foreach (FrontBuildGroup group in Model)
|
||||
{
|
||||
<div class="col-md-2 col-sm-3 col-xs-6 build-group">
|
||||
<div class="build-group">
|
||||
<h3 class="build-group-title">
|
||||
<a href="@Url.Action("ViewGroup", new
|
||||
{
|
||||
major = group.Key.Major,
|
||||
minor = group.Key.Minor,
|
||||
number = group.Key.Build,
|
||||
revision = group.Key.Revision
|
||||
})">
|
||||
@group.Key.ToString()</a>
|
||||
<a href="@Url.Action(nameof(FrontController.ViewGroup), new {major = group.Key.Major, minor = group.Key.Minor, number = group.Key.Build, revision = group.Key.Revision})">
|
||||
@group.Key.ToString()
|
||||
</a>
|
||||
</h3>
|
||||
@if (group.LastBuild.HasValue)
|
||||
{
|
||||
|
@ -43,12 +38,10 @@
|
|||
if (maxDate.AddDays(28) > DateTime.Now)
|
||||
{
|
||||
<span title="@maxDate.ToLongDateWithoutDay()"><i class="fa fa-calendar fa-fw"></i> @maxDate.Humanize()</span>
|
||||
<br />
|
||||
}
|
||||
else
|
||||
{
|
||||
<span title="@maxDate.Humanize()"><i class="fa fa-calendar fa-fw"></i> @maxDate.ToLongDateWithoutDay()</span>
|
||||
<br />
|
||||
}
|
||||
}
|
||||
</p>
|
||||
|
@ -59,4 +52,4 @@
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
@PaginationHelpers.PaginationBlock((int) ViewBag.PageNumber, (int) ViewBag.PageCount, "Index", ViewContext.RouteData.Values)
|
||||
@PaginationHelpers.PaginationBlock((int) ViewBag.PageNumber, (int) ViewBag.PageCount, nameof(FrontController.Index), ViewContext.RouteData.Values)
|
|
@ -1,4 +1,5 @@
|
|||
@model BuildFeed.Models.BuildModel
|
||||
@using BuildFeed.Code
|
||||
@model BuildFeed.Models.BuildModel
|
||||
|
||||
@{
|
||||
ViewBag.Title = Model.FullBuildString + " | BuildFeed";
|
||||
|
@ -150,7 +151,7 @@
|
|||
source = Model.SourceType
|
||||
})" class="more-link">
|
||||
<i class="fa fa-plus-square-o fa-sm"></i>
|
||||
@string.Format(BuildFeed.Local.Front.MoreFromSource, DisplayHelpers.GetDisplayTextForEnum(Model.SourceType))
|
||||
@string.Format(BuildFeed.Local.Front.MoreFromSource, MvcExtensions.GetDisplayTextForEnum(Model.SourceType))
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@model Tuple<BuildFeed.Models.BuildGroup, List<BuildFeed.Models.BuildModel>>
|
||||
@using BuildFeed.Code
|
||||
@using Humanizer;
|
||||
@{
|
||||
ViewBag.Title = $"{Model.Item1} | {BuildFeed.Local.Common.SiteName}";
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@model IEnumerable<BuildFeed.Models.BuildModel>
|
||||
@using BuildFeed.Code
|
||||
@using Humanizer;
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0}{1} | {2}", string.Format(BuildFeed.Local.Front.BuildsFrom, ViewBag.ItemId), ViewBag.PageNumber == 1 ? "" : string.Format(BuildFeed.Local.Common.PageTitleSegment, ViewBag.PageNumber), BuildFeed.Local.Common.SiteName);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@model IEnumerable<BuildFeed.Models.BuildModel>
|
||||
@using BuildFeed.Code
|
||||
@using Humanizer;
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0}{1} | {2}", ViewBag.ItemId, ViewBag.PageNumber == 1 ? "" : string.Format(BuildFeed.Local.Common.PageTitleSegment, ViewBag.PageNumber), @BuildFeed.Local.Common.SiteName);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@model IEnumerable<BuildFeed.Models.BuildModel>
|
||||
@using BuildFeed.Code
|
||||
@using Humanizer;
|
||||
@{
|
||||
ViewBag.Title = string.Format("{0} {1}{2} | {3}", BuildFeed.Local.Common.ProductName, ViewBag.ItemId, ViewBag.PageNumber == 1 ? "" : string.Format(BuildFeed.Local.Common.PageTitleSegment, ViewBag.PageNumber), BuildFeed.Local.Common.SiteName);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@using BuildFeed.Local
|
||||
@using BuildFeed.Code
|
||||
@using BuildFeed.Local
|
||||
@using BuildFeed.Models
|
||||
@using Humanizer
|
||||
@model IEnumerable<BuildFeed.Models.BuildModel>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
@using System.ComponentModel.DataAnnotations
|
||||
@using BuildFeed.Code
|
||||
|
||||
@model Enum
|
||||
|
||||
@DisplayHelpers.GetDisplayTextForEnum(ViewData.Model)
|
||||
@MvcExtensions.GetDisplayTextForEnum(ViewData.Model)
|
|
@ -1,4 +1,7 @@
|
|||
@using System.Globalization;
|
||||
@using System.Globalization
|
||||
@using BuildFeed.Code.Options
|
||||
@using BuildFeed.Controllers
|
||||
@using BuildFeed.Local
|
||||
@{
|
||||
bool isRtl = CultureInfo.CurrentUICulture.TextInfo.IsRightToLeft;
|
||||
}
|
||||
|
@ -6,155 +9,140 @@
|
|||
<html dir="@(isRtl ? "rtl" : "ltr")" lang="@CultureInfo.CurrentUICulture.TwoLetterISOLanguageName">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<link href="//maxcdn.bootstrapcdn.com/bootswatch/3.3.6/slate/bootstrap.min.css" rel="stylesheet" />
|
||||
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet" />
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet" type="text/css" />
|
||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
|
||||
<link rel="shortcut icon" href="~/favicon.ico" />
|
||||
<link rel="icon" href="~/favicon.ico" />
|
||||
<link rel="canonical" href="@Url.Action()" />
|
||||
<meta name="application-name" content="@BuildFeed.Local.Common.SiteName" />
|
||||
<meta name="application-name" content="@Common.SiteName" />
|
||||
|
||||
<link href="/content/style.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/content/default.min.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/content/dark.min.css" rel="stylesheet" type="text/css" />
|
||||
@if (isRtl)
|
||||
{
|
||||
<link href="/content/rtl.min.css" rel="stylesheet" type="text/css" />
|
||||
}
|
||||
<title>@ViewBag.Title</title>
|
||||
@RenderSection("head", false)
|
||||
<script type="text/javascript">
|
||||
var appInsights = window.appInsights || function (config) {
|
||||
function r(config) { t[config] = function () { var i = arguments; t.queue.push(function () { t[config].apply(t, i) }) } } var t = { config: config }, u = document, e = window, o = "script", s = u.createElement(o), i, f; for (s.src = config.url || "//az416426.vo.msecnd.net/scripts/a/ai.0.js", u.getElementsByTagName(o)[0].parentNode.appendChild(s), t.cookie = u.cookie, t.queue = [], i = ["Event", "Exception", "Metric", "PageView", "Trace"]; i.length;) r("track" + i.pop()); return r("setAuthenticatedUserContext"), r("clearAuthenticatedUserContext"), config.disableExceptionTracking || (i = "onerror", r("_" + i), f = e[i], e[i] = function (config, r, u, e, o) { var s = f && f(config, r, u, e, o); return s !== !0 && t["_" + i](config, r, u, e, o), s }), t
|
||||
}({
|
||||
instrumentationKey: "4632419f-7a2f-4ab5-8374-34384b650f42"
|
||||
});
|
||||
|
||||
window.appInsights = appInsights;
|
||||
appInsights.trackPageView();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
|
||||
(i[r].q = i[r].q || []).push(arguments)
|
||||
}, i[r].l = 1 * new Date(); a = s.createElement(o),
|
||||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
|
||||
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
|
||||
|
||||
ga('create', 'UA-55417692-1', 'auto');
|
||||
ga('require', 'displayfeatures');
|
||||
ga('require', 'linkid', 'linkid.js');
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
<header id="page-header">
|
||||
<div class="container">
|
||||
<header id="page-header"></header>
|
||||
<nav id="page-navigation" role="navigation">
|
||||
<div class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#page-navigation-collapse">
|
||||
<span class="sr-only">@BuildFeed.Local.Common.ToggleNavigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
@Html.ActionLink(BuildFeed.Local.Common.SiteName, "Index", new { controller = "Front", area = "" }, new { @class = "navbar-brand" })
|
||||
</div>
|
||||
<div class="collapse navbar-collapse" id="page-navigation-collapse">
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
@if (!User.Identity.IsAuthenticated)
|
||||
<h1>@Html.ActionLink(Common.SiteName, nameof(FrontController.Index), new {controller = "Front", area = ""})</h1>
|
||||
</div>
|
||||
</header>
|
||||
<nav id="page-navigation" role="navigation">
|
||||
<button type="button">
|
||||
<span class="sr-only">@Common.ToggleNavigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<div class="container">
|
||||
<ul id="page-navigation-links">
|
||||
@if (!User.Identity.IsAuthenticated)
|
||||
{
|
||||
<li>
|
||||
<a href="@Url.Action(nameof(SupportController.Login), new {controller = "Support", area = ""})" title="@Common.LogIn">
|
||||
<i class="fa fa-fw fa-user"></i> @Common.LogIn
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<li>
|
||||
<a href="@Url.Action("index", new {controller = "base", area = "admin"})" title="@Common.Admin">
|
||||
<i class="fa fa-fw fa-cogs"></i> @Common.Admin
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
<li>
|
||||
<a href="@Url.Action(nameof(FrontController.AddBuild), new {controller = "Front", area = ""})" title="@Common.AddBuild">
|
||||
<i class="fa fa-fw fa-plus-square"></i> @Common.AddBuild
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action(nameof(SupportController.Logout), new {controller = "Support", area = ""})" title="@Common.LogOut">
|
||||
<i class="fa fa-fw fa-user"></i> @Common.LogOut
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
<li>
|
||||
<a href="#" id="page-navigation-search" title="@Common.Search">
|
||||
<i class="fa fa-fw fa-search"></i> @Common.Search
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="@Url.Action(nameof(SupportController.Rss), new {controller = "Support", area = ""})" title="@Common.RssFeeds">
|
||||
<i class="fa fa-fw fa-rss"></i> @Common.RssFeeds
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://twitter.com/buildfeed" title="@Common.Twitter" target="_blank">
|
||||
<i class="fa fa-fw fa-twitter"></i> @Common.Twitter
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown-parent">
|
||||
<a href="#"><i class="fa fa-gear"></i> <span class="caret"></span></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li id="settings-theme-menu" class="dropdown-menu-block">
|
||||
<h4>@Common.NavigationTheme</h4>
|
||||
<ul>
|
||||
@foreach (Theme item in Theme.AvailableThemes)
|
||||
{
|
||||
<li><a href="@Url.Action("Login", new { controller = "Support", area = "" })" title="@BuildFeed.Local.Common.LogIn"><i class="fa fa-fw fa-user"></i> @BuildFeed.Local.Common.LogIn</a></li>
|
||||
<li>
|
||||
<a href="#" data-theme="@item.CookieValue">@item.DisplayName</a>
|
||||
</li>
|
||||
}
|
||||
else if (Roles.IsUserInRole("Administrators"))
|
||||
{
|
||||
<li><a href="@Url.Action("index", new { controller = "base", area = "admin" })" title="@BuildFeed.Local.Common.Admin"><i class="fa fa-fw fa-cogs"></i> @BuildFeed.Local.Common.Admin</a></li>
|
||||
<li><a href="@Url.Action("AddBuild", new { controller = "Front", area = "" })" title="@BuildFeed.Local.Common.AddBuild"><i class="fa fa-fw fa-plus-square"></i> @BuildFeed.Local.Common.AddBuild</a></li>
|
||||
<li><a href="@Url.Action("Logout", new { controller = "Support", area = "" })" title="@BuildFeed.Local.Common.LogOut"><i class="fa fa-fw fa-user"></i> @BuildFeed.Local.Common.LogOut</a></li>
|
||||
}
|
||||
else
|
||||
{
|
||||
<li><a href="@Url.Action("AddBuild", new { controller = "Front", area = "" })" title="@BuildFeed.Local.Common.AddBuild"><i class="fa fa-fw fa-plus-square"></i> @BuildFeed.Local.Common.AddBuild</a></li>
|
||||
<li><a href="@Url.Action("Logout", new { controller = "Support", area = "" })" title="@BuildFeed.Local.Common.LogOut"><i class="fa fa-fw fa-user"></i> @BuildFeed.Local.Common.LogOut</a></li>
|
||||
}
|
||||
<li><a href="#" id="page-navigation-search" title="@BuildFeed.Local.Common.Search"><i class="fa fa-fw fa-search"></i> @BuildFeed.Local.Common.Search</a></li>
|
||||
@*<li><a href="@Url.Action("Stats", new { controller = "Support", area = "" })" title="@BuildFeed.Local.Common.Statistics"><i class="fa fa-fw fa-line-chart"></i> @BuildFeed.Local.Common.Statistics</a></li>*@
|
||||
<li><a href="@Url.Action("Rss", new { controller = "Support", area = "" })" title="@BuildFeed.Local.Common.RssFeeds"><i class="fa fa-fw fa-rss"></i> @BuildFeed.Local.Common.RssFeeds</a></li>
|
||||
<li><a href="https://twitter.com/buildfeed" title="@BuildFeed.Local.Common.Twitter" target="_blank"><i class="fa fa-fw fa-twitter"></i> @BuildFeed.Local.Common.Twitter</a></li>
|
||||
<li>
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-globe"></i> <span class="caret"></span></a>
|
||||
<ul id="lang-switcher" class="dropdown-menu">
|
||||
@foreach (var locale in BuildFeed.Code.SiteLocale.AvailableLocales)
|
||||
{
|
||||
<li><a href="#" data-lang="@locale.LocaleId">@locale.DisplayName</a></li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<article id="page-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@RenderBody()
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer id="page-footer">
|
||||
<div class="row">
|
||||
<div class="col-sm-8 text-left">
|
||||
<p>
|
||||
<a href="@Url.Action("Sitemap", new { controller = "Support" })">@BuildFeed.Local.Common.Sitemap</a><br />
|
||||
<i class="fa fa-language"></i> @System.Globalization.CultureInfo.CurrentUICulture.NativeName (<a href="@Url.Action("Credits", new { controller = "Support" })">@BuildFeed.Local.Common.Credits</a>)
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-sm-4 text-right">
|
||||
<p>
|
||||
© 2013 - @DateTime.Now.Year.ToString(), @BuildFeed.Local.Common.SiteName<br />
|
||||
@BuildFeed.Local.Common.DevelopedBy <a href="https://twitter.com/tomhounsell" target="_blank">Thomas Hounsell</a><br />
|
||||
@BuildFeed.Local.Common.ContributeOn <a href="https://github.com/hounsell/BuildFeed" target="_blank"><i class="fa fa-github"></i> GitHub</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</li>
|
||||
<li id="settings-lang-menu" class="dropdown-menu-block">
|
||||
<h4>@Common.NavigationLanguage</h4>
|
||||
<ul>
|
||||
@foreach (Locale locale in Locale.AvailableLocales)
|
||||
{
|
||||
<li>
|
||||
<a href="#" data-lang="@locale.LocaleId">@locale.DisplayName</a>
|
||||
</li>
|
||||
}
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal fade" id="search-modal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">@BuildFeed.Local.Common.SearchBuildFeed</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-6 col-sm-offset-3">
|
||||
@Html.Label("search-input", BuildFeed.Local.Common.SearchQuery, new { @class = "sr-only" })
|
||||
@Html.TextBox("search-input", "", new { @class = "form-control", placeholder = BuildFeed.Local.Common.TypeToSearch })
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" id="search-results"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<article id="page-content">
|
||||
<div class="container">
|
||||
@RenderBody()
|
||||
</div>
|
||||
@Scripts.Render("~/bundles/jquery")
|
||||
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
|
||||
@Scripts.Render("~/bundles/jsrender")
|
||||
<script type="text/javascript" src="~/Scripts/bfs.js"></script>
|
||||
@RenderSection("scripts", required: false)
|
||||
<script id="result-template" type="text/x-jsrender">
|
||||
<div class="col-sm-4">
|
||||
<a href="{{:Url}}" class="list-group-item" title="{{:Title}}">
|
||||
<h4 class="list-group-item-heading">{{:Label}}</h4>
|
||||
<p class="list-group-item-text">{{:Group}}</p>
|
||||
</a>
|
||||
</div>
|
||||
</article>
|
||||
<footer id="page-footer">
|
||||
<div class="container">
|
||||
<p>
|
||||
<a href="@Url.Action(nameof(SupportController.Sitemap), new {controller = "Support"})">@Common.Sitemap</a><br />
|
||||
<i class="fa fa-language"></i> @CultureInfo.CurrentUICulture.NativeName (<a href="@Url.Action(nameof(SupportController.Credits), new {controller = "Support"})">@Common.Credits</a>)
|
||||
</p>
|
||||
<p>
|
||||
© 2013 - @DateTime.Now.Year.ToString(), @Common.SiteName<br />
|
||||
@Common.DevelopedBy <a href="https://twitter.com/tomhounsell" target="_blank">Thomas Hounsell</a><br />
|
||||
@Common.ContributeOn <a href="https://github.com/hounsell/BuildFeed" target="_blank"><i class="fa fa-github"></i> GitHub</a>
|
||||
</p>
|
||||
</div>
|
||||
</footer>
|
||||
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.0-rc.70/jsrender.min.js"></script>
|
||||
<script type="text/javascript" src="~/Scripts/bfs.min.js"></script>
|
||||
@RenderSection("scripts", false)
|
||||
<script id="result-template" type="text/x-jsrender">
|
||||
<a href="{{:Url}}" class="list-group-item" title="{{:Title}}">
|
||||
<h4 class="list-group-item-heading">{{:Label}}</h4>
|
||||
<p class="list-group-item-text">{{:Group}}</p>
|
||||
</a>
|
||||
</script>
|
||||
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
|
@ -63,6 +63,7 @@
|
|||
</rules>
|
||||
<rewriteMaps>
|
||||
<rewriteMap name="Support Pages">
|
||||
<add key="/statistics/" value="/" />
|
||||
<add key="/rss/flight/low/" value="/rss/feed/wif/" />
|
||||
<add key="/rss/flight/medium/" value="/rss/feed/msit/" />
|
||||
<add key="/rss/flight/high/" value="/rss/feed/osg/" />
|
||||
|
@ -70,7 +71,7 @@
|
|||
<add key="/rss/feed/medium/" value="/rss/feed/msit/" />
|
||||
<add key="/rss/feed/high/" value="/rss/feed/osg/" />
|
||||
<add key="/support/question/" value="/" />
|
||||
<add key="/support/stats/" value="/statistics/" />
|
||||
<add key="/support/stats/" value="/" />
|
||||
<add key="/support/rss/" value="/rss/" />
|
||||
<add key="/actions/create/" value="/add/" />
|
||||
<add key="/support/login/" value="/login/" />
|
||||
|
|
|
@ -1,14 +1,8 @@
|
|||
[
|
||||
{
|
||||
"outputFileName": "content/style.css",
|
||||
"outputFileName": "Scripts/bfs.js",
|
||||
"inputFiles": [
|
||||
"content/style.css"
|
||||
]
|
||||
},
|
||||
{
|
||||
"outputFileName": "content/rtl.css",
|
||||
"inputFiles": [
|
||||
"content/rtl.css"
|
||||
"Scripts/bfs.js"
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,14 @@
|
|||
[
|
||||
{
|
||||
"outputFile": "content/default.css",
|
||||
"inputFile": "content/default.scss"
|
||||
},
|
||||
{
|
||||
"outputFile": "content/rtl.css",
|
||||
"inputFile": "content/rtl.scss"
|
||||
},
|
||||
{
|
||||
"outputFile": "content/dark.css",
|
||||
"inputFile": "content/dark.scss"
|
||||
}
|
||||
]
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"compilers": {
|
||||
"less": {
|
||||
"autoPrefix": "",
|
||||
"cssComb": "none",
|
||||
"ieCompat": true,
|
||||
"strictMath": false,
|
||||
"strictUnits": false,
|
||||
"relativeUrls": true,
|
||||
"rootPath": "",
|
||||
"sourceMapRoot": "",
|
||||
"sourceMapBasePath": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"sass": {
|
||||
"includePath": "",
|
||||
"indentType": "space",
|
||||
"indentWidth": 2,
|
||||
"outputStyle": "nested",
|
||||
"Precision": 5,
|
||||
"relativeUrls": true,
|
||||
"sourceMapRoot": "",
|
||||
"sourceMap": false
|
||||
},
|
||||
"stylus": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"babel": {
|
||||
"sourceMap": false
|
||||
},
|
||||
"coffeescript": {
|
||||
"bare": false,
|
||||
"runtimeMode": "node",
|
||||
"sourceMap": false
|
||||
}
|
||||
},
|
||||
"minifiers": {
|
||||
"css": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
},
|
||||
"javascript": {
|
||||
"enabled": true,
|
||||
"termSemicolons": true,
|
||||
"gzip": false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
body {
|
||||
background-color: #f6f5f3;
|
||||
color: #373736; }
|
||||
|
||||
a {
|
||||
color: #373736; }
|
||||
|
||||
#page-content {
|
||||
background-color: #373736;
|
||||
color: #f6f5f3; }
|
||||
#page-content a {
|
||||
color: #f6f5f3; }
|
||||
|
||||
#page-navigation {
|
||||
background-color: #242423;
|
||||
color: #f6f5f3; }
|
||||
#page-navigation #page-navigation-links > li a {
|
||||
color: #f6f5f3; }
|
||||
#page-navigation #page-navigation-links > li a:hover {
|
||||
background-color: #373736; }
|
||||
|
||||
.dropdown-menu {
|
||||
background-color: #242423;
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15); }
|
||||
|
||||
article#page-content {
|
||||
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15) inset;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15) inset;
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15) inset; }
|
||||
article#page-content h1, article#page-content h3 {
|
||||
color: #d6d5d3; }
|
||||
|
|
@ -0,0 +1 @@
|
|||
body{background-color:#f6f5f3;color:#373736;}a{color:#373736;}#page-content{background-color:#373736;color:#f6f5f3;}#page-content a{color:#f6f5f3;}#page-navigation{background-color:#242423;color:#f6f5f3;}#page-navigation #page-navigation-links>li a{color:#f6f5f3;}#page-navigation #page-navigation-links>li a:hover{background-color:#373736;}.dropdown-menu{background-color:#242423;-moz-box-shadow:0 5px 10px rgba(0,0,0,.15);-webkit-box-shadow:0 5px 10px rgba(0,0,0,.15);box-shadow:0 5px 10px rgba(0,0,0,.15);}article#page-content{-moz-box-shadow:0 5px 10px rgba(0,0,0,.15) inset;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.15) inset;box-shadow:0 5px 10px rgba(0,0,0,.15) inset;}article#page-content h1,article#page-content h3{color:#d6d5d3;}
|
|
@ -0,0 +1,63 @@
|
|||
body
|
||||
{
|
||||
background-color: #f6f5f3;
|
||||
color: #373736;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
color: #373736;
|
||||
}
|
||||
|
||||
#page-content
|
||||
{
|
||||
background-color: #373736;
|
||||
color: #f6f5f3;
|
||||
|
||||
a
|
||||
{
|
||||
color: #f6f5f3;
|
||||
}
|
||||
}
|
||||
|
||||
#page-navigation
|
||||
{
|
||||
background-color: #242423;
|
||||
color: #f6f5f3;
|
||||
|
||||
#page-navigation-links
|
||||
{
|
||||
> li
|
||||
{
|
||||
a
|
||||
{
|
||||
color: #f6f5f3;
|
||||
}
|
||||
|
||||
a:hover
|
||||
{
|
||||
background-color: #373736;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu
|
||||
{
|
||||
background-color: #242423;
|
||||
-moz-box-shadow: 0 5px 10px rgba(0,0,0,0.15);
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.15);
|
||||
box-shadow: 0 5px 10px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
article#page-content
|
||||
{
|
||||
-moz-box-shadow: 0 5px 10px rgba(0,0,0,0.15) inset;
|
||||
-webkit-box-shadow: 0 5px 10px rgba(0,0,0,0.15) inset;
|
||||
box-shadow: 0 5px 10px rgba(0,0,0,0.15) inset;
|
||||
|
||||
h1, h3
|
||||
{
|
||||
color: #d6d5d3;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
body {
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 10pt;
|
||||
margin: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
|
||||
a {
|
||||
text-decoration: none; }
|
||||
|
||||
h1 {
|
||||
font-size: 3em;
|
||||
font-weight: 500; }
|
||||
|
||||
.container {
|
||||
width: 1240px;
|
||||
max-width: 80%;
|
||||
margin: 0 auto; }
|
||||
|
||||
header#page-header h1 {
|
||||
font-weight: 300;
|
||||
margin: 0 0 0.33em; }
|
||||
|
||||
nav#page-navigation #page-navigation-links {
|
||||
margin: 0 -15px;
|
||||
padding: 0;
|
||||
text-align: right; }
|
||||
nav#page-navigation #page-navigation-links > li {
|
||||
display: inline-block;
|
||||
vertical-align: top; }
|
||||
nav#page-navigation #page-navigation-links > li > a {
|
||||
display: block;
|
||||
padding: 15px; }
|
||||
|
||||
nav#page-navigation button {
|
||||
display: none; }
|
||||
|
||||
.dropdown-parent {
|
||||
position: relative; }
|
||||
.dropdown-parent .dropdown-menu {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: calc(80vw + 20px);
|
||||
max-width: 1240px;
|
||||
padding: 15px;
|
||||
text-align: left; }
|
||||
.dropdown-parent .dropdown-menu h4 {
|
||||
margin: 0 0 .5em;
|
||||
font-size: 1.2em;
|
||||
font-weight: 500; }
|
||||
.dropdown-parent .dropdown-menu .dropdown-menu-block {
|
||||
float: left;
|
||||
display: inline-block;
|
||||
vertical-align: top; }
|
||||
.dropdown-parent .dropdown-menu .dropdown-menu-block ul {
|
||||
padding: 0; }
|
||||
.dropdown-parent .dropdown-menu .dropdown-menu-block li {
|
||||
list-style-type: none;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
float: left;
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
vertical-align: top; }
|
||||
.dropdown-parent .dropdown-menu .dropdown-menu-block li > a {
|
||||
display: block;
|
||||
padding: 0 1em; }
|
||||
.dropdown-parent .dropdown-menu #settings-theme-menu {
|
||||
width: 120px; }
|
||||
.dropdown-parent .dropdown-menu #settings-lang-menu {
|
||||
width: calc(100% - 120px); }
|
||||
.dropdown-parent .dropdown-menu.open {
|
||||
display: block; }
|
||||
|
||||
article#page-content {
|
||||
padding: 1em 0; }
|
||||
article#page-content h1 {
|
||||
font-size: 5em;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
margin: 0; }
|
||||
article#page-content h3 {
|
||||
font-size: 3em;
|
||||
font-weight: normal;
|
||||
margin: 0 0 0.5em; }
|
||||
article#page-content .build-group-listing {
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start; }
|
||||
article#page-content .build-group-listing .build-group {
|
||||
width: 16.66667%;
|
||||
min-width: 160px;
|
||||
flex-grow: 1;
|
||||
margin-bottom: 1em; }
|
||||
article#page-content .build-group-listing .build-group h3 {
|
||||
font-size: 2em;
|
||||
font-weight: 300;
|
||||
margin: 0 0 0.25em;
|
||||
letter-spacing: -0.08em; }
|
||||
article#page-content .build-group-listing .build-group p {
|
||||
margin: 0 0 0.6667em; }
|
||||
|
||||
ul.pagination {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0; }
|
||||
ul.pagination > li {
|
||||
display: inline-block; }
|
||||
|
||||
footer#page-footer {
|
||||
font-size: 0.85em; }
|
||||
|
|
@ -0,0 +1 @@
|
|||
body{font-family:'Roboto',sans-serif;font-size:10pt;margin:0;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}a{text-decoration:none;}h1{font-size:3em;font-weight:500;}.container{width:1240px;max-width:80%;margin:0 auto;}header#page-header h1{font-weight:300;margin:0 0 .33em;}nav#page-navigation #page-navigation-links{margin:0 -15px;padding:0;text-align:right;}nav#page-navigation #page-navigation-links>li{display:inline-block;vertical-align:top;}nav#page-navigation #page-navigation-links>li>a{display:block;padding:15px;}nav#page-navigation button{display:none;}.dropdown-parent{position:relative;}.dropdown-parent .dropdown-menu{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;position:absolute;right:0;width:calc(80vw + 20px);max-width:1240px;padding:15px;text-align:left;}.dropdown-parent .dropdown-menu h4{margin:0 0 .5em;font-size:1.2em;font-weight:500;}.dropdown-parent .dropdown-menu .dropdown-menu-block{float:left;display:inline-block;vertical-align:top;}.dropdown-parent .dropdown-menu .dropdown-menu-block ul{padding:0;}.dropdown-parent .dropdown-menu .dropdown-menu-block li{list-style-type:none;height:2em;line-height:2em;float:left;width:20%;min-width:100px;vertical-align:top;}.dropdown-parent .dropdown-menu .dropdown-menu-block li>a{display:block;padding:0 1em;}.dropdown-parent .dropdown-menu #settings-theme-menu{width:120px;}.dropdown-parent .dropdown-menu #settings-lang-menu{width:calc(100% - 120px);}.dropdown-parent .dropdown-menu.open{display:block;}article#page-content{padding:1em 0;}article#page-content h1{font-size:5em;font-weight:300;text-align:center;margin:0;}article#page-content h3{font-size:3em;font-weight:normal;margin:0 0 .5em;}article#page-content .build-group-listing{display:flex;-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;justify-content:flex-start;}article#page-content .build-group-listing .build-group{width:16.66667%;min-width:160px;flex-grow:1;margin-bottom:1em;}article#page-content .build-group-listing .build-group h3{font-size:2em;font-weight:300;margin:0 0 .25em;letter-spacing:-.08em;}article#page-content .build-group-listing .build-group p{margin:0 0 .6667em;}ul.pagination{text-align:center;margin:0;padding:0;}ul.pagination>li{display:inline-block;}footer#page-footer{font-size:.85em;}
|
|
@ -0,0 +1,200 @@
|
|||
body
|
||||
{
|
||||
font-family: 'Roboto', sans-serif;
|
||||
font-size: 10pt;
|
||||
margin: 0;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
a
|
||||
{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 3em;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.container
|
||||
{
|
||||
width: 1240px;
|
||||
max-width: 80%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
header#page-header
|
||||
{
|
||||
h1
|
||||
{
|
||||
font-weight: 300;
|
||||
margin: 0 0 0.33em;
|
||||
}
|
||||
}
|
||||
|
||||
nav#page-navigation
|
||||
{
|
||||
#page-navigation-links
|
||||
{
|
||||
margin: 0 -15px;
|
||||
padding: 0;
|
||||
text-align: right;
|
||||
|
||||
> li
|
||||
{
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
> a
|
||||
{
|
||||
display: block;
|
||||
padding: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-parent
|
||||
{
|
||||
position: relative;
|
||||
|
||||
.dropdown-menu
|
||||
{
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: calc(80vw + 20px);
|
||||
max-width: 1240px;
|
||||
padding: 15px;
|
||||
text-align: left;
|
||||
|
||||
h4
|
||||
{
|
||||
margin: 0 0 .5em;
|
||||
font-size: 1.2em;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.dropdown-menu-block
|
||||
{
|
||||
float: left;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
|
||||
ul
|
||||
{
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li
|
||||
{
|
||||
list-style-type: none;
|
||||
height: 2em;
|
||||
line-height: 2em;
|
||||
float: left;
|
||||
width: 20%;
|
||||
min-width: 100px;
|
||||
vertical-align: top;
|
||||
|
||||
> a
|
||||
{
|
||||
display: block;
|
||||
padding: 0 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#settings-theme-menu
|
||||
{
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
#settings-lang-menu
|
||||
{
|
||||
width: calc(100% - 120px);
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu.open
|
||||
{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
article#page-content
|
||||
{
|
||||
padding: 1em 0;
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 5em;
|
||||
font-weight: 300;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 3em;
|
||||
font-weight: normal;
|
||||
margin: 0 0 0.5em;
|
||||
}
|
||||
|
||||
.build-group-listing
|
||||
{
|
||||
display: flex;
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.build-group
|
||||
{
|
||||
width: #{(100% / 6)};
|
||||
min-width: 160px;
|
||||
flex-grow: 1;
|
||||
margin-bottom: 1em;
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 2em;
|
||||
font-weight: 300;
|
||||
margin: 0 0 0.25em;
|
||||
letter-spacing: -0.08em;
|
||||
}
|
||||
|
||||
p
|
||||
{
|
||||
margin: 0 0 0.6667em;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ul.pagination
|
||||
{
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
> li
|
||||
{
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
footer#page-footer
|
||||
{
|
||||
font-size: 0.85em;
|
||||
}
|
|
@ -1,41 +1 @@
|
|||
.form-horizontal .form-control-static
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.pagination > li > a,
|
||||
.pagination > li > span
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
h1[dir=ltr]
|
||||
{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media (min-width: 768px)
|
||||
{
|
||||
.navbar-header
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.navbar-nav > li
|
||||
{
|
||||
float: right;
|
||||
}
|
||||
|
||||
.navbar-right
|
||||
{
|
||||
float: left !important;
|
||||
margin-left: -15px;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.navbar-right .dropdown-menu
|
||||
{
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
.form-horizontal .form-control-static{text-align:left}.pagination>li>a,.pagination>li>span{float:right}h1[dir=ltr]{text-align:right}@media(min-width:768px){.navbar-header{float:right}.navbar-nav>li{float:right}.navbar-right{float:left !important;margin-left:-15px;margin-right:0}.navbar-right .dropdown-menu{right:auto;left:0}}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
body {
|
||||
}
|
|
@ -1,261 +0,0 @@
|
|||
body, h1, h2, h3
|
||||
{
|
||||
font-family: "Segoe UI", Frutiger, "Frutiger Linotype", "Dejavu Sans", "Helvetica Neue", Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1, h2, h3
|
||||
{
|
||||
text-shadow: none;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
body
|
||||
{
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
h1
|
||||
{
|
||||
font-size: 52px;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
h1 a
|
||||
{
|
||||
text-decoration: none;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
@media(max-width: 480px)
|
||||
{
|
||||
h1
|
||||
{
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
h3
|
||||
{
|
||||
font-size: 30px;
|
||||
margin: 1em 0 0.4em;
|
||||
}
|
||||
|
||||
#page-content
|
||||
{
|
||||
padding-top: 50px;
|
||||
}
|
||||
|
||||
.addthis_sharing_toolbox
|
||||
{
|
||||
margin: 0 -0.5em;
|
||||
}
|
||||
|
||||
.at-share-tbx-element .at-share-btn
|
||||
{
|
||||
margin-left: 8px !important;
|
||||
}
|
||||
|
||||
.at-share-tbx-element .at-share-btn:first-child
|
||||
{
|
||||
margin-left: 0 !important;
|
||||
}
|
||||
|
||||
.at_flat_counter
|
||||
{
|
||||
vertical-align: 33% !important;
|
||||
}
|
||||
|
||||
.build-group
|
||||
{
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
@media(max-width:767px)
|
||||
{
|
||||
.build-group:nth-child(2n+1)
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
}
|
||||
|
||||
.build-group-title
|
||||
{
|
||||
font-size: 27px;
|
||||
font-weight: 300;
|
||||
letter-spacing: -1px;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
@media (max-width:480px)
|
||||
{
|
||||
.build-group-title
|
||||
{
|
||||
font-size: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.build-group-p
|
||||
{
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.no-wrapping
|
||||
{
|
||||
-ms-text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.eager-wrapping
|
||||
{
|
||||
-ms-word-wrap: break-word;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.label-build-status
|
||||
{
|
||||
padding-bottom: 1px;
|
||||
}
|
||||
|
||||
.field-validation-error
|
||||
{
|
||||
color: #ff4136;
|
||||
}
|
||||
|
||||
.form-details label
|
||||
{
|
||||
font-size: 15px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.form-details
|
||||
{
|
||||
margin-top: 2em;
|
||||
}
|
||||
|
||||
.form-details .form-control-static
|
||||
{
|
||||
font-weight: bold;
|
||||
color: #eaeaea;
|
||||
}
|
||||
|
||||
.form-details .form-control-static .more-link
|
||||
{
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.form-details .row
|
||||
{
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.credits-list dd + dt
|
||||
{
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
#page-footer
|
||||
{
|
||||
font-size: 12px;
|
||||
margin-top: 3em;
|
||||
}
|
||||
|
||||
.form-horizontal .control-label
|
||||
{
|
||||
padding-top: 8px;
|
||||
}
|
||||
|
||||
label, .control-label, .help-block, .checkbox, .radio
|
||||
{
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.btn-reset
|
||||
{
|
||||
padding: 9px 0 7px;
|
||||
}
|
||||
|
||||
.btn-xs
|
||||
{
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.table .btn
|
||||
{
|
||||
padding: 4px 9px;
|
||||
}
|
||||
|
||||
.table-admin h4
|
||||
{
|
||||
margin: .1em 0;
|
||||
}
|
||||
|
||||
.table-admin > tbody > tr > th,
|
||||
.table-admin > tbody > tr > td
|
||||
{
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.trumbowyg-box.trumbowyg, .trumbowyg-editor.trumbowyg
|
||||
{
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.trumbowyg-black .trumbowyg-dropdown button
|
||||
{
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
#search-results
|
||||
{
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#search-results .list-group-item
|
||||
{
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
#search-results .list-group-item-heading
|
||||
{
|
||||
overflow: hidden;
|
||||
-ms-text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
#search-results .list-group-item-heading h4
|
||||
{
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px)
|
||||
{
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 991px)
|
||||
{
|
||||
.col-sm-2.build-group:nth-child(6n+1),
|
||||
.col-sm-3.build-group:nth-child(4n+1)
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px)
|
||||
{
|
||||
.col-md-2.build-group:nth-child(6n+1)
|
||||
{
|
||||
clear: left;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 1200px)
|
||||
{
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
body,h1,h2,h3{font-family:"Segoe UI",Frutiger,"Frutiger Linotype","Dejavu Sans","Helvetica Neue",Arial,sans-serif}h1,h2,h3{text-shadow:none;font-weight:300}body{font-size:15px}h1{font-size:52px;text-align:center;margin-bottom:15px}h1 a{text-decoration:none;color:#000}@media(max-width:480px){h1{font-size:36px}}h3{font-size:30px;margin:1em 0 .4em}#page-content{padding-top:50px}.addthis_sharing_toolbox{margin:0 -.5em}.at-share-tbx-element .at-share-btn{margin-left:8px !important}.at-share-tbx-element .at-share-btn:first-child{margin-left:0 !important}.at_flat_counter{vertical-align:33% !important}.build-group{margin-bottom:2em}@media(max-width:767px){.build-group:nth-child(2n+1){clear:left}}.build-group-title{font-size:27px;font-weight:300;letter-spacing:-1px;margin:0 0 8px 0}@media(max-width:480px){.build-group-title{font-size:24px}}.build-group-p{color:rgba(255,255,255,.7);margin-bottom:5px}.no-wrapping{-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.eager-wrapping{-ms-word-wrap:break-word;word-wrap:break-word}.label-build-status{padding-bottom:1px}.field-validation-error{color:#ff4136}.form-details label{font-size:15px;font-weight:normal}.form-details{margin-top:2em}.form-details .form-control-static{font-weight:bold;color:#eaeaea}.form-details .form-control-static .more-link{font-weight:normal}.form-details .row{margin-bottom:.5em}.credits-list dd+dt{margin-top:1.5em}#page-footer{font-size:12px;margin-top:3em}.form-horizontal .control-label{padding-top:8px}label,.control-label,.help-block,.checkbox,.radio{font-size:14px}.btn-reset{padding:9px 0 7px}.btn-xs{font-size:13px}.table .btn{padding:4px 9px}.table-admin h4{margin:.1em 0}.table-admin>tbody>tr>th,.table-admin>tbody>tr>td{vertical-align:middle}.trumbowyg-box.trumbowyg,.trumbowyg-editor.trumbowyg{margin:0;width:100%}.trumbowyg-black .trumbowyg-dropdown button{color:#fff !important}#search-results{margin-top:1em}#search-results .list-group-item{margin-bottom:1em}#search-results .list-group-item-heading{overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#search-results .list-group-item-heading h4{font-size:16px}@media(min-width:768px) and (max-width:991px){.col-sm-2.build-group:nth-child(6n+1),.col-sm-3.build-group:nth-child(4n+1){clear:left}}@media(min-width:992px){.col-md-2.build-group:nth-child(6n+1){clear:left}}
|
|
@ -1,7 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Antlr" version="3.5.0.2" targetFramework="net45" />
|
||||
<package id="Chart.js" version="1.0.2" targetFramework="net45" />
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net461" />
|
||||
<package id="Humanizer" version="1.37.7" targetFramework="net461" />
|
||||
<package id="jQuery" version="2.2.3" targetFramework="net461" />
|
||||
|
@ -17,7 +15,6 @@
|
|||
<package id="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.3" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.3" targetFramework="net45" />
|
||||
|
@ -31,6 +28,5 @@
|
|||
<package id="MongoDB.Driver" version="2.2.4" targetFramework="net461" />
|
||||
<package id="MongoDB.Driver.Core" version="2.2.4" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net461" />
|
||||
<package id="WebGrease" version="1.6.0" targetFramework="net45" />
|
||||
<package id="xwebrss" version="1.2.1.130" targetFramework="net45" />
|
||||
</packages>
|
Loading…
Reference in New Issue