Web MVC site UI apperance

This commit is contained in:
Carlos Cañizares Estévez 2016-10-21 05:46:30 +02:00
parent 2ba685cd49
commit c424f0816a
65 changed files with 5502 additions and 295 deletions

2
.gitignore vendored

@ -251,3 +251,5 @@ paket-files/
.idea/ .idea/
*.sln.iml *.sln.iml
pub/ pub/
/src/Web/WebMVC/Properties/PublishProfiles/eShopOnContainersWebMVC2016 - Web Deploy-publish.ps1
/src/Web/WebMVC/Properties/PublishProfiles/publish-module.psm1

@ -7,7 +7,7 @@ services:
- CatalogUrl=http://catalog.api - CatalogUrl=http://catalog.api
- OrderingUrl=http://ordering.api - OrderingUrl=http://ordering.api
ports: ports:
- "80:80" - "800:80"
depends_on: depends_on:
- catalog.api - catalog.api
@ -31,10 +31,10 @@ services:
- "81:80" - "81:80"
# (Go to Production): For secured/final deployment, remove Ports mapping and # (Go to Production): For secured/final deployment, remove Ports mapping and
# leave just the internal expose section # leave just the internal expose section
# expose: expose:
# - "80" - "800"
extra_hosts: extra_hosts:
- "CESARDLBOOKVHD:10.0.75.1" - "DESKTOP-1HNACCH:192.168.1.39"
depends_on: depends_on:
- ordering.data - ordering.data

@ -105,7 +105,24 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
ViewData["ReturnUrl"] = returnUrl; ViewData["ReturnUrl"] = returnUrl;
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
var user = new ApplicationUser { UserName = model.Email, Email = model.Email }; var user = new ApplicationUser
{
UserName = model.Email,
Email = model.Email,
CardHolderName = model.User.CardHolderName,
CardNumber = model.User.CardNumber,
CardType = model.User.CardType,
City = model.User.City,
Country = model.User.Country,
Expiration = model.User.Expiration,
LastName = model.User.LastName,
Name = model.User.Name,
Street = model.User.Street,
State = model.User.State,
ZipCode = model.User.ZipCode,
PhoneNumber = model.User.PhoneNumber,
SecurityNumber = model.User.SecurityNumber
};
var result = await _userManager.CreateAsync(user, model.Password); var result = await _userManager.CreateAsync(user, model.Password);
if (result.Succeeded) if (result.Succeeded)
{ {

@ -7,6 +7,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Models; using Microsoft.eShopOnContainers.WebMVC.Models;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Newtonsoft.Json; using Newtonsoft.Json;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.Models.HomeViewModels;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{ {
@ -14,31 +16,25 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{ {
private HttpClient _http; private HttpClient _http;
private AppSettings _settings; private AppSettings _settings;
private ICatalogService _catalogSvc;
public HomeController(IOptions<AppSettings> options) public HomeController(IOptions<AppSettings> options, ICatalogService catalogSvc)
{ {
_http = new HttpClient(); _http = new HttpClient();
_settings = options.Value; _settings = options.Value;
_catalogSvc = catalogSvc;
} }
public async Task<IActionResult> Index() public async Task<IActionResult> Index()
{ {
var dataString = await _http.GetStringAsync(_settings.CatalogUrl); //var dataString = await _http.GetStringAsync(_settings.CatalogUrl);
var items = JsonConvert.DeserializeObject<List<CatalogItem>>(dataString); //var items = JsonConvert.DeserializeObject<List<CatalogItem>>(dataString);
return View(items); //items.AddRange(items);
} var items = await _catalogSvc.GetCatalogItems();
var vm = new IndexViewModel()
public IActionResult About() {
{ CatalogItems = items
ViewData["Message"] = "Your application description page."; };
return View(vm);
return View();
}
public IActionResult Contact()
{
ViewData["Message"] = "Your contact page.";
return View();
} }
public async Task<IActionResult> Orders() public async Task<IActionResult> Orders()

@ -60,11 +60,45 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
PhoneNumber = await _userManager.GetPhoneNumberAsync(user), PhoneNumber = await _userManager.GetPhoneNumberAsync(user),
TwoFactor = await _userManager.GetTwoFactorEnabledAsync(user), TwoFactor = await _userManager.GetTwoFactorEnabledAsync(user),
Logins = await _userManager.GetLoginsAsync(user), Logins = await _userManager.GetLoginsAsync(user),
BrowserRemembered = await _signInManager.IsTwoFactorClientRememberedAsync(user) BrowserRemembered = await _signInManager.IsTwoFactorClientRememberedAsync(user),
User = user
}; };
return View(model); return View(model);
} }
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Index(IndexViewModel model)
{
if (!ModelState.IsValid)
{
return View(model);
}
var user = await _userManager.GetUserAsync(HttpContext.User);
user.CardHolderName = model.User.CardHolderName;
user.CardNumber = model.User.CardNumber;
//user.CardType = model.User.CardType;
user.City = model.User.City;
user.Country = model.User.Country;
user.Expiration = model.User.Expiration;
user.State = model.User.State;
user.Street = model.User.Street;
user.ZipCode = model.User.ZipCode;
var result = await _userManager.UpdateAsync(user);
if (result.Succeeded)
{
_logger.LogInformation(99, "User changed his address and payment method information.");
return RedirectToAction(nameof(Index), new { Message = ManageMessageId.ProfileUpdated });
}
AddErrors(result);
return View(model);
}
// //
// POST: /Manage/RemoveLogin // POST: /Manage/RemoveLogin
[HttpPost] [HttpPost]
@ -347,7 +381,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
SetPasswordSuccess, SetPasswordSuccess,
RemoveLoginSuccess, RemoveLoginSuccess,
RemovePhoneSuccess, RemovePhoneSuccess,
Error Error,
ProfileUpdated
} }
private Task<ApplicationUser> GetCurrentUserAsync() private Task<ApplicationUser> GetCurrentUserAsync()

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.Models;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
public class OrderController : Controller
{
private IOrderingService _orderSvc;
public OrderController(IOrderingService orderSvc)
{
_orderSvc = orderSvc;
}
public IActionResult Cart()
{
return View();
}
public IActionResult Create()
{
return View();
}
public IActionResult Index(Order item)
{
_orderSvc.AddOrder(item);
return View(_orderSvc.GetOrders());
}
}
}

