Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
L
laravel-test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
laravel-test
Commits
70515ced
Commit
70515ced
authored
Jun 21, 2023
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header nav-panel edit
parent
4a9ad588
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
132 additions
and
59 deletions
+132
-59
Controller.php
src/app/Http/Controllers/Controller.php
+0
-0
UserController.php
src/app/Http/Controllers/UserController.php
+0
-2
common.css
src/public/assets/css/common.css
+13
-9
style.css
src/public/assets/css/style.css
+11
-4
login.js
src/public/assets/js/login.js
+3
-0
main.js
src/public/assets/js/main.js
+21
-0
layout.blade.php
src/resources/views/layouts/layout.blade.php
+30
-2
login.blade.php
src/resources/views/user/login.blade.php
+49
-41
web.php
src/routes/web.php
+5
-1
No files found.
src/app/Http/Controllers/Controller.php
100755 → 100644
View file @
70515ced
File mode changed from 100755 to 100644
src/app/Http/Controllers/UserController.php
View file @
70515ced
...
@@ -59,8 +59,6 @@ class UserController extends Controller
...
@@ -59,8 +59,6 @@ class UserController extends Controller
return
redirect
()
->
back
()
->
with
(
'error'
,
'Sittings saving error'
);
return
redirect
()
->
back
()
->
with
(
'error'
,
'Sittings saving error'
);
}
}
public
function
loginForm
()
{
public
function
loginForm
()
{
return
view
(
'user.login'
);
return
view
(
'user.login'
);
}
}
...
...
src/public/assets/css/common.css
View file @
70515ced
...
@@ -11,8 +11,15 @@
...
@@ -11,8 +11,15 @@
text-align
:
right
;
text-align
:
right
;
}
}
.b-auth-wrap
{
height
:
calc
(
100vh
-
160px
);
}
.btn-google
,
.btn-google
,
.btn-email
.btn-email
,
#sign-in-with-apple
{
{
color
:
#545454
;
color
:
#545454
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
...
@@ -20,25 +27,22 @@
...
@@ -20,25 +27,22 @@
}
}
.btn-google
:focus
,
.btn-google
:focus
,
.btn-email
:focus
.btn-email
:focus
,
#sign-in-with-apple
:focus
{
{
outline
:
0
;
outline
:
0
;
box-shadow
:
0
0
0
0.2rem
rgba
(
0
,
123
,
255
,
.25
);
box-shadow
:
0
0
0
0.2rem
rgba
(
0
,
123
,
255
,
.25
);
}
}
:not
(
.btn-check
)+
.btn-google
:active
{
border-color
:
transparent
;
}
#sign-in-with-apple
#sign-in-with-apple
{
{
display
:
inline
!important
;
padding
:
8px
!important
;
padding
:
10px
!important
;
border-color
:
#000
!important
;
border-radius
:
8px
!important
;
border-radius
:
8px
!important
;
color
:
#545454
!important
;
border
:
none
!important
;
}
}
.b-email
,
.b-email
,
.b-social
.b-social
{
{
...
...
src/public/assets/css/style.css
View file @
70515ced
...
@@ -117,7 +117,7 @@ h6 {
...
@@ -117,7 +117,7 @@ h6 {
# Header
# Header
--------------------------------------------------------------*/
--------------------------------------------------------------*/
#header
{
#header
{
transition
:
all
0.5s
;
/*transition: all 0.5s;*/
background
:
#fff
;
background
:
#fff
;
z-index
:
997
;
z-index
:
997
;
padding
:
15px
0
;
padding
:
15px
0
;
...
@@ -184,7 +184,7 @@ h6 {
...
@@ -184,7 +184,7 @@ h6 {
font-size
:
14px
;
font-size
:
14px
;
color
:
#16507b
;
color
:
#16507b
;
white-space
:
nowrap
;
white-space
:
nowrap
;
transition
:
0.3s
;
/*transition: 0.3s;*/
}
}
.navbar
a
i
,
.navbar
a
i
,
...
@@ -251,10 +251,17 @@ h6 {
...
@@ -251,10 +251,17 @@ h6 {
color
:
#2487ce
;
color
:
#2487ce
;
}
}
/*
.navbar .dropdown:hover>ul {
.navbar .dropdown:hover>ul {
opacity: 1;
opacity: 1;
top: 100%;
top: 100%;
visibility: visible;
visibility: visible;
}*/
.navbar
.dropdown
ul
.visible
{
opacity
:
1
;
top
:
100%
;
visibility
:
visible
;
}
}
.navbar
.dropdown
.dropdown
ul
{
.navbar
.dropdown
.dropdown
ul
{
...
@@ -300,10 +307,10 @@ h6 {
...
@@ -300,10 +307,10 @@ h6 {
.mobile-nav-toggle
{
.mobile-nav-toggle
{
display
:
block
;
display
:
block
;
}
}
/*
.navbar ul {
.navbar ul {
display: none;
display: none;
}
}
*/
}
}
.navbar-mobile
{
.navbar-mobile
{
...
...
src/public/assets/js/login.js
View file @
70515ced
...
@@ -33,11 +33,14 @@
...
@@ -33,11 +33,14 @@
}
}
on
(
'click'
,
'.btn-email'
,
function
(
e
)
{
on
(
'click'
,
'.btn-email'
,
function
(
e
)
{
e
.
preventDefault
();
ToggleAuthBlock
();
ToggleAuthBlock
();
});
});
on
(
'click'
,
'.b-email_back'
,
function
(
e
)
{
on
(
'click'
,
'.b-email_back'
,
function
(
e
)
{
e
.
preventDefault
();
ToggleAuthBlock
();
ToggleAuthBlock
();
});
});
...
...
src/public/assets/js/main.js
View file @
70515ced
...
@@ -271,5 +271,25 @@
...
@@ -271,5 +271,25 @@
* Initiate Pure Counter
* Initiate Pure Counter
*/
*/
new
PureCounter
();
new
PureCounter
();
// Клик по логину-почте:
const
navbarDropdown
=
document
.
querySelector
(
'#navbar .dropdown'
);
const
navbarDropdownUl
=
document
.
querySelector
(
'#navbar .dropdown ul'
);
if
(
navbarDropdownUl
)
{
document
.
addEventListener
(
'click'
,
(
e
)
=>
{
const
withinDropdown
=
e
.
composedPath
().
includes
(
navbarDropdown
);
const
withinBoundaries
=
e
.
composedPath
().
includes
(
navbarDropdownUl
);
if
(
withinDropdown
&&
!
withinBoundaries
)
{
e
.
preventDefault
();
navbarDropdownUl
.
classList
.
toggle
(
'visible'
);
}
else
if
(
!
withinBoundaries
)
{
navbarDropdownUl
.
classList
.
remove
(
'visible'
);
}
});
}
})()
})()
\ No newline at end of file
src/resources/views/layouts/layout.blade.php
View file @
70515ced
...
@@ -31,16 +31,44 @@
...
@@ -31,16 +31,44 @@
<h1
class=
"logo col-4"
><a
href=
"{{ route('home') }}"
>
{{ config('project.name') }}
</a></h1>
<h1
class=
"logo col-4"
><a
href=
"{{ route('home') }}"
>
{{ config('project.name') }}
</a></h1>
<nav
id=
"navbar"
class=
"navbar"
>
<ul>
@auth
@php
$email = auth()->user()->email;
//$email_brief = 'aa.chaplyginchaplyginchaplyginchaplyginchaplyginchaplygin@gmail.com';
$email_brief = (strlen($email) > 30) ? substr_replace($email, '...', 5, 25) : $email;
@endphp
<li
class=
"dropdown"
><a
href=
"#"
><span
class=
"fw-bold"
>
{{ $email_brief }}
</span>
<i
class=
"bi bi-chevron-down"
></i></a>
<ul>
<li><a
href=
"{{ url('settings') }}"
>
Налаштування
</a></li>
<li><a
href=
"{{ route('logout') }}"
>
Вийти
</a></li>
</ul>
</li>
@endauth
@guest
<li><a
class=
"getstarted"
href=
"{{ route('login.create') }}"
>
Увiйти
</a></li>
@endguest
</ul>
</nav>
<!-- .navbar -->
<?php
/* ?>
<div class="b-header-menu col-4">
<div class="b-header-menu col-4">
@auth
@auth
<a
class=
""
href=
"{{ url('settings') }}"
>
Налаштування
</a>
<a class="" href="{{ url('settings') }}">Налаштування</a>
|
<a class="" href="{{ route('logout') }}">Вийти</a>
<a class="" href="{{ route('logout') }}">Вийти</a>
@endauth
@endauth
@guest
@guest
<a
class=
""
href=
"{{ route('login.create') }}"
>
Вхiд
</a>
<a class="" href="{{ route('login.create') }}">Вхiд</a>
|
<a class="" href="{{ route('register.create') }}">Регiстрацiя</a>
<a class="" href="{{ route('register.create') }}">Регiстрацiя</a>
@endguest
@endguest
</div>
</div>
<?php */
?>
@yield('head_content')
@yield('head_content')
...
...
src/resources/views/user/login.blade.php
View file @
70515ced
...
@@ -14,56 +14,64 @@
...
@@ -14,56 +14,64 @@
<
section
>
<
section
>
<
div
class
='
container
'>
<
div
class
='
container
'>
<div class="text-center">
<div class="b-auth-wrap d-flex row align-items-center justify-content-center">
<h4>Авторизацiя</h4>
</div>
<div class="b-social row justify-content-center">
<div>
<div class="col-12 col-sm-10 col-lg-6 text-center">
<div class="text-center">
<div>
<h4>Авторизацiя</h4>
<div class="row">
<a class="btn btn-google" href="{{ route('
login
.
google
') }}" role="button"><img src="https://img.icons8.com/color/16/000000/google-logo.png"> Sign in with Google</a>
</div>
<br>
<div class="row">
@signInWithApple("white", true, "sign-in", 10)
</div>
<br>
<div class="row">
<a class="btn btn-email" href="#" role="button">Продолжить с помощью e-mail</a>
</div>
</div>
</div>
</div>
</div>
<div class="b-email row justify-content-center m-hide">
<div class="col-12 col-sm-10 col-lg-6 text-center">
<form method="post" action="{{ route('
login
') }}">
@csrf
<div class="b-social row justify-content-center">
<div class="col-12 col-sm-10 col-lg-6 text-center">
<div class="form-group">
<div>
<label for='
email
'>Email address</label>
<div class="row">
<input class="form-control" type="email" id="email" name="email" value="{{ old('
email
') }}">
<a class="btn btn-google" href="{{ route('
login
.
google
') }}" role="button"><img src="https://img.icons8.com/color/16/000000/google-logo.png"> Sign in with Google</a>
</div>
<br>
<div class="row b-social_apple">
@signInWithApple("white", true, "sign-in", 10)
</div>
<br>
<div class="row">
<a class="btn btn-email" href="#" role="button">Продовжити за допомогою e-mail</a>
</div>
</div>
</div>
</div>
<div class="form-group">
</div>
<label for='
password
'
>
Password
</
label
>
<
input
class
="
form
-
control
" type="
password
" id="
password
" name="
password
">
<div class="b-email row justify-content-center m-hide">
</div>
<div class="col-12 col-sm-10 col-lg-6 text-center">
<br>
<div class="
form
-
group
d
-
flex
justify
-
content
-
between
">
<form method="post" action="{{ route('
login
') }}">
<a class="
b
-
email_back
" href="
#">Назад</a>
<
button
type
=
"submit"
class
="
btn
btn
-
primary
">Войти</button>
@csrf
<div class="form-group">
<label for='
email
'>Email address</label>
<input class="form-control" type="email" id="email" name="email" value="{{ old('
email
') }}">
</div>
<div class="form-group">
<label for='
password
'
>
Password
</
label
>
<
input
class
="
form
-
control
" type="
password
" id="
password
" name="
password
">
</div>
<br>
<div class="
form
-
group
d
-
flex
justify
-
content
-
between
">
<a class="
b
-
email_back
" href="
#">Назад</a>
<
button
type
=
"submit"
class
="
btn
btn
-
primary
">Войти</button>
</div>
</form>
</div>
</div>
</
form
>
</
div
>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</section>
...
...
src/routes/web.php
View file @
70515ced
...
@@ -17,11 +17,15 @@ use Laravel\Socialite\Facades\Socialite;
...
@@ -17,11 +17,15 @@ use Laravel\Socialite\Facades\Socialite;
|
|
*/
*/
Route
::
get
(
'/test'
,
function
()
{
return
view
(
'test'
);
});
Route
::
get
(
'/'
,
function
()
{
Route
::
get
(
'/'
,
function
()
{
return
view
(
'home'
);
return
view
(
'home'
);
})
->
name
(
'home'
);
})
->
name
(
'home'
);
Route
::
group
([
'middleware'
=>
'guest'
],
function
(){
Route
::
group
([
'middleware'
=>
'guest'
],
function
(){
Route
::
get
(
'/register'
,
[
UserController
::
class
,
'create'
])
->
name
(
'register.create'
);
Route
::
get
(
'/register'
,
[
UserController
::
class
,
'create'
])
->
name
(
'register.create'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment