Skip to content

Commit

Permalink
Adding layouts; Adjusting error page;
Browse files Browse the repository at this point in the history
  • Loading branch information
lsantoss committed Dec 17, 2024
1 parent 1f0166c commit 745c175
Show file tree
Hide file tree
Showing 5 changed files with 160 additions and 26 deletions.
4 changes: 4 additions & 0 deletions src/POC.Rotativa.AspNetCore/Views/Customer/Index.cshtml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@using POC.Rotativa.AspNetCore.Models.Customer
@model IEnumerable<CustomerViewModel>

@{
Layout = "_LayoutReport";
}

<div class="container">
<table class="table-title-report">
<tr>
Expand Down
27 changes: 21 additions & 6 deletions src/POC.Rotativa.AspNetCore/Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,30 @@
<link rel="stylesheet" href="~/Rotativa.Net6.styles.css" asp-append-version="true" />
</head>
<body>
<div class="">
@RenderBody()
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand">Rotativa Asp.net Core</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</nav>
</header>

<footer>
<br />
<p>&copy; Lucas Santos - @DateTime.Now</p>
</footer>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>

<footer class="border-top footer text-muted">
<div class="container">
&copy; @DateTime.Now.Year - Rotativa Asp.net Core
</div>
</footer>

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
Expand Down
30 changes: 30 additions & 0 deletions src/POC.Rotativa.AspNetCore/Views/Shared/_LayoutReport.cshtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Rotativa Asp.net Core</title>
<link rel="shortcut icon" type="image/png" href="~/images/iconReport.png">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
<link rel="stylesheet" href="~/Rotativa.Net6.styles.css" asp-append-version="true" />
<link rel="stylesheet" href="~/css/report.css" />
</head>
<body>
<div class="">
@RenderBody()

<footer>
<br />
&copy; @DateTime.Now.Year - Rotativa Asp.net Core
</footer>
</div>

<script src="~/lib/jquery/dist/jquery.min.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>

@await RenderSectionAsync("Scripts", required: false)
</body>
</html>
34 changes: 34 additions & 0 deletions src/POC.Rotativa.AspNetCore/wwwroot/css/report.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
body {
padding-top: 50px;
padding-bottom: 20px;
}

.body-content {
padding-left: 15px;
padding-right: 15px;
}

.container {
margin-top: -5%;
}

.table-title-report {
width: 100%;
background-color: #A3CFEC;
}

.td-iconReport {
width: 20%;
padding: 1%;
}

.img-iconReport {
width: 75px;
}

thead {
background-color: #A3CFEC;
border-bottom: solid;
border-bottom-color: black;
font-size: 140%;
}
91 changes: 71 additions & 20 deletions src/POC.Rotativa.AspNetCore/wwwroot/css/site.css
Original file line number Diff line number Diff line change
@@ -1,34 +1,85 @@
html {
font-size: 14px;
}

@media (min-width: 768px) {
html {
font-size: 16px;
}
}

html {
position: relative;
min-height: 100%;
}

body {
padding-top: 50px;
padding-bottom: 20px;
margin-bottom: 60px;
}

a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}

a {
color: #0077cc;
}

.body-content {
padding-left: 15px;
padding-right: 15px;
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}

.container {
margin-top: -5%;
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}

.table-title-report {
.border-top {
border-top: 1px solid #e5e5e5;
}

.border-bottom {
border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
font-size: 1rem;
line-height: inherit;
}

.footer {
position: absolute;
bottom: 0;
width: 100%;
background-color: #A3CFEC;
white-space: nowrap;
line-height: 60px;
}

.td-iconReport {
width: 20%;
padding: 1%;
td {
vertical-align: middle;
}

.img-iconReport {
width: 75px;
#div-loader {
display: none;
z-index: 99999;
position: absolute;
height: auto;
width: auto;
margin-top: 300px;
margin-left: 50%;
text-align: center;
}

thead {
background-color: #A3CFEC;
border-bottom: solid;
border-bottom-color: black;
font-size: 140%;
}
#loader {
height: 60px;
width: 60px;
}

0 comments on commit 745c175

Please sign in to comment.