@ -1,22 +1,20 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.eShopOnContainers.WebMVC.Data;
namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations namespace WebMVC.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
[Migration("00000000000000_CreateIdentitySchema")] [Migration("20161019122215_Init_Scheme")]
partial class CreateIdentitySchema partial class Init_Scheme
{ {
protected override void BuildTargetModel(ModelBuilder modelBuilder) protected override void BuildTargetModel(ModelBuilder modelBuilder)
{ {
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "1.0.0-rc3") .HasAnnotation("ProductVersion", "1.0.0-rtm-21431")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
@ -132,18 +130,36 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
b.Property<int>("AccessFailedCount"); b.Property<int>("AccessFailedCount");
b.Property<string>("CardHolderName");
b.Property<string>("CardNumber");
b.Property<int>("CardType");
b.Property<string>("City");
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken(); .IsConcurrencyToken();
b.Property<string>("Country");
b.Property<string>("CountryCode");
b.Property<string>("Email") b.Property<string>("Email")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
b.Property<bool>("EmailConfirmed"); b.Property<bool>("EmailConfirmed");
b.Property<string>("Expiration");
b.Property<double>("Latitude");
b.Property<bool>("LockoutEnabled"); b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd"); b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<double>("Longitude");
b.Property<string>("NormalizedEmail") b.Property<string>("NormalizedEmail")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
@ -156,13 +172,23 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
b.Property<bool>("PhoneNumberConfirmed"); b.Property<bool>("PhoneNumberConfirmed");
b.Property<string>("SecurityNumber");
b.Property<string>("SecurityStamp"); b.Property<string>("SecurityStamp");
b.Property<string>("State");
b.Property<string>("StateCode");
b.Property<string>("Street");
b.Property<bool>("TwoFactorEnabled"); b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName") b.Property<string>("UserName")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
b.Property<string>("ZipCode");
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("NormalizedEmail") b.HasIndex("NormalizedEmail")

@ -1,13 +1,11 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Metadata;
namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations namespace WebMVC.Migrations
{ {
public partial class CreateIdentitySchema : Migration public partial class Init_Scheme : Migration
{ {
protected override void Up(MigrationBuilder migrationBuilder) protected override void Up(MigrationBuilder migrationBuilder)
{ {
@ -45,19 +43,33 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
{ {
Id = table.Column<string>(nullable: false), Id = table.Column<string>(nullable: false),
AccessFailedCount = table.Column<int>(nullable: false), AccessFailedCount = table.Column<int>(nullable: false),
CardHolderName = table.Column<string>(nullable: true),
CardNumber = table.Column<string>(nullable: true),
CardType = table.Column<int>(nullable: false),
City = table.Column<string>(nullable: true),
ConcurrencyStamp = table.Column<string>(nullable: true), ConcurrencyStamp = table.Column<string>(nullable: true),
Country = table.Column<string>(nullable: true),
CountryCode = table.Column<string>(nullable: true),
Email = table.Column<string>(maxLength: 256, nullable: true), Email = table.Column<string>(maxLength: 256, nullable: true),
EmailConfirmed = table.Column<bool>(nullable: false), EmailConfirmed = table.Column<bool>(nullable: false),
Expiration = table.Column<string>(nullable: true),
Latitude = table.Column<double>(nullable: false),
LockoutEnabled = table.Column<bool>(nullable: false), LockoutEnabled = table.Column<bool>(nullable: false),
LockoutEnd = table.Column<DateTimeOffset>(nullable: true), LockoutEnd = table.Column<DateTimeOffset>(nullable: true),
Longitude = table.Column<double>(nullable: false),
NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true), NormalizedEmail = table.Column<string>(maxLength: 256, nullable: true),
NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true), NormalizedUserName = table.Column<string>(maxLength: 256, nullable: true),
PasswordHash = table.Column<string>(nullable: true), PasswordHash = table.Column<string>(nullable: true),
PhoneNumber = table.Column<string>(nullable: true), PhoneNumber = table.Column<string>(nullable: true),
PhoneNumberConfirmed = table.Column<bool>(nullable: false), PhoneNumberConfirmed = table.Column<bool>(nullable: false),
SecurityNumber = table.Column<string>(nullable: true),
SecurityStamp = table.Column<string>(nullable: true), SecurityStamp = table.Column<string>(nullable: true),
State = table.Column<string>(nullable: true),
StateCode = table.Column<string>(nullable: true),
Street = table.Column<string>(nullable: true),
TwoFactorEnabled = table.Column<bool>(nullable: false), TwoFactorEnabled = table.Column<bool>(nullable: false),
UserName = table.Column<string>(maxLength: 256, nullable: true) UserName = table.Column<string>(maxLength: 256, nullable: true),
ZipCode = table.Column<string>(nullable: true)
}, },
constraints: table => constraints: table =>
{ {

@ -0,0 +1,246 @@
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.eShopOnContainers.WebMVC.Data;
namespace WebMVC.Migrations
{
[DbContext(typeof(ApplicationDbContext))]
[Migration("20161020101725_extendProfile")]
partial class extendProfile
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
modelBuilder
.HasAnnotation("ProductVersion", "1.0.0-rtm-21431")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
{
b.Property<string>("Id");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Name")
.HasAnnotation("MaxLength", 256);
b.Property<string>("NormalizedName")
.HasAnnotation("MaxLength", 256);
b.HasKey("Id");
b.HasIndex("NormalizedName")
.HasName("RoleNameIndex");
b.ToTable("AspNetRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("RoleId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("RoleId");
b.ToTable("AspNetRoleClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd();
b.Property<string>("ClaimType");
b.Property<string>("ClaimValue");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("Id");
b.HasIndex("UserId");
b.ToTable("AspNetUserClaims");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
{
b.Property<string>("LoginProvider");
b.Property<string>("ProviderKey");
b.Property<string>("ProviderDisplayName");
b.Property<string>("UserId")
.IsRequired();
b.HasKey("LoginProvider", "ProviderKey");
b.HasIndex("UserId");
b.ToTable("AspNetUserLogins");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("RoleId");
b.HasKey("UserId", "RoleId");
b.HasIndex("RoleId");
b.HasIndex("UserId");
b.ToTable("AspNetUserRoles");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserToken<string>", b =>
{
b.Property<string>("UserId");
b.Property<string>("LoginProvider");
b.Property<string>("Name");
b.Property<string>("Value");
b.HasKey("UserId", "LoginProvider", "Name");
b.ToTable("AspNetUserTokens");
});
modelBuilder.Entity("Microsoft.eShopOnContainers.WebMVC.Models.ApplicationUser", b =>
{
b.Property<string>("Id");
b.Property<int>("AccessFailedCount");
b.Property<string>("CardHolderName");
b.Property<string>("CardNumber");
b.Property<int>("CardType");
b.Property<string>("City");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken();
b.Property<string>("Country");
b.Property<string>("CountryCode");
b.Property<string>("Email")
.HasAnnotation("MaxLength", 256);
b.Property<bool>("EmailConfirmed");
b.Property<string>("Expiration");
b.Property<string>("LastName");
b.Property<double>("Latitude");
b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<double>("Longitude");
b.Property<string>("Name");
b.Property<string>("NormalizedEmail")
.HasAnnotation("MaxLength", 256);
b.Property<string>("NormalizedUserName")
.HasAnnotation("MaxLength", 256);
b.Property<string>("PasswordHash");
b.Property<string>("PhoneNumber");
b.Property<bool>("PhoneNumberConfirmed");
b.Property<string>("SecurityNumber");
b.Property<string>("SecurityStamp");
b.Property<string>("State");
b.Property<string>("StateCode");
b.Property<string>("Street");
b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName")
.HasAnnotation("MaxLength", 256);
b.Property<string>("ZipCode");
b.HasKey("Id");
b.HasIndex("NormalizedEmail")
.HasName("EmailIndex");
b.HasIndex("NormalizedUserName")
.IsUnique()
.HasName("UserNameIndex");
b.ToTable("AspNetUsers");
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRoleClaim<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
.WithMany("Claims")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserClaim<string>", b =>
{
b.HasOne("Microsoft.eShopOnContainers.WebMVC.Models.ApplicationUser")
.WithMany("Claims")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserLogin<string>", b =>
{
b.HasOne("Microsoft.eShopOnContainers.WebMVC.Models.ApplicationUser")
.WithMany("Logins")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserRole<string>", b =>
{
b.HasOne("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole")
.WithMany("Users")
.HasForeignKey("RoleId")
.OnDelete(DeleteBehavior.Cascade);
b.HasOne("Microsoft.eShopOnContainers.WebMVC.Models.ApplicationUser")
.WithMany("Roles")
.HasForeignKey("UserId")
.OnDelete(DeleteBehavior.Cascade);
});
}
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
namespace WebMVC.Migrations
{
public partial class extendProfile : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "LastName",
table: "AspNetUsers",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Name",
table: "AspNetUsers",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LastName",
table: "AspNetUsers");
migrationBuilder.DropColumn(
name: "Name",
table: "AspNetUsers");
}
}
}

@ -1,13 +1,11 @@
using System; using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.eShopOnContainers.WebMVC.Data;
namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations namespace WebMVC.Migrations
{ {
[DbContext(typeof(ApplicationDbContext))] [DbContext(typeof(ApplicationDbContext))]
partial class ApplicationDbContextModelSnapshot : ModelSnapshot partial class ApplicationDbContextModelSnapshot : ModelSnapshot
@ -15,7 +13,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
protected override void BuildModel(ModelBuilder modelBuilder) protected override void BuildModel(ModelBuilder modelBuilder)
{ {
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "1.0.0-rc3") .HasAnnotation("ProductVersion", "1.0.0-rtm-21431")
.HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b => modelBuilder.Entity("Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityRole", b =>
@ -131,18 +129,40 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
b.Property<int>("AccessFailedCount"); b.Property<int>("AccessFailedCount");
b.Property<string>("CardHolderName");
b.Property<string>("CardNumber");
b.Property<int>("CardType");
b.Property<string>("City");
b.Property<string>("ConcurrencyStamp") b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken(); .IsConcurrencyToken();
b.Property<string>("Country");
b.Property<string>("CountryCode");
b.Property<string>("Email") b.Property<string>("Email")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
b.Property<bool>("EmailConfirmed"); b.Property<bool>("EmailConfirmed");
b.Property<string>("Expiration");
b.Property<string>("LastName");
b.Property<double>("Latitude");
b.Property<bool>("LockoutEnabled"); b.Property<bool>("LockoutEnabled");
b.Property<DateTimeOffset?>("LockoutEnd"); b.Property<DateTimeOffset?>("LockoutEnd");
b.Property<double>("Longitude");
b.Property<string>("Name");
b.Property<string>("NormalizedEmail") b.Property<string>("NormalizedEmail")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
@ -155,13 +175,23 @@ namespace Microsoft.eShopOnContainers.WebMVC.Data.Migrations
b.Property<bool>("PhoneNumberConfirmed"); b.Property<bool>("PhoneNumberConfirmed");
b.Property<string>("SecurityNumber");
b.Property<string>("SecurityStamp"); b.Property<string>("SecurityStamp");
b.Property<string>("State");
b.Property<string>("StateCode");
b.Property<string>("Street");
b.Property<bool>("TwoFactorEnabled"); b.Property<bool>("TwoFactorEnabled");
b.Property<string>("UserName") b.Property<string>("UserName")
.HasAnnotation("MaxLength", 256); .HasAnnotation("MaxLength", 256);
b.Property<string>("ZipCode");
b.HasKey("Id"); b.HasKey("Id");
b.HasIndex("NormalizedEmail") b.HasIndex("NormalizedEmail")

@ -23,5 +23,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models.AccountViewModels
[Display(Name = "Confirm password")] [Display(Name = "Confirm password")]
[Compare("Password", ErrorMessage = "The password and confirmation password do not match.")] [Compare("Password", ErrorMessage = "The password and confirmation password do not match.")]
public string ConfirmPassword { get; set; } public string ConfirmPassword { get; set; }
public ApplicationUser User { get; set; }
} }
} }

@ -7,7 +7,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models
{ {
public class Address public class Address
{ {
public Guid ID { get; set; } public Guid Id { get; set; }
public string Street { get; set; } public string Street { get; set; }
public string City { get; set; } public string City { get; set; }
public string State { get; set; } public string State { get; set; }

@ -3,11 +3,30 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopOnContainers.WebMVC.Models namespace Microsoft.eShopOnContainers.WebMVC.Models
{ {
// Add profile data for application users by adding properties to the ApplicationUser class // Add profile data for application users by adding properties to the ApplicationUser class
public class ApplicationUser : IdentityUser public class ApplicationUser : IdentityUser
{ {
public string CardNumber { get; set; }
public string SecurityNumber { get; set; }
public string Expiration { get; set; }
public string CardHolderName { get; set; }
public int CardType { get; set; }
public string Street { get; set; }
public string City { get; set; }
public string State { get; set; }
public string StateCode { get; set; }
public string Country { get; set; }
public string CountryCode { get; set; }
public string ZipCode { get; set; }
public double Latitude { get; set; }
public double Longitude { get; set; }
[Required]
public string Name { get; set; }
[Required]
public string LastName { get; set; }
} }
} }

@ -0,0 +1,17 @@
using Microsoft.AspNetCore.Mvc.Rendering;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Models.HomeViewModels
{
public class IndexViewModel
{
public IEnumerable<CatalogItem> CatalogItems { get; set; }
public IEnumerable<SelectListItem> Brands { get; set; }
public IEnumerable<SelectListItem> Types { get; set; }
public int BrandFilterApplied { get; set; }
public int TypesFilterApplied { get; set; }
}
}

@ -17,5 +17,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models.ManageViewModels
public bool TwoFactor { get; set; } public bool TwoFactor { get; set; }
public bool BrowserRemembered { get; set; } public bool BrowserRemembered { get; set; }
public ApplicationUser User { get; set; }
} }
} }

@ -19,11 +19,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models
public int SequenceNumber { get; set; } public int SequenceNumber { get; set; }
public virtual Guid BuyerId { get; set; } public virtual Guid BuyerId { get; set; }
public virtual Address ShippingAddress { get; set; } public virtual Address ShippingAddress { get; set; }
public virtual Address BillingAddress { get; set; }
public virtual DateTime OrderDate { get; set; } public virtual DateTime OrderDate { get; set; }
//(CCE) public virtual Address BillingAddress { get; set; }
//(CDLTLL) public virtual OrderStatus Status { get; set; } //(CDLTLL) public virtual OrderStatus Status { get; set; }
} }
} }

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Models
{
public class PaymentInfo
{
public Guid Id { get; set; }
public string CardNumber {get;set;}
public string SecurityNumber { get; set; }
public int ExpirationMonth { get; set; }
public int ExpirationYear { get; set; }
public string CardHolderName { get; set; }
public CardType CardType { get; set; }
}
public enum CardType:int
{
AMEX,
VISA
}
}

@ -3,7 +3,7 @@
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:2113/", "applicationUrl": "http://localhost:2114/",
"sslPort": 0 "sslPort": 0
} }
}, },

@ -0,0 +1,41 @@
using System;
using System.Threading.Tasks;
using Microsoft.eShopOnContainers.WebMVC.Models;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public class CartService : ICartService
{
Order _order;
public CartService()
{
_order = new Order();
_order.OrderItems = new System.Collections.Generic.List<OrderItem>();
_order.OrderItems.Add(new OrderItem()
{
ProductName = "Cart product"
});
}
public void AddItemToOrder(CatalogItem item)
{
throw new NotImplementedException();
}
public int GetItemCountFromOrderInProgress()
{
throw new NotImplementedException();
}
public Task<Order> GetOrderInProgress()
{
return Task.Run(() => { return _order; });
}
public void RemoveItemFromOrder(Guid itemIdentifier)
{
throw new NotImplementedException();
}
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.eShopOnContainers.WebMVC.Models;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public class CatalogService : ICatalogService
{
List<CatalogItem> _items;
public CatalogService() {
_items = new List<CatalogItem>()
{
new CatalogItem() { Id = Guid.NewGuid(), Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12 },
new CatalogItem() { Id = Guid.NewGuid(), Description = "Cupt Black & White Mug", Name = "Cupt Black & White Mug", Price= 17 },
new CatalogItem() { Id = Guid.NewGuid(), Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12 },
new CatalogItem() { Id = Guid.NewGuid(), Description = ".NET Bot Black Sweatshirt", Name = ".NET Bot Black Sweatshirt", Price = decimal.Parse("19.5") }
};
}
public CatalogItem GetCatalogItem(Guid Id)
{
return _items.Where(x => x.Id == Id).FirstOrDefault();
}
public Task<List<CatalogItem>> GetCatalogItems()
{
return Task.Run(() => { return _items; });
}
}
}

@ -0,0 +1,16 @@
using Microsoft.eShopOnContainers.WebMVC.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public interface ICartService
{
void AddItemToOrder(CatalogItem item);
void RemoveItemFromOrder(Guid itemIdentifier);
int GetItemCountFromOrderInProgress();
Task<Order> GetOrderInProgress();
}
}

@ -0,0 +1,14 @@
using Microsoft.eShopOnContainers.WebMVC.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public interface ICatalogService
{
Task<List<CatalogItem>> GetCatalogItems();
CatalogItem GetCatalogItem(Guid Id);
}
}

@ -0,0 +1,15 @@
using Microsoft.eShopOnContainers.WebMVC.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public interface IOrderingService
{
List<Order> GetOrders();
Order GetOrder(Guid Id);
void AddOrder(Order Order);
}
}

@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.eShopOnContainers.WebMVC.Models;
namespace Microsoft.eShopOnContainers.WebMVC.Services
{
public class OrderingService : IOrderingService
{
private List<Order> _orders;
public OrderingService()
{
_orders = new List<Order>()
{
new Order()
{
BuyerId = Guid.NewGuid(), OrderDate = DateTime.Now,
OrderItems = new List<OrderItem>()
{
new OrderItem() { UnitPrice = 12 }
}
}
};
}
public void AddOrder(Order Order)
{
_orders.Add(Order);
}
public Order GetOrder(Guid Id)
{
return _orders.Where(x => x.BuyerId == Id).FirstOrDefault();
}
public List<Order> GetOrders()
{
return _orders;
}
}
}

@ -52,6 +52,9 @@ namespace Microsoft.eShopOnContainers.WebMVC
// Add application services. // Add application services.
services.AddTransient<IEmailSender, AuthMessageSender>(); services.AddTransient<IEmailSender, AuthMessageSender>();
services.AddTransient<ISmsSender, AuthMessageSender>(); services.AddTransient<ISmsSender, AuthMessageSender>();
services.AddTransient<ICatalogService, CatalogService>();
services.AddTransient<IOrderingService, OrderingService>();
services.AddTransient<ICartService, CartService>();
services.Configure<AppSettings>(Configuration); services.Configure<AppSettings>(Configuration);
} }

