Skip to content

Commit

Permalink
Merge pull request #113 from infoshareacademy/feature/ja-119-layout
Browse files Browse the repository at this point in the history
Feature/ja 119 layout
  • Loading branch information
Zjyslav authored Jul 7, 2024
2 parents 4e82883 + 60034b1 commit 19226ff
Show file tree
Hide file tree
Showing 39 changed files with 916 additions and 374 deletions.
10 changes: 5 additions & 5 deletions TutorLizard.Blazor/Components/Calendar.razor.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.calendar-container {
display: flex;
flex-direction: column;
background-color: darkgreen;
border-radius: 1rem;
background-color: #2b4027;
border-radius: 0px;
padding: 1rem;
}

Expand Down Expand Up @@ -39,7 +39,7 @@
.calendar-main {
border-radius: .5rem;
overflow: hidden;
background-color: whitesmoke;
background-color: #2b4027;
}

.seven-column-section {
Expand All @@ -55,7 +55,7 @@

.days-header div {
padding: 1rem 0;
background-color: white;
background-color: #9db88c;
text-align: center;
font-weight: bold;
}
Expand All @@ -75,7 +75,7 @@
}

.calendar-grid div:hover {
background-color: darkgreen;
background-color: #9db88c;
transition: .35s;
color: white;
font-weight: bold;
Expand Down
2 changes: 1 addition & 1 deletion TutorLizard.Blazor/Components/ScheduleForDay.razor
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="schedule-list">
@if (Schedule.Count == 0)
{
<div class="text-light text-center">Brak terminów.</div>
<div class="text-red text-center">Brak terminów.</div>
}
@foreach (var item in Schedule)
{
Expand Down
7 changes: 4 additions & 3 deletions TutorLizard.Blazor/Components/ScheduleForDay.razor.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
.schedule-container {
background-color: slateblue;
background-color: #ededed;
padding: 1rem;
border-radius: 1rem;
border-radius: 0;
color: black;
}

.schedule-container h3 {
color:white;
color:black;
margin: 0;
text-align: center;
padding-bottom: 1rem;
Expand Down
2 changes: 1 addition & 1 deletion TutorLizard.Blazor/Components/StudentsScheduleItem.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{
<div class="item" @onclick="() => NavigateToAdDetails(ScheduleItem.AdId)">
<h4 class="display-6">@ScheduleItem.DateTime.ToString("HH:mm")</h4>
<div class="fw-bold">@ScheduleItem.AdTitle <small class="text-primary">| Jako uczeń</small></div>
<div class="fw-bold">@ScheduleItem.AdTitle <small class="text-green">| Jako uczeń</small></div>
<div>Nauczyciel: @ScheduleItem.TutorName</div>
<div>Status zgłoszenia: @GetStatusName(ScheduleItem.Status)</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions TutorLizard.Blazor/Components/StudentsScheduleItem.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
background-color: white;
padding: .5rem;
margin: .25rem;
border-radius: .5rem;
border-radius: 0;
}

.item:hover {
background-color: lightblue;
background-color: #9db88c;
transition: .25s;
cursor: pointer;
}
Expand Down
12 changes: 6 additions & 6 deletions TutorLizard.Blazor/Components/TutorsScheduleItem.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
background-color: white;
padding: .5rem;
margin: .25rem;
border-radius: .5rem;
border-radius: 0;
}

.item:hover {
background-color: lightblue;
transition: .25s;
cursor: pointer;
}
.item:hover {
background-color: #9db88c;
transition: .25s;
cursor: pointer;
}

.item h4 {
margin: 0;
Expand Down
2 changes: 1 addition & 1 deletion TutorLizard.Web/Controllers/BrowseController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public BrowseController(IBrowseService browseService,
_userAuthenticationService = userAuthenticationService;
_uiMessagesService = uiMessagesService;
_categoryService = categoryService;
_pageSize = 10;
_pageSize = 12;
}
public IActionResult Index()
{
Expand Down
7 changes: 1 addition & 6 deletions TutorLizard.Web/Views/Account/ActivateAccount.cshtml
Original file line number Diff line number Diff line change
@@ -1,7 +1,2 @@
@using TutorLizard.Web.Resources
@{
ViewData["Title"] = @TutorLizard.Web.Resources.Account.AccountActivation;
}

<h1>@ViewData["Title"]</h1>

<h1 class="text-success">@TutorLizard.Web.Resources.Account.AccountActivated</h1>
18 changes: 9 additions & 9 deletions TutorLizard.Web/Views/Account/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
ViewData["Title"] = "Login";
}

<h1>@TutorLizard.Web.Resources.Account.Login</h1>
<h1 class="title">@TutorLizard.Web.Resources.Account.Login</h1>

<hr />
<div class="row">
<div class="col-md-4">
<div class="row justify-content-center gap-4">
<div class="col-md-4 user-container">
<form asp-action="Login">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
Expand All @@ -23,25 +23,25 @@
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group my-2">
<input type="submit" value="Login" class="btn btn-primary" />
<input type="submit" value="Login" class="btn btn-dark" />
</div>
</form>


</div>
<div class="row">
<div class="col-md-4 user-container">
<div>
<h2>@TutorLizard.Web.Resources.Account.LoginWithGoogle</h2>
<h2 class="title-3">@TutorLizard.Web.Resources.Account.LoginWithGoogle</h2>
</div>
<div>
<a asp-controller="Account" asp-action="GoogleLogin" class="btn btn-primary">@TutorLizard.Web.Resources.Account.GoogleSignUp</a>
<a asp-controller="Account" asp-action="GoogleLogin" class="btn btn-dark">@TutorLizard.Web.Resources.Account.GoogleSignUp</a>
</div>
</div>
</div>

<div>
@* <div>
<a asp-action="Index" asp-controller="Home">Back</a>
</div>
</div> *@

@section Scripts {
@{
Expand Down
20 changes: 10 additions & 10 deletions TutorLizard.Web/Views/Account/Register.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
ViewData["Title"] = "Register";
}

<h1>@TutorLizard.Web.Resources.Account.Register</h1>
<h1 class="title">@TutorLizard.Web.Resources.Account.Register</h1>

<hr />
<div class="row">
<div class="col-md-4">
<div class="login-grid row justify-content-center gap-4">
<div class="col-md-4 user-container">
<form asp-action="Register">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
Expand All @@ -27,23 +27,23 @@
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group my-2">
<input type="submit" value="@TutorLizard.Web.Resources.Account.Register" class="btn btn-primary" />
<input type="submit" value="@TutorLizard.Web.Resources.Account.Register" class="btn btn-dark" />
</div>
</form>
</div>
<div class="row">
<div>
<h2>@TutorLizard.Web.Resources.Account.RegisterWithGoogle</h2>
<div class="col-md-4 user-container">
<div class="col-md-4 w-100">
<h2 class="title-3">@TutorLizard.Web.Resources.Account.RegisterWithGoogle</h2>
</div>
<div>
<a asp-controller="Account" asp-action="GoogleLogin" class="btn btn-primary">@TutorLizard.Web.Resources.Account.GoogleSignUp</a>
<a asp-controller="Account" asp-action="GoogleLogin" class="btn btn-dark">Sign In with Google</a>
</div>
</div>
</div>

<div>
@* <div>
<a asp-action="Index">Back</a>
</div>
</div> *@

@section Scripts {
@{
Expand Down
10 changes: 5 additions & 5 deletions TutorLizard.Web/Views/Ad/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
ViewData["Title"] = "Ads - List";
}

<h1>@TutorLizard.Web.Resources.Ad.Ads</h1>
<h1 class="ads-title">@TutorLizard.Web.Resources.Ad.Ads</h1>

<p>
<a asp-action="Create">@TutorLizard.Web.Resources.Ad.CreateNew</a>
<a asp-action="Create" class="btn btn-primary">@TutorLizard.Web.Resources.Ad.CreateNew</a>
</p>
<table class="table">
<thead>
<table class="table table-striped table-hover">
<thead class="thead-dark">
<tr>
<th>
@Html.DisplayNameFor(model => model.Id)
Expand Down Expand Up @@ -65,7 +65,7 @@
@Html.DisplayFor(modelItem => item.CategoryId)
@if (ViewBag.CategoryName is not null)
{
<span> (@ViewBag.CategoryName)</span>
<span class="category-name"> (@ViewBag.CategoryName)</span>
}
</td>
<td>
Expand Down
108 changes: 59 additions & 49 deletions TutorLizard.Web/Views/Browse/AdDetails.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -2,61 +2,71 @@
@using TutorLizard.Web.Resources
@model GetAdDetailsResponse

<h1>@TutorLizard.Web.Resources.Browse.AdDetails</h1>
<h1 class="title">@TutorLizard.Web.Resources.Browse.AdDetails</h1>

<div>
<div><h2>@Model.Title</h2></div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.CategoryName :</div>
<div class="col-6 col-sm-9">@Model.CategoryName</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.Subject :</div>
<div class="col-6 col-sm-9">@Model.Subject</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.Localization :</div>
<div class="col-6 col-sm-9">@Model.Location</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.PostedBy :</div>
<div class="col-6 col-sm-9">@Model.TutorName</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.PostedBy :</div>
<div class="col-6 col-sm-9">@Model.Price zł/h</div>
<div class="row">
<div class="col-lg-6">
<div class="ad-details">
<h2 class="title-2 margin-bottom">@Model.Title</h2>
<div class="row ad-list-item">
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.CategoryName:</div>
<div class="col-6 col-sm-9">@Model.CategoryName</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.Subject:</div>
<div class="col-6 col-sm-9">@Model.Subject</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.Localization:</div>
<div class="col-6 col-sm-9">@Model.Location</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.PostedBy:</div>
<div class="col-6 col-sm-9">@Model.TutorName</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.Price:</div>
<div class="col-6 col-sm-9">@Model.Price zł/h</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.IsRemote:</div>
<div class="col-6 col-sm-9">
@if (Model.IsRemote)
{
<span>@TutorLizard.Web.Resources.Browse.Yes</span>
}
else
{
<span>@TutorLizard.Web.Resources.Browse.No</span>
}
</div>
</div>
</div>
<div class="row ad-list-item margin-top-small">
<div class="col">@Model.Description</div>
</div>
</div>
</div>
<div class="row">
<div class="col-6 col-sm-3">@TutorLizard.Web.Resources.Browse.IsRemote :</div>
<div class="col-6 col-sm-9">
@if (Model.IsRemote)

<div class="col-lg-6">
<div class="ad-details">
@if (Model.UserRelationship == AdToUserRelationship.Owner)
{
<span>@TutorLizard.Web.Resources.Browse.Yes</span>
@await Component.InvokeAsync(nameof(TutorsScheduleForAd), new { adId = Model.AdId })
}
else
@if (Model.UserRelationship == AdToUserRelationship.AcceptedStudent)
{
<span>@TutorLizard.Web.Resources.Browse.No</span>
@await Component.InvokeAsync(nameof(AvailableScheduleForAd), new { adId = Model.AdId })
}
@if (Model.UserRelationship == AdToUserRelationship.PendingStudent)
{
@await Component.InvokeAsync(nameof(AdRequestStatusForAd), new { adId = Model.AdId })
}
@if (Model.UserRelationship == AdToUserRelationship.None)
{
@await Component.InvokeAsync(nameof(CreateRequestForAd), new { adId = Model.AdId })
}
</div>
</div>
<div class="row">
<div class="col">@Model.Description</div>
</div>
</div>

@if(Model.UserRelationship == AdToUserRelationship.Owner)
{
@await Component.InvokeAsync(nameof(TutorsScheduleForAd), new { adId = Model.AdId })
}
@if(Model.UserRelationship == AdToUserRelationship.AcceptedStudent)
{
@await Component.InvokeAsync(nameof(AvailableScheduleForAd), new {adId = Model.AdId})
}
@if(Model.UserRelationship == AdToUserRelationship.PendingStudent)
{
@await Component.InvokeAsync(nameof(AdRequestStatusForAd), new {adId = Model.AdId})
}
@if(Model.UserRelationship == AdToUserRelationship.None)
{
@await Component.InvokeAsync(nameof(CreateRequestForAd), new { adId = Model.AdId })
}
Loading

0 comments on commit 19226ff

Please sign in to comment.