Skip to content

Commit 3553ab4

Browse files
author
Eric Hexter
committed
merege:
2 parents 2461358 + e700b41 commit 3553ab4

9 files changed

+243
-143
lines changed

src/Bootstrap/App_Start/BootstrapBundleConfig.cs

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public static void RegisterBundles(BundleCollection bundles)
2323
"~/Content/bootstrap-responsive.css",
2424
"~/Content/bootstrap-mvc-validation.css"
2525
));
26+
27+
bundles.Add(new StyleBundle("~/content/narrow").Include("~/Content/jumbotron-narrow.css"));
2628
}
2729
}
2830
}
+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/* Space out content a bit */
2+
body {
3+
padding-top: 20px;
4+
padding-bottom: 20px;
5+
}
6+
7+
/* Everything but the jumbotron gets side spacing for mobile first views */
8+
.header,
9+
.marketing,
10+
.footer {
11+
padding-right: 15px;
12+
padding-left: 15px;
13+
}
14+
15+
/* Custom page header */
16+
.header {
17+
border-bottom: 1px solid #e5e5e5;
18+
}
19+
/* Make the masthead heading the same height as the navigation */
20+
.header h3 {
21+
padding-bottom: 19px;
22+
margin-top: 0;
23+
margin-bottom: 0;
24+
line-height: 40px;
25+
}
26+
27+
/* Custom page footer */
28+
.footer {
29+
padding-top: 19px;
30+
color: #777;
31+
border-top: 1px solid #e5e5e5;
32+
}
33+
34+
/* Customize container */
35+
@media (min-width: 768px) {
36+
.container {
37+
max-width: 730px;
38+
}
39+
}
40+
.container-narrow > hr {
41+
margin: 30px 0;
42+
}
43+
44+
/* Main marketing message and sign up button */
45+
.jumbotron {
46+
text-align: center;
47+
border-bottom: 1px solid #e5e5e5;
48+
}
49+
.jumbotron .btn {
50+
padding: 14px 24px;
51+
font-size: 21px;
52+
}
53+
54+
/* Supporting marketing content */
55+
.marketing {
56+
margin: 40px 0;
57+
}
58+
.marketing p + h4 {
59+
margin-top: 28px;
60+
}
61+
62+
/* Responsive: Portrait tablets and up */
63+
@media screen and (min-width: 768px) {
64+
/* Remove the padding we set earlier */
65+
.header,
66+
.marketing,
67+
.footer {
68+
padding-right: 0;
69+
padding-left: 0;
70+
}
71+
/* Space out the masthead */
72+
.header {
73+
margin-bottom: 30px;
74+
}
75+
/* Remove the bottom border on the jumbotron for visual effect */
76+
.jumbotron {
77+
border-bottom: 0;
78+
}
79+
}

src/Bootstrap/Views/Shared/Create.cshtml

+22-14
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,29 @@
33
@using (Html.BeginForm())
44
{
55
@Html.ValidationSummary(true)
6-
<fieldset class="form-horizontal">
7-
<legend>@Model.GetLabel() <small>Details</small></legend>
8-
@foreach (var property in Model.VisibleProperties())
6+
7+
<h4>@Model.GetLabel() <small>Details</small></h4>
8+
foreach (var property in Model.VisibleProperties())
99
{
10-
using(Html.ControlGroupFor(property.Name)){
11-
@Html.Label(property.Name.ToSeparatedWords(), new { @class = "control-label" })
12-
<div class="controls">
13-
@Html.Editor(property.Name, new { @class = "input-xlarge" })
14-
@Html.ValidationMessage(property.Name, null, new { @class = "help-inline" })
15-
</div>
16-
}
10+
<div class="form-group">
11+
@Html.Label(property.Name.ToSeparatedWords(), new {@class=""})
12+
@Html.Editor(property.Name,new { htmlAttributes = new { @class = "form-control" }, })
13+
14+
@Html.ValidationMessage(property.Name, null, new { @class = "help-block" })
15+
</div>
1716
}
18-
<div class="form-actions">
17+
<div class="form-actions">
1918
<button type="submit" class="btn btn-primary">Save changes</button>
20-
@Html.ActionLink("Cancel", "Index", null, new { @class = "btn " })
19+
@Html.ActionLink("Cancel", "Index", null, new { @class = "btn btn-link " })
2120
</div>
22-
</fieldset>
23-
}
21+
}
22+
<div>
23+
@Html.ActionLink("Back to List", "Index")
24+
</div>
25+
26+
<script type="text/javascript">
27+
$(document).ready(function() {
28+
$("input").addClass("form-control")
29+
});
30+
</script>
31+

