Skip to content

Commit f3b344b

Browse files
committed
Initial commit
0 parents  commit f3b344b

36 files changed

+1783
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

README.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# HTML, CSS, and JavaScript Integration Project
2+
3+
## Overview
4+
This project demonstrates the integration of **HTML**, **CSS**, and **JavaScript** to create interactive and dynamic web applications. It covers a variety of exercises and examples, including **DOM manipulation**, **event handling**, **dynamic content creation**, and more.
5+
6+
Each folder within this project contains specific exercises or examples, organized by functionality, to help understand and practice core web development concepts.
7+
8+
## Table of Contents
9+
- [Project Structure](#project-structure)
10+
- [Features](#features)
11+
- [Usage](#usage)
12+
- [How to Contribute](#how-to-contribute)
13+
- [Best Practices](#best-practices)
14+
- [License](#license)
15+
16+
---
17+
18+
## Project Structure
19+
20+
The project has the following folder structure, designed for easy navigation and modularity:
21+
22+
```plaintext
23+
html-css-js-Integration/
24+
├── css/ # Global stylesheets
25+
│ ├── menu.css # Navigation menu styles
26+
│ └── style.css # Main stylesheet
27+
├── elevator/ # Elevator simulation example
28+
│ ├── css/
29+
│ │ └── style.css # Styles for the elevator simulation
30+
│ ├── index.html # Main HTML file for the elevator simulation
31+
│ └── js/
32+
│ ├── building.js # JavaScript for building the elevator
33+
│ └── street.js # JavaScript for street interactions
34+
├── events/ # Event handling examples
35+
│ ├── events_1.html # Example of mouse events
36+
│ ├── events_2.html # Example of keyboard events
37+
│ ├── events_3.html # Example of form events
38+
│ ├── events_4.html # Example of custom events
39+
│ ├── events_5.html # Example of event delegation
40+
│ ├── index.html # Overview of event handling examples
41+
│ └── windows_tips.html # Tips for managing window events
42+
├── image/ # Images used throughout the project
43+
│ └── logo-estreita.png # Logo used in some pages
44+
├── js/ # JavaScript examples
45+
│ └── element_by_id_02.js # Example of DOM manipulation by ID
46+
├── modify/ # Exercises on modifying HTML content
47+
│ ├── challenge.html # Challenge for DOM manipulation
48+
│ ├── creating_html_1.html # Example of creating HTML elements
49+
│ ├── creating_html_2.html # Another example of creating elements
50+
│ └── index.html # Overview of modification exercises
51+
└── select/ # DOM selection techniques
52+
├── accessing_classes.html # Selecting by class name
53+
├── attributes_1.html # Accessing element attributes
54+
├── attributes_2.html # Modifying element attributes
55+
├── attributes_3.html # More examples of attributes manipulation
56+
├── challenge.html # Challenge for practicing element selection
57+
├── element_by_id_02.html # Selecting by ID
58+
├── element_by_name.html # Selecting by name attribute
59+
├── element_by_tag.html # Selecting by tag name
60+
├── elements_by_class.html # Selecting multiple elements by class
61+
├── elements_by_id_01.html # Selecting multiple elements by ID
62+
├── index.html # Overview of selection techniques
63+
├── query_elements_1.html # Using querySelector for selection
64+
├── query_elements_2.html # Using querySelectorAll for selection
65+
└── query_elements_3.html # Advanced selection techniques
66+
67+
68+
## Features
69+
70+
This project demonstrates several key features of web development:
71+
72+
- **Elevator Simulation**: A fully interactive simulation of an elevator system using HTML, CSS, and JavaScript.
73+
- **Event Handling**: Practical examples of handling various browser events, including mouse, keyboard, and custom events.
74+
- **DOM Manipulation**: Various examples of selecting and manipulating DOM elements, such as modifying attributes, creating elements, and changing styles dynamically.
75+
- **Dynamic Content Creation**: Exercises focused on dynamically generating HTML content and modifying the DOM based on user interactions.
76+
- **Responsive Design**: Styles and layout adjustments that ensure the project works well on both desktop and mobile devices.
77+
78+
---
79+
80+
## Usage
81+
82+
To use this project, follow these steps:
83+
84+
1. **Clone the repository**:
85+
86+
```bash
87+
git clone https://github.com/your-username/html-css-js-Integration.git
88+
```
89+
90+
2. **Navigate to the project directory**:
91+
92+
```bash
93+
cd html-css-js-Integration
94+
```
95+
96+
3. **Open the index.html file** in your browser to view the main page, or open any of the other HTML files in their respective folders to view specific examples.
97+
98+
4. You can modify the `js/` or `css/` files to experiment with changes and see the effects on the project.
99+
100+
---
101+
102+
## How to Contribute
103+
104+
We welcome contributions to this project! To contribute:
105+
106+
1. Fork the repository by clicking the "Fork" button at the top of this page.
107+
2. Create a new branch for your feature or fix:
108+
109+
```bash
110+
git checkout -b feature-name
111+
```
112+
113+
3. Make your changes and commit them:
114+
115+
```bash
116+
git commit -am 'Add new feature'
117+
```
118+
119+
4. Push your changes to your fork:
120+
121+
```bash
122+
git push origin feature-name
123+
```
124+
125+
5. Open a Pull Request with a clear description of what you’ve done and why.
126+
127+
---
128+
129+
## Best Practices
130+
131+
This project follows several best practices to ensure readability, maintainability, and collaboration:
132+
133+
- **Separation of Concerns**: HTML, CSS, and JavaScript are kept in separate files and folders for better organization and modularity.
134+
- **Modular JavaScript**: JavaScript code is split into different files based on functionality, making it easier to maintain and extend.
135+
- **Clean and Readable Code**: The code is written with a focus on readability, using descriptive variable names, comments, and consistent indentation.
136+
- **Responsive Design**: CSS is written to ensure the website is responsive and works well on both desktop and mobile devices.
137+
- **Documentation**: Each feature and folder is well-documented, and this README provides a clear overview of the project structure and usage.
138+
139+
---
140+
141+
## License
142+
143+
This project is licensed under the MIT License. See the LICENSE file for more details.
144+

css/menu.css

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
#title-menu {
2+
position: relative;
3+
font-size: 2rem;
4+
background-color: black;
5+
padding: 20px 30px;
6+
border-bottom: 5px solid #8758ff;
7+
text-align: center;
8+
border-top-left-radius: 5px;
9+
border-top-right-radius: 5px;
10+
overflow: hidden;
11+
font-weight: 900;
12+
}
13+
14+
#title-menu > a {
15+
display: flex;
16+
justify-content: center;
17+
align-items: center;
18+
position: absolute;
19+
right: 0;
20+
top: 0;
21+
text-decoration: none;
22+
color: white;
23+
background-color: #f34a4a;
24+
height: 30px;
25+
width: 30px;
26+
font-size: 1.2rem;
27+
font-weight: 500;
28+
}
29+
30+
#content-menu {
31+
display: flex;
32+
background-color: #bbb;
33+
border-bottom-left-radius: 5px;
34+
border-bottom-right-radius: 5px;
35+
}
36+
37+
.column-menu {
38+
display: flex;
39+
/* flex: 1; */
40+
flex-direction: column;
41+
text-align: center;
42+
}
43+
44+
.column-menu > a {
45+
font-size: 1.4rem;
46+
padding: 8px 25px;
47+
text-decoration: none;
48+
color: black;
49+
}
50+
51+
.column-menu > a:hover {
52+
background-color: #999;
53+
}
54+
55+
.division {
56+
width: 3px;
57+
background-color: #333;
58+
}

css/style.css

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,100..900;1,100..900&display=swap');
2+
3+
body {
4+
height: 100vh;
5+
display: flex;
6+
justify-content: center;
7+
align-items: center;
8+
flex-wrap: wrap;
9+
align-content: center;
10+
color: #fff;
11+
background-color: #333;
12+
font-family: 'Noto Sans', sans-serif;
13+
}
14+
15+
.h1 {
16+
display: flex;
17+
justify-content: center;
18+
font-size: 3rem;
19+
font-weight: 900;
20+
}
21+
22+
#exercise div {
23+
padding: 20px 40px;
24+
margin: 5px;
25+
border: 4px solid white;
26+
font-size: 3rem;
27+
border-redius: 5px;
28+
29+
}
30+
31+
#exercise div:nth-child(1) {
32+
background-color: #d2001a;
33+
}
34+
#exercise div:nth-child(2) {
35+
background-color: #25316d;
36+
}
37+
#exercise div:nth-child(3) {
38+
background-color: #d800a6;
39+
}
40+
#exercise div:nth-child(4) {
41+
background-color: #319da0;
42+
}
43+
#exercise div:nth-child(5) {
44+
background-color: #367e18;
45+
}
46+
47+
/* It's a div inside the body element with id "exercise" that has the highlight class */
48+
#exercise .highlight {
49+
color: #f6cc42;
50+
border: 8px solid #f6cc42;
51+
font-weight: 900;
52+
}
53+
54+
#exercise .column {
55+
display: flex;
56+
flex-direction: column;
57+
gap: 15px;
58+
}
59+
60+
input,
61+
select {
62+
font-size: 1.7rem;
63+
color: #fff;
64+
background-color: #444;
65+
padding: 10px;
66+
outline: none;
67+
border-radius: 5px;
68+
border: none;
69+
}
70+
71+
input:focus,
72+
select:focus {
73+
background-color: #555;
74+
}
75+
76+
button {
77+
font-size: 1.4rem;
78+
color: #fff;
79+
background-color: #149e0f;
80+
border-radius: 5px;
81+
padding: 10px 25px;
82+
border: none;
83+
cursor: pointer;
84+
}

0 commit comments

Comments
 (0)