Files { get; set; }
16 |
17 | public JObject FolderInfoRoot { get; set; }
18 |
19 | public string RootDirectory { get; set; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SourceBrowser.Site")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SourceBrowser.Site")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("eaa37803-d416-435d-84d2-d09298d6a503")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/_references.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Scripts/_references.js
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.dojo.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/Scripts/history.js/history.adapter.dojo.js
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.jquery.js:
--------------------------------------------------------------------------------
1 | (function(a,b){var c=a.History=a.History||{},d=a.jQuery;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b){d(a).trigger(b)},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()})(window)
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.mootools.js:
--------------------------------------------------------------------------------
1 | (function(a,b){var c=a.History=a.History||{},d=a.MooTools;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");Object.append(Element.NativeEvents,{popstate:2,hashchange:2}),c.Adapter={bind:function(a,b,c){var d=typeof a=="string"?document.id(a):a;d.addEvent(b,c)},trigger:function(a,b){var c=typeof a=="string"?document.id(a):a;c.fireEvent(b)},onDomLoad:function(b){a.addEvent("domready",b)}},typeof c.init!="undefined"&&c.init()})(window)
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.prototype.js:
--------------------------------------------------------------------------------
1 | (function(a,b){var c=a.History=a.History||{},d=a.Prototype,e=a.Element,f=a.Event,g=a.$;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");typeof a.fireEvent=="undefined"&&typeof a.dispatchEvent=="undefined"?c.enable=!1:(function(){var a={HTMLEvents:/^(?:load|unload|abort|error|select|hashchange|popstate|change|submit|reset|focus|blur|resize|scroll)$/,MouseEvents:/^(?:click|mouse(?:down|up|over|move|out))$/},b={pointerX:0,pointerY:0,button:0,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,bubbles:!0,cancelable:!0};f.hasNativeEvent=function(b,c){var d=null,e;b=g(b);for(var f in a)if(a[f].test(c)){d=f;break}e=d?!0:!1;return e},f.bind=function(a,b,c){a=g(a);return e.hasNativeEvent(a,b)?e.observe(a,b,c):e.observe(a,"custom:"+b,c)},f.trigger=function(c,d){var f=Object.extend(b,arguments[2]||{}),h,i=null;c=g(c);var j;for(j in a)if(a[j].test(d)){i=j;break}if(!i)return e.fire(c,"custom:"+d);document.createEvent?(h=document.createEvent(i),i==="HTMLEvents"?h.initEvent(d,f.bubbles,f.cancelable):i&&h.initMouseEvent(d,f.bubbles,f.cancelable,document.defaultView,f.button,f.pointerX,f.pointerY,f.pointerX,f.pointerY,f.ctrlKey,f.altKey,f.shiftKey,f.metaKey,f.button,c)):document.createEventObject&&(f.clientX=f.pointerX,f.clientY=f.pointerY,h=Object.extend(document.createEventObject(),f));if(c.fireEvent)c.fireEvent("on"+d,h);else if(c.dispatchEvent)c.dispatchEvent(h);else throw new Error("Cannot dispatch the event");return c},e.addMethods({simulate:f.trigger,trigger:f.trigger,bind:f.bind,hasNativeEvent:f.hasNativeEvent})}(),c.Adapter={bind:function(a,b,c){e.bind(a,b,c)},trigger:function(a,b){e.trigger(a,b)},onDomLoad:function(b){f.observe(a.document,"dom:loaded",b)}},typeof c.init!="undefined"&&c.init())})(window)
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.yui.js:
--------------------------------------------------------------------------------
1 | (function(a,b){var c=a.History=a.History||{},d=a.YUI;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d().use("node-base",function(d){d.one(a).on(b,c)})},trigger:function(a,b){d().use("node-event-simulate",function(c){c.one(a).simulate(b)})},onDomLoad:function(a){d().use("event",function(b){b.on("domready",a)})}},typeof c.init!="undefined"&&c.init()})(window)
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/history.js/history.adapter.zepto.js:
--------------------------------------------------------------------------------
1 | (function(a,b){var c=a.History=a.History||{},d=a.Zepto;if(typeof c.Adapter!="undefined")throw new Error("History.js Adapter has already been loaded...");c.Adapter={bind:function(a,b,c){d(a).bind(b,c)},trigger:function(a,b){d(a).trigger(b)},onDomLoad:function(a){d(a)}},typeof c.init!="undefined"&&c.init()})(window)
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/treeViewHelpers.js:
--------------------------------------------------------------------------------
1 | function endsWith(str, suffix) {
2 | return str.indexOf(suffix, str.length - suffix.length) !== -1;
3 | }
4 |
5 | $(function () {
6 | $("#browserTree").click(
7 | function (e) {
8 | var target = e.originalEvent.target.href;
9 | if (!(endsWith(target, "#"))) {
10 | window.location.href = target;
11 | }
12 | }
13 | );
14 | });
15 |
16 | $(document).ready(function () {
17 | var path = window.location.pathname;
18 | expandTreeView(path);
19 | });
20 |
21 | function expandTreeView(path) {
22 | var parts = path.split("/");
23 | var pathToDate = "";
24 |
25 | // Ignore the first three elements from the path:
26 | // Browse/UserName/RepoName/Folder1/Folder2/FileName
27 | for (var partNumber = 4; partNumber < parts.length; partNumber++)
28 | {
29 | pathToDate = pathToDate + parts[partNumber] + "/";
30 | expandNode(pathToDate);
31 | }
32 | }
33 |
34 | function expandNode(path) {
35 | var selector = "li[id='" + path + "']";
36 | var node = $(selector);
37 | var child = $(selector + " > ul");
38 | if (node.length) {
39 | node.removeClass("collapsed");
40 | }
41 | if (child.length) {
42 | child.show();
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Scripts/upload.js:
--------------------------------------------------------------------------------
1 | $(document).ready(function () {
2 | getFormFromDom().submit(prepareForUpload);
3 | });
4 |
5 | function prepareForUpload() {
6 | getButtonFromDom().prop("disabled", true);
7 | var errorMessageElement = getErrorMessageFromDom();
8 | if (errorMessageElement) {
9 | errorMessageElement.css("visibility", "hidden");
10 | }
11 | getMessageDivFromDom().css("visibility", "visible");
12 | }
13 |
14 | //
15 | // DOM access methods
16 | //
17 | function getButtonFromDom() {
18 | return $(".btn");
19 | }
20 |
21 | function getFormFromDom() {
22 | return $("#upload-form");
23 | }
24 |
25 | function getMessageDivFromDom() {
26 | return $(".upload-message");
27 | }
28 |
29 | function getErrorMessageFromDom() {
30 | return $("#upload-error");
31 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Owin;
2 | using Owin;
3 |
4 | [assembly: OwinStartupAttribute(typeof(SourceBrowser.Site.Startup))]
5 |
6 | namespace SourceBrowser.Site
7 | {
8 | public partial class Startup
9 | {
10 | public void Configuration(IAppBuilder app)
11 | {
12 | ConfigureAuth(app);
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Utilities/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Web;
5 |
6 | namespace SourceBrowser.Site.Utilities
7 | {
8 | public static class Constants
9 | {
10 | public const string REPO_LOCK_FILENAME = "repo.lock";
11 | }
12 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ConfirmEmail.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "ConfirmAccount";
3 | }
4 |
5 | @ViewBag.Title.
6 |
7 |
8 | Thank you for confirming your account. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ExternalLoginConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ExternalLoginConfirmationViewModel
2 | @{
3 | ViewBag.Title = "Register";
4 | }
5 | @ViewBag.Title.
6 | Associate your @ViewBag.LoginProvider account.
7 |
8 | @using (Html.BeginForm("ExternalLoginConfirmation", "Account", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 |
12 | Association Form
13 |
14 | @Html.ValidationSummary(true, "", new { @class = "text-danger" })
15 |
16 | You've successfully authenticated with @ViewBag.LoginProvider .
17 | Please enter a user name for this site below and click the Register button to finish
18 | logging in.
19 |
20 |
27 |
32 | }
33 |
34 | @section Scripts {
35 | @Scripts.Render("~/bundles/jqueryval")
36 | }
37 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ExternalLoginFailure.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Login Failure";
3 | }
4 |
5 | @ViewBag.Title.
6 | Unsuccessful login with service.
7 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ForgotPassword.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ForgotPasswordViewModel
2 | @{
3 | ViewBag.Title = "Forgot your password?";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ForgotPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Enter your email.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
25 | }
26 |
27 | @section Scripts {
28 | @Scripts.Render("~/bundles/jqueryval")
29 | }
30 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ForgotPasswordConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Forgot Password Confirmation";
3 | }
4 |
5 |
6 | @ViewBag.Title.
7 |
8 |
9 |
10 | Please check your email to reset your password.
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/Manage.cshtml:
--------------------------------------------------------------------------------
1 | @using SourceBrowser.Site.Models;
2 | @using Microsoft.AspNet.Identity;
3 | @{
4 | ViewBag.Title = "Manage Account";
5 | }
6 |
7 | @ViewBag.Title.
8 |
9 | @ViewBag.StatusMessage
10 |
11 |
12 | @if (ViewBag.HasLocalPassword)
13 | {
14 | @Html.Partial("_ChangePasswordPartial")
15 | }
16 | else
17 | {
18 | @Html.Partial("_SetPasswordPartial")
19 | }
20 |
21 |
22 | @Html.Action("RemoveAccountList")
23 | @Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { Action = "LinkLogin", ReturnUrl = ViewBag.ReturnUrl })
24 |
25 |
26 |
27 | @section Scripts {
28 | @Scripts.Render("~/bundles/jqueryval")
29 | }
30 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/Register.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.RegisterViewModel
2 | @{
3 | ViewBag.Title = "Register";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Create a new account.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
26 |
32 |
37 | }
38 |
39 | @section Scripts {
40 | @Scripts.Render("~/bundles/jqueryval")
41 | }
42 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ResetPassword.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ResetPasswordViewModel
2 | @{
3 | ViewBag.Title = "Reset password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Reset your password.
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 | @Html.HiddenFor(model => model.Code)
15 |
21 |
27 |
33 |
38 | }
39 |
40 | @section Scripts {
41 | @Scripts.Render("~/bundles/jqueryval")
42 | }
43 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/ResetPasswordConfirmation.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Reset password confirmation";
3 | }
4 |
5 |
6 | @ViewBag.Title.
7 |
8 |
9 |
10 | Your password has been reset. Please @Html.ActionLink("click here to log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/SendCode.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.SendCodeViewModel
2 | @{
3 | ViewBag.Title = "Send";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("SendCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
9 | @Html.AntiForgeryToken()
10 | @Html.Hidden("rememberMe", @Model.RememberMe)
11 | Send verification code
12 |
13 |
14 |
15 | Select Two-Factor Authentication Provider:
16 | @Html.DropDownListFor(model => model.SelectedProvider, Model.Providers)
17 |
18 |
19 |
20 | }
21 |
22 | @section Scripts {
23 | @Scripts.Render("~/bundles/jqueryval")
24 | }
25 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/VerifyCode.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.VerifyCodeViewModel
2 | @{
3 | ViewBag.Title = "Verify";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("VerifyCode", "Account", new { ReturnUrl = Model.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" })) {
9 | @Html.AntiForgeryToken()
10 | @Html.Hidden("provider", @Model.Provider)
11 | @Html.Hidden("rememberMe", @Model.RememberMe)
12 | Enter verification code
13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" })
15 |
21 |
29 |
34 | }
35 |
36 | @section Scripts {
37 | @Scripts.Render("~/bundles/jqueryval")
38 | }
39 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/_ChangePasswordPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNet.Identity
2 | @model SourceBrowser.Site.Models.ManageUserViewModel
3 |
4 | You're logged in as @User.Identity.GetUserName() .
5 |
6 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
7 | {
8 | @Html.AntiForgeryToken()
9 | Change Password Form
10 |
11 | @Html.ValidationSummary("", new { @class = "text-danger" })
12 |
18 |
24 |
30 |
31 |
36 | }
37 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/_ExternalLoginsListPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using SourceBrowser.Site.Models
2 | @model ExternalLoginListViewModel
3 | @using Microsoft.Owin.Security
4 |
5 | Use another service to log in.
6 |
7 | @{
8 | var loginProviders = Context.GetOwinContext().Authentication.GetExternalAuthenticationTypes();
9 | if (loginProviders.Count() == 0)
10 | {
11 |
12 |
There are no external authentication services configured. See this article
13 | for details on setting up this ASP.NET application to support logging in via external services.
14 |
15 | }
16 | else
17 | {
18 | using (Html.BeginForm(Model.Action, "Account", new { ReturnUrl = Model.ReturnUrl }))
19 | {
20 | @Html.AntiForgeryToken()
21 |
22 |
23 | @foreach (AuthenticationDescription p in loginProviders)
24 | {
25 | @p.AuthenticationType
26 | }
27 |
28 |
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/_RemoveAccountPartial.cshtml:
--------------------------------------------------------------------------------
1 | @model ICollection
2 |
3 | @if (Model.Count > 0)
4 | {
5 | Registered Logins
6 |
34 | }
35 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Account/_SetPasswordPartial.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ManageUserViewModel
2 |
3 |
4 | You do not have a local username/password for this site. Add a local
5 | account so you can log in without an external login.
6 |
7 |
8 | @using (Html.BeginForm("Manage", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 |
12 | Create Local Login
13 |
14 | @Html.ValidationSummary("", new { @class = "text-danger" })
15 |
21 |
27 |
32 | }
33 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/AwaitLookup.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.GithubSolutionStructure
2 |
3 | @{
4 | ViewBag.Title = "AwaitLookup";
5 | }
6 |
7 |
8 |
9 |
10 | We are currently processing @Model.ParentRepo.ParentUserName's repository @Model.ParentRepo.Name.
11 | This may take a few minutes. Refresh this page periodically.
12 | View @Model.ParentRepo.Name on github.
13 |
14 |
15 |
24 |
25 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/Index.cshtml:
--------------------------------------------------------------------------------
1 | @using SourceBrowser.Site.Models
2 | @{
3 | ViewBag.Title = "Browse";
4 | }
5 |
6 |
7 | @if (ViewBag.Users == null || ViewBag.Users.Count == 0)
8 | {
9 |
10 |
11 | Oops! There are no repositories to browse. :(
12 | Try uploading one of your own from Github!
13 |
14 | }
15 | else
16 | {
17 |
18 |
19 |
Pick user or organization whose repo you want to browse:
20 |
34 |
35 | }
36 |
37 |
38 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/InvalidPath.cshtml:
--------------------------------------------------------------------------------
1 |
2 | @{
3 | ViewBag.Title = "InvalidPath";
4 | }
5 |
6 | InvalidPath
7 |
8 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/LookupError.cshtml:
--------------------------------------------------------------------------------
1 |
2 | @{
3 | ViewBag.Title = "Error";
4 | }
5 |
6 |
7 |
8 |
There was and error retrieving this project
9 | Please ensure the URL you're using is correct.
10 | @if(ViewBag.ErrorMessage != null)
11 | {
12 |
13 | @ViewBag.ErrorMessage
14 | }
15 |
16 |
17 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/LookupFile.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.GithubFileStructure
2 |
3 | @{
4 | ViewBag.Title = Model.FileName;
5 | }
6 |
7 |
8 |
9 |
10 |
11 | @if (!String.IsNullOrEmpty(Model.SourceCode))
12 | {
13 | @Html.Raw(Model.SourceCode)
14 | }
15 |
16 |
17 |
18 |
19 |
20 | @Html.Raw(ViewBag.TreeView)
21 |
22 |
24 |
25 | There were no results
26 |
27 |
28 |
29 |
30 | @section Scripts {
31 | @Scripts.Render("~/bundles/treeViewScripts")
32 | }
33 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Browse/LookupFolder.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.GithubSolutionStructure
2 |
3 | @{
4 | ViewBag.Title = Model.ParentRepo.Name;
5 | }
6 |
7 |
8 |
9 |
10 | Browsing @Model.ParentRepo.ParentUserName's repository @Model.ParentRepo.Name.
11 |
12 | Use the search box or the tree view on the right,
13 | or view @Model.ParentRepo.Name on GitHub.
14 |
15 | @if (ViewBag.Readme != null)
16 | {
17 |
18 |
19 |
@Html.Raw(ViewBag.Readme)
20 |
21 | }
22 |
23 |
24 |
25 |
26 | @Html.Raw(ViewBag.TreeView)
27 |
28 |
29 |
30 | There were no results
31 |
32 |
33 |
34 |
35 | @section Scripts {
36 | @Scripts.Render("~/bundles/treeViewScripts")
37 | }
38 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Home/About.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "About";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 | Use this area to provide additional information.
8 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Home/Contact.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Contact";
3 | }
4 | @ViewBag.Title.
5 | @ViewBag.Message
6 |
7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P:
11 | 425.555.0100
12 |
13 |
14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com
17 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Home/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | // ViewBag.Title = "Home Page"; leaving it null, so that users see just "Source Browser"
3 | }
4 |
5 |
6 |
7 |
Source Browser
8 |
Turn any C# GitHub Repository into a set of static HTML files.
9 |
10 | @Html.ActionLink("Upload Your Repo", "", "Upload", new { }, new { @class = "button large primary fg-white" })
11 | @Html.ActionLink("See sample", "", "Browse//CodeConnect//SourceBrowser", new { }, new { @class = "button large success fg-white" })
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
What?
20 |
21 | Source Browser takes C# files and turns them into
22 | statically linked HTML files.
23 |
24 |
@Html.ActionLink("Browse projects", "", "Browse", new { }, new { @class = "btn btn-default" })
25 |
26 |
27 |
Why?
28 |
29 | Source Browser makes it easy to browse third party libraries
30 | and explore unfamiliar code online.
31 |
32 |
33 |
34 |
Contribute!
35 |
36 | Source Browser is open source on Github.
37 | We're accepting pull requests and would love your contributions.
38 |
Contribute»
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Manage/AddPhoneNumber.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.AddPhoneNumberViewModel
2 | @{
3 | ViewBag.Title = "Phone Number";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("AddPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Add a phone number
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
25 | }
26 |
27 | @section Scripts {
28 | @Scripts.Render("~/bundles/jqueryval")
29 | }
30 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Manage/ChangePassword.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ChangePasswordViewModel
2 | @{
3 | ViewBag.Title = "Change Password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("ChangePassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | Change Password Form
12 |
13 | @Html.ValidationSummary("", new { @class = "text-danger" })
14 |
20 |
26 |
32 |
37 | }
38 | @section Scripts {
39 | @Scripts.Render("~/bundles/jqueryval")
40 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Manage/ManageLogins.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.ManageLoginsViewModel
2 | @using Microsoft.Owin.Security
3 | @{
4 | ViewBag.Title = "Manage your external logins";
5 | }
6 |
7 | @ViewBag.Title.
8 |
9 | @ViewBag.StatusMessage
10 | @if (Model.CurrentLogins.Count > 0)
11 | {
12 | Registered Logins
13 |
41 | }
42 | @if (Model.OtherLogins.Count > 0)
43 | {
44 | Add another service to log in.
45 |
46 | using (Html.BeginForm("LinkLogin", "Manage"))
47 | {
48 | @Html.AntiForgeryToken()
49 |
50 |
51 | @foreach (AuthenticationDescription p in Model.OtherLogins)
52 | {
53 | @p.AuthenticationType
54 | }
55 |
56 |
57 | }
58 | }
59 |
60 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Manage/SetPassword.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.SetPasswordViewModel
2 | @{
3 | ViewBag.Title = "Create Password";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | You do not have a local username/password for this site. Add a local
9 | account so you can log in without an external login.
10 |
11 |
12 | @using (Html.BeginForm("SetPassword", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
13 | {
14 | @Html.AntiForgeryToken()
15 |
16 | Create Local Login
17 |
18 | @Html.ValidationSummary("", new { @class = "text-danger" })
19 |
25 |
31 |
36 | }
37 | @section Scripts {
38 | @Scripts.Render("~/bundles/jqueryval")
39 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Manage/VerifyPhoneNumber.cshtml:
--------------------------------------------------------------------------------
1 | @model SourceBrowser.Site.Models.VerifyPhoneNumberViewModel
2 | @{
3 | ViewBag.Title = "Verify Phone Number";
4 | }
5 |
6 | @ViewBag.Title.
7 |
8 | @using (Html.BeginForm("VerifyPhoneNumber", "Manage", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
9 | {
10 | @Html.AntiForgeryToken()
11 | @Html.Hidden("phoneNumber", @Model.PhoneNumber)
12 | Enter verification code
13 | @ViewBag.Status
14 |
15 | @Html.ValidationSummary("", new { @class = "text-danger" })
16 |
22 |
27 | }
28 |
29 | @section Scripts {
30 | @Scripts.Render("~/bundles/jqueryval")
31 | }
32 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Shared/Error.cshtml:
--------------------------------------------------------------------------------
1 | @model System.Web.Mvc.HandleErrorInfo
2 |
3 | @{
4 | ViewBag.Title = "Error";
5 | }
6 |
7 | Error.
8 | An error occurred while processing your request.
9 | @Model.Exception.StackTrace;
10 |
11 |
12 |
13 |
14 |
15 | @Model.Exception;
16 |
17 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Shared/Lockout.cshtml:
--------------------------------------------------------------------------------
1 | @model System.Web.Mvc.HandleErrorInfo
2 |
3 | @{
4 | ViewBag.Title = "Locked Out";
5 | }
6 |
7 |
8 | Locked out.
9 | This account has been locked out, please try again later.
10 |
11 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Shared/_BrowseLayout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | @ViewBag.Title | Source Browser
8 | @Styles.Render("~/Content/css")
9 | @Scripts.Render("~/bundles/modernizr")
10 |
11 |
12 |
13 |
29 |
30 | @RenderBody()
31 |
32 | @Scripts.Render("~/bundles/jquery")
33 | @Scripts.Render("~/bundles/bootstrap")
34 | @Scripts.Render("~/bundles/search")
35 | @*Scripts.Render("~/bundles/sourcebrowser")*@
36 | @RenderSection("scripts", required: false)
37 |
38 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Shared/_Layout.cshtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | @(ViewBag.Title != null ? ViewBag.Title + " | Source Browser" : "Source Browser")
8 | @Styles.Render("~/Content/css")
9 | @Scripts.Render("~/bundles/modernizr")
10 |
11 |
12 |
13 |
41 |
42 | @RenderBody()
43 |
44 |
50 |
51 | @Scripts.Render("~/bundles/jquery")
52 | @Scripts.Render("~/bundles/bootstrap")
53 | @Scripts.Render("~/bundles/search")
54 | @*Scripts.Render("~/bundles/sourcebrowser")*@
55 | @RenderSection("scripts", required: false)
56 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Shared/_LoginPartial.cshtml:
--------------------------------------------------------------------------------
1 | @using Microsoft.AspNet.Identity
2 | @if (Request.IsAuthenticated)
3 | {
4 | using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))
5 | {
6 | @Html.AntiForgeryToken()
7 |
8 |
9 |
10 | @Html.ActionLink("Hello " + User.Identity.GetUserName() + "!", "Manage", "Account", routeValues: null, htmlAttributes: new { title = "Manage" })
11 |
12 | Log off
13 |
14 | }
15 | }
16 | else
17 | {
18 |
19 | @Html.ActionLink("Register", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })
20 | @Html.ActionLink("Log in", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Upload/Index.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | ViewBag.Title = "Upload";
3 | }
4 |
5 | @Scripts.Render("~/bundles/jquery")
6 | @Scripts.Render("~/bundles/upload")
7 |
8 |
16 |
17 |
25 |
26 |
27 | Uploading. Please Wait...
28 |
29 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/Web.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Views/_ViewStart.cshtml:
--------------------------------------------------------------------------------
1 | @{
2 | Layout = "~/Views/Shared/_Layout.cshtml";
3 | }
4 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Web.Debug.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/Web.Release.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
17 |
18 |
19 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/favicon.ico
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/iconFont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.eot
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/iconFont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.ttf
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/iconFont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/iconFont.woff
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/metroSysIcons.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/metroSysIcons.ttf
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/fonts/metroSysIcons.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/fonts/metroSysIcons.woff
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-accordion.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.accordion", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | closeAny: true,
8 | open: function(frame){},
9 | action: function(frame){}
10 | },
11 |
12 | _frames: {},
13 |
14 | _create: function(){
15 | var element = this.element;
16 |
17 | if (element.data('closeany') != undefined) this.options.closeAny = element.data('closeany');
18 |
19 | this._frames = element.children(".accordion-frame");
20 |
21 | this.init();
22 | },
23 |
24 | init: function(){
25 | var that = this;
26 |
27 | this._frames.each(function(){
28 | var frame = this,
29 | a = $(this).children(".heading"),
30 | content = $(this).children(".content");
31 |
32 | if ($(a).hasClass("active") && !$(a).attr('disabled') && $(a).data('action') != 'none') {
33 | $(content).show();
34 | $(a).removeClass("collapsed");
35 | } else {
36 | $(a).addClass("collapsed");
37 | }
38 |
39 | a.on('click', function(e){
40 | e.preventDefault();
41 | if ($(this).attr('disabled') || $(this).data('action') == 'none') return;
42 |
43 | if (that.options.closeAny) that._closeFrames();
44 |
45 | if ($(content).is(":hidden")) {
46 | $(content).slideDown();
47 | $(this).removeClass("collapsed");
48 | that._trigger("frame", e, {frame: frame});
49 | that.options.open(frame);
50 | } else {
51 | $(content).slideUp();
52 | $(this).addClass("collapsed");
53 | }
54 | that.options.action(frame);
55 | });
56 | });
57 | },
58 |
59 | _closeFrames: function(){
60 | this._frames.children(".content").slideUp().parent().children('.heading').addClass("collapsed");
61 | },
62 |
63 | _destroy: function(){},
64 |
65 | _setOption: function(key, value){
66 | this._super('_setOption', key, value);
67 | }
68 | })
69 | })( jQuery );
70 |
71 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-button-set.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.buttonset", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | click: function(btn, on){}
8 | },
9 |
10 | _buttons: {},
11 |
12 | _create: function(){
13 | var element = this.element;
14 |
15 | this._buttons = element.find("button, .button");
16 |
17 | this.init();
18 | },
19 |
20 | init: function(){
21 | var that = this;
22 |
23 | this._buttons.each(function(){
24 | var btn = $(this);
25 |
26 | btn.on('click', function(e){
27 | e.preventDefault();
28 | btn.toggleClass("active");
29 |
30 | that.options.click(btn, btn.hasClass("active"));
31 | that._trigger("click", null, {button: btn, on: (btn.hasClass("active"))});
32 | });
33 | });
34 | },
35 |
36 | _destroy: function(){},
37 |
38 | _setOption: function(key, value){
39 | this._super('_setOption', key, value);
40 | }
41 | })
42 | })( jQuery );
43 |
44 | (function( $ ) {
45 | $.widget("metro.buttongroup", {
46 |
47 | version: "1.0.0",
48 |
49 | options: {
50 | click: function(btn, on){}
51 | },
52 |
53 | _buttons: {},
54 |
55 | _create: function(){
56 | var element = this.element;
57 |
58 | this._buttons = element.find("button, .button");
59 |
60 | this.init();
61 | },
62 |
63 | init: function(){
64 | var that = this;
65 |
66 | this._buttons.each(function(){
67 | var btn = $(this);
68 |
69 | btn.on('click', function(e){
70 | e.preventDefault();
71 | that._buttons.removeClass("active");
72 | btn.addClass("active");
73 |
74 | that.options.click(btn, btn.hasClass("active"));
75 | that._trigger("click", null, {button: btn, on: (btn.hasClass("active"))});
76 | });
77 | });
78 | },
79 |
80 | _destroy: function(){},
81 |
82 | _setOption: function(key, value){
83 | this._super('_setOption', key, value);
84 | }
85 | })
86 | })( jQuery );
87 |
88 |
89 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-core.js:
--------------------------------------------------------------------------------
1 |
2 | (function($){
3 | $.Metro = function(params){
4 | params = $.extend({
5 | }, params);
6 | };
7 |
8 | $.Metro.getDeviceSize = function(){
9 | var device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
10 | var device_height = (window.innerHeight > 0) ? window.innerHeight : screen.height;
11 | return {
12 | width: device_width,
13 | height: device_height
14 | }
15 | }
16 |
17 | })(jQuery);
18 |
19 | $(function(){
20 | $('html').on('click', function(e){
21 | $('.dropdown-menu').each(function(i, el){
22 | if (!$(el).hasClass('keep-open') && $(el).css('display')=='block') {
23 | $(el).hide();
24 | }
25 | });
26 | });
27 | });
28 |
29 | $(function(){
30 | $(window).on('resize', function(){
31 | if (METRO_DIALOG) {
32 | var top = ($(window).height() - METRO_DIALOG.outerHeight()) / 2;
33 | var left = ($(window).width() - METRO_DIALOG.outerWidth()) / 2;
34 | METRO_DIALOG.css({
35 | top: top, left: left
36 | });
37 | }
38 | });
39 | });
40 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-drag-tile.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.dragtile", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | },
8 |
9 | _create: function(){
10 | var that = this, element = tile = this.element,
11 | area = element.parents('.tile-area'),
12 | tiles = area.find(".tile"),
13 | groups = area.find(".tile-group");
14 |
15 | tile.attr("draggable", "true");
16 |
17 | addTouchEvents(tile[0]);
18 |
19 | tile[0].addEventListener('dragstart', this._dragStart, false);
20 | tile[0].addEventListener('dragend', this._dragEnd, false);
21 |
22 | tile.on('mousedown', function(e){
23 | });
24 |
25 | tile.on('mouseup', function(e){
26 | });
27 | },
28 |
29 | _dragStart: function(e){
30 | $(this).css('opacity',.4);
31 | },
32 |
33 | _dragEnd: function(e){
34 | $(this).css('opacity',1);
35 | },
36 |
37 | _destroy: function(){
38 |
39 | },
40 |
41 | _setOption: function(key, value){
42 | this._super('_setOption', key, value);
43 | }
44 | })
45 | })( jQuery );
46 |
47 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-fluentmenu.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.fluentmenu", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | onSpecialClick: function(e, el){},
8 | onTabClick: function(e, el){}
9 | },
10 |
11 | _create: function(){
12 | var that = this, element = this.element, o = this.options,
13 | tabs = element.find('.tabs-holder > li > a');
14 |
15 | this._hidePanels();
16 | this._showPanel();
17 |
18 | tabs.on('click', function(e){
19 | if ($(this).parent('li').hasClass('special')) {
20 | o.onSpecialClick(e, $(this));
21 | } else {
22 | var panel = $($(this).attr('href'));
23 |
24 | that._hidePanels();
25 | that._showPanel(panel);
26 | element.find('.tabs-holder > li').removeClass('active');
27 | $(this).parent('li').addClass('active');
28 |
29 | o.onTabClick(e, $(this));
30 | }
31 | e.preventDefault();
32 | });
33 | },
34 |
35 | _hidePanels: function(){
36 | this.element.find('.tab-panel').hide();
37 | },
38 |
39 | _showPanel: function(panel){
40 | if (panel == undefined) {
41 | panel = this.element.find('.tabs-holder li.active a').attr('href');
42 | }
43 | $(panel).show();
44 | },
45 |
46 | _destroy: function(){
47 |
48 | },
49 |
50 | _setOption: function(key, value){
51 | this._super('_setOption', key, value);
52 | }
53 | })
54 | })( jQuery );
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-global.js:
--------------------------------------------------------------------------------
1 | var METRO_AUTO_REINIT;
2 | var METRO_LOCALE;
3 | var METRO_WEEK_START;
4 | var METRO_DIALOG = false;
5 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-listview.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.listview", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | onGroupExpand: function(g){},
8 | onGroupCollapse: function(g){},
9 | onListClick: function(l){}
10 | },
11 |
12 | _create: function(){
13 | var that = this, element = this.element;
14 |
15 | element.children('.collapsed').children('.group-content').hide();
16 |
17 | element.find('.group-title').on('click', function(e){
18 | var $this = $(this),
19 | group = $this.parent('.list-group'),
20 | group_content = group.children('.group-content');
21 |
22 | group.toggleClass('collapsed');
23 |
24 | if (group.hasClass('collapsed')) {
25 | group_content.slideUp();
26 | that.options.onGroupCollapse(group);
27 | } else {
28 | group_content.slideDown();
29 | that.options.onGroupExpand(group);
30 | }
31 |
32 | e.preventDefault();
33 | });
34 |
35 | element.find('.list').on('click', function(e){
36 | element.find('.list').removeClass('active');
37 | $(this).toggleClass('active');
38 | that.options.onListClick($(this));
39 | e.preventDefault();
40 | });
41 | },
42 |
43 | _destroy: function(){
44 |
45 | },
46 |
47 | _setOption: function(key, value){
48 | this._super('_setOption', key, value);
49 | }
50 | })
51 | })( jQuery );
52 |
53 |
54 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-loader.js:
--------------------------------------------------------------------------------
1 | var plugins = [
2 | 'global',
3 | 'core',
4 | 'locale',
5 | 'touch-handler',
6 |
7 | 'accordion',
8 | 'button-set',
9 | 'date-format',
10 | 'calendar',
11 | 'datepicker',
12 | 'carousel',
13 | 'countdown',
14 | 'dropdown',
15 | 'input-control',
16 | 'live-tile',
17 |
18 | 'progressbar',
19 | 'rating',
20 | 'slider',
21 | 'tab-control',
22 | 'table',
23 | 'times',
24 | 'dialog',
25 | 'notify',
26 | 'listview',
27 | 'treeview',
28 | 'fluentmenu',
29 | 'hint',
30 | 'streamer',
31 | 'stepper',
32 | 'drag-tile',
33 | 'scroll',
34 | 'pull',
35 | 'wizard',
36 | 'panel',
37 | 'tile-transform',
38 |
39 | 'initiator'
40 |
41 |
42 | ];
43 |
44 | $.each(plugins, function(i, plugin){
45 | $("").attr('src', 'js/metro/metro-'+plugin+'.js').appendTo($('head'));
46 | });
47 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-panel.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.panel", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | onCollapse: function(){},
8 | onExpand: function(){}
9 | },
10 |
11 | _create: function(){
12 | var element = this.element, o = this.options,
13 | header = element.children('.panel-header'),
14 | content = element.children('.panel-content');
15 |
16 | header.on('click', function(){
17 | content.slideToggle(
18 | 'fast',
19 | function(){
20 | element.toggleClass('collapsed');
21 | if (element.hasClass('collapsed')) {
22 | o.onCollapse();
23 | } else {
24 | o.onExpand();
25 | }
26 | }
27 | );
28 | });
29 | },
30 |
31 | _destroy: function(){
32 |
33 | },
34 |
35 | _setOption: function(key, value){
36 | this._super('_setOption', key, value);
37 | }
38 | })
39 | })( jQuery );
40 |
41 |
42 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-plugin-template.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.widget", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | },
8 |
9 | _create: function(){
10 | },
11 |
12 | _destroy: function(){
13 |
14 | },
15 |
16 | _setOption: function(key, value){
17 | this._super('_setOption', key, value);
18 | }
19 | })
20 | })( jQuery );
21 |
22 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-pull.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.pullmenu", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | },
8 |
9 | _create: function(){
10 | var that = this,
11 | element = this.element;
12 |
13 | var menu = (element.data("relation") != undefined) ? element.data("relation") : element.parent().children(".element-menu, .horizontal-menu");
14 |
15 | addTouchEvents(element[0]);
16 |
17 | element.on("click", function(e){
18 | menu.slideToggle();
19 | e.preventDefault();
20 | e.stopPropagation();
21 | });
22 |
23 | },
24 |
25 | _destroy: function(){
26 |
27 | },
28 |
29 | _setOption: function(key, value){
30 | this._super('_setOption', key, value);
31 | }
32 | })
33 | })( jQuery );
34 |
35 | $(window).resize(function(){
36 | var device_width = (window.innerWidth > 0) ? window.innerWidth : screen.width;
37 | if (device_width > 800) {$(".element-menu").show();} else {$(".element-menu").hide();}
38 | });
39 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-table.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.tablecontrol", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | width: '100%',
8 | height: 'auto',
9 | cls: 'table',
10 | checkRow: false,
11 | colModel: [],
12 | data: []
13 | },
14 |
15 | _create: function(){
16 | var element = this.element,
17 | table;
18 |
19 | element.css({
20 | width: this.options.width,
21 | height: this.options.height
22 | });
23 |
24 | table = this.createTable(element);
25 |
26 | this.addHeader(table, this.options.colModel);
27 | this.addTableData(table, this.options.data);
28 |
29 | table.addClass(this.options.cls);
30 | },
31 |
32 | addHeader: function(container, data){
33 | var thead = $(" ").appendTo(container);
34 | var th, tr = $(" ").appendTo(thead);
35 | $.each(data, function(index, column){
36 | th = $(" ").addClass(column.hcls).html(column.caption).appendTo(tr);
37 | });
38 | },
39 |
40 | createTable: function(container){
41 | return $("").appendTo(container);
42 | },
43 |
44 | addTableData: function(container, data){
45 | var that = this,
46 | tbody = $(" ").appendTo(container);
47 |
48 | $.each(data, function(i, row){
49 | that.addRowData(tbody, row);
50 | });
51 | },
52 |
53 | addRowData: function(container, row){
54 | var td, tr = $(" ").appendTo(container);
55 | if (row.__row_class != undefined) {
56 | tr.addClass(row.__row_class);
57 | }
58 | $.each(this.options.colModel, function(index, val){
59 | td = $(" ").css("width", val.width).addClass(val.cls).html(row[val.field]).appendTo(tr);
60 | });
61 | },
62 |
63 | _destroy: function(){
64 | },
65 |
66 | _setOption: function(key, value){
67 | this._super('_setOption', key, value);
68 | }
69 | })
70 | })( jQuery );
71 |
72 | $(function(){
73 | $('[data-role=table]').tablecontrol();
74 | });
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-touch-handler.js:
--------------------------------------------------------------------------------
1 | var hasTouch = 'ontouchend' in window, eventTimer;
2 | var moveDirection = 'undefined', startX, startY, deltaX, deltaY, mouseDown = false
3 |
4 | function addTouchEvents(element){
5 | if (hasTouch) {
6 | element.addEventListener("touchstart", touch2Mouse, true);
7 | element.addEventListener("touchmove", touch2Mouse, true);
8 | element.addEventListener("touchend", touch2Mouse, true);
9 | }
10 | }
11 |
12 | function touch2Mouse(e)
13 | {
14 | var theTouch = e.changedTouches[0];
15 | var mouseEv;
16 |
17 | switch(e.type)
18 | {
19 | case "touchstart": mouseEv="mousedown"; break;
20 | case "touchend": mouseEv="mouseup"; break;
21 | case "touchmove": mouseEv="mousemove"; break;
22 | default: return;
23 | }
24 |
25 |
26 | if (mouseEv == "mousedown") {
27 | eventTimer = (new Date()).getTime();
28 | startX = theTouch.clientX;
29 | startY = theTouch.clientY;
30 | mouseDown = true;
31 | }
32 |
33 | if (mouseEv == "mouseup") {
34 | if ((new Date()).getTime() - eventTimer <= 500) {
35 | mouseEv = "click";
36 | } else if ((new Date()).getTime() - eventTimer > 1000) {
37 | mouseEv = "longclick";
38 | }
39 | eventTimer = 0;
40 | mouseDown = false;
41 | }
42 |
43 | if (mouseEv == "mousemove") {
44 | if (mouseDown) {
45 | deltaX = theTouch.clientX - startX;
46 | deltaY = theTouch.clientY - startY;
47 | moveDirection = deltaX > deltaY ? 'horizontal' : 'vertical';
48 | }
49 | }
50 |
51 | var mouseEvent = document.createEvent("MouseEvent");
52 | mouseEvent.initMouseEvent(mouseEv, true, true, window, 1, theTouch.screenX, theTouch.screenY, theTouch.clientX, theTouch.clientY, false, false, false, false, 0, null);
53 | theTouch.target.dispatchEvent(mouseEvent);
54 |
55 | e.preventDefault();
56 | }
57 |
58 |
59 | /* To add touch support for element need create listeners for component dom element
60 | if (hasTouch) {
61 | element.addEventListener("touchstart", touch2Mouse, true);
62 | element.addEventListener("touchmove", touch2Mouse, true);
63 | element.addEventListener("touchend", touch2Mouse, true);
64 | }
65 | */
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/js/metro/metro-treeview.js:
--------------------------------------------------------------------------------
1 | (function( $ ) {
2 | $.widget("metro.treeview", {
3 |
4 | version: "1.0.0",
5 |
6 | options: {
7 | onNodeClick: function(node){},
8 | onNodeCollapsed: function(node){},
9 | onNodeExpanded: function(node){}
10 | },
11 |
12 | _create: function(){
13 | var that = this, element = this.element;
14 |
15 | element.find('.node.collapsed').find('ul').hide();
16 |
17 | element.find('.node-toggle').parent().on('click', function(e){
18 | var $this = $(this), node = $this.parent("li");
19 |
20 | if (node.hasClass("keep-open")) return;
21 |
22 | node.toggleClass('collapsed');
23 |
24 | if (node.hasClass('collapsed')) {
25 | node.children('ul').fadeOut('fast');
26 | that.options.onNodeCollapsed(node);
27 | } else {
28 | node.children('ul').fadeIn('fast');
29 | that.options.onNodeExpanded(node);
30 | }
31 |
32 | that.options.onNodeClick(node);
33 | e.preventDefault();
34 | e.stopPropagation();
35 | });
36 |
37 | element.find("a").each(function(){
38 | var $this = $(this);
39 | $this.css({
40 | paddingLeft: ($this.parents("ul").length-1) * 10
41 | });
42 | });
43 |
44 | element.find('a').on('click', function(e){
45 | var $this = $(this), node = $this.parent('li');
46 | element.find('a').removeClass('active');
47 | $this.toggleClass('active');
48 | that.options.onNodeClick(node);
49 | e.preventDefault();
50 | });
51 | },
52 |
53 | _destroy: function(){
54 |
55 | },
56 |
57 | _setOption: function(key, value){
58 | this._super('_setOption', key, value);
59 | }
60 | })
61 | })( jQuery );
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/accordion.less:
--------------------------------------------------------------------------------
1 | .accordion {
2 | & > .accordion-frame {
3 | .border;
4 | margin-bottom: 2px;
5 |
6 | & > .heading {
7 | display: block;
8 | text-decoration: none;
9 | background-color: @grayLighter;
10 | padding: 10px 20px;
11 | width: 100%;
12 | position: relative;
13 | color: @dark;
14 |
15 | [class*="icon-"] {
16 | margin-right: 10px;
17 | }
18 |
19 | }
20 |
21 | & > .content {
22 | padding: 10px;
23 | }
24 | }
25 |
26 | & > .accordion-frame {
27 | & > .content {
28 | display: none;
29 | }
30 |
31 | &:first-child {
32 | & > .content {
33 | //display: block;
34 | }
35 | }
36 | }
37 | }
38 |
39 | .accordion {
40 | &.with-marker {
41 | .heading {
42 | &:before {
43 | position: absolute;
44 | display: block;
45 | left: 5px;
46 | top: 12px;
47 | content: '';
48 |
49 | width: 0;
50 | height: 0;
51 | border-left: 7px solid transparent;
52 | border-top: 7px solid transparent;
53 | border-bottom: 7px solid black;
54 | }
55 |
56 | &.collapsed {
57 | &:before {
58 | .rotate(-45deg);
59 | margin-left: -4px;
60 | }
61 | }
62 | }
63 | }
64 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/balloon.less:
--------------------------------------------------------------------------------
1 | .balloon {
2 | display: block;
3 | width: auto;
4 | height: auto;
5 | margin: 0;
6 | padding: 0;
7 | border: 1px @gray solid;
8 | background-color: @white;
9 | position: relative;
10 | margin-bottom: 30px;
11 |
12 | &:before, &:after {
13 | content: '';
14 | position: absolute;
15 | width: 0;
16 | height: 0;
17 | }
18 | &:before {
19 | z-index: 2;
20 | }
21 | &:after {
22 | z-index: 1;
23 | }
24 |
25 | &.bottom {
26 | &:before, &:after {
27 | top: 1px;
28 | left: 20px;
29 | margin: -20px 0;
30 | border-left: 10px solid transparent;
31 | border-right: 10px solid transparent;
32 | border-bottom: 20px solid @white;
33 | }
34 |
35 | &:after {
36 | top: 0;
37 | border-bottom: 20px solid @gray;
38 | }
39 | }
40 |
41 | &.top {
42 | &:before, &:after {
43 | top: 100%;
44 | margin-top: -1px;
45 | left: 20px;
46 | border-left: 10px solid transparent;
47 | border-right: 10px solid transparent;
48 | border-top: 20px solid @white;
49 | }
50 |
51 | &:after {
52 | margin-top: 1px;
53 | border-top: 20px solid @gray;
54 | }
55 | }
56 |
57 | &.left {
58 | &:before, &:after {
59 | top: 10px;
60 | left: 100%;
61 | margin-left: -1px;
62 | border-top: 10px solid transparent;
63 | border-bottom: 10px solid transparent;
64 | border-left: 20px solid @white;
65 | }
66 |
67 | &:after {
68 | margin-left: 0;
69 | border-left: 21px solid @gray;
70 | }
71 | }
72 |
73 | &.right {
74 | &:before, &:after {
75 | top: 10px;
76 | left: -19px;
77 | margin: 0;
78 | border-top: 10px solid transparent;
79 | border-bottom: 10px solid transparent;
80 | border-right: 20px solid @white;
81 | }
82 |
83 | &:after {
84 | left: -20px;
85 | border-right: 20px solid @gray;
86 | }
87 | }
88 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/countdown.less:
--------------------------------------------------------------------------------
1 | .countdown, .times{
2 | width: auto;
3 | margin:0 auto;
4 | font: 20px/1.5 'Open Sans Condensed',sans-serif;
5 | text-align:center;
6 | letter-spacing:-3px;
7 |
8 | .digit-wrapper{
9 | display: inline-block;
10 | height: 1.6em;
11 | overflow: hidden;
12 | position: relative;
13 | width: 1.05em;
14 |
15 | .digit{
16 | position:absolute;
17 | display:block;
18 | width:1em;
19 | text-align:center;
20 | vertical-align: middle;
21 | letter-spacing:-1px;
22 |
23 | &.stop {
24 | background-color: @red;
25 | }
26 | }
27 | }
28 |
29 | .divider{
30 | display :inline-block;
31 | width: 16px;
32 | height: 1.5em;
33 | position :relative;
34 | font-weight: bold;
35 |
36 | &:before {
37 | width: 100%;
38 | height:1.5em;
39 | position: absolute;
40 | content: ":";
41 | color: inherit;
42 | font-size: inherit;
43 | vertical-align: middle;
44 | text-align: center;
45 | left: -20%;
46 | top: -15%;
47 | }
48 | }
49 |
50 | &.inverse {
51 | .digit {
52 | color: @grayDark !important;
53 | background-color: @grayLighter !important;
54 | }
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/iconFont.less:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'iconFont';
3 | src:url('../fonts/iconFont.eot');
4 | src:url('../fonts/iconFont.eot?#iefix') format('embedded-opentype'),
5 | url('../fonts/iconFont.woff') format('woff'),
6 | url('../fonts/iconFont.ttf') format('truetype'),
7 | url('../fonts/iconFont.svg#iconFont') format('svg');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
12 | [data-icon]:before {
13 | font-family: 'iconFont';
14 | content: attr(data-icon);
15 | speak: none;
16 | font-weight: normal;
17 | font-variant: normal;
18 | text-transform: none;
19 | line-height: 1;
20 | -webkit-font-smoothing: antialiased;
21 | }
22 |
23 | [class*="icon-"] {
24 | font-family: 'iconFont' !important;
25 | speak: none;
26 | font-style: normal;
27 | font-weight: normal !important;
28 | font-variant: normal;
29 | text-transform: none;
30 | text-decoration: inherit;
31 | line-height: 1;
32 | display: inline-block;
33 | vertical-align: -8%;
34 | -webkit-font-smoothing: antialiased;
35 | font-size: inherit;
36 |
37 | &.smaller {
38 | font-size: .7em;
39 | vertical-align: 6%;
40 | }
41 | &.large {
42 | font-size: 1.2em;
43 | vertical-align: -10%;
44 | }
45 | }
46 |
47 | @import "iconFont-content";
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/icons.less:
--------------------------------------------------------------------------------
1 | @sysIconFontName: metroSysIcons;
2 |
3 | @font-face {
4 | font-family: 'metroSysIcons';
5 | src: url('../fonts/metroSysIcons.woff') format('woff'),
6 | url('../fonts/metroSysIcons.ttf') format('truetype'),
7 | url('../fonts/metroSysIcons.svg#metroSysIcons') format('svg');
8 | font-weight: normal;
9 | font-style: normal;
10 | }
11 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/images.less:
--------------------------------------------------------------------------------
1 | img {
2 | max-width: 100%;
3 |
4 | &.rounded, &.cycle, &.polaroid {
5 | background-color: @white;
6 | .border;
7 | }
8 |
9 | &.rounded {
10 | border-radius: 10px;
11 | }
12 | &.cycle {
13 | border-radius: 50%;
14 | }
15 | &.polaroid {
16 | padding: @subunitSize * 2;
17 | }
18 | }
19 |
20 | .image-container {
21 | position: relative;
22 | padding: 0;
23 | background-color: @grayDark;
24 | width: 240px;
25 | overflow: hidden;
26 |
27 | &.full-size {
28 | width: 100%;
29 | }
30 |
31 | img {
32 | margin: 0;
33 | width: 100%;
34 | height: auto;
35 | }
36 |
37 | & > .overlay, & > .overlay-fluid {
38 | position: absolute;
39 | width: 100%;
40 | height: 55px;
41 | overflow: hidden;
42 | background-color: #1e1e1e;
43 | padding: 5px 10px;
44 | opacity: .8;
45 | bottom: 0;
46 | font-size: 8pt;
47 | color: #fff;
48 | }
49 |
50 | & > .overlay-fluid {
51 | bottom: -55px;
52 | font-size: 8pt;
53 | color: #fff;
54 | }
55 |
56 | &:hover {
57 | .overlay-fluid {
58 | -webkit-transform: translate(0, -55px);
59 | -ms-transform: translate(0, -55px);
60 | -o-transform: translate(0, -55px);
61 | -moz-transform: translate(0, -55px);
62 | transform: translate(0, -55px);
63 |
64 | -webkit-transition: all @overlay-speed ease;
65 | -moz-transition: all @overlay-speed ease;
66 | -o-transition: all @overlay-speed ease;
67 | -ms-transition: all @overlay-speed ease;
68 | transition: all @overlay-speed ease;
69 | }
70 | }
71 |
72 | &.selected {
73 | #element > .selected;
74 | }
75 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/metro-bootstrap.less:
--------------------------------------------------------------------------------
1 | // Core variables
2 | @import "variables.less";
3 |
4 | // CSS Reset
5 | @import "reset.less";
6 |
7 | .metro {
8 | // Mixins
9 | @import "funcs";
10 | @import "utils";
11 |
12 | // Effects
13 | @import "transform";
14 |
15 | // Typography
16 | @import "typography";
17 |
18 | // Grid system and page layouts
19 | @import "layout";
20 | @import "grid";
21 |
22 | // Base CSS
23 | @import "tables";
24 | @import "buttons";
25 | @import "breadcrumbs";
26 | @import "forms";
27 | @import "images";
28 |
29 | // Components
30 | @import "menus";
31 | @import "navigation-bar";
32 | @import "tiles";
33 | @import "carousel";
34 | @import "rating";
35 | @import "pagination";
36 | @import "countdown";
37 | @import "tab-control";
38 | @import "progress-bar";
39 | @import "sidebar";
40 | @import "accordion";
41 | @import "calendar";
42 | @import "slider";
43 | @import "window";
44 | @import "lists";
45 | @import "treeview";
46 | @import "fluent-menu";
47 | @import "hint";
48 | @import "balloon";
49 | @import "stepper";
50 | @import "streamer";
51 | @import "scroll";
52 | @import "notify";
53 | @import "notice";
54 | @import "dataTables";
55 | @import "wizard";
56 | @import "panels";
57 |
58 | // Icons
59 | //@import "icons";
60 | //@import "icons-content";
61 | @import "icons";
62 |
63 | // Misc
64 | @import "misc";
65 |
66 | @import "colors";
67 |
68 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/misc.less:
--------------------------------------------------------------------------------
1 | .example {
2 | .clearfix;
3 | padding: 20px 40px 20px 60px;
4 | border: 1px #ccc solid;
5 | position: relative;
6 | margin: 0 0 10px 0;
7 | background-color: lighten(@gray, 66%) !important;
8 | min-height: 100px;
9 |
10 | &:before {
11 | position: absolute;
12 | content: "example";
13 | left: -21px;
14 | top: 30px;
15 | //background: @grayLighter;
16 | color: @grayLight !important;
17 | //padding: 5px 10px;
18 | margin: 5px 10px;
19 | .item-title-secondary;
20 | .rotate(-90deg);
21 | }
22 |
23 | }
24 |
25 | code, .code {
26 | .code-text;
27 | display: inline-block;
28 | padding: 3px 5px;
29 | margin: 0;
30 | background-color: @grayLighter;
31 | color: @red;
32 | border: 1px lighten(@gray, 50%) solid;
33 | font-size: 90%;
34 | line-height: 90%;
35 | }
36 |
37 | .label {
38 | display: inline-block;
39 | padding: 3px 5px;
40 | margin: 0;
41 | font-size: 90%;
42 | font-weight: normal !important;
43 | line-height: 90%;
44 | background: @grayLighter;
45 | color: @gray;
46 | .text-bold;
47 |
48 | &.alert, &.error {
49 | background-color: @red;
50 | color: @white
51 | }
52 | &.important, &.warning {
53 | background-color: @orange;
54 | color: @white
55 | }
56 | &.success {
57 | background-color: @darkGreen;
58 | color: @white
59 | }
60 | &.info {
61 | background-color: @cyan;
62 | color: @white;
63 | }
64 | }
65 |
66 | hr {
67 | height: 1px;
68 | margin: 20px 0;
69 | border: 0;
70 | color: @grayLighter;
71 | background-color: @grayLighter;
72 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/notice.less:
--------------------------------------------------------------------------------
1 |
2 | .notice {
3 | display: block;
4 | min-width: 200px;
5 | height: auto;
6 | position: relative;
7 | background-color: @lightBlue;
8 | padding: 20px;
9 |
10 | * {
11 | color: inherit;
12 | }
13 |
14 | &:before {
15 | content: "";
16 | width: 10px;
17 | height: 10px;
18 | display: block;
19 | position: absolute;
20 | background-color: inherit;
21 | left: -5px;
22 | top: 50%;
23 | margin-top: -5px;
24 | .rotate(45deg);
25 | }
26 |
27 | &.marker-on-top {
28 | &:before {
29 | top: 0;
30 | left: 50%;
31 | margin-left: -5px;
32 | }
33 | }
34 |
35 | &.marker-on-right {
36 | &:before {
37 | top: 50%;
38 | margin-top: -5px;
39 | left: 100%;
40 | margin-left: -5px;
41 | }
42 | }
43 |
44 | &.marker-on-bottom {
45 | &:before {
46 | top: 100%;
47 | margin-left: -5px;
48 | left: 50%;
49 | margin-top: -5px;
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/notify.less:
--------------------------------------------------------------------------------
1 |
2 | &.notify-container {
3 | position: fixed;
4 | right: 0;
5 | top: 0;
6 | //bottom: 0;
7 | z-index: @zindexCharms;
8 | //border: 1px #000 dotted;
9 | //background-color: @dark;
10 |
11 | .notify {
12 | background-color: @white;
13 | //border: 1px @grayLight solid;
14 | display: block;
15 | position: relative;
16 | min-width: 220px;
17 | #font > .segoe;
18 | color: @dark;
19 | padding: 10px;
20 | margin: 2px 2px 2px 0;
21 |
22 | .caption {
23 | font-size: 18px;
24 | line-height: 20px;
25 | margin-bottom: 5px;
26 | }
27 | .content {
28 | font-size: 14px;
29 | line-height: 16px;
30 | }
31 |
32 | }
33 | }
34 |
35 | .notify-wrapper {
36 | position: relative;
37 | background-color: @dark;
38 | width: auto;
39 | height: auto;
40 | min-width: 250px;
41 | color: @white;
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/pagination.less:
--------------------------------------------------------------------------------
1 | .pagination {
2 | width: auto;
3 | margin-bottom: 10px;
4 |
5 | & > ul {
6 | .unstyled;
7 | margin: 0;
8 | .clearfix;
9 |
10 | li {
11 | display: block;
12 | float: left;
13 | margin-right: 1px;
14 | position: relative;
15 |
16 | a {
17 | .button;
18 | color: inherit;
19 | display: block;
20 | float: left;
21 | margin-right: 1px;
22 | }
23 |
24 | &.first, &.prev, &.next, &.last {
25 | a {
26 | //font-size: 20pt;
27 | }
28 | }
29 |
30 | &.active {
31 | a {
32 | background-color: @lightBlue ;
33 | color: @white;
34 | }
35 | }
36 | &.disabled, &.spaces {
37 | a {
38 | background-color: darken(@white, 5%);
39 | color: #1e1e1e;
40 | cursor: not-allowed;
41 |
42 | &:active {
43 | top: 0;
44 | left: 0;
45 | }
46 | }
47 | }
48 | &.disabled {
49 | a {
50 | color: #1e1e1e;
51 | }
52 | }
53 |
54 | &.spaces {
55 | a {
56 | background-color: @white;
57 | cursor: default;
58 | }
59 | }
60 | }
61 | }
62 |
63 | &.small {
64 | ul {
65 | li {
66 | a {
67 | padding: 2px 10px;
68 | font-size: 11.9px;
69 | }
70 | }
71 | }
72 | }
73 | &.mini {
74 | ul {
75 | li {
76 | a {
77 | padding: 0px 6px;
78 | font-size: 10.5px;
79 | }
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/panels.less:
--------------------------------------------------------------------------------
1 | .panel {
2 | .border;
3 | .panel-header {
4 | padding: 10px;
5 | background-color: @grayLighter;
6 | width: 100%;
7 | .subheader-secondary;
8 | color: @dark;
9 | cursor: default;
10 | }
11 | .panel-content {
12 | width: 100%;
13 | height: auto;
14 | padding: 10px;
15 | }
16 | }
17 |
18 | [data-role=panel] {
19 | .panel-header {
20 | cursor: pointer;
21 | &:after {
22 | font-family: @sysIconFontName;
23 | content: "\e000";
24 | float: right;
25 | color: inherit;
26 | .rotate(180deg);
27 | }
28 | }
29 |
30 | &.collapsed {
31 | .panel-header {
32 | &:after {
33 | content: "\e000";
34 | .rotate(90deg);
35 | }
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/progress-bar.less:
--------------------------------------------------------------------------------
1 | .progress-bar {
2 | display: block;
3 | position: relative;
4 | height: 10px;
5 | width: 100%;
6 | margin-bottom: 10px;
7 | background-color: @grayLighter;
8 | .clearfix;
9 |
10 | .bar {
11 | position: relative;
12 | display: block;
13 | float: left;
14 | width: 0;
15 | background-color: @cyan;
16 | height: 100%;
17 | }
18 |
19 | &.small {
20 | height: 5px;
21 | }
22 | &.large {
23 | height: 15px;
24 | }
25 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/stepper.less:
--------------------------------------------------------------------------------
1 | .stepper {
2 | margin: 10px 0;
3 | .clearfix;
4 |
5 | & > ul {
6 | counter-reset:li;
7 | border-top: 1px @dark dotted;
8 | position: relative;
9 | padding: 0;
10 | margin: 30px 0;
11 | width: 100%;
12 |
13 | li {
14 | list-style: none;
15 | float: left;
16 | width: 2em;
17 | height: 2em;
18 | margin-top: -1em;
19 | position: absolute;
20 | //border: 1px red dotted;
21 | left: 0;
22 | background:#666;
23 | cursor: pointer;
24 |
25 | &:before {
26 | content:counter(li);
27 | counter-increment:li;
28 | position:absolute;
29 | box-sizing:border-box;
30 | padding:.3em 10px;
31 | color:#fff;
32 | font-weight:bold;
33 | font-family:"Helvetica Neue", Arial, sans-serif;
34 | font-size: 1.5rem;
35 | text-align:center;
36 | }
37 |
38 | &:hover {
39 | background-color: @grayLight;
40 | }
41 |
42 | &.current, &.complete {
43 | transition: all 0.2s ease;
44 | }
45 |
46 | &.current {
47 | background-color: @cyan;
48 | //.scale(1.5);
49 |
50 | &:hover {
51 | background-color: @lighterBlue;
52 | }
53 | }
54 | &.complete {
55 | background-color: @green;
56 |
57 | &:before {
58 | }
59 |
60 | &:hover {
61 | background-color: @lightGreen;
62 | }
63 | }
64 | }
65 | }
66 | &.rounded {
67 | li {
68 | border-radius: 100%;
69 | }
70 | }
71 | &.diamond {
72 | li {
73 | .rotate(45deg);
74 | &:before {
75 | .rotate(-45deg);
76 | }
77 | }
78 |
79 | }
80 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/tab-control.less:
--------------------------------------------------------------------------------
1 | .tab-control {
2 | .tabs {
3 | .unstyled;
4 | .clearfix;
5 | .no-margin;
6 |
7 | & > li {
8 | background-color: @white;
9 | display: block;
10 | float: left;
11 | margin-left: 5px;
12 | position: relative;
13 |
14 | & > a {
15 | border: 1px @grayLighter solid;
16 | display: block;
17 | float: left;
18 | padding: 5px 10px;
19 | z-index: 10;
20 | top: 0;
21 | left: 0;
22 | color: inherit;
23 | background-color: @grayLighter;
24 | }
25 |
26 | &.active {
27 | a {
28 | border-bottom-color: @white ;
29 | background-color: @white ;
30 | border-top: 2px @red solid;
31 | }
32 |
33 | &:hover {
34 | a {
35 | background-color: @white ;
36 | color: @dark;
37 | }
38 | }
39 | }
40 |
41 | &:hover {
42 | a {
43 | background-color: darken(@grayLighter, 10%);
44 | color: @white;
45 | }
46 | }
47 |
48 | &.place-right {
49 | float: right;
50 | margin-right: 5px;
51 | margin-left: auto;
52 | }
53 | }
54 |
55 | &.no-spaces {
56 | & > li {
57 | margin-left: 0;
58 | }
59 | }
60 | z-index: 2;
61 | }
62 |
63 | .frames {
64 | z-index: 1;
65 | border: 1px @grayLighter solid;
66 | margin-top: -1px;
67 |
68 | .frame {
69 | display: none;
70 |
71 | &:first-child {
72 | display: block;
73 | }
74 | }
75 | }
76 | .frame {
77 | padding: @unitSize;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/transform.less:
--------------------------------------------------------------------------------
1 | .rotate45 {.rotate(45deg);}
2 | .rotate90 {.rotate(90deg);}
3 | .rotate135 {.rotate(135deg);}
4 | .rotate180 {.rotate(180deg);}
5 | .rotate225 {.rotate(225deg);}
6 | .rotate270 {.rotate(270deg);}
7 | .rotate360 {.rotate(360deg);}
8 |
9 | .rotateX45 {.rotateX(45deg);}
10 | .rotateX90 {.rotateX(90deg);}
11 | .rotateX135 {.rotateX(135deg);}
12 | .rotateX180 {.rotateX(180deg);}
13 | .rotateX225 {.rotateX(225deg);}
14 | .rotateX270 {.rotateX(270deg);}
15 | .rotateX360 {.rotateX(360deg);}
16 |
17 | .rotateY45 {.rotateY(45deg);}
18 | .rotateY90 {.rotateY(90deg);}
19 | .rotateY135 {.rotateY(135deg);}
20 | .rotateY180 {.rotateY(180deg);}
21 | .rotateY225 {.rotateY(225deg);}
22 | .rotateY270 {.rotateY(270deg);}
23 | .rotateY360 {.rotateY(360deg);}
24 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/treeview.less:
--------------------------------------------------------------------------------
1 | .treeview {
2 | background-color: #fdfdfd;
3 | color: @gray;
4 | display: block;
5 | list-style: none;
6 | margin: 0;
7 | padding: 0;
8 |
9 | ul {
10 | color: @gray;
11 | display: block;
12 | list-style: none;
13 | margin: 0;
14 | padding: 0;
15 |
16 | li {
17 | a {
18 | padding: 0 0 0 15px;
19 | }
20 | }
21 | }
22 |
23 | a {
24 | font-size: 12px;
25 | color: inherit;
26 | display: block;
27 | }
28 |
29 | .node {
30 | & > a {
31 | margin-bottom: 5px;
32 | padding: 0 0 0 15px;
33 | font-size: 12px;
34 | position: relative;
35 | color: #000;
36 | white-space: nowrap;
37 | text-overflow: ellipsis;
38 | }
39 |
40 | &:not(:first-child) {
41 | margin-top: 0;
42 | }
43 | }
44 |
45 | .node-toggle {
46 | display: inline-block;
47 | position: relative;
48 | float: left;
49 | margin-right: 3px;
50 | width: 10px;
51 | height: 10px;
52 | &:before {
53 | position: absolute;
54 | display: block;
55 | left: 2px;
56 | top: 0;
57 | content: '';
58 |
59 | width: 0;
60 | height: 0;
61 | border-left: 7px solid transparent;
62 | border-top: 7px solid transparent;
63 | border-bottom: 7px @dark solid;
64 | }
65 | &:hover {
66 | &:before {
67 | border-bottom-color: @cobalt;
68 | }
69 | }
70 | }
71 |
72 | li.collapsed {
73 | .node-toggle:before {
74 | .rotate(-45deg);
75 | margin-left: -4px;
76 | }
77 | }
78 |
79 | li {
80 | a:hover {
81 | background-color: @lwListBackgroundHoverColor;
82 | }
83 | }
84 |
85 | .active {
86 | background-color: #e1e1e1;
87 | font-weight: bold;
88 | color: @dark;
89 | }
90 |
91 | a {
92 | .value {
93 | color: #0067cb;
94 | }
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/less/wizard.less:
--------------------------------------------------------------------------------
1 | .wizard {
2 | .steps {
3 | margin: 10px 0;
4 | padding: 20px;
5 | border: 1px @grayLighter solid;
6 | position: relative;
7 |
8 | .step {
9 | position: relative;
10 | width: 100%;
11 | height: 100%;
12 | display: none;
13 |
14 | &:first-child {
15 | display: block;
16 | }
17 | }
18 | }
19 |
20 | .actions {
21 | .group-right {
22 | float: right;
23 | }
24 | .group-left {
25 | float: left;
26 | }
27 |
28 | button {
29 | .button;
30 | margin-right: 2px;
31 |
32 | &:last-child {
33 | margin-right: 0;
34 | }
35 |
36 | &.btn-help {
37 | }
38 |
39 | &.btn-prior, &.btn-next {
40 | }
41 |
42 | &.btn-finish {
43 | background-color: @green;
44 | color: @white;
45 |
46 | }
47 |
48 | &:disabled {
49 | background-color: lighten(@gray, 10%) !important;
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/libs/Microsoft.CodeAnalysis.CSharp.Workspaces.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/libs/Microsoft.CodeAnalysis.CSharp.Workspaces.dll
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/libs/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/libs/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll
--------------------------------------------------------------------------------
/src/SourceBrowser.Site/libs/System.Collections.Immutable.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/SourceBrowser.Site/libs/System.Collections.Immutable.dll
--------------------------------------------------------------------------------
/src/SourceBrowser.SolutionRetriever/GitHubInformationRetriever.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Octokit;
3 | using System.Configuration;
4 |
5 | namespace SourceBrowser.SolutionRetriever
6 | {
7 | public static class GitHubInformationRetriever
8 | {
9 | private static GitHubClient _github = new GitHubClient(new ProductHeaderValue("SourceBrowser"));
10 |
11 | static GitHubInformationRetriever()
12 | {
13 | // Try to authenticate so that we can make 5000 API calls /hr instead of 60
14 | // See: https://developer.github.com/v3/#rate-limiting
15 | string token = ConfigurationManager.AppSettings["GitHubBasicAuthenticationToken"];
16 | if (!String.IsNullOrEmpty(token))
17 | {
18 | _github.Connection.Credentials = new Credentials(token);
19 | }
20 | }
21 |
22 | public static void GetUserInformation(string username, ref string fullName, ref string avatarUrl, ref string gitHubUrl, ref string blogUrl)
23 | {
24 | var user = _github.User.Get(username).Result;
25 |
26 | avatarUrl = user.AvatarUrl;
27 | gitHubUrl = user.HtmlUrl;
28 | blogUrl = user.Blog;
29 | fullName = user.Name;
30 | }
31 |
32 | public static void GetRepoInformation(string userName, string repoName, ref int forksCount, ref int starsCount, ref string language, ref string homepage, ref bool isPrivate, ref string description)
33 | {
34 | var repo = _github.Repository.Get(userName, repoName).Result;
35 |
36 | forksCount = repo.ForksCount;
37 | starsCount = repo.StargazersCount;
38 | language = repo.Language;
39 | homepage = repo.Homepage;
40 | isPrivate = repo.Private;
41 | description = repo.Description;
42 | }
43 |
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/SourceBrowser.SolutionRetriever/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SourceBrowser.SolutionRetriever")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SourceBrowser.SolutionRetriever")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1c8de71e-e969-4e5a-b889-09bb6ec934de")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/SourceBrowser.SolutionRetriever/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("SourceBrowser.Tests")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("SourceBrowser.Tests")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("ea8f0b24-b238-4a04-9a54-8ab12bdb5e88")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Tests/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/src/SourceBrowser.Tests/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/lib/Roslyn.Services.UnitTests.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/lib/Roslyn.Services.UnitTests.dll
--------------------------------------------------------------------------------
/src/lib/Roslyn.Test.Utilities.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/CodeConnect/SourceBrowser/9848ba033619d9887e1c358bc721284c29ebe8e2/src/lib/Roslyn.Test.Utilities.dll
--------------------------------------------------------------------------------
23 | @foreach (AuthenticationDescription p in loginProviders) 24 | { 25 | 26 | } 27 |
28 |