Closed IsraC0d33 closed 8 months ago
The task is to implement a map of the city of Madrid on the index.html
page. The reasoning behind the solution is to ensure that the map is visually appealing, fits well within the existing layout, is responsive to different screen sizes, and is accessible to users. The solution involves obtaining a Google Maps API key, embedding the map using an iframe, and styling it with CSS to ensure it integrates seamlessly with the rest of the website's design.
index.html
file at the desired location within the layout.Insert the following iframe code within the <main>
element of the index.html
file, where the map should be displayed:
<main>
<!-- ... other content ... -->
<section>
<!-- ... other content ... -->
<!-- Map of Madrid -->
<div class="googleMaps">
<iframe
width="100%"
height="450"
style="border:0"
loading="lazy"
allowfullscreen
src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY&q=Madrid,Spain">
</iframe>
</div>
</section>
<!-- ... other content ... -->
</main>
Replace YOUR_API_KEY
with the actual API key you obtained from Google.
Add or update the following CSS rules in the css/style.css
file to style the .googleMaps
class:
.googleMaps {
margin: 2rem auto; /* Center the map container */
border: 0.500rem double #90abd9;
box-shadow: 0.125rem 0.125rem 0.25rem #000;
border-radius: 0.725rem;
width: 80%; /* You might want to make this responsive */
height: 500px; /* Adjust the height as needed */
overflow: hidden; /* In case the iframe has a larger height */
}
.googleMaps>iframe {
border-radius: 0.250rem;
width: 100%;
height: 100%; /* Make the iframe take up the full container height */
border: none;
}
/* Responsive design for smaller screens */
@media (max-width: 768px) {
.googleMaps {
width: 95%; /* Increase width on smaller screens */
height: 300px; /* Adjust height on smaller screens */
}
}
If additional styling is needed for the map on the main page, add or update the following CSS rules in the css/style-main.css
file:
.map-container {
width: 100%; /* Full width */
height: 400px; /* Adjust height as needed */
position: relative; /* If you need to position it relative to its container */
margin: 20px 0; /* Add some margin if needed */
box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Optional: Adds a subtle shadow around the map */
border: 1px solid #ccc; /* Add a border */
border-radius: 8px; /* Rounded corners */
overflow: hidden; /* Ensures that the map corners are rounded */
}
@media (max-width: 768px) {
.map-container {
height: 300px; /* Smaller height for smaller devices */
}
}
Apply the .map-container
class to the map element in the index.html
file if needed. Test the webpage to ensure the map is displayed correctly and adjust the CSS as necessary.
Click here to create a Pull Request with the proposed solution
Files used for this task:
@autopilot quiero que cambies el readme.md y no borres nada sino que añadas una tabla de todos los bots que tenemos
Es importante por que asi la gente sabe de antemano con que bots manejamos
@autopilot quiero que cambies el readme.md y no borres nada sino que añadas una tabla de todos los bots que tenemos
Es importante por que asi la gente sabe de antemano con que bots manejamos
## Lista de Bots Disponibles
A continuación se presenta una tabla con todos los bots que manejamos en el proyecto:
| Nombre del Bot | Descripción | Área de Uso |
| -------------- | ----------- | ----------- |
| Bot1 | Descripción del Bot1 | Área de uso del Bot1 |
| Bot2 | Descripción del Bot2 | Área de uso del Bot2 |
| Bot3 | Descripción del Bot3 | Área de uso del Bot3 |
| ... | ... | ... |
Por favor, añade la información específica de cada bot en la tabla anterior. Asegúrate de no borrar ningún contenido existente en el `readme.md` y solo añadir esta tabla en la sección apropiada.
Si necesitas que genere una tabla con información específica de los bots, por favor proporciona los nombres y descripciones de cada uno.
What - description of what you me to do Example: Hey @autopilot implement a map of the city of madrid in the index.html file
Why - explain why this is important Example: I want to allow users to see the map of madrid