Commit 0b81fc79 authored by Vipul Basapati's avatar Vipul Basapati

Changes in Template styling and usage of non-static values in template.blade.php

parent 1099ed05
...@@ -43,13 +43,15 @@ class UserNeedsConfirmation extends Notification ...@@ -43,13 +43,15 @@ class UserNeedsConfirmation extends Notification
/** /**
* Get the mail representation of the notification. * Get the mail representation of the notification.
* *
* @param mixed $notifiable * @param \App\Models\Access\User\User $user
* *
* @return \Illuminate\Notifications\Messages\MailMessage * @return \Illuminate\Notifications\Messages\MailMessage
*/ */
public function toMail($notifiable) public function toMail($user)
{ {
$confirmation_url = route('frontend.auth.account.confirm', $user->confirmation_code);
return (new MailMessage()) return (new MailMessage())
->view('emails.template'); ->view('emails.template', compact('confirmation_url'));
} }
} }
...@@ -115,7 +115,7 @@ class UserRepository extends BaseRepository ...@@ -115,7 +115,7 @@ class UserRepository extends BaseRepository
$user->confirmed = 1; $user->confirmed = 1;
} }
DB::transaction(function () use ($user) { DB::transaction(function () use ($user, $provider) {
if ($user->save()) { if ($user->save()) {
/* /*
...@@ -130,8 +130,6 @@ class UserRepository extends BaseRepository ...@@ -130,8 +130,6 @@ class UserRepository extends BaseRepository
* Assigned permissions to user * Assigned permissions to user
*/ */
$user->permissions()->sync($permissions); $user->permissions()->sync($permissions);
}
});
/* /*
* If users have to confirm their email and this is not a social account, * If users have to confirm their email and this is not a social account,
...@@ -142,6 +140,8 @@ class UserRepository extends BaseRepository ...@@ -142,6 +140,8 @@ class UserRepository extends BaseRepository
if (config('access.users.confirm_email') && $provider === false) { if (config('access.users.confirm_email') && $provider === false) {
$user->notify(new UserNeedsConfirmation($user->confirmation_code)); $user->notify(new UserNeedsConfirmation($user->confirmation_code));
} }
}
});
/* /*
* Return the user object * Return the user object
......
...@@ -104,7 +104,7 @@ return [ ...@@ -104,7 +104,7 @@ return [
/* /*
* Whether or not the user has to confirm their email when signing up * Whether or not the user has to confirm their email when signing up
*/ */
'confirm_email' => false, 'confirm_email' => true,
/* /*
* Whether or not the users email can be changed on the edit profile screen * Whether or not the users email can be changed on the edit profile screen
......
# humanstxt.org/
# The humans responsible & technology colophon
# TEAM
<name> -- <role> -- <twitter>
# THANKS
<name>
# TECHNOLOGY COLOPHON
CSS3, HTML5
Apache Server Configs, jQuery, Modernizr, Normalize.css
...@@ -3,228 +3,81 @@ ...@@ -3,228 +3,81 @@
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css" rel="stylesheet" media="all"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
/* Media Queries */ <style>
@media only screen and (max-width: 500px) { body {
.button { background-color: #495867;
width: 100% !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23a594c1' fill-opacity='0.4'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
} }
} .container {
.button{ margin-top: 25px;
font-family: Avenir, Helvetica, sans-serif; font-family: "Fira Sans", Raleway,sans-serif;
box-sizing: border-box; color: #333;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16); background: #fff;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
display: inline-grid;
width: 200px;
min-height: 20px;
padding: 10px;
background-color: #3869D4;
border-radius: 3px;
color: #ffffff;
font-size: 15px;
line-height: 25px;
text-align: center;
text-decoration: none;
-webkit-text-size-adjust: none;
}
.confirm{
padding:10px 35px;
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
text-align: left;
margin-left: 300px;
color: #74787E;
font-size: 16px;
display: block;
}
/* Body Tag */
body{
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
color: #74787E;
height: 100%;
hyphens: auto;
line-height: 0px;
margin: 0;
padding: 0;
width: 100%;
background-color: #F2F4F6;
-moz-hyphens: auto;
-ms-word-break: break-all;
-webkit-hyphens: auto;
-webkit-text-size-adjust: none;
word-break: break-word;
}
/* paragraph */
p.link{
text-align: center;
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
}
p.thnx{
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
text-align: left;
margin-top: 0;
color: #74787E;
font-size: 16px;
margin-left: 330px;
line-height: 1.5em;
} }
p.regards{ .container .content {
font-family: Avenir, Helvetica, sans-serif; padding: 10px 10px 25px 50px;
box-sizing: border-box;
text-align: left;
margin-top: 0;
color: #74787E;
font-size: 16px;
margin-left: 330px;
line-height: 1.5em;
} }
p.promotion{ .container .display-5 {
font-family: Avenir, Helvetica, sans-serif; padding-top: 50px;
box-sizing: border-box;
text-align: left;
margin-top: 0;
color: #74787E;
font-size: 14px;
margin-left: 330px;
line-height: 1.5em;
} }
p.promoLink{ .container .btn {
font-family: Avenir, Helvetica, sans-serif; border-radius: 0;
box-sizing: border-box;
text-align: left;
margin-top: 0;
color: #74787E;
font-size: 12px;
line-height: 1.5em;
margin-left: 330px;
}
p.copyright{
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
text-align: center;
margin-top: 0;
color: #74787E;
font-size: 12px;
line-height: 1.5em;
margin-left: 0px;
} }
/* anchor tag */ .container .companyTitle a{
a#title { color: #333;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
color: #2F3133;
text-decoration: none; text-decoration: none;
text-shadow: 0 1px 0 white;
} }
a#link{ .container .link {
text-align: center; text-align: center;
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
box-sizing: border-box;
box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
display: inline-block;
width: 200px;
min-height: 20px;
padding: 10px;
background-color: #3869D4;
border-radius: 3px;
color: #ffffff; font-size: 15px;
line-height: 25px;
text-align: center;
text-decoration: none;
-webkit-text-size-adjust: none;
}
a#promoLink{
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
color: #3869D4;
font-size: 14px;
}
a#copyright{
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
color: #3869D4;
line-height: 15em;
}
/* header tag */
h1.title{
padding: 25px 0;
text-align:center;
}
h1.greatings{
box-sizing: border-box;
font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif;
padding: 35px 35px 0 35px;
font-family: Avenir, Helvetica, sans-serif;
box-sizing: border-box;
margin-left: 300px;
color: #2F3133;
font-size: 19px;
font-weight: bold;
text-align: left;
line-height: 1.6;
display: block;
} }
</style> </style>
</head> </head>
<body> <body>
<h1 class="title"> <div class="container">
<a id="title" href="http://127.0.0.1:8001" target="_blank"> <h1 class="display-5 text-center companyTitle">
@yield('title', app_name()) <a href="{{ url('/') }}" target="_blank">
{{ app_name() }}
</a> </a>
</h1> </h1>
<h1 class="greatings">Hello!</h1> <div class="content">
<h2>Hello!</h2>
<p class="confirm">Click here to confirm your account:</p> <p class="text-muted">Click here to confirm your account:</p>
<p class="link"> <p class="link">
<a href="http://127.0.0.1:8001/account/confirm/a1eab89c40867053f04184e542a133c2" class="button" target="_blank"> <a href="{{ $confirmation_url }}" class="btn btn-lg btn-primary" target="_blank">
Confirm Account Confirm Account
</a> </a>
</p> </p>
<p class="thnx">Thank you for using our application!</p> <p class="text-muted">Thank you for using our application!</p>
<p class="regards">Regards,<br>Laravel Admin Panel</p> <p class="text-muted">Regards,<br>Laravel Admin Panel</p>
<p class="promotion"> <p class="text-muted small">
If you’re having trouble clicking the "Confirm Account" button, copy and paste the URL <br> below into your web browser: If you’re having trouble clicking the "Confirm Account" button, copy and paste the URL <br> below into your web browser:
</p> </p>
<p class="promoLink"> <p class="small">
<a id="promoLink" href="http://127.0.0.1:8001/account/confirm/a1eab89c40867053f04184e542a133c2" target="_blank"> <a href="{{ $confirmation_url }}" target="_blank">
http://127.0.0.1:8001/account/confirm/a1eab89c40867053f04184e542a133c2 {{ $confirmation_url }}
</a> </a>
</p> </p>
<p class="copyright"> <p class="copyright small text-sm-center">
© 2018 <a id="copyright" href="http://127.0.0.1:8001" target="_blank">@yield('title', app_name())</a>. ©2018 <a href="{{ url('/') }}" target="_blank">@yield('title', app_name())</a>.
All Rights Reserved. All Rights Reserved.
</p> </p>
</div>
</div>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment