Menu

Our homepage serves 24 logo elements for 12 logo files, and four more files nobody has ever requested
📰

Our homepage serves 24 logo elements for 12 logo files, and four more files nobody has ever requested

DEV Community: html·Daniel Pertu·about 1 month ago
#iowhYhH4
#devto2#devto#dev#bytes#logos
Long article (1028 words) — no AI summary yet.
Reading 0:00
15s threshold

The CogniPrep landing page has a wall of company logos under the hero with the caption "Some companies that our clients have applied to". Twelve logos, three rows of four, about as simple as a component gets.

Here is what the deployed HTML actually contains:

curl -s https://cogniprep.app/ | grep -o '<img[^>]*logos/[a-z-]*\.svg[^>]*>' | wc -l

Enter fullscreen mode

Exit fullscreen mode

Every logo twice.

Why there are two of each

The hero is a two-column layout on desktop with the grid in the right column, and a single column on mobile with the grid underneath the buttons. One element cannot be in two places in the DOM, so the page does this:

{ /* Right Column - Company Grid */ } < div className = "animate-fade-in mt-8 hidden md:block" > < CompanyGrid /> </ div >

{ /* Mobile company grid */ } < div className = "animate-fade-in md:hidden" > < CompanyGrid /> </ div >

Enter fullscreen mode

Exit fullscreen mode

hidden md:block and md:hidden , so exactly one is ever visible.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.