Skip to content

Commit eb6d6cc

Browse files
author
Aldo Caneo
committed
Add media icons on table schedule and change design
1 parent 11fd30b commit eb6d6cc

5 files changed

Lines changed: 66 additions & 34 deletions

File tree

assets/css/base.css

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
body {
2+
background: rgb(248, 249, 250);
23
text-align: center;
3-
//background: linear-gradient(135deg, #008, #888, #800);
4-
background:linear-gradient(135deg, blue, white, red);
5-
color: white;
64
font-size:24px;
75
}
86

97
table {
108
width: 100%;
9+
background: white;
1110
}
1211

1312
th, td {

assets/css/schedule.css

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
table#schedule {
22
text-align: left;
33
font-size: 20px;
4+
margin: 0px 4%;
45
}
56

67
table#schedule th, table#schedule td {
7-
border: 1px solid lightgray;
8+
border: solid 12px rgb(248, 249, 250);
89
padding: 20px;
910
}
1011

1112
#schedule th {
1213
font-size: 24px;
1314
}
1415

16+
#schedule td.content {
17+
display: flex;
18+
}
19+
1520
.photo-speaker {
1621
vertical-align: top;
1722
align-items: left;
@@ -30,7 +35,7 @@ table#schedule th, table#schedule td {
3035
}
3136

3237
.author {
33-
color: cyan;
38+
color: #888;
3439
font-weight: bold;
3540
font-style: italic;
3641
}
@@ -45,9 +50,11 @@ table#schedule th, table#schedule td {
4550
.level.Básico {
4651
background: green;
4752
}
53+
4854
.level.Intermedio {
4955
background: yellow;
5056
}
57+
5158
.level.Avanzado {
5259
background: red;
5360
}
@@ -61,5 +68,6 @@ table#schedule th, table#schedule td {
6168
}
6269

6370
.category.Auto {
64-
background: magenta;
71+
background: #808;
72+
color: white;
6573
}

assets/js/copiapo/schedule.js

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default () => {
6565
author: 'Andrés Ibañez',
6666
title: 'Ciencia de datos y python',
6767
photos: ['Andres_Ibanez.jpeg'],
68-
category: 'Datos'},
68+
category: 'Data'},
6969
{
7070
block: '11:55 - 12:10',
7171
author: 'Eduardo Espinoza Norambuena',
@@ -114,14 +114,18 @@ export default () => {
114114
const blockCell = row.insertCell();
115115
blockCell.innerHTML = obj.block;
116116
const eventCell = row.insertCell();
117+
eventCell.className = "content"
118+
const profileDiv = document.createElement("div");
119+
const photosDiv = document.createElement("div");
120+
const mediaDiv = document.createElement("div");
121+
const eventDiv = document.createElement("div");
122+
eventDiv.className='event';
117123
obj.photos.forEach(photo => {
118124
const img = document.createElement('img')
119125
img.className='photo-speaker';
120126
img.src= 'assets/speakers/copiapo/'+ photo;
121-
eventCell.appendChild(img)
127+
photosDiv.appendChild(img)
122128
});
123-
const eventDiv = document.createElement("div");
124-
eventDiv.className='event'
125129
const titleDiv = document.createElement("div");
126130
titleDiv.className = 'title';
127131
titleDiv.innerHTML = obj.title;
@@ -142,6 +146,31 @@ export default () => {
142146
categoryDiv.innerHTML = obj.category;
143147
eventDiv.appendChild(categoryDiv);
144148
}
149+
let link, icon
150+
const urls = {
151+
github: 'https://github.com/',
152+
facebook: 'https://www.facebook.com/',
153+
instagram: 'https://www.instagram.com/',
154+
youtube: 'https://www.youtube.com/',
155+
twitter: 'https://x.com/',
156+
linkedin: 'https://www.linkedin.com/',
157+
twitch: 'https://www.twitch.com/',
158+
discord: 'https://discord.gg/',
159+
}
160+
Object.keys(urls).forEach(key=>{
161+
if (key in obj){
162+
link = document.createElement("a");
163+
link.href = `${urls[key]}${obj[key]}`;
164+
link.target = '_blank'
165+
icon = document.createElement("i");
166+
icon.className = `bi bi-${key}`
167+
link.appendChild(icon);
168+
mediaDiv.appendChild(link);
169+
}
170+
})
171+
profileDiv.appendChild(photosDiv)
172+
profileDiv.appendChild(mediaDiv)
173+
eventCell.appendChild(profileDiv)
145174
eventCell.appendChild(eventDiv)
146175
})
147176
}
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<div class="dark-background">
2-
<table id="schedule"/>
3-
<thead>
4-
<tr>
5-
<th>Módulo</th>
6-
<th>Evento</th>
7-
</tr>
8-
</thead>
9-
<tbody>
10-
</tbody>
11-
</table>
12-
</div>
1+
<table id="schedule"/>
2+
<thead>
3+
<tr>
4+
<th>Módulo</th>
5+
<th>Evento</th>
6+
</tr>
7+
</thead>
8+
<tbody>
9+
</tbody>
10+
</table>
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
<div class="dark-background">
2-
<table id="schedule"/>
3-
<thead>
4-
<tr>
5-
<th>Módulo</th>
6-
<th>Evento</th>
7-
</tr>
8-
</thead>
9-
<tbody>
10-
</tbody>
11-
</table>
12-
</div>
1+
<table id="schedule"/>
2+
<thead>
3+
<tr>
4+
<th>Módulo</th>
5+
<th>Evento</th>
6+
</tr>
7+
</thead>
8+
<tbody>
9+
</tbody>
10+
</table>

0 commit comments

Comments
 (0)