@ -0,0 +1,30 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Models;
using Microsoft.eShopOnContainers.WebMVC.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents
{
public class Cart : ViewComponent
{
private readonly ICartService _cartSvc;
public Cart(ICartService cartSvc)
{
_cartSvc = cartSvc;
}
public async Task<IViewComponentResult> InvokeAsync()
{
var item = await GetItemsAsync();
return View(item);
}
private Task<Order> GetItemsAsync()
{
return _cartSvc.GetOrderInProgress();
}
}
}

@ -7,83 +7,49 @@
@{ @{
ViewData["Title"] = "Log in"; ViewData["Title"] = "Log in";
} }
<div class="brand-header-block">
<h2>@ViewData["Title"].</h2> <ul class="container">
<div class="row"> <li><a asp-area="" asp-controller="Account" asp-action="Register">REGISTER</a></li>
<div class="col-md-8"> <li class="active" style="margin-right: 65px;">LOGIN</li>
<section> </ul>
<form asp-controller="Account" asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal"> </div>
<h4>Use a local account to log in.</h4> <div class="container account-login-container">
<hr /> <div class="row">
<div asp-validation-summary="All" class="text-danger"></div> <div class="col-md-12">
<div class="form-group"> <section>
<label asp-for="Email" class="col-md-2 control-label"></label> <form asp-controller="Account" asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<div class="col-md-10"> <h4>ARE YOU REGISTERED?</h4>
<input asp-for="Email" class="form-control" /> <div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Email" class="form-control form-input form-input-center" />
<span asp-validation-for="Email" class="text-danger"></span> <span asp-validation-for="Email" class="text-danger"></span>
</div> </div>
</div> <div class="form-group">
<div class="form-group"> <label asp-for="Password" class="control-label form-label"></label>
<label asp-for="Password" class="col-md-2 control-label"></label> <input asp-for="Password" class="form-control form-input form-input-center" />
<div class="col-md-10">
<input asp-for="Password" class="form-control" />
<span asp-validation-for="Password" class="text-danger"></span> <span asp-validation-for="Password" class="text-danger"></span>
</div> </div>
</div> @*<div class="form-group">
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<div class="checkbox"> <div class="checkbox">
<label asp-for="RememberMe"> <label asp-for="RememberMe">
<input asp-for="RememberMe" /> <input asp-for="RememberMe" />
@Html.DisplayNameFor(m => m.RememberMe) @Html.DisplayNameFor(m => m.RememberMe)
</label> </label>
</div> </div>
</div>*@
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;LOG IN&nbsp;</button>
</div> </div>
</div> <p>
<div class="form-group"> <a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" class="text">Register as a new user?</a>
<div class="col-md-offset-2 col-md-10"> </p>
<button type="submit" class="btn btn-default">Log in</button> <p>
</div> @*<a asp-action="ForgotPassword" class="text">Forgot your password?</a>*@
</div> </p>
<p> </form>
<a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]">Register as a new user?</a> </section>
</p> </div>
<p>
<a asp-action="ForgotPassword">Forgot your password?</a>
</p>
</form>
</section>
</div>
<div class="col-md-4">
<section>
<h4>Use another service to log in.</h4>
<hr />
@{
var loginProviders = SignInManager.GetExternalAuthenticationSchemes().ToList();
if (loginProviders.Count == 0)
{
<div>
<p>
There are no external authentication services configured. See <a href="http://go.microsoft.com/fwlink/?LinkID=532715">this article</a>
for details on setting up this ASP.NET application to support logging in via external services.
</p>
</div>
}
else
{
<form asp-controller="Account" asp-action="ExternalLogin" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<div>
<p>
@foreach (var provider in loginProviders)
{
<button type="submit" class="btn btn-default" name="provider" value="@provider.AuthenticationScheme" title="Log in using your @provider.DisplayName account">@provider.AuthenticationScheme</button>
}
</p>
</div>
</form>
}
}
</section>
</div> </div>
</div> </div>

