fix: ajustes de cores, fontes, cantos arredondados, etc.

This commit is contained in:
Ricardo Carneiro 2024-09-29 23:53:57 -03:00
parent 8c43814ffd
commit 950400e0a8
53 changed files with 683 additions and 359 deletions

View File

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Blinks.Domain.Entities
{
public class BusinessAreas
{
public BusinessAreas() { }
public string Name { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Blinks.Domain.Entities
{
internal class BusinessAres
{
}
}

View File

@ -3,9 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using VCart.Domain.ValueObjects; using Blinks.Domain.ValueObjects;
namespace VCart.Domain.Entities namespace Blinks.Domain.Entities
{ {
public class PersonUser public class PersonUser
{ {

View File

@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Blinks.Domain.Entities
{
public class UserPlan
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public string UserPlanId { get; set; }
}
}

View File

@ -4,7 +4,7 @@ using System.Diagnostics.Metrics;
using System.IO; using System.IO;
using System.Reflection.Emit; using System.Reflection.Emit;
namespace VCart.Domain namespace Blinks.Domain
{ {
public class DateBirth : AValueObject public class DateBirth : AValueObject
{ {

View File

@ -2,7 +2,7 @@
using BaseDomain; using BaseDomain;
using System.Globalization; using System.Globalization;
namespace VCart.Domain namespace Blinks.Domain
{ {
public class DateChanged : AValueObject public class DateChanged : AValueObject
{ {

View File

@ -1,7 +1,7 @@
using BaseDomain; using BaseDomain;
using System.Net.Mail; using System.Net.Mail;
namespace VCart.Domain namespace Blinks.Domain
{ {
public class Email : AValueObject public class Email : AValueObject
{ {

View File

@ -5,7 +5,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace VCart.Domain.ValueObjects namespace Blinks.Domain.ValueObjects
{ {
public class Id : AValueObject public class Id : AValueObject
{ {

View File

@ -1,6 +1,6 @@
using BaseDomain; using BaseDomain;
namespace VCart.Domain namespace Blinks.Domain
{ {
public class Name : AValueObject public class Name : AValueObject
{ {

View File

@ -1,7 +1,7 @@
using BaseDomain; using BaseDomain;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
namespace VCart.Domain namespace Blinks.Domain
{ {
public class Phone : AValueObject public class Phone : AValueObject
{ {

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace VCart.Domain.ValueObjects namespace Blinks.Domain.ValueObjects
{ {
public class Username public class Username
{ {

View File

@ -5,7 +5,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using MongoDB.Driver; using MongoDB.Driver;
namespace VCart.Infra.MongoDB namespace Blinks.Infra.MongoDB
{ {
public class MongoDbContext public class MongoDbContext
{ {

View File

@ -1,7 +1,7 @@
using global::MongoDB.Bson.Serialization.Attributes; using global::MongoDB.Bson.Serialization.Attributes;
using global::MongoDB.Bson; using global::MongoDB.Bson;
namespace VCart.Infra.MongoDB namespace Blinks.Infra.MongoDB
{ {
public class PersonUser public class PersonUser

View File

@ -21,11 +21,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Resource.pt-BR.Designer.cs">
<DependentUpon>Resource.pt-BR.resx</DependentUpon>
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="Resource.Designer.cs"> <Compile Update="Resource.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
@ -35,7 +30,6 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Resource.pt-BR.resx"> <EmbeddedResource Update="Resource.pt-BR.resx">
<LastGenOutput>Resource.pt-BR.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resource.resx"> <EmbeddedResource Update="Resource.resx">

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class CartHomeController : Controller public class CartHomeController : Controller
{ {

View File

@ -1,8 +1,8 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Diagnostics; using System.Diagnostics;
using VCart.Models; using Blinks.Models;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class HomeController : Controller public class HomeController : Controller
{ {

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Globalization; using System.Globalization;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class LanguageController : Controller public class LanguageController : Controller
{ {

View File

@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication; using Microsoft.AspNetCore.Authentication;
using Stripe; using Stripe;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class LoginController : Controller public class LoginController : Controller
{ {
@ -30,7 +30,7 @@ namespace VCart.Controllers
public ActionResult ExternalLogin(string provider, string returnUrl) public ActionResult ExternalLogin(string provider, string returnUrl)
{ {
var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl }); var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl });
var properties = new AuthenticationProperties { RedirectUri = "https://localhost:44377" + redirectUrl }; var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5094" + redirectUrl };
return Challenge(properties, "Microsoft"); return Challenge(properties, "Microsoft");
} }
@ -39,7 +39,7 @@ namespace VCart.Controllers
public ActionResult ExternalLoginGoogle(string provider, string returnUrl) public ActionResult ExternalLoginGoogle(string provider, string returnUrl)
{ {
var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl }); var redirectUrl = Url.Action("ExternalLoginCallback", "Login", new { ReturnUrl = returnUrl });
var properties = new AuthenticationProperties { RedirectUri = "https://localhost:44377" + redirectUrl }; var properties = new AuthenticationProperties { RedirectUri = "http://localhost:5094" + redirectUrl };
return Challenge(properties, "Google"); return Challenge(properties, "Google");
} }

View File

@ -0,0 +1,73 @@
using Microsoft.AspNetCore.Mvc;
using Stripe;
using Stripe.Checkout;
namespace Blinks.Controllers
{
[Route("Pay")]
public class PayController : Controller
{
private string domain = "";
public PayController()
{
domain = "http://192.168.0.27:5094/";
}
public IActionResult Index()
{
return View();
}
[HttpPost("createbio")]
public ActionResult CreateBio()
{
StripeConfiguration.ApiKey = "sk_test_51PvIzkBk8jHwC3c0sGuWDUO8MV9KeOdSkir3Ulo2RZWmUhJLBIAgzxQScuomVi2l333MNmi0yr3FgeFv7OZnCJ0j00hD94yGx1";
var options = new SessionCreateOptions
{
UiMode = "embedded",
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
Price = "price_1Q1CXGBk8jHwC3c0YwypjEVd",
Quantity = 1,
},
},
Mode = "subscription",
ReturnUrl = domain + "/Plans/OrderView?SessionId={CHECKOUT_SESSION_ID}",
};
var service = new SessionService();
Session session = service.Create(options);
return Json(new { clientSecret = session.ClientSecret });
}
[HttpPost("createcatalogo")]
public ActionResult CreateCatalogo()
{
StripeConfiguration.ApiKey = "sk_test_51PvIzkBk8jHwC3c0sGuWDUO8MV9KeOdSkir3Ulo2RZWmUhJLBIAgzxQScuomVi2l333MNmi0yr3FgeFv7OZnCJ0j00hD94yGx1";
var options = new SessionCreateOptions
{
UiMode = "embedded",
LineItems = new List<SessionLineItemOptions>
{
new SessionLineItemOptions
{
// Provide the exact Price ID (for example, pr_1234) of the product you want to sell
Price = "price_1Q1CjvBk8jHwC3c03D82tbH8",
Quantity = 1,
},
},
Mode = "subscription",
ReturnUrl = domain + "/Plans/OrderView?SessionId={CHECKOUT_SESSION_ID}",
};
var service = new SessionService();
Session session = service.Create(options);
return Json(new { clientSecret = session.ClientSecret });
}
}
}

View File

@ -1,63 +1,40 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using Stripe; using Stripe;
using Stripe.Checkout;
using Blinks.Models;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class PlansController : Controller public class PlansController : Controller
{ {
private string domain = "";
public PlansController()
{
domain = "http://192.168.0.27:5094/";
}
public IActionResult Index() public IActionResult Index()
{ {
return View(); return View();
} }
[HttpPost] public IActionResult Pay(string ammount)
public ActionResult Create(PaymentIntentCreateRequest request)
{ {
var paymentIntentService = new PaymentIntentService(); return View();
var paymentIntent = paymentIntentService.Create(new PaymentIntentCreateOptions
{
Amount = CalculateOrderAmount(request.Items),
Currency = "usd",
// In the latest version of the API, specifying the `automatic_payment_methods` parameter is optional because Stripe enables its functionality by default.
AutomaticPaymentMethods = new PaymentIntentAutomaticPaymentMethodsOptions
{
Enabled = true,
},
});
return Json(new
{
clientSecret = paymentIntent.ClientSecret
// [DEV]: For demo purposes only, you should avoid exposing the PaymentIntent ID in the client-side code.
//dpmCheckerLink = $"https://dashboard.stripe.com/settings/payment_methods/review?transaction_id={paymentIntent.ID}"
});
} }
private long CalculateOrderAmount(Item[] items) public IActionResult OrderView([FromQuery] string SessionId)
{ {
// Calculate the order total on the server to prevent var sessionService = new SessionService();
// people from directly manipulating the amount on the client Session session = sessionService.Get(SessionId);
long total = 0;
foreach (Item item in items) ViewBag.Status = session.RawJObject["status"];
{ ViewBag.CustomerEmail = session.RawJObject["customer_details"]["email"];
total += item.Amount; //return Json(new { status = session.RawJObject["status"], customer_email = session.RawJObject["customer_details"]["email"] });
} return View();
return total;
} }
public class Item
{
[JsonProperty("id")]
public string Id { get; set; }
[JsonProperty("Amount")]
public long Amount { get; set; }
}
public class PaymentIntentCreateRequest
{
[JsonProperty("items")]
public Item[] Items { get; set; }
}
} }
} }

View File

@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Diagnostics; using System.Diagnostics;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
[Route("signin-microsoft")] [Route("signin-microsoft")]
public class SignInController : Controller public class SignInController : Controller

View File

@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace VCart.Controllers namespace Blinks.Controllers
{ {
public class StartupController : Controller public class StartupController : Controller
{ {

View File

@ -7,16 +7,16 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src WORKDIR /src
COPY ["VCart.csproj", "."] COPY ["Blinks.csproj", "."]
RUN dotnet restore "./VCart.csproj" RUN dotnet restore "./Blinks.csproj"
COPY . . COPY . .
WORKDIR "/src/." WORKDIR "/src/."
RUN dotnet build "VCart.csproj" -c Release -o /app/build RUN dotnet build "Blinks.csproj" -c Release -o /app/build
FROM build AS publish FROM build AS publish
RUN dotnet publish "VCart.csproj" -c Release -o /app/publish /p:UseAppHost=false RUN dotnet publish "Blinks.csproj" -c Release -o /app/publish /p:UseAppHost=false
FROM base AS final FROM base AS final
WORKDIR /app WORKDIR /app
COPY --from=publish /app/publish . COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "VCart.dll"] ENTRYPOINT ["dotnet", "Blinks.dll"]

View File

@ -1,4 +1,4 @@
namespace VCart.Middle namespace Blinks.Middle
{ {
using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Http;
using System.Globalization; using System.Globalization;

View File

@ -0,0 +1,7 @@
namespace Blinks.Models
{
public class ChangeViewModel
{
public string ChargeId { get; set; }
}
}

View File

@ -1,4 +1,4 @@
namespace VCart.Models namespace Blinks.Models
{ {
public class ErrorViewModel public class ErrorViewModel
{ {

9
VCart/Models/Payment.cs Normal file
View File

@ -0,0 +1,9 @@
namespace Blinks.Models
{
public class Payment
{
public int Amount { get; set; }
public string Currency { get; set; }
public string Description { get; set; }
}
}

View File

@ -32,7 +32,7 @@
}, },
"projects": [ "projects": [
{ {
"path": "VCart.csproj", "path": "Blinks.csproj",
"startingProject": true, "startingProject": true,
"issues": 1, "issues": 1,
"storyPoints": 1, "storyPoints": 1,
@ -40,7 +40,7 @@
{ {
"incidentId": "1161414d-b2e4-4447-9d34-e811b563e1c5", "incidentId": "1161414d-b2e4-4447-9d34-e811b563e1c5",
"ruleId": "NuGet.0001", "ruleId": "NuGet.0001",
"projectPath": "VCart.csproj", "projectPath": "Blinks.csproj",
"state": "Active", "state": "Active",
"location": { "location": {
"snippetModel": { "snippetModel": {
@ -48,7 +48,7 @@
"protected": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found" "protected": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found"
}, },
"kind": "File", "kind": "File",
"path": "VCart.csproj", "path": "Blinks.csproj",
"snippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found", "snippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found",
"protectedSnippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found", "protectedSnippet": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets, 1.19.4\n\nRecommendation:\n\nNo supported version found",
"label": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.19.4" "label": "Microsoft.VisualStudio.Azure.Containers.Tools.Targets 1.19.4"
@ -57,7 +57,7 @@
] ]
}, },
{ {
"path": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj", "path": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
"startingProject": true, "startingProject": true,
"issues": 1, "issues": 1,
"storyPoints": 1, "storyPoints": 1,
@ -65,7 +65,7 @@
{ {
"incidentId": "2fdd89a6-9f8d-4428-8845-41d048dcaf73", "incidentId": "2fdd89a6-9f8d-4428-8845-41d048dcaf73",
"ruleId": "Project.0002", "ruleId": "Project.0002",
"projectPath": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj", "projectPath": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
"state": "Active", "state": "Active",
"location": { "location": {
"snippetModel": { "snippetModel": {
@ -73,7 +73,7 @@
"protected": "Current: net7.0\nNew: net8.0" "protected": "Current: net7.0\nNew: net8.0"
}, },
"kind": "File", "kind": "File",
"path": "C:\\vscode\\vcart.me.mvc\\VCart.Domain\\VCart.Domain.csproj", "path": "C:\\vscode\\Blinks.me.mvc\\Blinks.Domain\\Blinks.Domain.csproj",
"snippet": "Current: net7.0\nNew: net8.0", "snippet": "Current: net7.0\nNew: net8.0",
"protectedSnippet": "Current: net7.0\nNew: net8.0" "protectedSnippet": "Current: net7.0\nNew: net8.0"
} }

View File

@ -1,9 +1,11 @@
using Microsoft.AspNetCore.Authentication.Cookies; using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.Google;
using Microsoft.AspNetCore.Authentication.MicrosoftAccount; using Microsoft.AspNetCore.Authentication.MicrosoftAccount;
using Microsoft.AspNetCore.Localization; using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.Options; using Microsoft.Extensions.Options;
using Stripe; using Stripe;
using Stripe.Forwarding;
using System.Globalization; using System.Globalization;
var builder = WebApplication.CreateBuilder(args); var builder = WebApplication.CreateBuilder(args);
@ -50,8 +52,8 @@ builder.Services.Configure<RequestLocalizationOptions>(options =>
{ {
var supportedCultures = new List<CultureInfo> var supportedCultures = new List<CultureInfo>
{ {
new CultureInfo("en"), new CultureInfo("pt-BR"),
new CultureInfo("pt-BR") new CultureInfo("en")
}; };
options.DefaultRequestCulture = new RequestCulture("pt-BR"); options.DefaultRequestCulture = new RequestCulture("pt-BR");
@ -91,5 +93,6 @@ app.MapControllerRoute(
name: "default", name: "default",
pattern: "{controller=Home}/{action=Index}/{id?}"); pattern: "{controller=Home}/{action=Index}/{id?}");
app.UseRequestLocalization();
app.Run(); app.Run();

View File

@ -7,7 +7,7 @@
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"dotnetRunMessages": true, "dotnetRunMessages": true,
"applicationUrl": "http://192.168.0.27:5094" "applicationUrl": "http://localhost:5094"
}, },
"https": { "https": {
"commandName": "Project", "commandName": "Project",

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace VCart { namespace Blinks {
using System; using System;
@ -39,7 +39,7 @@ namespace VCart {
public static global::System.Resources.ResourceManager ResourceManager { public static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("VCart.Resource", typeof(Resource).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Blinks.Resource", typeof(Resource).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace VCart { namespace Blinks {
using System; using System;

View File

@ -3,13 +3,13 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.7.34031.279 VisualStudioVersion = 17.7.34031.279
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart", "VCart.csproj", "{51C3E6BC-4BBC-429F-9A7F-8C8A14E14DF4}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks", "Blinks.csproj", "{51C3E6BC-4BBC-429F-9A7F-8C8A14E14DF4}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart.Domain", "..\VCart.Domain\VCart.Domain.csproj", "{83471C51-B081-4FAC-B5D3-24B237DEC339}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks.Domain", "..\VCart.Domain\Blinks.Domain.csproj", "{83471C51-B081-4FAC-B5D3-24B237DEC339}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseDomain", "..\..\vcart.me\vcart.back\Struct.ValueObjects\BaseDomain.csproj", "{083273D7-7AE9-48A0-A59F-7CC03E1B4C30}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BaseDomain", "..\..\vcart.me\vcart.back\Struct.ValueObjects\BaseDomain.csproj", "{083273D7-7AE9-48A0-A59F-7CC03E1B4C30}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VCart.Infra", "..\VCart.Infra\VCart.Infra.csproj", "{82C3179D-BE8C-4B83-95F4-32B86448D5AC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blinks.Infra", "..\VCart.Infra\Blinks.Infra.csproj", "{82C3179D-BE8C-4B83-95F4-32B86448D5AC}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -126,7 +126,7 @@
</div><!-- End Carousel --> </div><!-- End Carousel -->
</div> </div>
@section Style { @section Styles {
<style> <style>
body { padding-top: 50px; } body { padding-top: 50px; }

View File

@ -7,7 +7,7 @@
</script> </script>
} }
@section Style { @section Styles {
<style type="text/css"> <style type="text/css">
.text-responsive { .text-responsive {
font-size: calc(100% + 1vw + 1vh); font-size: calc(100% + 1vw + 1vh);

View File

@ -1,169 +1,127 @@
 @{
@* ViewBag.Title = "Login / Registro";
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
Layout = "";
} }
<!DOCTYPE html>
<html> @section Styles {
<head>
<title>VCart</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">
<style> <style>
/* Coded with love by Mutiullah Samim */ .box {
body, width: 500px;
html { margin: 200px 0;
margin: 0; }
padding: 0;
height: 100%;
background: #C5ACD3 !important;
}
.user_card { .shape1 {
height: 400px; position: relative;
width: 350px; height: 150px;
margin-top: auto; width: 150px;
margin-bottom: auto; background-color: #0074d9;
background: #C1DD89; border-radius: 80px;
position: relative; float: left;
display: flex; margin-right: -50px;
justify-content: center; }
flex-direction: column;
padding: 10px;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-webkit-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
-moz-box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 5px;
}
.brand_logo_container { .shape2 {
position: absolute; position: relative;
height: 170px; height: 150px;
width: 170px; width: 150px;
top: -75px; background-color: #0074d9;
border-radius: 50%; border-radius: 80px;
background: #C5ACD3; margin-top: -30px;
padding: 10px; float: left;
text-align: center; }
}
.brand_logo { .shape3 {
height: 150px; position: relative;
width: 150px; height: 150px;
border-radius: 50%; width: 150px;
/* border: 2px solid white; background-color: #0074d9;
*/ } border-radius: 80px;
margin-top: -30px;
float: left;
margin-left: -31px;
}
.form_container { .shape4 {
margin-top: 100px; position: relative;
} height: 150px;
width: 150px;
background-color: #0074d9;
border-radius: 80px;
margin-top: -25px;
float: left;
margin-left: -32px;
}
.login_btn { .shape5 {
width: 100%; position: relative;
background: darkgreen !important; height: 150px;
color: white !important; width: 150px;
} background-color: #0074d9;
border-radius: 80px;
float: left;
margin-right: -48px;
margin-left: -32px;
margin-top: -30px;
}
.login_btn:focus { .shape6 {
box-shadow: none !important; position: relative;
outline: 0px !important; height: 150px;
} width: 150px;
background-color: #0074d9;
border-radius: 80px;
float: left;
margin-right: -20px;
margin-top: -35px;
}
.login_container { .shape7 {
padding: 0 2rem; position: relative;
} height: 150px;
width: 150px;
background-color: #0074d9;
border-radius: 80px;
float: left;
margin-right: -20px;
margin-top: -57px;
}
.input-group-text { .float {
background: darkgreen !important; position: absolute;
color: white !important; z-index: 2;
border: 0 !important; }
border-radius: 0.25rem 0 0 0.25rem !important;
}
.input_user,
.input_pass:focus {
box-shadow: none !important;
outline: 0px !important;
}
.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
background-color: darkgreen !important;
}
.form {
margin-left: 145px;
}
</style> </style>
</head>
<!--Coded with love by Mutiullah Samim-->
<body>
<div class="container h-100">
<div class="d-flex justify-content-center h-100">
<div class="user_card">
<div class="d-flex justify-content-center">
<div class="brand_logo_container">
@*
<img src="https://cdn.freebiesupply.com/logos/large/2x/pinterest-circle-logo-png-transparent.png" class="brand_logo" alt="Logo">
*@
<img src="~/img/logo.png" class="brand_logo" alt="Logo">
</div>
</div>
<div class="d-flex justify-content-center form_container">
@*
<form>
<div class="input-group mb-3">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-user"></i></span>
</div>
<input type="text" name="" class="form-control input_user" value="" placeholder="username">
</div>
<div class="input-group mb-2">
<div class="input-group-append">
<span class="input-group-text"><i class="fas fa-key"></i></span>
</div>
<input type="password" name="" class="form-control input_pass" value="" placeholder="password">
</div>
<div class="form-group">
<div class="custom-control custom-checkbox">
<input type="checkbox" class="custom-control-input" id="customControlInline">
<label class="custom-control-label" for="customControlInline">Remember me</label>
</div>
</div>
<div class="d-flex justify-content-center mt-3 login_container">
<button type="button" name="button" class="btn login_btn">Login</button>
</div>
</form>
*@
<div class="row" >
@using (Html.BeginForm("ExternalLogin", "Login", new { provider = "Microsoft" }, FormMethod.Post, true, new { id = "externalLoginForm" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn login_btn">Login with Microsoft</button>
<br />
}
</div>
<div class="row">
@using (Html.BeginForm("ExternalLoginGoogle", "Login", new { provider = "Google" }, FormMethod.Post, true, new { id = "externalLoginForm" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn login_btn">Login with Google</button>
}
</div>
</div>
<div class="mt-4"> }
<div class="d-flex justify-content-center links">
Don't have an account? <a href="#" class="ml-2">Sign Up</a> <div id="login-row" class="row justify-content-center align-items-center">
</div> <div id="login-column" class="col-md-6">
<div class="d-flex justify-content-center links"> <div class="box">
<a href="#">Forgot your password?</a> <div class="shape1"></div>
<div class="shape2"></div>
<div class="shape3"></div>
<div class="shape4"></div>
<div class="shape5"></div>
<div class="shape6"></div>
<div class="shape7"></div>
<div class="float">
<br />
<br />
@using (Html.BeginForm("ExternalLogin", "Login", new { provider = "Microsoft" }, FormMethod.Post, true, new { id = "externalLoginForm", style = "margin-left: 150px" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-success btn-block login">Login with Microsoft</button>
}
<br />
@using (Html.BeginForm("ExternalLoginGoogle", "Login", new { provider = "Google" }, FormMethod.Post, true, new { id = "externalLoginForm", style = "margin-left: 150px" }))
{
@Html.AntiForgeryToken()
<button type="submit" class="btn btn-success btn-block login">Login with Google</button>
}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</body>
</html>

View File

@ -0,0 +1,45 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
@section Scripts {
<script src="https://js.stripe.com/v3/"></script>
<script>
// This is your test secret API key.
const stripe = Stripe("pk_test_51PvIzkBk8jHwC3c0efDBJMY9dBwNqs0SDAHP0vIQr17G9iYg4GQtIrCOh2N9teJoYDXUHTWe6iEHnUylMntwhbin00R7y6lQOV");
initialize();
// Create a Checkout Session
async function initialize() {
const payPlan = get('plan');
const fetchClientSecret = async () => {
const response = await fetch("/Pay/create" + payPlan, {
method: "POST",
});
const { clientSecret } = await response.json();
return clientSecret;
};
const checkout = await stripe.initEmbeddedCheckout({
fetchClientSecret,
});
// Mount Checkout
checkout.mount('#checkout');
}
function get(name) {
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
</script>
}
<br />
<br />
<div id="checkout">
<!-- Checkout will insert the payment form here -->
</div>

View File

@ -1,8 +1,9 @@
@{ @{
ViewBag.Title = "Planos";
} }
<div class="row db-padding-btm db-attached"> <div class="row db-padding-btm db-attached">
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3"> <div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
<div class="db-wrapper"> <div class="db-wrapper">
<div class="db-pricing-eleven db-bk-color-one"> <div class="db-pricing-eleven db-bk-color-one">
<div class="price text-price-responsive"> <div class="price text-price-responsive">
@ -13,93 +14,87 @@
Básico Básico
</div> </div>
<ul class="text-responsive"> <ul class="text-responsive">
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Cartão <span class="hide-in-cell">pessoal virtual</span></li> <li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Links <span class="hide-in-cell">pessoal virtual</span></li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li> <li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir imagem </span>Whatsapp *</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Até 20 links </li> <li><i class="bi bi-plus-square-fill text-success"></i>Até 3 links </li>
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem página de</span> Produtos</li> <li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem página de</span> Produtos</li>
<li><i class="bi bi-square text-success"></i>Links agendados **</li> <li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem contador de </span>Visualizações</span></li>
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Contador de </span>Visualizações</span></li> </ul>
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de </span>Contatos</li>
</ul>
<div class="pricing-footer"> <div class="pricing-footer">
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a> <div class="btn db-button-color-square btn-lg">Plano Atual</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3"> <div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
<div class="db-wrapper"> <div class="db-wrapper">
<div class="db-pricing-eleven db-bk-color-three"> <div class="db-pricing-eleven db-bk-color-two popular">
<div class="price text-price-responsive"> <div class="price text-price-responsive">
<sup>R$</sup>13 <sup>R$</sup>13
<small>por mês</small> <small>por mês</small>
</div> </div>
<div class="type text-type-responsive"> <div class="type text-type-responsive">
Comum BIO
</div>
<ul>
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Links <span class="hide-in-cell">pessoal virtual</span></li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
<li><i class="bi bi-plus-square-fill text-success"></i>100 links</li>
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Sem página de</span> Produtos</li>
@*
<li><i class="bi bi-plus-square-fill text-success"></i>1 Link agendado **</li>
*@
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Contador de</span> Visualizações</li>
@*
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
*@
</ul>
<div class="pricing-footer">
@if (User.Identity.IsAuthenticated)
{
<a href="/Pay/?plan=bio" class="btn db-button-color-square btn-lg">Assinar</a>
}
else
{
<a href="/Login" class="btn db-button-color-square btn-lg">Login / Registro</a>
}
</div>
</div>
</div>
</div>
<div class="col-4 col-xs-4 col-sm-4 col-md-4 col-lg-4">
<div class="db-wrapper">
<div class="db-pricing-eleven db-bk-color-three">
<div class="price text-price-responsive">
<sup>R$</sup>27
<small>por mês</small>
</div>
<div class="type text-type-responsive">
CATÁLOGO
</div> </div>
<ul> <ul>
<li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Cartão <span class="hide-in-cell">pessoal virtual</span></li> <li><i class="bi bi-plus-square-fill text-success"></i>1 Bio/Cartão <span class="hide-in-cell">pessoal virtual</span></li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li> <li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links</li>
<li><i class="bi bi-plus-square-fill text-success"></i>1 Página de produto</li>
<li><i class="bi bi-plus-square-fill text-success"></i>1 Link agendado **</li>
<li><i class="bi bi-square text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
<li><i class="bi bi-square text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
</ul>
<div class="pricing-footer">
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
</div>
</div>
</div>
</div>
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3">
<div class="db-wrapper">
<div class="db-pricing-eleven db-bk-color-two popular">
<div class="price text-price-responsive">
<sup>R$</sup>30
<small>por mês</small>
</div>
<div class="type text-type-responsive">
Super
</div>
<ul>
<li><i class="bi bi-plus-square-fill text-success"></i>300 Bio/Cartões <span class="hide-in-cell">pessoal virtual</span></li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links </li> <li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links </li>
<li><i class="bi bi-plus-square-fill text-success"></i>300 Produtos</li> <li><i class="bi bi-plus-square-fill text-success"></i>Links de Produtos</li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Use links</span> agendados **</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li> <li><i class="bi bi-plus-square-fill text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
@*
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li> <li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
*@
</ul> </ul>
<div class="pricing-footer"> <div class="pricing-footer">
@if (User.Identity.IsAuthenticated)
{
<button type="button" class="btn db-button-color-square btn-lg" onclick="waitingDialog.show('Custom message');window.location.href = '/Pay/?plan=catalogo';">Assinar</button>
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a> @*
</div> <a href="/Pay/?plan=catalogo" class="btn db-button-color-square btn-lg">Assinar</a>
</div> *@
</div> }
</div> else
<div class="col-3 col-xs-3 col-sm-3 col-md-3 col-lg-3"> {
<div class="db-wrapper"> <a href="/Login" class="btn db-button-color-square btn-lg">Login / Registro</a>
<div class="db-pricing-eleven db-bk-color-three"> }
<div class="price text-price-responsive">
<sup>R$</sup>55
<small>por mês</small>
</div>
<div class="type text-type-responsive">
Empresas
</div>
<ul>
<li><i class="bi bi-plus-square-fill text-success"></i>300 Bio/Cartões <span class="hide-in-cell">pessoal virtual</span></li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Exibir cartão </span>Whatsapp *</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Sem limite de links </li>
<li><i class="bi bi-plus-square-fill text-success"></i>300 Produtos</li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Use links</span> agendados **</li>
<li><i class="bi bi-plus-square-fill text-success"></i>Contador<span class="hide-in-cell"> de visualizações</span> </li>
<li><i class="bi bi-plus-square-fill text-success"></i><span class="hide-in-cell">Registro de contatos</span> </li>
</ul>
<div class="pricing-footer">
<a href="#" class="btn db-button-color-square btn-lg">Assinar</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -11,15 +11,15 @@ License: MIT
BACKGROUND COLORS BACKGROUND COLORS
============================================================*/ ============================================================*/
.db-bk-color-one { .db-bk-color-one {
background-color: #e1f2e6; background-color: #A9B595;
} }
.db-bk-color-two { .db-bk-color-two {
background-color: burlywood; background-color: #B9CEA0;
} }
.db-bk-color-three { .db-bk-color-three {
background-color: darkseagreen; background-color: #97A47E;
} }
.db-bk-color-six { .db-bk-color-six {
@ -51,6 +51,7 @@ BACKGROUND COLORS
margin-top: 50px; margin-top: 50px;
text-align: center; text-align: center;
box-shadow: 0 0 5px rgba(0, 0, 0, .5); box-shadow: 0 0 5px rgba(0, 0, 0, .5);
border-radius: 7px 7px 7px 7px;
color: #101211; color: #101211;
line-height: 30px; line-height: 30px;
} }
@ -74,19 +75,19 @@ BACKGROUND COLORS
.db-pricing-eleven .price { .db-pricing-eleven .price {
background-color: rgba(0, 0, 0, 0.5); background-color: rgba(0, 0, 0, 0);
color: #FFFFFF; color: #FFFFFF;
} }
.db-pricing-eleven .price small { .db-pricing-eleven .price small {
color: #B8B8B8; color: #63783F;
display: block; display: block;
font-size: 12px; font-size: 12px;
margin-top: 22px; margin-top: 22px;
} }
.db-pricing-eleven .type { .db-pricing-eleven .type {
background-color: #52E89E; background-color: #63783F;
padding: 50px 20px; padding: 50px 20px;
font-weight: 900; font-weight: 900;
text-transform: uppercase; text-transform: uppercase;

View File

@ -0,0 +1,10 @@
@model ChangeViewModel
@{
ViewBag.Title = "OrederStatus";
}
<h2>Order Status</h2>
<p>@ViewBag.Status</p>
<h4>Email</h4>
<p>@ViewBag.Email</p>

View File

@ -0,0 +1,77 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
@section Scripts {
<script src="https://js.stripe.com/v3/"></script>
<script>
var stripe = Stripe('Your Secret key');
var elements = stripe.elements();
var style = {
base: {
fontSize: '16px',
color: '#32325d',
},
};
var card = elements.create('card', { style: style });
card.mount('#card-element');
var form = document.getElementById('payment-form');
form.addEventListener('submit', function (event) {
event.preventDefault();
stripe.createToken(card).then(function (result) {
if (result.error) {
var errorElement = document.getElementById('card-errors');
errorElement.textContent = result.error.message;
} else {
stripeTokenHandler(result.token);
}
});
});
function stripeTokenHandler(token) {
var form = document.getElementById('payment-form');
var hiddenInput = document.createElement('input');
hiddenInput.setAttribute('type', 'hidden');
hiddenInput.setAttribute('name', 'stripeToken');
hiddenInput.setAttribute('value', token.id);
form.appendChild(hiddenInput);
form.submit();
}
</script>
}
<form action="/cart/Create" method="post" id="payment-form">
<div class="col-sm-6">
<div class="panel panel-success">
<div class="panel-heading">
Credit Card Information
</div>
<div class="panel-body">
<div class="form-horizontal">
<div class="form-group">
<div class="col-sm-8">
<input type="number" class="form-control" name="Amount" placeholder="Amount" required />
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
<input type="text" class="form-control" name="Currency" value="INR" readonly />
</div>
</div>
<div class="form-group">
<div class="col-sm-8">
<input type="text" class="form-control" name="Description" placeholder="Description" required />
</div>
</div>
<div id="card-element">
</div>
<div id="card-errors" role="alert"></div>
</div>
<br />
<input type="submit" value="Submit Payment" />
</div>
</div>
</div>
</form>

View File

@ -0,0 +1,44 @@
@*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
*@
@{
}
@section Scripts {
<script src="https://js.stripe.com/v3/"></script>
<script>
// This is your test secret API key.
const stripe = Stripe("pk_test_51PvIzkBk8jHwC3c0efDBJMY9dBwNqs0SDAHP0vIQr17G9iYg4GQtIrCOh2N9teJoYDXUHTWe6iEHnUylMntwhbin00R7y6lQOV");
initialize();
// Create a Checkout Session
async function initialize() {
const payPlan = get('plan');
const fetchClientSecret = async () => {
const response = await fetch("/Pay" + payPlan, {
method: "POST",
});
const { clientSecret } = await response.json();
return clientSecret;
};
const checkout = await stripe.initEmbeddedCheckout({
fetchClientSecret,
});
// Mount Checkout
checkout.mount('#checkout');
}
function get(name) {
if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
return decodeURIComponent(name[1]);
}
</script>
}
<div id="checkout">
<!-- Checkout will insert the payment form here -->
</div>

View File

@ -4,7 +4,7 @@
@{ @{
} }
<li class="nav-item dropdown"> <li class="nav-item dropdown" style="display: none">
<a class="nav-link text-white dropdown-toggle" href="#" id="languageDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link text-white dropdown-toggle" href="#" id="languageDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-book"></i>&nbsp;&nbsp;Idioma - @Context.Request.Cookies["Language"] <i class="bi bi-book"></i>&nbsp;&nbsp;Idioma - @Context.Request.Cookies["Language"]
</a> </a>

View File

@ -5,19 +5,19 @@
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - VCart</title> <title>@ViewData["Title"] - Blinks</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" /> <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/VCart.styles.css" asp-append-version="true" /> <link rel="stylesheet" href="~/Blinks.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
@await RenderSectionAsync("Style", required: false) @await RenderSectionAsync("Styles", required: false)
</head> </head>
<body class="hide-body"> <body class="hide-body">
<partial name="_Busy" /> <partial name="_Busy" />
<div id="wrapper"> <div id="wrapper">
<nav id="nav-bar" class="navbar navbar-expand-lg navbar-dark"> <nav id="nav-bar" class="navbar navbar-expand-lg navbar-dark">
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">VCart</a> <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Blinks</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
@ -33,7 +33,7 @@
<a class="nav-link text-white" asp-area="" asp-controller="Plans" asp-action="Index">Planos</a> <a class="nav-link text-white" asp-area="" asp-controller="Plans" asp-action="Index">Planos</a>
</li> </li>
</ul> </ul>
@if (!User.Identity.IsAuthenticated) @if (User!=null && User.Identity!=null && !User.Identity.IsAuthenticated)
{ {
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<partial name="_Language" /> <partial name="_Language" />
@ -45,10 +45,10 @@
else else
{ {
<ul class="navbar-nav ml-auto"> <ul class="navbar-nav ml-auto">
<partial name="_Language" /> <partial name="_Language"/>
<li class="nav-item dropdown" style="margin-right: 10px"> <li class="nav-item dropdown" style="margin-right: 10px">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-person"></i> @User.FindFirst("FullName").Value <i class="bi bi-person"></i> @(User.FindFirst("FullName")!=null ? User.FindFirst("FullName").Value : "N/A")
</a> </a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown"> <div class="dropdown-menu" aria-labelledby="navbarDropdown">
<a class="dropdown-item" asp-area="" asp-controller="Login" asp-action="Logout">Sair</a> <a class="dropdown-item" asp-area="" asp-controller="Login" asp-action="Logout">Sair</a>
@ -80,18 +80,21 @@
<footer class="border-top footer text-muted"> <footer class="border-top footer text-muted">
<div class="container"> <div class="container">
&copy; 2024 - VCart - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a> &copy; 2024 - Blinks - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div> </div>
</footer> </footer>
</div> </div>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct" crossorigin="anonymous"></script>
<script src="~/js/site.js" asp-append-version="true"></script> <script src="~/js/site.js" asp-append-version="true"></script>
<script type="text/javascript" > <script src="~/js/wait.js" asp-append-version="true"></script>
<script type="text/javascript">
$(function () { $(function () {
$(document).ready(function () { $(document).ready(function () {
$('.loading').hide(); $('.loading').hide();
//$('body').fadeIn(1000);
$('body').slideDown('slow');
}); });
$('a[href="#search"]').on('click', function (event) { $('a[href="#search"]').on('click', function (event) {
@ -110,12 +113,6 @@
} }
}); });
//Do not include! This prevents the form from submitting for DEMO purposes only!
$('form').submit(function (event) {
event.preventDefault();
return false;
})
$(window).on('beforeunload', function () { $(window).on('beforeunload', function () {
displayBusyIndicator(); displayBusyIndicator();
}); });
@ -143,20 +140,20 @@
$('ul.navbar-nav').find('a[href="' + location.pathname + '"]') $('ul.navbar-nav').find('a[href="' + location.pathname + '"]')
.closest('a') .closest('a')
.removeClass('text-white') .removeClass('text-white')
.addClass('text-red'); .addClass('text-black');
} }
function searchActive() { function searchActive() {
$('#searchLi').addClass("active"); $('#searchLi').addClass("active");
$('#searchLi > a') $('#searchLi > a')
.removeClass('text-white') .removeClass('text-white')
.addClass('text-red'); .addClass('text-black');
} }
function searchInactive() { function searchInactive() {
$('#searchLi').removeClass("active"); $('#searchLi').removeClass("active");
$('#searchLi > a') $('#searchLi > a')
.removeClass('text-red') .removeClass('text-black')
.addClass('text-white'); .addClass('text-white');
} }
@ -167,18 +164,16 @@
$('ul.navbar-nav').find('a[href="' + location.pathname + '"]') $('ul.navbar-nav').find('a[href="' + location.pathname + '"]')
.closest('a') .closest('a')
.removeClass('text-red') .removeClass('text-black')
.addClass('text-white'); .addClass('text-white');
} }
function displayBusyIndicator() { function displayBusyIndicator() {
setTimeout(function () { //$('body').fadeOut(1000);
$('#wrapper').fadeOut('slow'); $('body').slideUp('slow');
$('.loading').show();
}, 5000);
} }
$(".hide-body").fadeOut(2000); //$(".hide-body").fadeOut(2000);
}); });
</script> </script>
@await RenderSectionAsync("Scripts", required: false) @await RenderSectionAsync("Scripts", required: false)

View File

@ -13,12 +13,16 @@ a {
.btn-primary { .btn-primary {
color: #fff; color: #fff;
background-color: #1b6ec2; background-color: #63783F;
border-color: #1861ac; border-color: #1861ac;
} }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { .nav-pills .nav-link.active, .nav-pills .show > .nav-link {
/*
color: #fff; color: #fff;
*/
color: black !important;
background-color: #1b6ec2; background-color: #1b6ec2;
border-color: #1861ac; border-color: #1861ac;
} }
@ -116,7 +120,7 @@ button.accept-policy {
} }
.btn-primary { .btn-primary {
background-color: #00ff21; background-color: #63783F;
} }
.navbar-inner { .navbar-inner {
@ -156,22 +160,36 @@ button.accept-policy {
} }
} }
.navbar .navbar-collapse ul.navbar-nav .nav-item.active { .navbar .navbar-collapse ul.navbar-nav .nav-item {
color: white; padding-left: 3px;
background-color: #00ff21 !important; padding-right: 3px;
} }
a.nav-link.text-white { .navbar .navbar-collapse ul.navbar-nav .nav-item.active {
background-color: green; color: white;
padding-left: 3px;
padding-right: 3px;
background-color: #C7CCB8 !important;
border-radius: 7px 7px 7px 7px;
/*
background-color: #b8f2a1 !important;
*/
}
a.nav-link.text-black {
color: black !important;
} }
nav.link .active { nav.link .active {
background-color: red; color: black !important;
color: darkgreen;
} }
#nav-bar { #nav-bar {
background-color: darkgreen; background-color: #63783F
/* background-color: #darkgreen;
*/
} }
#searchLi > a { #searchLi > a {
@ -183,6 +201,10 @@ nav.link .active {
color: darkred; color: darkred;
} }
.text-black {
color: black !important;
}
.btn.green { .btn.green {
background-color: darkgreen; background-color: darkgreen;
color: white; color: white;

View File

@ -11,7 +11,7 @@
<html> <html>
<head> <head>
<title>VCart</title> <title>Blinks</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.1/css/all.css" integrity="sha384-gfdkjb5BdAXd+lj+gudLWI+BXq4IuLW5IT+brZEZsLFm++aCMlF1V92rMkPaX4PP" crossorigin="anonymous">

View File

@ -1,4 +1,4 @@
@using VCart @using Blinks
@* @*
For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860 For more information on enabling MVC for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
@ -7,7 +7,7 @@
ViewData["Title"] = "Form Example"; ViewData["Title"] = "Form Example";
} }
@section Style { @section Styles {
<style type="text/css"> <style type="text/css">
.bg-grayed { .bg-grayed {
background-color: #D8D8D8 background-color: #D8D8D8

View File

@ -1,3 +1,3 @@
@using VCart @using Blinks
@using VCart.Models @using Blinks.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@ -12,4 +12,4 @@
"SecretKey": "sua_secret_key_aqui", "SecretKey": "sua_secret_key_aqui",
"PublishableKey": "sua_publishable_key_aqui" "PublishableKey": "sua_publishable_key_aqui"
} }
} }

View File

@ -18,5 +18,6 @@ html {
} }
body { body {
margin-bottom: 60px; margin-bottom: 60px;
display: none;
} }

67
VCart/wwwroot/js/wait.js Normal file
View File

@ -0,0 +1,67 @@
/**
* Module for displaying "Waiting for..." dialog using Bootstrap
*
* @author Eugene Maslovich <ehpc@em42.ru>
*/
var waitingDialog = waitingDialog || (function ($) {
'use strict';
// Creating modal dialog's DOM
var $dialog = $(
'<div class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-hidden="true" style="padding-top:15%; overflow-y:visible;">' +
'<div class="modal-dialog modal-m">' +
'<div class="modal-content">' +
'<div class="modal-header"><h3 style="margin:0;"></h3></div>' +
'<div class="modal-body">' +
'<div class="progress progress-striped active" style="margin-bottom:0;"><div class="progress-bar" style="width: 100%"></div></div>' +
'</div>' +
'</div></div></div>');
return {
/**
* Opens our dialog
* @param message Custom message
* @param options Custom options:
* options.dialogSize - bootstrap postfix for dialog size, e.g. "sm", "m";
* options.progressType - bootstrap postfix for progress bar type, e.g. "success", "warning".
*/
show: function (message, options) {
// Assigning defaults
if (typeof options === 'undefined') {
options = {};
}
if (typeof message === 'undefined') {
message = 'Loading';
}
var settings = $.extend({
dialogSize: 'm',
progressType: '',
onHide: null // This callback runs after the dialog was hidden
}, options);
// Configuring dialog
$dialog.find('.modal-dialog').attr('class', 'modal-dialog').addClass('modal-' + settings.dialogSize);
$dialog.find('.progress-bar').attr('class', 'progress-bar');
if (settings.progressType) {
$dialog.find('.progress-bar').addClass('progress-bar-' + settings.progressType);
}
$dialog.find('h3').text(message);
// Adding callbacks
if (typeof settings.onHide === 'function') {
$dialog.off('hidden.bs.modal').on('hidden.bs.modal', function (e) {
settings.onHide.call($dialog);
});
}
// Opening dialog
$dialog.modal();
},
/**
* Closes dialog
*/
hide: function () {
$dialog.modal('hide');
}
};
})(jQuery);