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
4a9ad588
Commit
4a9ad588
authored
Jun 20, 2023
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
styles, toggle auth blocks
parent
9d2e8278
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
15 deletions
+88
-15
common.css
src/public/assets/css/common.css
+18
-2
login.js
src/public/assets/js/login.js
+41
-0
create.blade.php
src/resources/views/user/create.blade.php
+1
-1
login.blade.php
src/resources/views/user/login.blade.php
+28
-12
No files found.
src/public/assets/css/common.css
View file @
4a9ad588
...
@@ -11,14 +11,16 @@
...
@@ -11,14 +11,16 @@
text-align
:
right
;
text-align
:
right
;
}
}
.btn-google
.btn-google
,
.btn-email
{
{
color
:
#545454
;
color
:
#545454
;
background-color
:
#ffffff
;
background-color
:
#ffffff
;
box-shadow
:
0
1px
2px
1px
#ddd
;
box-shadow
:
0
1px
2px
1px
#ddd
;
}
}
.btn-google
:focus
.btn-google
:focus
,
.btn-email
: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
);
...
@@ -36,3 +38,16 @@
...
@@ -36,3 +38,16 @@
border-radius
:
8px
!important
;
border-radius
:
8px
!important
;
}
}
.b-email
,
.b-social
{
//
transition
:
all
1s
ease-out
;
//
animation
:
3s
linear
1s
slidein
;
}
.b-email.m-hide
,
.b-social.m-hide
{
display
:
none
;
}
\ No newline at end of file
src/public/assets/js/login.js
View file @
4a9ad588
...
@@ -3,4 +3,44 @@
...
@@ -3,4 +3,44 @@
console
.
log
(
'AAA login page'
);
console
.
log
(
'AAA login page'
);
const
select
=
(
el
,
all
=
false
)
=>
{
el
=
el
.
trim
()
if
(
all
)
{
return
[...
document
.
querySelectorAll
(
el
)]
}
else
{
return
document
.
querySelector
(
el
)
}
}
const
on
=
(
type
,
el
,
listener
,
all
=
false
)
=>
{
let
selectEl
=
select
(
el
,
all
)
if
(
selectEl
)
{
if
(
all
)
{
selectEl
.
forEach
(
e
=>
e
.
addEventListener
(
type
,
listener
))
}
else
{
selectEl
.
addEventListener
(
type
,
listener
)
}
}
}
let
email
=
select
(
'.b-email'
);
let
social
=
select
(
'.b-social'
);
function
ToggleAuthBlock
()
{
email
.
classList
.
toggle
(
'm-hide'
);
social
.
classList
.
toggle
(
'm-hide'
);
}
on
(
'click'
,
'.btn-email'
,
function
(
e
)
{
ToggleAuthBlock
();
});
on
(
'click'
,
'.b-email_back'
,
function
(
e
)
{
ToggleAuthBlock
();
});
})()
})()
\ No newline at end of file
src/resources/views/user/create.blade.php
View file @
4a9ad588
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<div class='container'>
<div class='container'>
<div class="
row
justify
-
content
-
center
">
<div class="
row
justify
-
content
-
center
">
<div class="
col
-
4
text
-
center
">
<div class="
col
-
12
col
-
sm
-
10
col
-
lg
-
4
text
-
center
">
<h4>Регiстрацiя</h4>
<h4>Регiстрацiя</h4>
...
...
src/resources/views/user/login.blade.php
View file @
4a9ad588
...
@@ -14,10 +14,32 @@
...
@@ -14,10 +14,32 @@
<
section
>
<
section
>
<
div
class
='
container
'>
<
div
class
='
container
'>
<div class="row justify-content-center">
<div class="text-center">
<div class="col-4 text-center">
<h4>Авторизацiя</h4>
<h4>Авторизацiя</h4>
</div>
<div class="b-social row justify-content-center">
<div class="col-12 col-sm-10 col-lg-6 text-center">
<div>
<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 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
') }}">
<form method="post" action="{{ route('
login
') }}">
...
@@ -32,17 +54,11 @@
...
@@ -32,17 +54,11 @@
<label for='
password
'
>
Password
</
label
>
<label for='
password
'
>
Password
</
label
>
<
input
class
="
form
-
control
" type="
password
" id="
password
" name="
password
">
<
input
class
="
form
-
control
" type="
password
" id="
password
" name="
password
">
</div>
</div>
<br>
<div class="form-group">
<div class="
form
-
group
d
-
flex
justify
-
content
-
between
">
<a class="
b
-
email_back
" href="
#">Назад</a>
<
button
type
=
"submit"
class
="
btn
btn
-
primary
">Войти</button>
<
button
type
=
"submit"
class
="
btn
btn
-
primary
">Войти</button>
</div>
</div>
<a class="btn btn-google" href="{{ route('
login
.
google
'
)
}}
"><img src="
https
://
img
.
icons8
.
com
/
color
/
16
/
000000
/
google
-
logo
.
png
"> Sign in with Google</a>
<div>
@signInWithApple("
black
", true, "
sign
-
in
", 10)
</div>
</form>
</form>
</div>
</div>
...
...
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