Skip to content

Commit

Permalink
Merge pull request #19 from Trafix120/committees
Browse files Browse the repository at this point in the history
Committees Created
  • Loading branch information
erland-syafiq authored Oct 17, 2023
2 parents 5ffd2fc + e449745 commit efe59d7
Show file tree
Hide file tree
Showing 26 changed files with 425 additions and 22 deletions.
216 changes: 213 additions & 3 deletions Controllers/CommitteesController.cs

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions VTMUNC.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="6.0.16" />
</ItemGroup>

<ItemGroup>
<Folder Include="wwwroot\Images\Chair_Headshots\" />
</ItemGroup>

</Project>
17 changes: 11 additions & 6 deletions ViewModels/Committee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@ public class Committee
public Staff ChairA { get; set; }
public Staff ChairB { get; set; }

public Committee(string name, string imagePath, string executiveSummary, Staff chairA, Staff chairB)
public string BackgroundGuide { get; set; }

public Committee(string name, string imagePath, string executiveSummary, Staff chairA, Staff chairB, string backgroundGuide)
{
Name = name;
UrlName = name.Replace(" ", "-").ToLower();
UrlName = name.Replace(" ", "-");
ImagePath = imagePath;
ExecutiveSummary = executiveSummary;
ExecutiveSummary = executiveSummary.Replace("\\n", "<br><br>");
ChairA = chairA;
ChairB = chairB;
BackgroundGuide = backgroundGuide;
}

public Committee(
Expand All @@ -38,14 +41,16 @@ public Committee(
string nameChairB,
string positionChairB,
string bioChairB,
string emailChairB)
string emailChairB,
string backgroundGuide)
{
Name = name;
UrlName = name.Replace(" ", "-").ToLower();
UrlName = name.Replace(" ", "-");
ImagePath = imagePath;
ExecutiveSummary = executiveSummary;
ExecutiveSummary = executiveSummary.Replace("\\n", "<br><br>");
ChairA = new Staff(imagePathChairA, nameChairA, positionChairA, bioChairA, emailChairA);
ChairB = new Staff(imagePathChairB, nameChairB, positionChairB, bioChairB, emailChairB);
BackgroundGuide = backgroundGuide;
}

}
Expand Down
4 changes: 3 additions & 1 deletion Views/Applicants/Success.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
@{
ViewData["Title"] = "Success";
}
<section style="min-height: 100vh;">
<h1>Thanks For Registering!</h1>
</section>

<h1>Thanks For Registering!</h1>

135 changes: 133 additions & 2 deletions Views/Committees/Details.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,137 @@
@using VTMUNC.ViewModels
@using VTMUNC.ViewModels;
@model Committee

<section>
<style>
.secretariatCard {
padding: 40px;
margin-bottom: 40px;
margin-right: 10px;
margin-left: 10px;
border: solid var(--primary);
background: var(--primary-background);
box-shadow: -8px 12px 0px 0px var(--tertiary);
}
.secretariatEmail {
font-style: italic;
font-family: "Playfair Display", sans-serif;
font-size: 16px;
}
.secretariatImg {
height: 200px;
width: 100%;
object-fit: cover;
background-position: center;
margin-bottom: 20px;
}
.committeeImg {
height: 88px;
width: 88px;
object-fit: cover;
margin-bottom: 30px;
box-shadow: -20px 16px 0px 0px #DEBB8F;
margin-left: 20px;
}
.committeeTitle {
justify-content: center;
align-items: center;
margin-top: 20px;
}
.heroBtn {
text-decoration: none;
display: inline-block;
margin-top: 10px;
justify-content: center;
padding: 10px;
margin-top: 40px;
}
</style>


<section style="min-height: 100vh;">
<div class="row" style="margin-top: 50px">
<div class="col-md-6">
<div class="row">
<div class="col-md-3">
<img class="committeeImg" src="/Images/Committees/@Model.ImagePath" />
</div>
<div class="col-md-9 committeeTitle">
<h3>@Model.Name</h3>
</div>
</div>

<p style="margin-top: 20px; font-size: 14px">@Html.Raw(Model.ExecutiveSummary)</p>
<a class="btn btn-primary btn-lg heroBtn" href="/BackgroundGuides/@Model.BackgroundGuide" target="_blank">
<h5 style="color:white; transform: translate(0px, 3px); ">
Background Guide
</h5>
</a>
</div>