@ -2,41 +2,106 @@
@{ @{
ViewData["Title"] = "Register"; ViewData["Title"] = "Register";
} }
<div class="brand-header-block">
<h2>@ViewData["Title"].</h2> <ul class="container">
<li class="active">REGISTER</li>
<form asp-controller="Account" asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal"> <li style="margin-right: 65px;"><a asp-area="" asp-controller="Account" asp-action="Login">LOGIN</a></li>
<h4>Create a new account.</h4> </ul>
<hr /> </div>
<div asp-validation-summary="All" class="text-danger"></div> <div class="container cart-index-container">
<div class="form-group"> @*<h2>@ViewData["Title"].</h2>*@
<label asp-for="Email" class="col-md-2 control-label"></label> <h4 class="order-create-section-title">CREATE NEW ACCOUNT</h4>
<div class="col-md-10"> <form asp-controller="Account" asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<input asp-for="Email" class="form-control" /> @*<div asp-validation-summary="All" class="text-danger"></div>*@
<span asp-validation-for="Email" class="text-danger"></span> <div class="row">
<div class="form-group col-sm-6">
<label asp-for="User.Name" class="control-label form-label">NAME</label>
<input asp-for="User.Name" class="form-control form-input" />
<span asp-validation-for="User.Name" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.LastName" class="control-label form-label">LAST NAME</label>
<input asp-for="User.LastName" class="form-control form-input" />
<span asp-validation-for="User.LastName" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.Street" class="control-label form-label">ADDRESS</label>
<input asp-for="User.Street" class="form-control form-input" />
<span asp-validation-for="User.Street" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.City" class="control-label form-label"></label>
<input asp-for="User.City" class="form-control form-input" />
<span asp-validation-for="User.City" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.State" class="control-label form-label"></label>
<input asp-for="User.State" class="form-control form-input" />
<span asp-validation-for="User.State" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.Country" class="control-label form-label"></label>
<input asp-for="User.Country" class="form-control form-input" />
<span asp-validation-for="User.Country" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.ZipCode" class="control-label form-label">POSTCODE</label>
<input asp-for="User.ZipCode" class="form-control form-input" />
<span asp-validation-for="User.ZipCode" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.PhoneNumber" class="control-label form-label">PHONE NUMBER</label>
<input asp-for="User.PhoneNumber" class="form-control form-input" />
<span asp-validation-for="User.PhoneNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.CardNumber" class="control-label form-label">Card Number</label>
<input asp-for="User.CardNumber" class="form-control form-input" />
<span asp-validation-for="User.CardNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.CardHolderName" class="control-label form-label">Cardholder Name</label>
<input asp-for="User.CardHolderName" class="form-control form-input" />
<span asp-validation-for="User.CardHolderName" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.Expiration" class="control-label form-label">Expiration Date</label>
<input asp-for="User.Expiration" placeholder="MM/YY" class="form-control form-input form-input-small" />
<span asp-validation-for="User.Expiration" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.SecurityNumber" class="control-label form-label">Security Code</label>
<input asp-for="User.SecurityNumber" class="form-control form-input form-input-small" />
<span asp-validation-for="User.SecurityNumber" class="text-danger" />
</div>
</div> </div>
</div> <br /><br />
<div class="form-group"> <div class="row">
<label asp-for="Password" class="col-md-2 control-label"></label> <div class="form-group col-sm-6">
<div class="col-md-10"> <label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Password" class="form-control" /> <input asp-for="Email" class="form-control form-input" />
<span asp-validation-for="Password" class="text-danger"></span> <span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group col-sm-offset-6"></div>
<div class="form-group col-sm-6">
<label asp-for="Password" class="control-label form-label"></label>
<input asp-for="Password" class="form-control form-input" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="ConfirmPassword" class="control-label form-label"></label>
<input asp-for="ConfirmPassword" class="form-control form-input" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
</div>
<br /><br />
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand">&nbsp;Register&nbsp;</button>
</div> </div>
</div> <br /><br />
<div class="form-group"> </form>
<label asp-for="ConfirmPassword" class="col-md-2 control-label"></label> </div>
<div class="col-md-10">
<input asp-for="ConfirmPassword" class="form-control" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
</div>
<div class="form-group">
<div class="col-md-offset-2 col-md-10">
<button type="submit" class="btn btn-default">Register</button>
</div>
</div>
</form>
@section Scripts { @section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
} }

