27
27
display : flex;
28
28
flex-direction : column;
29
29
box-sizing : border-box;
30
- padding : 5 vmin ;
30
+ padding : 4 vmin ;
31
31
}
32
32
.background {
33
33
position : absolute;
44
44
align-items : center;
45
45
justify-content : center;
46
46
flex-shrink : 0 ;
47
- margin-bottom : 4 vmin ;
47
+ margin-bottom : 2.5 vmin ;
48
48
}
49
49
.logo {
50
- height : 12 vmin ;
50
+ height : 10 vmin ;
51
51
width : auto;
52
- margin-right : 3 vmin ;
52
+ margin-right : 2.5 vmin ;
53
53
}
54
54
.logo-text {
55
55
font-family : "Inter" , sans-serif;
56
- font-size : 6 vmin ;
56
+ font-size : 5 vmin ;
57
57
line-height : 1.1 ;
58
58
font-weight : 800 ;
59
59
color : # 1f2937 ;
62
62
flex-grow : 1 ;
63
63
display : flex;
64
64
flex-direction : column;
65
- justify-content : center ;
65
+ justify-content : space-around ;
66
66
text-align : center;
67
+ gap : 2vmin ;
67
68
}
68
69
.title {
69
- font-size : clamp (30px , 6.2vmin , 62px );
70
70
font-weight : 800 ;
71
71
line-height : 1.2 ;
72
72
color : # 1f2937 ;
73
- margin : 0 0 4 vmin 0 ;
73
+ margin : 0 ;
74
74
display : -webkit-box;
75
- -webkit-line-clamp : 5 ;
75
+ -webkit-line-clamp : 4 ; /* More room for long titles */
76
76
-webkit-box-orient : vertical;
77
77
overflow : hidden;
78
78
}
79
+ .description {
80
+ line-height : 1.4 ;
81
+ color : # 4b5563 ;
82
+ margin : 0 ;
83
+ display : -webkit-box;
84
+ -webkit-line-clamp : 6 ; /* Allow more lines for description */
85
+ -webkit-box-orient : vertical;
86
+ overflow : hidden;
87
+ word-wrap : break-word;
88
+ }
79
89
.speakers {
80
- margin-bottom : 4vmin ;
81
90
display : flex;
82
91
justify-content : center;
83
92
align-items : center;
84
- min-height : 28 vmin ;
93
+ min-height : 45 vmin ; /* Adjusted to give text more space */
85
94
}
86
95
.speakers-container {
87
96
display : flex;
88
97
justify-content : center;
89
98
align-items : flex-start;
90
- gap : 2.5 vmin ;
99
+ gap : 2 vmin ;
91
100
flex-wrap : wrap;
92
101
max-width : 95% ;
93
102
}
100
109
.speaker-img {
101
110
border-radius : 50% ;
102
111
object-fit : cover;
103
- border : 0.8 vmin solid white;
112
+ border : 0.7 vmin solid white;
104
113
box-shadow : 0 0.5vmin 1.5vmin rgba (0 , 0 , 0 , 0.15 );
105
114
flex-shrink : 0 ;
106
115
}
107
116
.speaker-name {
108
- font-size : clamp (18px , 3.2vmin , 28px );
109
117
font-weight : 500 ;
110
118
color : # 374151 ;
111
119
line-height : 1.2 ;
112
120
max-width : 100% ;
113
121
word-wrap : break-word;
114
122
}
115
123
.event-details {
116
- font-size : clamp (28 px , 5 .5vmin , 55 px );
124
+ font-size : clamp (24 px , 4 .5vmin , 45 px ); /* Default size */
117
125
line-height : 1.4 ;
118
126
color : # 4b5563 ;
119
127
margin : 0 ;
120
128
font-weight : 500 ;
129
+ text-shadow :
130
+ -2px -2px 6px white, 2px -2px 6px white,
131
+ -2px 2px 6px white, 2px 2px 6px white,
132
+ 0 0 15px white, 0 0 25px white, 0 0 35px white;
121
133
}
122
134
.event-date {
123
135
font-weight : 700 ;
124
136
color : # 667eea ;
125
137
}
126
138
.footer {
127
- font-size : clamp (20 px , 4 vmin , 40 px );
139
+ font-size : clamp (18 px , 3.5 vmin , 35 px );
128
140
font-weight : 500 ;
129
141
color : # 667eea ;
130
142
text-align : center;
131
143
flex-shrink : 0 ;
132
- margin-top : 4 vmin ;
144
+ margin-top : 2.5 vmin ;
133
145
}
134
146
</ style >
135
147
</ head >
142
154
</ div >
143
155
< div class ="main-content ">
144
156
< h1 class ="title "> PAGE_TITLE</ h1 >
157
+ < p class ="description "> PAGE_DESCRIPTION</ p >
145
158
< div class ="speakers ">
146
159
< div class ="speakers-container ">
147
160
<!-- SPEAKER_IMAGES_HTML will be injected here -->
@@ -158,36 +171,74 @@ <h1 class="title">PAGE_TITLE</h1>
158
171
< script >
159
172
document . addEventListener ( 'DOMContentLoaded' , ( ) => {
160
173
const speakerContainer = document . querySelector ( '.speakers-container' ) ;
161
- if ( ! speakerContainer ) return ;
174
+ const descriptionEl = document . querySelector ( '.description' ) ;
175
+ const titleEl = document . querySelector ( '.title' ) ;
176
+ const eventDetailsEl = document . querySelector ( '.event-details' ) ;
177
+
178
+ if ( ! speakerContainer || ! titleEl ) return ;
162
179
const speakerItems = speakerContainer . querySelectorAll ( '.speaker-item' ) ;
163
180
const speakerCount = speakerItems . length ;
164
181
165
- if ( speakerCount === 0 ) return ;
182
+ // Logic for description visibility
183
+ if ( descriptionEl ) {
184
+ if ( ! descriptionEl . textContent || descriptionEl . textContent . trim ( ) === '' ) {
185
+ descriptionEl . style . display = 'none' ;
186
+ }
187
+ }
188
+
189
+ if ( speakerCount >= 1 && speakerCount <= 6 ) {
190
+ // Larger sizes for 1-6 speakers
191
+ titleEl . style . fontSize = 'clamp(32px, 6.0vmin, 60px)' ;
192
+ if ( descriptionEl ) descriptionEl . style . fontSize = 'clamp(22px, 4.3vmin, 42px)' ;
193
+ // Reduced date/time size to give more room to description
194
+ if ( eventDetailsEl ) eventDetailsEl . style . fontSize = 'clamp(32px, 5.5vmin, 55px)' ;
195
+
196
+ let imgSize = '27vmin' ; // Default for 4-6 speakers
197
+ let nameSize = 'clamp(20px, 3.5vmin, 32px)' ;
166
198
167
- let size = '22vmin' ;
199
+ if ( speakerCount === 1 ) { imgSize = '51vmin' ; }
200
+ else if ( speakerCount === 2 ) { imgSize = '37vmin' ; }
201
+ else if ( speakerCount === 3 ) { imgSize = '32vmin' ; }
168
202
169
- if ( speakerCount === 1 ) {
170
- size = '42vmin' ;
171
- } else if ( speakerCount === 2 ) {
172
- size = '32vmin' ;
173
- } else if ( speakerCount === 3 ) {
174
- size = '27vmin' ;
175
- } else if ( speakerCount >= 4 && speakerCount <= 6 ) {
176
- size = '24vmin' ;
177
- } else if ( speakerCount > 6 ) {
178
- size = '20vmin' ;
179
- }
203
+ speakerItems . forEach ( item => {
204
+ item . style . width = imgSize ;
205
+ const img = item . querySelector ( '.speaker-img' ) ;
206
+ const name = item . querySelector ( '.speaker-name' ) ;
207
+ if ( img ) {
208
+ img . style . width = imgSize ;
209
+ img . style . height = imgSize ;
210
+ }
211
+ if ( name ) {
212
+ name . style . fontSize = nameSize ;
213
+ }
214
+ } ) ;
215
+ } else { // 0 or 7+ speakers
216
+ // Smaller sizes for 7+ speakers
217
+ titleEl . style . fontSize = 'clamp(28px, 5.5vmin, 55px)' ;
218
+ if ( descriptionEl ) descriptionEl . style . fontSize = 'clamp(28px, 5.2vmin, 52px)' ;
219
+
220
+ let imgSize = '18vmin' ;
221
+ let nameSize = 'clamp(16px, 2.8vmin, 26px)' ;
222
+ if ( speakerCount > 8 ) {
223
+ imgSize = '16vmin' ;
224
+ nameSize = 'clamp(14px, 2.5vmin, 24px)' ;
225
+ }
180
226
181
- speakerItems . forEach ( item => {
182
- item . style . width = size ;
183
- const img = item . querySelector ( '.speaker-img' ) ;
184
- if ( img ) {
185
- img . style . width = size ;
186
- img . style . height = size ;
187
- }
188
- } ) ;
227
+ speakerItems . forEach ( item => {
228
+ item . style . width = imgSize ;
229
+ const img = item . querySelector ( '.speaker-img' ) ;
230
+ const name = item . querySelector ( '.speaker-name' ) ;
231
+ if ( img ) {
232
+ img . style . width = imgSize ;
233
+ img . style . height = imgSize ;
234
+ }
235
+ if ( name ) {
236
+ name . style . fontSize = nameSize ;
237
+ }
238
+ } ) ;
239
+ }
189
240
} ) ;
190
241
</ script >
191
242
192
243
</ body >
193
- </ html >
244
+ </ html >
0 commit comments