Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion notes/Views/Notebook/Create.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div>
@Html.LabelFor(model => model.Title, htmlAttributes: new{@class = "control-label col-md-2"})
<div class="col-md-10">
@Html.EditorFor(model => model.Title, new {htmlAttributes = new { @class ="form-control"}})
@Html.EditorFor(model => model.Title, new {htmlAttributes = new { @class ="form-control bg-info"}})

@Html.ValidationMessageFor(model => model.Title, "Write Title", new {@class = "text-danger"})

Expand Down
16 changes: 12 additions & 4 deletions notes/Views/Notebook/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,18 @@
{
@Html.AntiForgeryToken()

<table class="table mb-4 w-auto" >
<tr class="note">

<td>

<div class="form-horizontal">
@Html.ValidationSummary(true, "", new {@class = "text-danger"})
<div>
@Html.LabelFor(model => model.Title, htmlAttributes: new{@class = "control-label col-md-2"})
<div class="col-md-10">
@Html.EditorFor(model => model.Title, new {htmlAttributes = new { @class ="form-control"}})

@Html.EditorFor(model => model.Title, new {htmlAttributes = new { @class ="form-control w-auto bg-light"} })
@Html.ValidationMessageFor(model => model.Title, "", new {@class = "text-danger"})
@Html.ValidationMessageFor(model => model.Title, "", new {@class = "text-danger"})

</div>
Expand All @@ -28,7 +33,7 @@
<div>
@Html.LabelFor(model => model.Description, htmlAttributes: new{@class = "control-label col-md-2"})
<div class="col-md-10">
@Html.TextAreaFor(model => model.Description, new {htmlAttributes = new { @class ="form-control"}})
@Html.TextAreaFor(model => model.Description, new {htmlAttributes = new { @class ="form-control bg-light"}})

@Html.ValidationMessageFor(model => model.Description, "", new {@class = "text-danger"})

Expand All @@ -43,8 +48,11 @@

</div>

</td>
</tr>
</table>


}

@Html.ActionLink("Back to list", "Index")
@Html.ActionLink("Back to list", "Index", null,null, new { @class = "btn btn-success btn-large" })
24 changes: 17 additions & 7 deletions notes/Views/Notebook/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,41 @@
<div class="mb-4">
There are @Model.Count() notes on our page
</div>
<table class="table mb-4 w-auto ">

<table class="table mb-4 w-auto" >
<tr>
<th>
<h4>Notes</h4>
<h3>Notes</h3>
</th>

</tr>
@foreach (var item in Model)
{
<tr class="note">
<tr class="note">

<td>

<h1>@Html.DisplayFor(modelItem => item.Title)</h1>
<br>
Created:<br>
<br/>
Date of creation:&nbsp;&nbsp;
@Html.DisplayFor(modelItem => item.Created)
<br />
Edited:<br />
Date of edition:&nbsp;&nbsp;
@Html.DisplayFor(modelItem => item.DateOfEdition)


</td>
<td>

@Html.ActionLink("Edit", "Edit", new { id = item.Id}, new { @class = "btn btn-primary" })
@Html.ActionLink("Details", "Details", new {id = item.Id}, new { @class = "btn btn-info" })
@Html.ActionLink("Delete", "Delete", new {id = item.Id}, new { @class = "btn btn-danger" })



</td>
</tr>
}
</table>
@Html.ActionLink("Create New", "Create",null,null, new { @class = "btn btn-success btn-large" })

@Html.ActionLink("Create New", "Create",null,null, new { @class = "btn btn-success btn-large" })
2 changes: 1 addition & 1 deletion notes/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"NotesContext": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=NotebookDb;Integrated Security=True;Connect Timeout=30;Encrypt=False"
"NotesContext": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=Notebook;Integrated Security=True;Connect Timeout=30;Encrypt=False"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
4 changes: 3 additions & 1 deletion notes/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
html {
font-size: 14px;
font-size: 14px;
}

@media (min-width: 768px) {
Expand All @@ -24,6 +24,7 @@ body {

.background-image {
background-color: rgba(0, 0, 0, 0.5);

}

.note {
Expand Down Expand Up @@ -72,4 +73,5 @@ h2 {
font-family: Arial;
font-size: 20px;
color: black;

}