@ -1,7 +0,0 @@
@{
ViewData["Title"] = "About";
}
<h2>@ViewData["Title"].</h2>
<h3>@ViewData["Message"]</h3>
<p>Use this area to provide additional information.</p>

@ -1,17 +0,0 @@
@{
ViewData["Title"] = "Contact";
}
<h2>@ViewData["Title"].</h2>
<h3>@ViewData["Message"]</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

@ -1,16 +1,67 @@
@{ @{
ViewData["Title"] = "Home Page"; ViewData["Title"] = "Home Page";
@model IEnumerable<CatalogItem> @model Microsoft.eShopOnContainers.WebMVC.Models.HomeViewModels.IndexViewModel
} }
@foreach (var catalogItem in Model) <div class="container-fluid">
{ <div class="row home-banner">
<div class="panel panel-default"> <div class="container home-banner-text"><img src="~/images/main_banner_text.png" /></div>
<div class="panel-heading"> </div>
<h3 class="panel-title">@catalogItem.Name</h3>
</div> <div class="home-catalog-filter-container">
<div class="panel-body"> <div class="container">
@catalogItem.Description @*<ul class="nav navbar-nav col-sm-6 home-catalog-filter-brands">
<li><a asp-area="" asp-controller="Home" asp-action="Index" class="btn-bracketed">ALL</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="About" class="btn-bracketed">AZURE</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Contact" class="btn-bracketed">.NET</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Orders" class="btn-bracketed">LOREM</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Orders" class="btn-bracketed">IPSUM</a></li>
</ul>
<ul class="nav navbar-nav col-sm-6 home-catalog-filter-types">
<li><a asp-area="" asp-controller="Home" asp-action="Index" class="btn-bracketed">ALL</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="About" class="btn-bracketed">T-SHIRT</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Contact" class="btn-bracketed">STICKER</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Orders" class="btn-bracketed">MUGS</a></li>
<li><a asp-area="" asp-controller="Home" asp-action="Orders" class="btn-bracketed">SWEATSHIRT</a></li>
</ul>*@
<div data-name="brand" class="select-filter-wrapper">
<img src="~/images/arrow-down.png" class="select-filter-arrow" />
<select asp-for="BrandFilterApplied" asp-items="Model.Brands" class="select-filter" >
<option>ALL</option>
</select>
</div>
<div data-name="type" class="select-filter-wrapper">
<img src="~/images/arrow-down.png" class="select-filter-arrow" />
<select asp-for="TypesFilterApplied" asp-items="Model.Types" class="select-filter">
<option>ALL</option>
</select>
</div>
<a asp-area="" asp-controller="Home" asp-action="About" class="btn-brand btn-brand-small btn-brand-small-filter">
APPLY
</a>
</div> </div>
</div> </div>
} </div>
<div class="container home-catalog-container">
<div class="row">
@foreach (var catalogItem in Model.CatalogItems)
{
<div class="col-sm-4 home-catalog-item">
<div class="home-catalog-item-image" >
<img src="~/images/product_temp.PNG" />
<a asp-area="" asp-controller="Home" asp-action="About" class="btn-brand home-catalog-item-image-addCart">
ADD TO CART
</a>
</div>
<div class="home-catalog-item-title">
<span>@catalogItem.Name</span>
</div>
<div class="home-catalog-item-price">
<span>@catalogItem.Price.ToString("N2")</span>
</div>
</div>
}
</div>
</div>

@ -3,7 +3,7 @@
ViewData["Title"] = "Change Password"; ViewData["Title"] = "Change Password";
} }
<h2>@ViewData["Title"].</h2>
<form asp-controller="Manage" asp-action="ChangePassword" method="post" class="form-horizontal"> <form asp-controller="Manage" asp-action="ChangePassword" method="post" class="form-horizontal">
<h4>Change Password Form</h4> <h4>Change Password Form</h4>

@ -3,69 +3,98 @@
ViewData["Title"] = "Manage your account"; ViewData["Title"] = "Manage your account";
} }
<h2>@ViewData["Title"].</h2> @*<h2>@ViewData["Title"].</h2>*@
<p class="text-success">@ViewData["StatusMessage"]</p> <p class="text-success">@ViewData["StatusMessage"]</p>
<div class="brand-header-block">
<div> <ul class="container">
<h4>Change your account settings</h4> <li class="brand-header-back"><a asp-area="" asp-controller="Home" asp-action="Index">Back to list</a></li>
<hr /> </ul>
<dl class="dl-horizontal">
<dt>Password:</dt>
<dd>
@if (Model.HasPassword)
{
<a asp-controller="Manage" asp-action="ChangePassword" class="btn-bracketed">Change</a>
}
else
{
<a asp-controller="Manage" asp-action="SetPassword" class="btn-bracketed">Create</a>
}
</dd>
<dt>External Logins:</dt>
<dd>
@Model.Logins.Count <a asp-controller="Manage" asp-action="ManageLogins" class="btn-bracketed">Manage</a>
</dd>
<dt>Phone Number:</dt>
<dd>
<p>
Phone Numbers can used as a second factor of verification in two-factor authentication.
See <a href="http://go.microsoft.com/fwlink/?LinkID=532713">this article</a>
for details on setting up this ASP.NET application to support two-factor authentication using SMS.
</p>
@*@(Model.PhoneNumber ?? "None")
@if (Model.PhoneNumber != null)
{
<br />
<a asp-controller="Manage" asp-action="AddPhoneNumber" class="btn-bracketed">Change</a>
<form asp-controller="Manage" asp-action="RemovePhoneNumber" method="post">
[<button type="submit" class="btn-link">Remove</button>]
</form>
}
else
{
<a asp-controller="Manage" asp-action="AddPhoneNumber" class="btn-bracketed">Add</a>
}*@
</dd>
<dt>Two-Factor Authentication:</dt>
<dd>
<p>
There are no two-factor authentication providers configured. See <a href="http://go.microsoft.com/fwlink/?LinkID=532713">this article</a>
for setting up this application to support two-factor authentication.
</p>
@*@if (Model.TwoFactor)
{
<form asp-controller="Manage" asp-action="DisableTwoFactorAuthentication" method="post" class="form-horizontal">
Enabled <button type="submit" class="btn-link btn-bracketed">Disable</button>
</form>
}
else
{
<form asp-controller="Manage" asp-action="EnableTwoFactorAuthentication" method="post" class="form-horizontal">
<button type="submit" class="btn-link btn-bracketed">Enable</button> Disabled
</form>
}*@
</dd>
</dl>
</div> </div>
<div class="container cart-index-container">
<form asp-controller="Manage" asp-action="Index" method="post" class="form-horizontal">
<div class="form-group">
<div class="col-md-offset-8 col-md-4">
<button type="submit" class="btn btn-default btn-brand">[ Save ]</button>
</div>
</div>
<h4 class="order-create-section-title">SHIPPING ADDRESS</h4>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="User.Street" class="control-label form-label">ADDRESS</label>
<input asp-for="User.Street" class="form-control form-input" />
<span asp-validation-for="User.Street" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.City" class="control-label form-label"></label>
<input asp-for="User.City" class="form-control form-input" />
<span asp-validation-for="User.City" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.State" class="control-label form-label"></label>
<input asp-for="User.State" class="form-control form-input" />
<span asp-validation-for="User.State" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.Country" class="control-label form-label"></label>
<input asp-for="User.Country" class="form-control form-input" />
<span asp-validation-for="User.Country" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.ZipCode" class="control-label form-label"></label>
<input asp-for="User.ZipCode" class="form-control form-input form-input-small" />
<span asp-validation-for="User.ZipCode" class="text-danger" />
</div>
</div>
<br /><br />
<div class="order-create-section-payment">
<h4 class="order-create-section-title">PAYMENT METHOD</h4>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="User.CardNumber" class="control-label form-label">Card Number</label>
<input asp-for="User.CardNumber" class="form-control form-input" />
<span asp-validation-for="User.CardNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.CardHolderName" class="control-label form-label">Cardholder Name</label>
<input asp-for="User.CardHolderName" class="form-control form-input" />
<span asp-validation-for="User.CardHolderName" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.Expiration" class="control-label form-label">Expiration Date</label>
<input asp-for="User.Expiration" placeholder="MM/YY" class="form-control form-input form-input-small" />
<span asp-validation-for="User.Expiration" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.SecurityNumber" class="control-label form-label">Security Code</label>
<input asp-for="User.SecurityNumber" class="form-control form-input form-input-small" />
<span asp-validation-for="User.SecurityNumber" class="text-danger" />
</div>
</div>
</div>
<br /><br />
<h4 class="order-create-section-title">Change your account settings</h4>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="User.Street" class="control-label form-label">PASSWORD</label>
<br />
@if (Model.HasPassword)
{
<a asp-controller="Manage" asp-action="ChangePassword" class="text">Change</a>
}
else
{
<a asp-controller="Manage" asp-action="SetPassword" class="text">Create</a>
}
</div>
</div>
<br /><br />
<div class="form-group">
<div class="col-md-offset-8 col-md-4">
<button type="submit" class="btn btn-default btn-brand">[ Save ]</button>
</div>
</div>
<br /><br />
</form>
</div>

