Skip to content

Commit

Permalink
Sprint 3 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrotomassini committed Sep 5, 2023
1 parent 5ab54e4 commit f6660e2
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 46 deletions.
55 changes: 14 additions & 41 deletions details.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,48 +115,21 @@ <h2>Details</h2>
<!-- Content -->
<div class="container-fluid mb-5">
<div class="row pt-5">

<div class="col-6">
<img src="assets/img/cinema.jpg" alt="" class="img-fluid">
<img src="" alt="Event Image" id="eventImage" class="img-fluid">
</div>
<div class="col-6">

<div class="details">
<h2>About Our Event Planning Company</h2>
<p>Welcome to Spectacular Events, your premier destination for creating unforgettable experiences.
With over a decade of experience in the event industry, we specialize in curating exceptional
gatherings that leave a lasting impact.</p>

<p>Our dedicated team of creative minds and meticulous planners work tirelessly to bring your vision
to life. Whether it's a grand corporate conference, a dreamy wedding, a pulsating music
festival, or an intimate private celebration, we infuse each event with passion, innovation, and
attention to detail.</p>

<p>We take pride in offering a comprehensive range of services, including event conceptualization,
venue selection, theme design, entertainment booking, catering coordination, and seamless
execution. Our commitment to excellence ensures that every event unfolds seamlessly, exceeding
expectations and creating cherished memories.</p>


<h3>Why Choose Us?</h3>
<ul>
<li>Experienced Professionals: Our team comprises skilled professionals with diverse
backgrounds, ensuring a well-rounded approach to event planning.</li>
<li>Creative Innovation: We thrive on bringing fresh ideas and innovative concepts to the table,
ensuring each event is unique and captivating.</li>
<li>Attention to Detail: No detail is too small for us. We meticulously plan every aspect to
ensure a flawless event.</li>
<li>Client-Centric Approach: We prioritize your vision and preferences, tailoring every event to
reflect your personality and style.</li>
<li>Extensive Network: With strong industry connections, we can secure top-tier vendors,
performers, and resources.</li>
</ul>

<p>From intimate gatherings to large-scale productions, Spectacular Events is your partner in
crafting moments that resonate. Contact us today to turn your event dreams into a sensational
reality!</p>
<h2>Event Details</h2>
<p><strong>Name:</strong> <span id="eventName"></span></p>
<p><strong>Date:</strong> <span id="eventDate"></span></p>
<p><strong>Description:</strong> <span id="eventDescription"></span></p>
<p><strong>Category:</strong> <span id="eventCategory"></span></p>
<p><strong>Place:</strong> <span id="eventPlace"></span></p>
<p><strong>Capacity:</strong> <span id="eventCapacity"></span></p>
<p><strong>Assistance:</strong> <span id="eventAssistance"></span></p>
<p><strong>Price:</strong> <span id="eventPrice"></span></p>
</div>

</div>
</div>
</div>
Expand Down Expand Up @@ -184,7 +157,6 @@ <h3>Why Choose Us?</h3>
<img src="assets/img/whatsapp.png" alt="Whatsapp" width="25">
</a>
</li>

</ul>
</div>
<div class="col-md-6 text-right">
Expand All @@ -195,7 +167,6 @@ <h3>Why Choose Us?</h3>
</footer>
<!-- End footer -->


<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"
integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
crossorigin="anonymous"></script>
Expand All @@ -205,8 +176,10 @@ <h3>Why Choose Us?</h3>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.0.0/dist/js/bootstrap.min.js"
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
crossorigin="anonymous"></script>
</body>


<!-- Javascript personalizado -->
<script src="./js/Amazing_Events_Imformation_task1.js"></script>
<script src="./js/details.js"></script>
</body>

