Spaces:
Running
Running
Update index.html
Browse files- index.html +85 -61
index.html
CHANGED
@@ -58,7 +58,7 @@
|
|
58 |
flex-wrap: wrap;
|
59 |
margin: -1px;
|
60 |
}
|
61 |
-
|
62 |
flex-basis: calc(100% / 7);
|
63 |
height: 50px;
|
64 |
border: 1px solid #ccc;
|
@@ -69,7 +69,6 @@
|
|
69 |
font-size: 16px;
|
70 |
padding: 10px;
|
71 |
box-sizing: border-box;
|
72 |
-
text-align: center;
|
73 |
}
|
74 |
.cell-header {
|
75 |
background-color: #eee;
|
@@ -103,6 +102,18 @@
|
|
103 |
font-size: 14px;
|
104 |
text-align: center;
|
105 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
</style>
|
107 |
</head>
|
108 |
<body>
|
@@ -117,59 +128,67 @@
|
|
117 |
<div class="tab" data-month="julio">Julio</div>
|
118 |
<div class="tab" data-month="agosto">Agosto</div>
|
119 |
</div>
|
120 |
-
<div class="
|
121 |
-
<
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
173 |
</div>
|
174 |
<div class="footer">
|
175 |
<p>Lo que es, ya ha sido, y lo que será, ya fue, y Dios busca lo que ha pasado.</p>
|
@@ -178,25 +197,28 @@
|
|
178 |
</div>
|
179 |
<script>
|
180 |
const tabs = document.querySelectorAll('.tab');
|
181 |
-
const
|
|
|
182 |
function showTab(event) {
|
183 |
tabs.forEach(tab => {
|
184 |
tab.classList.remove('active');
|
185 |
});
|
186 |
-
|
187 |
-
|
188 |
-
});
|
189 |
const month = event.target.dataset.month;
|
190 |
event.target.classList.add('active');
|
191 |
document.querySelector('.title').innerHTML = 'Agenda de líderes';
|
192 |
document.querySelector('.subtitle').innerHTML = `${month.charAt(0).toUpperCase() + month.slice(1)} 2023`;
|
193 |
document.querySelector('.date').innerHTML = `Lunes 1 de ${month.charAt(0).toUpperCase() + month.slice(1)}`;
|
194 |
-
document.querySelector(`.row.${month}`).classList.add('active');
|
195 |
}
|
|
|
196 |
tabs.forEach(tab => {
|
197 |
tab.addEventListener('click', showTab);
|
198 |
});
|
|
|
199 |
const cells = document.querySelectorAll('.cell-day');
|
|
|
200 |
function showInput(event) {
|
201 |
const input = document.createElement('input');
|
202 |
input.value = event.target.innerHTML;
|
@@ -206,14 +228,16 @@
|
|
206 |
input.focus();
|
207 |
input.addEventListener('blur', saveInput);
|
208 |
}
|
|
|
209 |
function saveInput(event) {
|
210 |
const value = event.target.value;
|
211 |
event.target.parentNode.innerHTML = value;
|
212 |
event.target.parentNode.classList.remove('cell-edit');
|
213 |
}
|
|
|
214 |
cells.forEach(cell => {
|
215 |
cell.addEventListener('click', showInput);
|
216 |
});
|
217 |
</script>
|
218 |
</body>
|
219 |
-
</html>
|
|
|
58 |
flex-wrap: wrap;
|
59 |
margin: -1px;
|
60 |
}
|
61 |
+
.cell {
|
62 |
flex-basis: calc(100% / 7);
|
63 |
height: 50px;
|
64 |
border: 1px solid #ccc;
|
|
|
69 |
font-size: 16px;
|
70 |
padding: 10px;
|
71 |
box-sizing: border-box;
|
|
|
72 |
}
|
73 |
.cell-header {
|
74 |
background-color: #eee;
|
|
|
102 |
font-size: 14px;
|
103 |
text-align: center;
|
104 |
}
|
105 |
+
.row-shading:nth-child(odd) .cell {
|
106 |
+
background-color: #f0f0f0;
|
107 |
+
}
|
108 |
+
.row-shading:nth-child(even) .cell {
|
109 |
+
background-color: #fff;
|
110 |
+
}
|
111 |
+
.table-container {
|
112 |
+
overflow: scroll;
|
113 |
+
}
|
114 |
+
.table-container table {
|
115 |
+
table-layout: fixed;
|
116 |
+
}
|
117 |
</style>
|
118 |
</head>
|
119 |
<body>
|
|
|
128 |
<div class="tab" data-month="julio">Julio</div>
|
129 |
<div class="tab" data-month="agosto">Agosto</div>
|
130 |
</div>
|
131 |
+
<div class="table-container">
|
132 |
+
<table>
|
133 |
+
<thead>
|
134 |
+
<tr>
|
135 |
+
<th>Lunes</th>
|
136 |
+
<th>Martes</th>
|
137 |
+
<th>Miércoles</th>
|
138 |
+
<th>Jueves</th>
|
139 |
+
<th>Viernes</th>
|
140 |
+
<th>Sábado</th>
|
141 |
+
<th>Domingo</th>
|
142 |
+
</tr>
|
143 |
+
</thead>
|
144 |
+
<tbody class="row-shading junio active">
|
145 |
+
<tr>
|
146 |
+
<td class="cell cell-day cell-odd">1</td>
|
147 |
+
<td class="cell cell-day cell-even">2</td>
|
148 |
+
<td class="cell cell-day cell-odd">3</td>
|
149 |
+
<td class="cell cell-day cell-even">4</td>
|
150 |
+
<td class="cell cell-day cell-odd">5</td>
|
151 |
+
<td class="cell cell-day cell-even">6</td>
|
152 |
+
<td class="cell cell-day cell-odd">7</td>
|
153 |
+
</tr>
|
154 |
+
<tr>
|
155 |
+
<td class="cell cell-day cell-even">8</td>
|
156 |
+
<td class="cell cell-day cell-odd">9</td>
|
157 |
+
<td class="cell cell-day cell-even">10</td>
|
158 |
+
<td class="cell cell-day cell-odd">11</td>
|
159 |
+
<td class="cell cell-day cell-even">12</td>
|
160 |
+
<td class="cell cell-day cell-odd">13</td>
|
161 |
+
<td class="cell cell-day cell-even">14</td>
|
162 |
+
</tr>
|
163 |
+
<tr>
|
164 |
+
<td class="cell cell-day cell-odd">15</td>
|
165 |
+
<td class="cell cell-day cell-even">16</td>
|
166 |
+
<td class="cell cell-day cell-odd">17</td>
|
167 |
+
<td class="cell cell-day cell-even">18</td>
|
168 |
+
<td class="cell cell-day cell-odd">19</td>
|
169 |
+
<td class="cell cell-day cell-even">20</td>
|
170 |
+
<td class="cell cell-day cell-odd">21</td>
|
171 |
+
</tr>
|
172 |
+
<tr>
|
173 |
+
<td class="cell cell-day cell-even">22</td>
|
174 |
+
<td class="cell cell-day cell-odd">23</td>
|
175 |
+
<td class="cell cell-day cell-even">24</td>
|
176 |
+
<td class="cell cell-day cell-odd">25</td>
|
177 |
+
<td class="cell cell-day cell-even">26</td>
|
178 |
+
<td class="cell cell-day cell-odd">27</td>
|
179 |
+
<td class="cell cell-day cell-even">28</td>
|
180 |
+
</tr>
|
181 |
+
<tr>
|
182 |
+
<td class="cell cell-day cell-odd">29</td>
|
183 |
+
<td class="cell cell-day cell-even">30</td>
|
184 |
+
<td class="cell"></td>
|
185 |
+
<td class="cell"></td>
|
186 |
+
<td class="cell"></td>
|
187 |
+
<td class="cell"></td>
|
188 |
+
<td class="cell"></td>
|
189 |
+
</tr>
|
190 |
+
</tbody>
|
191 |
+
</table>
|
192 |
</div>
|
193 |
<div class="footer">
|
194 |
<p>Lo que es, ya ha sido, y lo que será, ya fue, y Dios busca lo que ha pasado.</p>
|
|
|
197 |
</div>
|
198 |
<script>
|
199 |
const tabs = document.querySelectorAll('.tab');
|
200 |
+
const rowShading = document.querySelector('.row-shading');
|
201 |
+
|
202 |
function showTab(event) {
|
203 |
tabs.forEach(tab => {
|
204 |
tab.classList.remove('active');
|
205 |
});
|
206 |
+
rowShading.classList.remove('active');
|
207 |
+
|
|
|
208 |
const month = event.target.dataset.month;
|
209 |
event.target.classList.add('active');
|
210 |
document.querySelector('.title').innerHTML = 'Agenda de líderes';
|
211 |
document.querySelector('.subtitle').innerHTML = `${month.charAt(0).toUpperCase() + month.slice(1)} 2023`;
|
212 |
document.querySelector('.date').innerHTML = `Lunes 1 de ${month.charAt(0).toUpperCase() + month.slice(1)}`;
|
213 |
+
document.querySelector(`.row-shading.${month}`).classList.add('active');
|
214 |
}
|
215 |
+
|
216 |
tabs.forEach(tab => {
|
217 |
tab.addEventListener('click', showTab);
|
218 |
});
|
219 |
+
|
220 |
const cells = document.querySelectorAll('.cell-day');
|
221 |
+
|
222 |
function showInput(event) {
|
223 |
const input = document.createElement('input');
|
224 |
input.value = event.target.innerHTML;
|
|
|
228 |
input.focus();
|
229 |
input.addEventListener('blur', saveInput);
|
230 |
}
|
231 |
+
|
232 |
function saveInput(event) {
|
233 |
const value = event.target.value;
|
234 |
event.target.parentNode.innerHTML = value;
|
235 |
event.target.parentNode.classList.remove('cell-edit');
|
236 |
}
|
237 |
+
|
238 |
cells.forEach(cell => {
|
239 |
cell.addEventListener('click', showInput);
|
240 |
});
|
241 |
</script>
|
242 |
</body>
|
243 |
+
</html>
|