Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Juan Montilla
/
TBW2223_equipo12
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7d39a23c
authored
May 05, 2023
by
Manuel Ruiz Toribio
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Filtro vegano y origen estético
parent
5a5fba1c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
363 additions
and
17 deletions
app/Config/Routes.php
app/Views/pages/home.php
public/css/style.css
public/js/main.js
public/js/recipe_view.js
app/Config/Routes.php
View file @
7d39a23c
...
@@ -40,7 +40,7 @@ $routes->match(['get'], '/home', [User::class, 'user_ok']);
...
@@ -40,7 +40,7 @@ $routes->match(['get'], '/home', [User::class, 'user_ok']);
$routes
->
get
(
'insert
R
ecipe'
,
'InsertRecipeController::insertRecipe'
);
$routes
->
get
(
'insert
_r
ecipe'
,
'InsertRecipeController::insertRecipe'
);
$routes
->
get
(
'login'
,
'Pages::viewLogin'
);
$routes
->
get
(
'login'
,
'Pages::viewLogin'
);
$routes
->
get
(
'users'
,
'User::list'
);
$routes
->
get
(
'users'
,
'User::list'
);
$routes
->
get
(
'home'
,
'Pages::prueba'
);
$routes
->
get
(
'home'
,
'Pages::prueba'
);
...
...
app/Views/pages/home.php
View file @
7d39a23c
...
@@ -14,24 +14,17 @@
...
@@ -14,24 +14,17 @@
<!-- Filtro 1-->
<!-- Filtro 1-->
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link collapsed"
data-bs-target=
"#tables-nav"
data-bs-toggle=
"collapse"
href=
"#"
>
<a
class=
"nav-link collapsed"
data-bs-target=
"#tables-nav"
data-bs-toggle=
"collapse"
href=
"#"
>
<i
class=
"bi bi-layout-text-window-reverse"
></i><span>
Filtro
1
</span><i
<i
class=
"bi bi-layout-text-window-reverse"
></i><span>
Filtro
Vegano
</span><i
class=
"bi bi-chevron-down ms-auto"
></i>
class=
"bi bi-chevron-down ms-auto"
></i>
</a>
</a>
<ul
id=
"tables-nav"
class=
"nav-content collapse "
data-bs-parent=
"#sidebar-nav"
>
<ul
id=
"tables-nav"
class=
"nav-content collapse "
data-bs-parent=
"#sidebar-nav"
>
<!--Contenido del dropdown-->
<!--Contenido del dropdown-->
<ul
class=
"
ks
-cboxtags"
>
<ul
class=
"
vegan
-cboxtags"
>
<li>
<li>
<input
type=
"checkbox"
id=
"checkboxOne"
value=
"Order one"
>
<input
type=
"checkbox"
id=
"checkboxOne"
value=
"Order one"
>
<label
for=
"checkboxOne"
>
Opción 1
</label>
<label
for=
"checkboxOne"
>
Recetas Veganas
</label>
</li>
<li>
<input
type=
"checkbox"
id=
"checkboxTwo"
value=
"Order Two"
>
<label
for=
"checkboxTwo"
>
Opción 2
</label>
</li>
<li>
<input
type=
"checkbox"
id=
"checkboxThree"
value=
"Order Two"
>
<label
for=
"checkboxThree"
>
Opción 3
</label>
</li>
</li>
</ul>
</ul>
</ul>
</ul>
</li>
<!-- Fin Filtro 1 -->
</li>
<!-- Fin Filtro 1 -->
...
@@ -44,26 +37,54 @@
...
@@ -44,26 +37,54 @@
</a>
</a>
<ul
id=
"tables-nav2"
class=
"nav-content collapse "
data-bs-parent=
"#sidebar-nav"
>
<ul
id=
"tables-nav2"
class=
"nav-content collapse "
data-bs-parent=
"#sidebar-nav"
>
<!--Contenido del dropdown-->
<!--Contenido del dropdown-->
<ul
class=
"
ks
-cboxtags"
>
<ul
class=
"
indian
-cboxtags"
>
<li>
<li>
<input
type=
"checkbox"
id=
"checkboxFour"
value=
"Order four"
>
<input
type=
"checkbox"
id=
"checkboxFour"
value=
"Order four"
>
<label
for=
"checkboxFour"
>
Opción 4
</label>
<label
for=
"checkboxFour"
>
India
</label>
</li>
</li>
</ul>
<ul
class=
"french-cboxtags"
>
<li>
<li>
<input
type=
"checkbox"
id=
"checkboxFive"
value=
"Order five"
>
<input
type=
"checkbox"
id=
"checkboxFive"
value=
"Order five"
>
<label
for=
"checkboxFive"
>
Opción 5
</label>
<label
for=
"checkboxFive"
>
Francia
</label>
</li>
</li>
</ul>
<ul
class=
"chinese-cboxtags"
>
<li>
<li>
<input
type=
"checkbox"
id=
"checkboxSix"
value=
"Order six"
>
<input
type=
"checkbox"
id=
"checkboxSix"
value=
"Order six"
>
<label
for=
"checkboxSix"
>
Opción 6
</label>
<label
for=
"checkboxSix"
>
China
</label>
</li>
</ul>
<ul
class=
"mexican-cboxtags"
>
<li>
<input
type=
"checkbox"
id=
"checkboxSeven"
value=
"Order seven"
>
<label
for=
"checkboxSeven"
>
México
</label>
</li>
</li>
</ul>
</ul>
<ul
class=
"spanish-cboxtags"
>
<li>
<input
type=
"checkbox"
id=
"checkboxEight"
value=
"Order eigth"
>
<label
for=
"checkboxEight"
>
España
</label>
</li>
</ul>
<ul
class=
"japanese-cboxtags"
>
<li>
<input
type=
"checkbox"
id=
"checkboxNine"
value=
"Order nine"
>
<label
for=
"checkboxNine"
>
Japón
</label>
</li>
</ul>
</ul>
</ul>
</li>
<!-- Fin Filtro 1 -->
</li>
<!-- Fin Filtro 1 -->
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link collapsed"
href=
"/insert
R
ecipe"
>
<a
class=
"nav-link collapsed"
href=
"/insert
_r
ecipe"
>
<i
class=
"bi bi-person"
></i>
<i
class=
"bi bi-person"
></i>
<span>
Perfil
</span>
<span>
Perfil
</span>
</a>
</a>
...
...
public/css/style.css
View file @
7d39a23c
This diff is collapsed.
Click to expand it.
public/js/main.js
View file @
7d39a23c
...
@@ -108,6 +108,9 @@
...
@@ -108,6 +108,9 @@
onscroll
(
document
,
toggleBacktotop
)
onscroll
(
document
,
toggleBacktotop
)
}
}
/**
/**
* Initiate tooltips
* Initiate tooltips
*/
*/
...
...
public/js/recipe_view.js
0 → 100644
View file @
7d39a23c
/**
* Template Name: NiceAdmin
* Updated: Mar 09 2023 with Bootstrap v5.2.3
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/
(
function
()
{
"use strict"
;
/**
* Easy selector helper function
*/
const
select
=
(
el
,
all
=
false
)
=>
{
el
=
el
.
trim
()
if
(
all
)
{
return
[...
document
.
querySelectorAll
(
el
)]
}
else
{
return
document
.
querySelector
(
el
)
}
}
/**
* Easy event listener function
*/
const
on
=
(
type
,
el
,
listener
,
all
=
false
)
=>
{
if
(
all
)
{
select
(
el
,
all
).
forEach
(
e
=>
e
.
addEventListener
(
type
,
listener
))
}
else
{
select
(
el
,
all
).
addEventListener
(
type
,
listener
)
}
}
/**
* Easy on scroll event listener
*/
const
onscroll
=
(
el
,
listener
)
=>
{
el
.
addEventListener
(
'scroll'
,
listener
)
}
/**
* Sidebar toggle
*/
if
(
select
(
'.toggle-sidebar-btn'
))
{
on
(
'click'
,
'.toggle-sidebar-btn'
,
function
(
e
)
{
select
(
'body'
).
classList
.
toggle
(
'toggle-sidebar'
)
})
}
/**
* Search bar toggle
*/
if
(
select
(
'.search-bar-toggle'
))
{
on
(
'click'
,
'.search-bar-toggle'
,
function
(
e
)
{
select
(
'.search-bar'
).
classList
.
toggle
(
'search-bar-show'
)
})
}
/**
* Navbar links active state on scroll
*/
let
navbarlinks
=
select
(
'#navbar .scrollto'
,
true
)
const
navbarlinksActive
=
()
=>
{
let
position
=
window
.
scrollY
+
200
navbarlinks
.
forEach
(
navbarlink
=>
{
if
(
!
navbarlink
.
hash
)
return
let
section
=
select
(
navbarlink
.
hash
)
if
(
!
section
)
return
if
(
position
>=
section
.
offsetTop
&&
position
<=
(
section
.
offsetTop
+
section
.
offsetHeight
))
{
navbarlink
.
classList
.
add
(
'active'
)
}
else
{
navbarlink
.
classList
.
remove
(
'active'
)
}
})
}
window
.
addEventListener
(
'load'
,
navbarlinksActive
)
onscroll
(
document
,
navbarlinksActive
)
/**
* Toggle .header-scrolled class to #header when page is scrolled
*/
let
selectHeader
=
select
(
'#header'
)
if
(
selectHeader
)
{
const
headerScrolled
=
()
=>
{
if
(
window
.
scrollY
>
100
)
{
selectHeader
.
classList
.
add
(
'header-scrolled'
)
}
else
{
selectHeader
.
classList
.
remove
(
'header-scrolled'
)
}
}
window
.
addEventListener
(
'load'
,
headerScrolled
)
onscroll
(
document
,
headerScrolled
)
}
/**
* Back to top button
*/
let
backtotop
=
select
(
'.back-to-top'
)
if
(
backtotop
)
{
const
toggleBacktotop
=
()
=>
{
if
(
window
.
scrollY
>
100
)
{
backtotop
.
classList
.
add
(
'active'
)
}
else
{
backtotop
.
classList
.
remove
(
'active'
)
}
}
window
.
addEventListener
(
'load'
,
toggleBacktotop
)
onscroll
(
document
,
toggleBacktotop
)
}
/**
* Initiate tooltips
*/
var
tooltipTriggerList
=
[].
slice
.
call
(
document
.
querySelectorAll
(
'[data-bs-toggle="tooltip"]'
))
var
tooltipList
=
tooltipTriggerList
.
map
(
function
(
tooltipTriggerEl
)
{
return
new
bootstrap
.
Tooltip
(
tooltipTriggerEl
)
})
/**
* Initiate quill editors
*/
if
(
select
(
'.quill-editor-default'
))
{
new
Quill
(
'.quill-editor-default'
,
{
theme
:
'snow'
});
}
if
(
select
(
'.quill-editor-bubble'
))
{
new
Quill
(
'.quill-editor-bubble'
,
{
theme
:
'bubble'
});
}
if
(
select
(
'.quill-editor-full'
))
{
new
Quill
(
".quill-editor-full"
,
{
modules
:
{
toolbar
:
[
[{
font
:
[]
},
{
size
:
[]
}],
[
"bold"
,
"italic"
,
"underline"
,
"strike"
],
[{
color
:
[]
},
{
background
:
[]
}
],
[{
script
:
"super"
},
{
script
:
"sub"
}
],
[{
list
:
"ordered"
},
{
list
:
"bullet"
},
{
indent
:
"-1"
},
{
indent
:
"+1"
}
],
[
"direction"
,
{
align
:
[]
}],
[
"link"
,
"image"
,
"video"
],
[
"clean"
]
]
},
theme
:
"snow"
});
}
/**
* Initiate TinyMCE Editor
*/
const
useDarkMode
=
window
.
matchMedia
(
'(prefers-color-scheme: dark)'
).
matches
;
const
isSmallScreen
=
window
.
matchMedia
(
'(max-width: 1023.5px)'
).
matches
;
tinymce
.
init
({
selector
:
'textarea.tinymce-editor'
,
plugins
:
'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons'
,
editimage_cors_hosts
:
[
'picsum.photos'
],
menubar
:
'file edit view insert format tools table help'
,
toolbar
:
'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl'
,
toolbar_sticky
:
true
,
toolbar_sticky_offset
:
isSmallScreen
?
102
:
108
,
autosave_ask_before_unload
:
true
,
autosave_interval
:
'30s'
,
autosave_prefix
:
'{path}{query}-{id}-'
,
autosave_restore_when_empty
:
false
,
autosave_retention
:
'2m'
,
image_advtab
:
true
,
link_list
:
[{
title
:
'My page 1'
,
value
:
'https://www.tiny.cloud'
},
{
title
:
'My page 2'
,
value
:
'http://www.moxiecode.com'
}
],
image_list
:
[{
title
:
'My page 1'
,
value
:
'https://www.tiny.cloud'
},
{
title
:
'My page 2'
,
value
:
'http://www.moxiecode.com'
}
],
image_class_list
:
[{
title
:
'None'
,
value
:
''
},
{
title
:
'Some class'
,
value
:
'class-name'
}
],
importcss_append
:
true
,
file_picker_callback
:
(
callback
,
value
,
meta
)
=>
{
/* Provide file and text for the link dialog */
if
(
meta
.
filetype
===
'file'
)
{
callback
(
'https://www.google.com/logos/google.jpg'
,
{
text
:
'My text'
});
}
/* Provide image and alt text for the image dialog */
if
(
meta
.
filetype
===
'image'
)
{
callback
(
'https://www.google.com/logos/google.jpg'
,
{
alt
:
'My alt text'
});
}
/* Provide alternative source and posted for the media dialog */
if
(
meta
.
filetype
===
'media'
)
{
callback
(
'movie.mp4'
,
{
source2
:
'alt.ogg'
,
poster
:
'https://www.google.com/logos/google.jpg'
});
}
},
templates
:
[{
title
:
'New Table'
,
description
:
'creates a new table'
,
content
:
'<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>'
},
{
title
:
'Starting my story'
,
description
:
'A cure for writers block'
,
content
:
'Once upon a time...'
},
{
title
:
'New list with dates'
,
description
:
'New List with dates'
,
content
:
'<div class="mceTmpl"><span class="cdate">cdate</span><br><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>'
}
],
template_cdate_format
:
'[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]'
,
template_mdate_format
:
'[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]'
,
height
:
600
,
image_caption
:
true
,
quickbars_selection_toolbar
:
'bold italic | quicklink h2 h3 blockquote quickimage quicktable'
,
noneditable_class
:
'mceNonEditable'
,
toolbar_mode
:
'sliding'
,
contextmenu
:
'link image table'
,
skin
:
useDarkMode
?
'oxide-dark'
:
'oxide'
,
content_css
:
useDarkMode
?
'dark'
:
'default'
,
content_style
:
'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
});
/**
* Initiate Bootstrap validation check
*/
var
needsValidation
=
document
.
querySelectorAll
(
'.needs-validation'
)
Array
.
prototype
.
slice
.
call
(
needsValidation
)
.
forEach
(
function
(
form
)
{
form
.
addEventListener
(
'submit'
,
function
(
event
)
{
if
(
!
form
.
checkValidity
())
{
event
.
preventDefault
()
event
.
stopPropagation
()
}
form
.
classList
.
add
(
'was-validated'
)
},
false
)
})
/**
* Initiate Datatables
*/
const
datatables
=
select
(
'.datatable'
,
true
)
datatables
.
forEach
(
datatable
=>
{
new
simpleDatatables
.
DataTable
(
datatable
);
})
/**
* Autoresize echart charts
*/
const
mainContainer
=
select
(
'#main'
);
if
(
mainContainer
)
{
setTimeout
(()
=>
{
new
ResizeObserver
(
function
()
{
select
(
'.echart'
,
true
).
forEach
(
getEchart
=>
{
echarts
.
getInstanceByDom
(
getEchart
).
resize
();
})
}).
observe
(
mainContainer
);
},
200
);
}
})();
\ No newline at end of file
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