</html>
54 changes: 54 additions & 0 deletions js/details.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
document.addEventListener("DOMContentLoaded", () => {
// ID del evento de la URL
const urlParams = new URLSearchParams(window.location.search);
const eventId = urlParams.get("eventId");

// Encuentra el evento correspondiente en tu fuente de datos (data.events)
const event = data.events.find((event) => event._id === eventId);

if (event) {
// Actualiza los elementos HTML con los detalles del evento

// Nombre del evento
document.getElementById("eventName").textContent = event.name;

// Fecha del evento
const eventDateElement = document.getElementById("eventDate");
const eventDate = new Date(event.date);
const formattedDate = eventDate.toLocaleDateString("en-US", {
year: "numeric",
month: "long",
day: "numeric",
});
eventDateElement.textContent = formattedDate;

// Descripción del evento
document.getElementById("eventDescription").textContent = event.description;

// Categoría del evento
document.getElementById("eventCategory").textContent = event.category;

// Lugar del evento
document.getElementById("eventPlace").textContent = event.place;

// Capacidad del evento (con formato de miles)
const eventCapacityElement = document.getElementById("eventCapacity");
eventCapacityElement.textContent = new Intl.NumberFormat().format(event.capacity);

// Asistencia al evento (con formato de miles)
const eventAssistanceElement = document.getElementById("eventAssistance");
eventAssistanceElement.textContent = new Intl.NumberFormat().format(event.assistance);

// Precio del evento (con formato de moneda)
const eventPriceElement = document.getElementById("eventPrice");
eventPriceElement.textContent = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
}).format(event.price);

// Imagen del evento
const eventImageElement = document.getElementById("eventImage");
eventImageElement.src = event.image;
eventImageElement.alt = event.name;
}
});
6 changes: 3 additions & 3 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ document.addEventListener("DOMContentLoaded", () => {
// Variables globales
let cardsContent;
let categoryContent;
let noResultsMessage;
let noResultsMessage;

// Función para cargar las categorías y las tarjetas de eventos
const loadCategoriesAndCards = () => {
Expand Down Expand Up @@ -55,7 +55,7 @@ document.addEventListener("DOMContentLoaded", () => {
<h5 class="card-title">${amazingEvent.date}</h5>
<p class="card-text">${amazingEvent.description}</p>
<p>$${amazingEvent.price}</p>
<a href="details.html" class="btn btn-dark">Más detalles</a>
<a href="details.html?eventId=${amazingEvent._id}" class="btn btn-dark" data-event-id="${amazingEvent._id}">Más detalles</a>
</div>
</div>
`;
Expand Down Expand Up @@ -96,7 +96,7 @@ document.addEventListener("DOMContentLoaded", () => {
(searchTerm === "" || cardTitle.includes(searchTerm))
) {
card.style.display = "block";
resultsExist = true;
resultsExist = true;
} else {
card.style.display = "none";
}
Expand Down
2 changes: 1 addition & 1 deletion js/past-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ document.addEventListener("DOMContentLoaded", () => {
<h5 class="card-title">${amazingEvent.date}</h5>
<p class="card-text">${amazingEvent.description}</p>
<p>$${amazingEvent.price}</p>
<a href="details.html" class="btn btn-dark">Más detalles</a>
<a href="details.html?eventId=${amazingEvent._id}" class="btn btn-dark" data-event-id="${amazingEvent._id}">Más detalles</a>
</div>
</div>
`;
Expand Down
2 changes: 1 addition & 1 deletion js/upcoming-events.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ document.addEventListener("DOMContentLoaded", () => {
<h5 class="card-title">${amazingEvent.date}</h5>
<p class="card-text">${amazingEvent.description}</p>
<p>$${amazingEvent.price}</p>
<a href="details.html" class="btn btn-dark">Más detalles</a>
<a href="details.html?eventId=${amazingEvent._id}" class="btn btn-dark" data-event-id="${amazingEvent._id}">Más detalles</a>
</div>
</div>
`;
Expand Down

0 comments on commit f6660e2

Please sign in to comment.