src/Bootstrap/Views/Shared/Index.cshtml

+5-6
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,10 @@
2727
}
2828
<td>
2929
<div class="btn-group">
30-
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
31-
Action
32-
<span class="caret"></span>
33-
</a>
34-
<ul class="dropdown-menu">
30+
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
31+
Action <span class="caret"></span>
32+
</button>
33+
<ul class="dropdown-menu" role="menu">
3534
@{
3635
@Html.TryPartial("_actions", model)
3736
var routevalues = model.GetIdValue();
@@ -51,6 +50,6 @@
5150

5251
</table>
5352
<p>
54-
@Html.ActionLink("Create New", "Create", null, new {@class = "btn"})
53+
@Html.ActionLink("Create New", "Create", null, new {@class = "btn btn-default"})
5554
</p>
5655

src/Bootstrap/Views/Shared/_BootstrapLayout.basic.cshtml

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
<a class="navbar-brand" href="#">Project name</a>
2626
</div>
2727
<div id="navbar" class="collapse navbar-collapse">
28-
@Html.Navigation()
28+
<ul class="nav navbar-nav">
29+
@Html.Navigation()
30+
</ul>
2931
</div><!--/.nav-collapse -->
3032
</div>
3133
</nav>
@@ -38,8 +40,8 @@
3840
<p>&copy; Company @System.DateTime.Now.ToString("yyyy")</p>
3941
</footer>
4042
</div>
41-
@Scripts.Render("~/js")
42-
@RenderSection("Scripts", required: false)
43+
@Scripts.Render("~/js")
44+
@RenderSection("Scripts", required: false)
4345
</body>
4446
</html>
4547

src/Bootstrap/Views/Shared/_BootstrapLayout.empty.cshtml

+47-30
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,53 @@
99
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1010
<link href="@Styles.Url("~/content/css")" rel="stylesheet"/>
1111
<style type="text/css">
12-
body {
13-
padding-top: 40px;
14-
padding-bottom: 40px;
15-
background-color: #f5f5f5;
16-
}
17-
18-
.form-signin {
19-
max-width: 300px;
20-
padding: 19px 29px 29px;
21-
margin: 0 auto 20px;
22-
background-color: #fff;
23-
border: 1px solid #e5e5e5;
24-
-webkit-border-radius: 5px;
25-
-moz-border-radius: 5px;
26-
border-radius: 5px;
27-
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
28-
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
29-
box-shadow: 0 1px 2px rgba(0,0,0,.05);
30-
}
31-
.form-signin .form-signin-heading,
32-
.form-signin .checkbox {
33-
margin-bottom: 10px;
34-
}
35-
.form-signin input[type="text"],
36-
.form-signin input[type="password"] {
37-
font-size: 16px;
38-
height: auto;
39-
margin-bottom: 15px;
40-
padding: 7px 9px;
41-
}
12+
body {
13+
padding-top: 40px;
14+
padding-bottom: 40px;
15+
background-color: #eee;
16+
}
17+
18+
.form-signin {
19+
max-width: 330px;
20+
padding: 15px;
21+
margin: 0 auto;
22+
}
23+
24+
.form-signin .form-signin-heading,
25+
.form-signin .checkbox {
26+
margin-bottom: 10px;
27+
}
28+
29+
.form-signin .checkbox {
30+
font-weight: normal;
31+
}
32+
33+
.form-signin .form-control {
34+
position: relative;
35+
height: auto;
36+
-webkit-box-sizing: border-box;
37+
-moz-box-sizing: border-box;
38+
box-sizing: border-box;
39+
padding: 10px;
40+
font-size: 16px;
41+
}
42+
43+
.form-signin .form-control:focus {
44+
z-index: 2;
45+
}
46+
47+
.form-signin input[type="email"] {
48+
margin-bottom: -1px;
49+
border-bottom-right-radius: 0;
50+
border-bottom-left-radius: 0;
51+
}
52+
53+
.form-signin input[type="password"] {
54+
margin-bottom: 10px;
55+
border-top-left-radius: 0;
56+
border-top-right-radius: 0;
57+
}
58+
4259
4360
</style> <link href="@Styles.Url("~/Content/css-responsive")" rel="stylesheet" type="text/css" />
4461
@RenderSection("head", required: false)

src/Bootstrap/Views/Shared/_alerts.cshtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
{
1212
if (TempData.ContainsKey(key))
1313
{
14-
<div class="alert alert-@key">
15-
<button type="button" class="close" data-dismiss="alert">x</button>
14+
<div class="alert alert-@key" role="alert">
15+
<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
1616
@TempData[key]
1717
</div>
1818
}

0 commit comments

Comments
 (0)