@ -0,0 +1,54 @@
@model Microsoft.eShopOnContainers.WebMVC.Models.Order
@{
ViewData["Title"] = "My Cart";
}
<div class="brand-header-block">
<ul class="container">
<li class="brand-header-back"><a asp-area="" asp-controller="Home" asp-action="Index">Back to list</a></li>
</ul>
</div>
<div class="container cart-index-container">
<div class="row">
<div class="col-md-offset-8 col-md-4">
<a asp-controller="Home" asp-action="Index" class="btn btn-default btn-brand btn-brand-dark btn-cart">&nbsp;Continue Shopping&nbsp;</a>
</div>
<br /><br /><br /><br />
<div class="col-md-12">
<section>
<table class="table">
<thead>
<tr>
<th>
PRODUCT
</th>
<th>
</th>
<th>
BRAND
</th>
<th>
PRICE
</th>
<th>
QUANTITY
</th>
<th>
FINAL PRICE
</th>
</tr>
</thead>
<tbody>
@await Component.InvokeAsync("Cart")
</tbody>
</table>
</section>
</div>
<br /><br /><br /><br /><br /><br />
<div class="col-md-offset-8 col-md-4">
<a asp-controller="Order" asp-action="Create" class="btn btn-default btn-brand btn-cart">&nbsp;CheckOut&nbsp;</a>
</div>
</div>
</div>

@ -0,0 +1,112 @@
@model Microsoft.eShopOnContainers.WebMVC.Models.Order
@{
ViewData["Title"] = "View";
}
<div class="brand-header-block">
<ul class="container">
<li class="brand-header-back"><a asp-area="" asp-controller="Order" asp-action="Cart">Back to list</a></li>
</ul>
</div>
<div class="container cart-index-container">
<form asp-action="View">
<h4 class="order-create-section-title">SHIPPING ADDRESS</h4>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="OrderNumber" class="control-label form-label">order number</label>
<input asp-for="OrderNumber" class="form-control form-input" />
<span asp-validation-for="OrderNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="SequenceNumber" class="control-label form-label"></label>
<input asp-for="SequenceNumber" class="form-control form-input" />
<span asp-validation-for="SequenceNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="BuyerId" class="control-label form-label"></label>
<input asp-for="BuyerId" class="form-control form-input" />
<span asp-validation-for="BuyerId" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="OrderDate" class="control-label form-label"></label>
<input asp-for="OrderDate" class="form-control form-input" />
<span asp-validation-for="OrderDate" class="text-danger" />
</div>
</div>
<br /><br />
<div class="order-create-section-payment">
<h4 class="order-create-section-title">PAYMENT METHOD</h4>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="OrderNumber" class="control-label form-label">Card Number</label>
<input asp-for="OrderNumber" class="form-control form-input" />
<span asp-validation-for="OrderNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="OrderNumber" class="control-label form-label">Cardholder Name</label>
<input asp-for="OrderNumber" class="form-control form-input" />
<span asp-validation-for="OrderNumber" class="text-danger" />
</div>
</div>
<div class="form-horizontal row">
<div class="form-group col-sm-6">
<label asp-for="OrderNumber" class="control-label form-label">Expiration Date</label>
<select asp-for="OrderNumber" class="form-control form-select" />
<span asp-validation-for="OrderNumber" class="text-danger" />
<br />
<label asp-for="OrderDate" class="control-label form-label">hhh</label>
<select asp-for="OrderDate" class="form-control form-select" />
<span asp-validation-for="OrderDate" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="OrderNumber" class="control-label form-label">Security Code</label>
<input asp-for="OrderNumber" class="form-control form-input form-input-small" />
<span asp-validation-for="OrderNumber" class="text-danger" />
</div>
</div>
</div>
<br /><br />
<div class="col-md-12 order-create-section-items">
<section>
<table class="table">
<thead>
<tr>
<th>
PRODUCT
</th>
<th>
</th>
<th>
BRAND
</th>
<th>
PRICE
</th>
<th>
QUANTITY
</th>
<th>
FINAL PRICE
</th>
</tr>
</thead>
<tbody>
@await Component.InvokeAsync("Cart")
</tbody>
</table>
</section>
</div>
<br /><br /><br /><br /><br /><br />
<div class="form-group">
<div class="col-md-offset-8 col-md-4">
@*<input type="submit" value="[ PLACE ORDER ]" class="btn btn-default btn-brand" />*@
<a asp-controller="Order" asp-action="Index" class="btn btn-default btn-brand">[ PLACE ORDER ]</a>
</div>
</div>
<br /><br /><br /><br /><br /><br />
</form>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

@ -0,0 +1,56 @@
@model IEnumerable<Microsoft.eShopOnContainers.WebMVC.Models.Order>
@{
ViewData["Title"] = "View";
}
<div class="brand-header-block">
<ul class="container">
<li class="brand-header-back"><a asp-area="" asp-controller="Home" asp-action="Index">Back to home</a></li>
</ul>
</div>
<div class="container cart-index-container">
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.OrderNumber)
</th>
<th>
@Html.DisplayNameFor(model => model.OrderDate)
@*@Html.DisplayNameFor(model => model.SequenceNumber)*@
</th>
<th>
@Html.DisplayNameFor(model => model.BuyerId)
</th>
<th>
@Html.DisplayNameFor(model => model.OrderDate)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.OrderNumber)
</td>
<td>
@Html.DisplayFor(modelItem => item.OrderDate)
@*@Html.DisplayFor(modelItem => item.SequenceNumber)*@
</td>
<td>
@Html.DisplayFor(modelItem => item.BuyerId)
</td>
<td>
@Html.DisplayFor(modelItem => item.OrderDate)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Details", "Details", new { /* id=item.PrimaryKey */ }) |
@Html.ActionLink("Delete", "Delete", new { /* id=item.PrimaryKey */ })
</td>
</tr>
}
</tbody>
</table>
</div>

@ -0,0 +1,20 @@
@model Microsoft.eShopOnContainers.WebMVC.Models.Order
@{
ViewData["Title"] = "My Cart";
}
@foreach (var item in Model.OrderItems)
{
<tr>
<td>@*image*@</td>
<td>@item.ProductName</td>
<td>ROSLYN</td>
<td>$&nbsp;@item.UnitPrice</td>
<td>@item.Quantity</td>
<td>$&nbsp;@item.Quantity * @item.UnitPrice</td>
</tr>
}

