Last active
August 29, 2015 14:03
-
-
Save scriptnull/bf4d513ce969488645ce to your computer and use it in GitHub Desktop.
ASP .NET MVC + BootStrap Basic installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>@ViewBag.Title</title> | |
@Scripts.Render("~/bundles/jquery") | |
@Styles.Render("~/Content/bootstrapcss") | |
@Scripts.Render("~/bundles/bootstrapjs") | |
@Scripts.Render("~/bundles/modernizr") | |
</head> | |
<body> | |
<button type="button" class="btn btn-default btn-lg"> | |
<span class="glyphicon glyphicon-star"></span> Star | |
</button> | |
<span class="label label-success">Success</span> | |
@RenderBody() | |
@RenderSection("scripts", required: false) | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Web; | |
using System.Web.Optimization; | |
namespace MvcBootStrapTry | |
{ | |
public class BundleConfig | |
{ | |
// For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725 | |
public static void RegisterBundles(BundleCollection bundles) | |
{ | |
bundles.IgnoreList.Clear(); | |
bundles.Add(new ScriptBundle("~/bundles/jquery").Include( | |
"~/Scripts/jquery-{version}.js")); | |
bundles.Add(new ScriptBundle("~/bundles/bootstrapjs").Include( | |
"~/Scripts/bootstrap.min.js")); | |
bundles.Add(new StyleBundle("~/Content/bootstrapcss").Include( | |
"~/Content/bootstrap.min.css", | |
"~/Content/bootstrap-responsive.min.css")); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
change @font-face{ | |
.. | |
url : ("../Content/fonts/...") | |
} | |
"../fonts/.." to "../Content/fonts/.." in all url withing @font-face within Bootstrap.css and Bootstrap.min.css | |
+---Content | |
| | bootstrap-theme.css | |
| | bootstrap-theme.css.map | |
| | bootstrap-theme.min.css | |
| | bootstrap.css | |
| | bootstrap.css.map | |
| | bootstrap.min.css | |
| | Site.css | |
| | | |
| \---fonts | |
| glyphicons-halflings-regular.eot | |
| glyphicons-halflings-regular.svg | |
| glyphicons-halflings-regular.ttf | |
| glyphicons-halflings-regular.woff | |
| | |
//delete jquery-ui scripts ( 2 script ) | |
+---Scripts | |
| bootstrap.js //Add | |
| bootstrap.min.js //Add | |
| jquery-1.7.1.intellisense.js | |
| jquery-1.7.1.js | |
| jquery-1.7.1.min.js | |
| jquery.unobtrusive-ajax.js | |
| jquery.unobtrusive-ajax.min.js | |
| jquery.validate-vsdoc.js | |
| jquery.validate.js | |
| jquery.validate.min.js | |
| jquery.validate.unobtrusive.js | |
| jquery.validate.unobtrusive.min.js | |
| knockout-2.1.0.debug.js | |
| knockout-2.1.0.js | |
| modernizr-2.5.3.js | |
| _references.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment