Bonjour,
j'utilise bootstrap 3.3.7 et j'ai aussi créer un fichier css pour quelques modifications (hauteur, largeur, couleur, positionnement).
Seulement mes thumbnails ne sont pas responsive contrairement au reste de mon code et je ne vois pas pourquoi, voici mon code avec le css en dessous j'ai tenté des modification mais rien n'y fais.
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <link rel="stylesheet" type="text/css" href="testbis_jour.css"> <title>PHP ICS Parser test</title> <style>body { background-color: #eee } .caption { overflow-x: auto }</style> </head> <body> <div class="container-fluid"> <?php $showExample = array( 'interval' => true, 'range' => true, 'all' => true, ); ?> <div class="progress" id="bis"> <div class="progress-bar" id="secondbis" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"> <span class="sr-only">100% Complete</span> <table class="topTable"> <tr class="topBar"> <th class="navHeure"> <?php $hournow = new datetime(); $hournow->modify('+1 hour'); echo $hournow->format('H:i') . ' - Room: ' . $room .''; ?> </th> <th class="navDate"> <?php $hournow = new datetime(); $hournow->modify('+1 hour'); echo $hournow->format('l jS F Y'); ?> </th> <th class="navEvent"> <?php if ($showExample['interval']) { $events = $ical->eventsFromInterval('2 days ago '); if ($events) { echo 'Events scheduled today'; } else { echo 'No events scheduled today'; } $count = 1; ?> </th> </tr> </table> </div> </div> <div class="position_bar"> <table class="heures"> <tr> <th><time datetime="08:00">8h</time></th> <th><time datetime="09:00">9h</time></th> <th><time datetime="10:00">10h</time></th> <th><time datetime="11:00">11h</time></th> <th><time datetime="12:00">12h</time></th> <th><time datetime="13:00">13h</time></th> <th><time datetime="14:00">14h</time></th> <th><time datetime="15:00">15h</time></th> <th><time datetime="16:00">16h</time></th> <th><time datetime="17:00">17h</time></th> <th><time datetime="18:00">18h</time></th> <th><time datetime="19:00">19h</time></th> <th><time datetime="20:00">20h</time></th> </tr> </table> <table class="tableline"> <tr class="lines"> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> <td class="linehours"></td> </tr> </table> <div class="progress" id="first"> <div class="progress-bar" id="secondfirst" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%;"> <span class="sr-only">100% Complete</span> <div class="row"> <?php $i=0; $k=0; foreach ($events as $event) : ?> <?php echo '<div class="col-md-1 placement'.$k.'">' ?> <?php echo '<div class="thumbnail taille'.$i.'">'; ?> <div class="caption" style="text-align: center;"> <h6><?php $dtstart = $ical->iCalDateToDateTime($event->dtstart_array[3], $forceTimeZone); $dtstart->modify('+1 hour'); echo $event->summary . ' (' . $dtstart->format('d-m-Y H:i') . ') <br>'; $dtend = $ical->iCalDateToDateTime($event->dtend_array[3], $forceTimeZone); $dtend->modify('+1 hour'); echo $event->summary . ' (' . $dtend->format('d-m-Y H:i') . ')'; ?></h6> </div> <?php echo '</div>'; ?> <?php echo '</div>'; ?> <?php if ($count > 1 && $count % 3 === 0) { echo '</div><div class="row">'; } $count++; ?> <?php if ($dtstart < $dtend) { $diff=($dtend->getTimestamp() - $dtstart->getTimestamp())/60; echo '<style type="text/css"> .col-md-1 .taille'.$i.' { width: calc(0.1743em*'.$diff.'); } </style>'; } ?> <?php if ($dtstart < $dtend) { $datenow2 = new datetime('11-02-2019 08:00'); $diff2=($dtstart->getTimestamp() - $datenow2->getTimestamp())/60; echo '<style type="text/css"> .placement'.$k.' { position: relative; left: calc(0.1725em*'.$diff2.'); } </style>'; } ?> <?php $i++; $k++; endforeach ?> </div> </div> </div> </div> <?php } ?> <div class="rowbis"> <div class="row"> <?php foreach ($events as $event) : ?> <?php if ($showExample['interval']) { $events = $ical->eventsFromInterval('2 days ago'); } $dtstart = $ical->iCalDateToDateTime($event->dtstart_array[3], $forceTimeZone); $dtstart->format('d-m-Y H:i'); $dtstart->modify('+1 hour'); $dtend = $ical->iCalDateToDateTime($event->dtend_array[3], $forceTimeZone); $dtend->format('d-m-Y H:i'); $dtend->modify('+1 hour'); //$datenow = date('Y-m-d H:i'); $datenow = new datetime('11-02-2019 12:40'); $datenow->modify('+1 hour'); if (($datenow <= $dtend) && ($datenow >= $dtstart)) { ?> <div class="col-md-4"> <div class="thumbnail"> <div class="caption" style="text-align: center;"> <h2><?php echo $event->summary . ' (' . $dtstart->format('d-m-Y') . ') <br><br><br><br>'; echo ' de ' . $dtstart->format('H:i') . ' à ' . $dtend->format('H:i') . ''; ?></h2> </div> </div> </div> <?php } ?> <?php endforeach ?> </div> </div> </div> </body> </html>
PS: Je débute donc pour tous ce qui est responsive c'est la première fois que je fais
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111 body { background-color: #333 !important; } #first { height: 17.857142857142858em; margin-bottom: 1%; width: 100%; } #bis { height: 3.5714285714285716em; margin-top: 0.5%; width: 100%; } #secondfirst { background-color: #7ebc59; } #secondbis { background-color: #e6dbc9; } .col-md-1 .thumbnail { background-color: #e0474c; height: 20.83em; border-color: #e0474c; } .heures th { width: 8.33%; color: #eee; } .heures { margin-right: -0.3em; } .position_bar { margin-top: 2%; } h4 { color: #eee; } .col-md-4 .thumbnail { margin-top: 3%; height: 23.3em; background-color: #e6dbc9; } .topTable { width: 100% !important; } .topBar { width: 100% !important; } .topBar th { color: #333; width: 40% !important; } .navHeure { font-size: 20px; font-weight: bold; padding-top: 1%; } .navDate { font-size: 1.4vw; font-weight: 400; padding-top: 1%; } .navEvent { font-size: 1.4vw; font-weight: 400; padding-top: 1%; } .linehours { border-left: 0.15em solid #eee; padding: 0.4em; width: 8.33%; } .tableline { margin-right: -0.3em; }
Et voici les visuels sur mon ordinateur sans et avec la vue adaptive mozilla:
![]()
Partager