@ -19,31 +19,41 @@
<body> <body>
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="container"> <div class="container">
<div class="navbar-header"> <div class="row">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <div class="navbar-header col-sm-8 col-xs-8">
<span class="sr-only">Toggle navigation</span> @*<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span> <span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> <span class="icon-bar"></span>
<a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">Microsoft.eShopOnContainers.WebMVC</a> </button>*@
</div> <a asp-area="" asp-controller="Home" asp-action="Index">
<div class="navbar-collapse collapse"> <div class="navbar-brand">
<ul class="nav navbar-nav"> </div>
<li><a asp-area="" asp-controller="Home" asp-action="Index">Home</a></li> </a>
<li><a asp-area="" asp-controller="Home" asp-action="About">About</a></li> </div>
<li><a asp-area="" asp-controller="Home" asp-action="Contact">Contact</a></li> <div class="navbar-header col-sm-4 col-xs-4 text-center">
<li><a asp-area="" asp-controller="Home" asp-action="Orders">Orders</a></li> @await Html.PartialAsync("_LoginPartial")
</ul> </div>
@await Html.PartialAsync("_LoginPartial")
</div> </div>
</div> </div>
</div> </div>
<div class="container body-content"> <div>
@RenderBody() @RenderBody()
<hr />
<footer> <footer>
<p>&copy; 2016 - Microsoft.eShopOnContainers.WebMVC</p> <div class="container">
<div class="row">
<div class="col-sm-6">
<br><div class="brand"></div>
</div>
<div class="col-sm-6">
<br />
<br>
<br />
<div class="text hidden-xs">&copy; e-ShoponContainers. All right reserved</div>
</div>
</div>
</div>
</footer> </footer>
</div> </div>

@ -8,19 +8,16 @@
{ {
<form asp-area="" asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="navbar-right"> <form asp-area="" asp-controller="Account" asp-action="LogOff" method="post" id="logoutForm" class="navbar-right">
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li> <li style="float:right"><a asp-area="" asp-controller="Order" asp-action="Cart"><img src="~/images/cart.PNG" class="layout-cart-image hidden-xs"></a></li>
<a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage">Hello @UserManager.GetUserName(User)!</a> <li class="fr"><a href="javascript:document.getElementById('logoutForm').submit()" class="btn-login">&nbsp;Log Out&nbsp;</a></li>
</li> @*<li class="fr login-user"><a asp-area="" asp-controller="Manage" asp-action="Index" title="Manage">@UserManager.GetUserName(User)</a></li>*@
<li>
<button type="submit" class="btn btn-link navbar-btn navbar-link">Log off</button>
</li>
</ul> </ul>
</form> </form>
} }
else else
{ {
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><a asp-area="" asp-controller="Account" asp-action="Register">Register</a></li> <li><a asp-area="" asp-controller="Account" class="btn-login" asp-action="Login">&nbsp;Log In&nbsp;</a></li>
<li><a asp-area="" asp-controller="Account" asp-action="Login">Log in</a></li> <li><a asp-area="" asp-controller="Order" asp-action="Cart"><img src="~/images/cart.PNG" class="layout-cart-image hidden-xs"></a></li>
</ul> </ul>
} }

@ -3,6 +3,5 @@
@using Microsoft.eShopOnContainers.WebMVC.Models.AccountViewModels @using Microsoft.eShopOnContainers.WebMVC.Models.AccountViewModels
@using Microsoft.eShopOnContainers.WebMVC.Models.ManageViewModels @using Microsoft.eShopOnContainers.WebMVC.Models.ManageViewModels
@using Microsoft.AspNetCore.Identity @using Microsoft.AspNetCore.Identity
@using Microsoft.eShopOnContainers.WebMVC.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

@ -1,8 +1,9 @@
{ {
"ConnectionStrings": { "ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Microsoft.eShopOnContainers.WebMVC-946ae052-8305-4a99-965b-ec8636ddbae3;Trusted_Connection=True;MultipleActiveResultSets=true" //"DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Microsoft.eShopOnContainers.WebMVC-946ae052-8305-4a99-965b-ec8636ddbae3;Trusted_Connection=True;MultipleActiveResultSets=true;"
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;Initial Catalog=master;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False;Trusted_Connection=True;"
}, },
"CatalogUrl": "http://localhost:2418/", "CatalogUrl": "http://localhost:56986/",
"OrderingUrl": "http://localhost:2446/", "OrderingUrl": "http://localhost:2446/",
"Logging": { "Logging": {
"IncludeScopes": false, "IncludeScopes": false,
@ -13,3 +14,5 @@
} }
} }
} }
Data Source=tcp:eshoponcontainerswebmvc2016dbserver.database.windows.net,1433;Initial Catalog=eShopOnContainersWebMVC2016_db;User Id=eshoponcontainerswebmvc2016dbserver@eshoponcontainerswebmvc2016dbserver;Password=Patata.123

@ -18,8 +18,12 @@
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.AspNetCore.StaticFiles": "1.0.0", "Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0",
"Microsoft.EntityFrameworkCore.SqlServer.Design": { //"Microsoft.EntityFrameworkCore.SqlServer.Design": {
"version": "1.0.0", // "version": "1.0.0-rc2-final",
// "type": "build"
//},
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview2-final",
"type": "build" "type": "build"
}, },
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0", "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
@ -88,6 +92,7 @@
"dotnet bundle" "dotnet bundle"
], ],
"postpublish": [ "postpublish": [
/*"dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"*/] "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
]
} }
} }

@ -4,7 +4,6 @@
<!-- <!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
--> -->
<system.webServer> <system.webServer>
<handlers> <handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/>