@if (@Model.ChairB.Name == "null")
{
<div class="col-md-1"></div>

<div class="col-md-4" >
<div class="secretariatCard">
<div>
<img class="secretariatImg" src="/Images/Chair_Headshots/@Model.ChairA.ImagePath" />
</div>

<h4>@Model.ChairA.Name</h4>
<h5>@Model.ChairA.Position</h5>
<br>
<p>
@Model.ChairA.Bio
</p>
<h6 class="secretariatEmail">@Model.ChairA.Email</h6>
</div>
</div>

<div class="col-md-1"></div>
}
else
{
<div class="col-md-3">
<div class="secretariatCard">
<div>
<img class="secretariatImg" src="/Images/Chair_Headshots/@Model.ChairA.ImagePath" />
</div>

<h4>@Model.ChairA.Name</h4>
<h5>@Model.ChairA.Position</h5>
<br>
<p>
@Model.ChairA.Bio
</p>
<h6 class="secretariatEmail">@Model.ChairA.Email</h6>
</div>
</div>
<div class="col-md-3">
<div class="secretariatCard">
<div>
<img class="secretariatImg" src="/Images/Chair_Headshots/@Model.ChairB.ImagePath" />
</div>

<h4>@Model.ChairB.Name</h4>
<h5>@Model.ChairB.Position</h5>
<br>
<p>
@Model.ChairB.Bio
</p>
<h6 class="secretariatEmail">@Model.ChairB.Email</h6>
</div>
</div>

}



</div>
</section>
69 changes: 64 additions & 5 deletions Views/Committees/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}
.secretariatImg {
height: 300px;
height: 400px;
width: 100%;
object-fit: cover;
background-position: center;
Expand All @@ -74,16 +74,75 @@
</div>

<div class="row">
@foreach (var committee in Model)
<div class="col-12 text-center">
<h3 class="text-nowrap secretariatTitle">General Assembly</h3>
</div>
</div>

<div class="row">
@for (int i = 0; i < 2 && i < Model.Count(); i++)
{
<div class="col-md-4">
var committee = Model.ElementAt(i);
<a href= "Committees/@committee.UrlName" class="col-md-6">
<div class="secretariatCard">
<h3 style="display: flex; justify-content: center; align-items: center; margin-bottom: 30px">
@committee.Name
</h3>
<div>
<img class="secretariatImg" src="/Images/Chair_Headshots/@committee.ImagePath" />
<img class="secretariatImg" src="/Images/Committees/@committee.ImagePath" />
</div>

</div>
</div>
</a>
}
</div>

<div class="row">
<div class="col-12 text-center">
<h3 class="text-nowrap secretariatTitle">Crisis Committees</h3>
</div>
</div>

<div class="row">
@for (int i = 2; i < 8 && i < Model.Count(); i++)
{
var committee = Model.ElementAt(i);
<a href="Committees/@committee.UrlName" class="col-md-6">
<div class="secretariatCard">
<h3 style="display: flex; justify-content: center; align-items: center; margin-bottom: 30px">
@committee.Name
</h3>
<div>
<img class="secretariatImg" src="/Images/Committees/@committee.ImagePath" />
</div>

</div>
</a>
}
</div>

<div class="row">
<div class="col-12 text-center">
<h3 class="text-nowrap secretariatTitle">Specialized Committees</h3>
</div>
</div>

<div class="row">
@for (int i = 8; i < 10 && i < Model.Count(); i++)
{
var committee = Model.ElementAt(i);
<a href="Committees/@committee.UrlName" class="col-md-6">
<div class="secretariatCard">
<h3 style="display: flex; justify-content: center; align-items: center; margin-bottom: 30px">
@committee.Name
</h3>
<div>
<img class="secretariatImg" src="/Images/Committees/@committee.ImagePath" />
</div>

</div>
</a>
}
</div>

</section>
2 changes: 1 addition & 1 deletion Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
<div class="navbar-collapse collapse d-sm-inline-flex justify-content-end">
<a class="nav-link customFont" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
<a class="nav-link customFont" asp-area="" asp-controller="Home" asp-action="About">About Us</a>
<a class="nav-link customFont" asp-area="" asp-controller="Home" asp-action="Committees">Committees</a>
<a class="nav-link customFont" asp-area="" asp-controller="Committees" asp-action="Index">Committees</a>
<a class="nav-link customFont" asp-area="" asp-controller="Applicants" asp-action="Create">Register</a>
<partial name="_LoginPartial" />
</div>
Expand Down
Binary file added wwwroot/BackgroundGuides/Committees.pdf
Binary file not shown.
Binary file added wwwroot/Images/Chair_Headshots/alyssa.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Chair_Headshots/anneli.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Chair_Headshots/evan.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Chair_Headshots/liz.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Chair_Headshots/natilyn.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Chair_Headshots/suddhan.CR2
Binary file not shown.
Binary file added wwwroot/Images/Chair_Headshots/vihaan.CR2
Binary file not shown.
Binary file added wwwroot/Images/Chair_Headshots/willk.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/adhoc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/aosis.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/barbie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/development.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/korra.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/mythology.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/revolution.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/starwars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/voldemart.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added wwwroot/Images/Committees/women.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit efe59d7

Please sign in to comment.