Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
lovelace
webLovelace
Commits
6a082191
Commit
6a082191
authored
Mar 14, 2017
by
Alejandro E. Rendon
Browse files
Added Google Analytics Script
parent
65bb43a7
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/js/analytics.js
0 → 100644
View file @
6a082191
(
function
(
i
,
s
,
o
,
g
,
r
,
a
,
m
)
{
i
[
'
GoogleAnalyticsObject
'
]
=
r
;
i
[
r
]
=
i
[
r
]
||
function
()
{
(
i
[
r
].
q
=
i
[
r
].
q
||
[]).
push
(
arguments
);
},
i
[
r
].
l
=
1
*
new
Date
();
a
=
s
.
createElement
(
o
),
m
=
s
.
getElementsByTagName
(
o
)[
0
];
a
.
async
=
1
;
a
.
src
=
g
;
m
.
parentNode
.
insertBefore
(
a
,
m
);
})(
window
,
document
,
'
script
'
,
'
https://www.google-analytics.com/analytics.js
'
,
'
ga
'
);
ga
(
'
create
'
,
'
UA-93695434-1
'
,
'
auto
'
);
ga
(
'
send
'
,
'
pageview
'
);
public/js/scroll.js
View file @
6a082191
...
...
@@ -6,9 +6,9 @@
ev
.
preventDefault
();
$
(
'
html, body
'
).
stop
().
animate
(
{
scrollTop
:
target
.
offset
().
top
,
scrollTop
:
target
.
offset
().
top
},
1000
,
1000
);
}
});
...
...
views/footer.ejs
View file @
6a082191
...
...
@@ -31,20 +31,20 @@
<div class="field">
<div class="two fields">
<div class="field">
<input type="text" name="
n
ame" placeholder="Nombres">
<input type="text" name="
footerN
ame" placeholder="Nombres">
</div>
<div class="field">
<input type="text" name="
l
ast" placeholder="Apellidos">
<input type="text" name="
footerL
ast" placeholder="Apellidos">
</div>
</div>
</div>
<div class="field">
<div class="field">
<input type="text" name="
e
mail" placeholder="Correo Electrónico">
<input type="text" name="
footerE
mail" placeholder="Correo Electrónico">
</div>
</div>
<div class="field">
<textarea style="margin-top: 0px; margin-bottom: 0px; height: 50px; resize: none;" name="
t
ext" placeholder="Mensaje"></textarea>
<textarea style="margin-top: 0px; margin-bottom: 0px; height: 50px; resize: none;" name="
footerT
ext" placeholder="Mensaje"></textarea>
<%# <input type="text" name="profession" placeholder="Ocupación">%>
</div>
<div class="ui submit button">Enviar</div>
...
...
@@ -74,6 +74,7 @@
</div>
<script type="text/javascript" src="/js/scroll.js"></script>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script type="text/javascript" src="/js/analytics.js"></script>
<script type="text/javascript">
$('.activating.element').popup();
</script>
...
...
@@ -91,6 +92,42 @@ $('.message .close').on('click', function() {
$(document).ready(function() {
$('.ui.form').form({
fields: {
username: {
identifier: 'username',
rules: [
{
type: 'empty',
prompt: 'Please enter your username'
}
]
},
user_id: {
identifier: 'user_id',
rules: [
{
type: 'empty',
prompt: 'Please enter your id'
}
]
},
name: {
identifier: 'name',
rules: [
{
type: 'empty',
prompt: 'Please enter your name'
}
]
},
last_name: {
identifier: 'last_name',
rules: [
{
type: 'empty',
prompt: 'Please enter your last name'
}
]
},
email: {
identifier: 'email',
rules: [
...
...
@@ -104,26 +141,83 @@ $(document).ready(function() {
}
]
},
name
: {
identifier: '
name
',
profession
: {
identifier: '
profession
',
rules: [
{
type: 'empty',
prompt: 'Please enter your
name
'
prompt: 'Please enter your
profession
'
}
]
},
l
as
t
: {
identifier: '
l
as
t
',
p
as
sword
: {
identifier: '
p
as
sword
',
rules: [
{
type: 'empty',
prompt: 'Please enter your Last Name'
prompt: 'Please enter your password'
},
{
type: 'length[6]',
prompt: 'Your password must be at least 6 characters'
}
]
},
confirmPassword: {
identifier: 'confirmPassword',
rules: [
{
type: 'empty',
prompt: 'Please enter your password'
},
{
type: 'length[6]',
prompt: 'Your password must be at least 6 characters'
}
]
},
text: {
identifier: 'text',
rules: [
{
type: 'empty',
prompt: 'Please enter your Text'
}
]
},
footerEmail: {
identifier: 'footerEmail',
rules: [
{
type: 'empty',
prompt: 'Please enter your e-mail'
},
{
type: 'email',
prompt: 'Please enter a valid e-mail'
}
]
},
footerName: {
identifier: 'footerName',
rules: [
{
type: 'empty',
prompt: 'Please enter your name'
}
]
},
footerLast: {
identifier: 'footerLast',
rules: [
{
type: 'empty',
prompt: 'Please enter your Last Name'
}
]
},
footerText: {
identifier: 'footerText',
rules: [
{
type: 'empty',
...
...
views/user/signup.ejs
View file @
6a082191
...
...
@@ -66,49 +66,11 @@
padding
:
5em
0em
;
}
</style>
<script>
$
(
document
)
.
ready
(
function
()
{
$
(
'
.ui.form
'
)
.
form
({
fields
:
{
email
:
{
identifier
:
'
email
'
,
rules
:
[
{
type
:
'
empty
'
,
prompt
:
'
Please enter your e-mail
'
},
{
type
:
'
email
'
,
prompt
:
'
Please enter a valid e-mail
'
}
]
},
password
:
{
identifier
:
'
password
'
,
rules
:
[
{
type
:
'
empty
'
,
prompt
:
'
Please enter your password
'
},
{
type
:
'
length[6]
'
,
prompt
:
'
Your password must be at least 6 characters
'
}
]
}
}
})
;
})
;
</script>
<
%
include
../
navbar.ejs
%
>
<div
class=
"ui middle aligned center aligned grid"
>
<div
class=
"column"
>
<h2
class=
"ui teal image header"
>
<!-- <img src="assets/images/logo.png" class="image"> -->
<div
class=
"content"
>
Registro
</div>
...
...
@@ -132,14 +94,14 @@
<label
class=
"ui left aligned header"
>
Nombre(s)
</label>
<div
class=
"ui left icon input"
>
<i
class=
"user icon"
></i>
<input
type=
"text"
name=
"name"
placeholder=
"Nombre(s)"
>
<input
type=
"text"
name=
"name"
placeholder=
"Nombre(s)"
required=
""
>
</div>
</div>
<div
class=
"field"
>
<label
class=
"ui left aligned header"
>
Apellido(s)
</label>
<div
class=
"ui left icon input"
>
<i
class=
"user icon"
></i>
<input
type=
"text"
name=
"last_name"
placeholder=
"Apellidos(s)"
>
<input
type=
"text"
name=
"last_name"
placeholder=
"Apellidos(s)"
required=
""
>
</div>
</div>
</div>
...
...
@@ -149,14 +111,14 @@
<label
class=
"ui left aligned header"
>
Código
</label>
<div
class=
"ui left icon input"
>
<i
class=
"info icon"
></i>
<input
type=
"text"
name=
"user_id"
placeholder=
"Código"
>
<input
type=
"text"
name=
"user_id"
placeholder=
"Código"
required=
""
>
</div>
</div>
<div
class=
"field"
>
<label
class=
"ui left aligned header"
>
Usuario
</label>
<div
class=
"ui left icon input"
>
<i
class=
"add user icon"
></i>
<input
type=
"text"
name=
"username"
placeholder=
"Usuario"
>
<input
type=
"text"
name=
"username"
placeholder=
"Usuario"
required=
""
>
</div>
</div>
</div>
...
...
@@ -165,14 +127,14 @@
<label
class=
"ui left aligned header"
>
Correo Electrónico
</label>
<div
class=
"ui left icon input"
>
<i
class=
"at icon"
></i>
<input
type=
"text"
name=
"email"
placeholder=
"Correo Electrónico"
>
<input
type=
"text"
name=
"email"
placeholder=
"Correo Electrónico"
required=
""
>
</div>
</div>
<div
class=
"field"
>
<label
class=
"ui left aligned header"
>
Ocupación
</label>
<div
class=
"ui left icon input"
>
<i
class=
"student icon"
></i>
<input
type=
"text"
name=
"profession"
placeholder=
"Ocupación"
>
<input
type=
"text"
name=
"profession"
placeholder=
"Ocupación"
required=
""
>
</div>
</div>
</div>
...
...
@@ -182,14 +144,14 @@
<label
class=
"ui left aligned header"
>
Contraseña
</label>
<div
class=
"ui left icon input"
>
<i
class=
"lock icon"
></i>
<input
type=
"password"
name=
"password"
placeholder=
"Contraseña"
>
<input
type=
"password"
name=
"password"
placeholder=
"Contraseña"
required=
""
>
</div>
</div>
<div
class=
"field"
>
<label
class=
"ui left aligned header"
>
Confirmar Contraseña
</label>
<div
class=
"ui left icon input"
>
<i
class=
"unlock alternate icon"
></i>
<input
type=
"password"
name=
"confirmPassword"
placeholder=
"Confirmar Contraseña"
>
<input
type=
"password"
name=
"confirmPassword"
placeholder=
"Confirmar Contraseña"
required=
""
>
</div>
</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