@ -1,6 +1,19 @@
body { @font-face {
padding-top: 50px; font-family: Montserrat;
padding-bottom: 20px; font-weight: 400;
src: url("/fonts/Montserrat-Regular.eot?") format("eot"),url("/fonts/Montserrat-Regular.woff") format("woff"),url("/fonts/Montserrat-Regular.ttf") format("truetype"),url("/fonts/Montserrat-Regular.svg#Montserrat") format("svg")
}
@font-face {
font-family: Montserrat;
font-weight: 700;
src: url("/fonts/Montserrat-Bold.eot?") format("eot"),url("/fonts/Montserrat-Bold.woff") format("woff"),url("/fonts/Montserrat-Bold.ttf") format("truetype"),url("/fonts/Montserrat-Bold.svg#Montserrat") format("svg")
}
body {
padding-top: 80px;
/*padding-bottom: 20px;*/
font-family: Montserrat,sans-serif;
} }
/* Wrapping element */ /* Wrapping element */
@ -17,34 +30,514 @@ textarea {
max-width: 280px; max-width: 280px;
} }
.select-filter {
background-color: transparent;
padding: 10px;
margin: 10px;
margin-right: 20px;
color: white;
padding-top: 20px;
padding-bottom: 5px;
min-width: 120px;
border-color: #37c7ca;
max-height: 43px;
-webkit-appearance: none;
}
select::-ms-expand {
display: none;
}
.select-filter-wrapper {
z-index: 0;
display:inline-block;
margin-left: -10px;
}
.select-filter-wrapper::before {
content: attr(data-name);
opacity: 0.5;
z-index: 1;
text-transform: uppercase;
position: absolute;
font-size: 10px;
margin-top: 15px;
margin-left: 25px;
color: white;
}
.select-filter-arrow {
position: absolute;
margin-left: 110px;
margin-top: 40px;
}
.btn-brand-small-filter {
margin-top: 10px;
position: absolute;
margin-left: 15px;
}
/* Carousel */ /* Carousel */
.carousel-caption p { .carousel-caption p {
font-size: 20px; font-size: 20px;
line-height: 1.4; line-height: 1.4;
} }
.layout-cart-image {
height: 36px;
margin-top: 5px;
}
/* buttons and links extension to use brackets: [ click me ] */ /* buttons and links extension to use brackets: [ click me ] */
.btn-bracketed::before { .btn-bracketed:hover:before {
display:inline-block; display: inline-block;
content: "["; content: "[";
padding-right: 0.5em; padding-right: 0.5em;
color: chartreuse;
} }
.btn-bracketed::after {
display:inline-block; .btn-bracketed:hover:after {
display: inline-block;
content: "]"; content: "]";
padding-left: 0.5em; padding-left: 0.5em;
color: chartreuse;
}
.btn-brand {
background-color: #83D01B;
color: white;
padding: 10px 20px 10px 20px;
border-radius: 0px;
border: none;
width: 255px;
display: inline-block;
text-align: center;
text-transform: uppercase;
height: 45px;
font-size: 16px;
font-weight: normal;
}
.btn-brand::before {
content: '['
}
.btn-brand::after {
content: ']'
}
.btn-brand:hover:before {
padding-right: 5px;
}
.btn-brand:hover:after {
padding-left: 5px;
}
.btn-brand-big {
width: 360px;
margin-top: 20px;
}
.btn-brand-small {
width: 120px;
font-size: 14px;
}
.btn-brand-small::before {
content: '';
}
.btn-brand-small::after {
content: '';
}
.btn-brand-small:hover:before {
content: '';
padding: 0;
}
.btn-brand-small:hover:after {
content: '';
padding: 0;
}
.btn-brand-dark {
background-color: #00a69c;
}
.btn-brand:hover {
color: white;
background-color: #83D01B;
text-decoration:none;
}
.btn-brand-dark:hover {
background-color: #00a69c;
}
.btn-cart {
float: right;
}
.form-label {
text-transform: uppercase;
font-weight: normal!important;
text-align: left;
margin-bottom: 10px !important;
color: #404040;
}
.form-input {
border-radius: 0;
padding: 10px;
height: 45px;
width: 360px;
max-width: 360px;
}
.form-input-small {
max-width: 100px;
}
.form-select {
border-radius: 0;
padding: 10px;
height: 45px;
width: 150px;
} }
/* Make .svg files in the carousel display properly in older browsers */ /* Make .svg files in the carousel display properly in older browsers */
.carousel-inner .item img[src$=".svg"] .carousel-inner .item img[src$=".svg"] {
{
width: 100%; width: 100%;
} }
.navbar-inverse {
background-color: #FFF;
border-color: #FFF;
}
.navbar-inverse li {
margin-top: 10px;
}
.btn-login {
border: 1px solid #00A69C;
height: 36px!important;
margin-right: 10px;
margin-top: 10px;
background-color: white;
color: #00a69c;
text-transform:uppercase;
max-width: 140px;
width: 140px;
padding-top:8px!important;
}
.btn-login {
font-weight:normal!important;
}
.btn-login::before {
content: '[';
}
.btn-login::after {
content: ']';
}
.btn-login:hover:before {
content: '[ ';
}
.btn-login:hover:after {
content: ' ]';
}
.navbar-inverse li a {
height: 30px;
padding: 5px 20px;
color: #00A69C !important;
}
.navbar-brand {
margin-top: 20px;
background-image: url(../images/brand.PNG);
width: 201px;
height: 44px;
margin-left: 0px !important;
}
.nav > li > a {
color: white;
}
.nav > li > a:hover, .nav > li > a:focus {
background-color: #00A69C;
font-weight: bolder;
}
.container-fluid {
padding-left: 0px;
padding-right: 0px;
}
.home-banner {
width: 100%;
margin-right: 0px;
margin-left: 0px;
background-image: url(../images/main_banner.PNG);
background-size: cover;
height: 258px;
background-position: center;
}
.home-banner-text {
margin-top: 70px;
}
.home-catalog-container {
min-height: 400px;
}
.home-catalog-filter-container {
background-color: #00A69C;
height:63px;
}
.home-catalog-filter-container li a {
padding-top: 5px !important;
}
.home-catalog-filter-brands::before {
content: 'BRAND';
color: white;
font-size: x-small;
opacity: 0.5;
margin: 10px 0px 0px 15px;
}
.home-catalog-filter-types::before {
content: 'TYPES';
color: white;
font-size: x-small;
opacity: 0.5;
margin: 10px 0px 0px 15px;
}
.home-catalog-item {
margin-top: 10px;
margin-bottom: 10px;
}
.home-catalog-item-image {
width: 100%;
object-fit: cover;
max-width: 320px;
}
.home-catalog-item-image-addCart {
background-color: #83D01B;
color: white;
display: block;
height: 43px;
padding: 10px 20px 10px 20px;
font-weight: bold;
text-align: center;
margin-top: 10px;
margin-left: 50px;
font-size: 16px;
font-weight: normal;
}
.home-catalog-item-image-addCart:hover {
color: white;
text-decoration: none;
}
.home-catalog-item-image:hover:after {
cursor: pointer;
}
.home-catalog-item-title {
text-align: center;
text-transform: uppercase;
font-weight: 300;
font-size: 16px;
margin-top: 20px;
}
.home-catalog-item-price {
text-align: center;
font-weight: 900;
font-size: 28px;
}
.home-catalog-item-price::before {
content: '$';
}
.container .nav .navbar-nav .col-sm-6 ::before {
content: 'BRAND';
}
.validation-summary-errors li {
list-style: none;
}
footer {
background-color: black;
height: 150px;
vertical-align: middle;
}
footer .brand {
margin-top: 25px;
background-image: url(../images/brand_dark.PNG);
max-width: 231px;
height: 52px;
margin-left: 0px !important;
}
footer .text {
text-align: right;
width: 100%;
height: 100%;
color: #83D01B;
margin-top: 10px;
}
form .text {
color: #83D01B;
}
form .col-md-4 {
text-align: right;
}
.brand-header-block {
background-color: #00A69C;
height: 63px;
}
.brand-header-block li {
list-style: none;
display: inline;
opacity: 0.5;
margin-top: 25px;
margin-left: 10px;
float: right;
cursor: pointer;
color: white;
}
.brand-header-block li a {
color: white;
}
.brand-header-block li a:hover {
text-decoration:none;
}
.brand-header-block .active {
opacity: 1;
}
.brand-header-block .active::before {
content: '[ ';
color: greenyellow;
}
.brand-header-block .active::after {
content: ' ]';
color: greenyellow;
}
.brand-header-back {
float: left!important;
margin-top: 20px!important;
text-transform: uppercase;
}
.account-login-container {
min-height: 70vh;
text-align: center;
}
.account-register-container {
min-height: 70vh;
text-align: center !important;
align-content: center;
}
.cart-index-container {
min-height: 70vh;
padding-top: 40px;
}
.input-validation-error {
border: 1px solid #fb0d0d;
}
.text-danger {
color: #fb0d0d;
font-size: 12px;
}
.cart {
border: none !important;
}
.form-horizontal h4 {
margin-top: 30px;
}
.form-control:focus {
border-color: #83d01b;
}
.form-input-center {
margin: auto;
}
.order-create-section-title {
margin-left: -15px;
text-transform: uppercase;
}
.order-create-section-items {
margin-left: -30px;
}
.fr {
float:right!important;
}
.login-user {
position: absolute!important;
top: 40px;
right: 65px;
}
/* Hide/rearrange for smaller screens */ /* Hide/rearrange for smaller screens */
@media screen and (max-width: 767px) { @media screen and (max-width: 767px) {
/* Hide captions */ /* Hide captions */
.carousel-caption { .carousel-caption {
display: none display: none;
} }
footer .text {
text-align: left;
margin-top: -15px;
}
}
@media screen and (max-width: 415px) {
.btn-brand-small-filter {
width: 65px;
padding:10px 10px 10px 10px;
font-size: 10px;
}
} }

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width: 64px  |  Height: 64px  |  Size: 31 KiB

After

Width: 48px  |  Height: 48px  |  Size: 15 KiB

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

(image error) Size: 111 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

After

(image error) Size: 104 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

(image error) Size: 1.0 KiB

Binary file not shown.

After

(image error) Size: 5.1 KiB

Binary file not shown.

After

(image error) Size: 5.1 KiB

Binary file not shown.

After

(image error) Size: 1.5 KiB

Binary file not shown.

After

(image error) Size: 713 KiB

Binary file not shown.

After

(image error) Size: 8.6 KiB

File diff suppressed because one or more lines are too long

After

(image error) Size: 12 KiB

Binary file not shown.

After

(image error) Size: 130 KiB