|
27 | 27 | justify-content: center;
|
28 | 28 | align-items: center;
|
29 | 29 | }
|
30 |
| - .logo { |
31 |
| - max-width: 600px; |
32 |
| - margin-bottom: 20px; |
33 |
| - display: none; /* Hide initially */ |
34 |
| - } |
35 |
| - .logo-vertical |
36 |
| - { |
37 |
| - max-height: 300px; |
38 |
| - margin-bottom: 20px; |
39 |
| - display: none; /* Hide initially */ |
40 |
| - } |
41 |
| - .logo { display: block; } /* Show horizontal logo initially */ |
42 | 30 | h1 {
|
43 | 31 | font-size: 3em;
|
44 | 32 | margin-bottom: 10px;
|
|
53 | 41 | width: 30px;
|
54 | 42 | margin-right: 10px;
|
55 | 43 | }
|
| 44 | + .logo { |
| 45 | + max-width: 600px; |
| 46 | + display: none; |
| 47 | + } |
| 48 | + .logo-vertical { |
| 49 | + max-height: 300px; |
| 50 | + display: none; |
| 51 | + } |
| 52 | + @media (orientation: landscape) { |
| 53 | + .logo { display: block; } |
| 54 | + } |
56 | 55 | @media (orientation: portrait) {
|
57 |
| - .logo { display: none; } |
58 |
| - .logo-vertical { display: block; } /* Ensure this is visible in portrait */ |
| 56 | + .logo-vertical { display: block; } |
59 | 57 | }
|
60 | 58 | </style>
|
| 59 | + <script> |
| 60 | + document.addEventListener("DOMContentLoaded", function() { |
| 61 | + let horizImage = document.getElementById("logo-horiz"); |
| 62 | + let vertImage = document.getElementById("logo-vert"); |
| 63 | + |
| 64 | + if (window.matchMedia("(orientation: portrait)").matches) { |
| 65 | + horizImage.setAttribute("loading", "lazy"); |
| 66 | + } else { |
| 67 | + vertImage.setAttribute("loading", "lazy"); |
| 68 | + } |
| 69 | + }); |
| 70 | + </script> |
61 | 71 | </head>
|
62 | 72 | <body>
|
63 | 73 | <div class="container">
|
64 | 74 | <a href="https://github.com/libdebug/libdebug">
|
65 |
| - <img src="./images/libdebug_logo_horiz.webp" alt="libdebug Logo" class="logo"> |
66 |
| - <img src="./images/libdebug_logo_vert.webp" alt="libdebug Logo Vertical" class="logo-vertical"> |
| 75 | + <picture> |
| 76 | + <source srcset="./images/libdebug_logo_vert.webp" media="(orientation: portrait)"> |
| 77 | + <source srcset="./images/libdebug_logo_horiz.webp" media="(orientation: landscape)"> |
| 78 | + <img id="logo-horiz" src="./images/libdebug_logo_horiz.webp" alt="libdebug Logo" class="logo"> |
| 79 | + <img id="logo-vert" src="./images/libdebug_logo_vert.webp" alt="libdebug Logo Vertical" class="logo-vertical"> |
| 80 | + </picture> |
67 | 81 | </a>
|
68 | 82 | <p>
|
69 | 83 | A Python library to debug binary executables, your own way.
|
|
0 commit comments