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
8f19fe54
authored
May 18, 2023
by
Juan Montilla
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge remote-tracking branch 'origin/developmanu' into developJC
parents
5621cb17
6e23446c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
14 deletions
.env
app/Config/Routes.php
app/Views/pages/home.php
app/Views/pages/insertRecipe.php
app/Views/pages/recipe_view.php
app/Views/templates/header.php
public/js/main.js
.env
View file @
8f19fe54
...
...
@@ -16,13 +16,14 @@
CI_ENVIRONMENT = production
#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------
app.baseURL = 'https://tbw2223-12-mrtjcmh.oa.r.appspot.com'
#
app.baseURL = 'https://tbw2223-12-mrtjcmh.oa.r.appspot.com'
# If you have trouble with `.`, you could also use `_`.
#
app_baseURL = 'http://localhost'
app_baseURL = 'http://localhost'
# app.forceGlobalSecureRequests = false
# app.CSPEnabled = false
...
...
app/Config/Routes.php
View file @
8f19fe54
...
...
@@ -3,6 +3,7 @@
namespace
Config
;
use
App\Controllers\RecipesController
;
// Create a new instance of our RouteCollection class.
$routes
=
Services
::
routes
();
...
...
app/Views/pages/home.php
View file @
8f19fe54
...
...
@@ -107,7 +107,7 @@
});
let
recipeHtml
=
`
<div class="card info-card sales-card" onclick="window.location.href='recipe/
${
recipe
.
id
}
'">
<div class="card info-card sales-card
recipe-card
" onclick="window.location.href='recipe/
${
recipe
.
id
}
'">
<a href="recipe/
${
recipe
.
id
}
"></a>
<div class="row flex-nowrap">
<div class="col-lg-3 col-md-4 col-sm-12 imagen-container">
...
...
app/Views/pages/insertRecipe.php
View file @
8f19fe54
...
...
@@ -60,16 +60,15 @@
<option
value=
"Otoño"
>
Otoño
</option>
<option
value=
"4estaciones"
>
4 estaciones
</option>
</select>
</div>
<!-- Opción vegana -->
<div
class=
"form-group col-md-4"
>
<label
for=
"is_vegan"
class=
"chip-label"
>
Vegana
</label>
<div
class=
"custom-control custom-switch"
>
<input
type=
"checkbox"
class=
"custom-control-input"
id=
"is_vegan"
name=
"is_vegan"
>
<label
class=
"custom-control-label chip"
for=
"is_vegan"
></label>
</div>
</div>
<!-- Seleccionar vegano -->
<div
class=
"form-group col-md-4"
>
<label
for=
"is_vegan"
>
Vegana?
</label>
<select
id=
"is_vegan"
name=
"is_vegan"
class=
"form-control"
>
<option
value=
"1"
>
Si
</option>
<option
value=
"0"
>
No
</option>
</select>
</div>
</div>
...
...
app/Views/pages/recipe_view.php
View file @
8f19fe54
...
...
@@ -75,4 +75,4 @@ function getYoutubeVideoId($url)
</div>
</section>
</main>
<!-- End #main -->
\ No newline at end of file
</main>
<!-- End #main -->
app/Views/templates/header.php
View file @
8f19fe54
...
...
@@ -304,6 +304,9 @@
<?php
endif
;
?>
</div>
<?php
if
(
$session
->
has
(
'logged_in'
))
:
?>
<!-- Si usuario logueado -->
...
...
public/js/main.js
View file @
8f19fe54
...
...
@@ -3,6 +3,43 @@
(
function
()
{
/*
$(document).ready(function() {
$(".filter-checkbox").change(function() {
var filters = {
origin: [],
season: [],
is_vegan: []
};
$("input:checkbox:checked").each(function(){
var id = $(this).attr('id');
var value = $(this).val();
if (id.startsWith('checkboxOne')) {
filters.is_vegan.push(value);
} else if (id.startsWith('checkboxFour') || id.startsWith('checkboxFive') || id.startsWith('checkboxSix') || id.startsWith('checkboxSeven') || id.startsWith('checkboxEight') || id.startsWith('checkboxNine')) {
filters.origin.push(value);
} else if (id.startsWith('checkboxTen') || id.startsWith('checkboxEleven') || id.startsWith('checkboxTwelve') || id.startsWith('checkbox13')) {
filters.season.push(value);
}
});
$.ajax({
url: "<?php echo base_url('recipes/index'); ?>",
type: 'get',
data: filters,
success: function(response) {
// Aquí deberías reemplazar el contenido de la sección con las nuevas tarjetas de recetas
$(".section.dashboard").html(response);
}
});
});
});
*/
const
recipesSearch
=
document
.
querySelector
(
'#search-query'
);
function
search_recipe
(
query
)
{
...
...
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