[gimp-web] content: improve download platform choice menu with bold active item.



commit b4f04844f758ca2b0175934e4b0d8e2039dac566
Author: Jehan <jehan girinstud io>
Date:   Sun Dec 5 17:25:19 2021 +0100

    content: improve download platform choice menu with bold active item.
    
    It makes the menu-like interaction more understandable.

 content/js/platform-display.js | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
---
diff --git a/content/js/platform-display.js b/content/js/platform-display.js
index fae8a7a4..931cb2ba 100644
--- a/content/js/platform-display.js
+++ b/content/js/platform-display.js
@@ -41,12 +41,16 @@
         document.getElementById('mac').style.display = 'none';
         document.getElementById('linux').style.display = 'none';
         document.getElementById('pOSTEST').innerHTML = 'Microsoft Windows.';
+
+        document.getElementById('os_win').style.fontWeight = 'bold';
     }else if ( platform.os.family.indexOf('OS X') !== -1 ){
         // OS X
         document.getElementById('win').style.display = 'none';
         document.getElementById('mac').style.display = 'block';
         document.getElementById('linux').style.display = 'none';
         document.getElementById('pOSTEST').innerHTML = 'OS X.';
+
+        document.getElementById('os_mac').style.fontWeight = 'bold';
     }else if ( platform.os.family.indexOf('iOS') !== -1 || platform.os.family.indexOf('Android') !== -1 ){
         // iOS or Android
         document.getElementById('pOSTEST').innerHTML = platform.os.family + '.';
@@ -61,29 +65,43 @@
         document.getElementById('win').style.display = 'none';
         document.getElementById('mac').style.display = 'none';
         document.getElementById('linux').style.display = 'block';
+
+        document.getElementById('os_linux').style.fontWeight = 'bold';
     }
 
     function render( os ){
+        document.getElementById('os_all').style.fontWeight = 'normal';
+        document.getElementById('os_linux').style.fontWeight = 'normal';
+        document.getElementById('os_win').style.fontWeight = 'normal';
+        document.getElementById('os_mac').style.fontWeight = 'normal';
         switch( this.id ) {
             case 'os_linux':
                 document.getElementById('linux').style.display = 'block';
                 document.getElementById('win').style.display = 'none';
                 document.getElementById('mac').style.display = 'none';
+
+                document.getElementById('os_linux').style.fontWeight = 'bold';
                 break;
             case 'os_win':
                 document.getElementById('linux').style.display = 'none';
                 document.getElementById('win').style.display = 'block';
                 document.getElementById('mac').style.display = 'none';
+
+                document.getElementById('os_win').style.fontWeight = 'bold';
                 break;
             case 'os_mac':
                 document.getElementById('linux').style.display = 'none';
                 document.getElementById('win').style.display = 'none';
                 document.getElementById('mac').style.display = 'block';
+
+                document.getElementById('os_mac').style.fontWeight = 'bold';
                 break;
             default:
                 document.getElementById('linux').style.display = 'block';
                 document.getElementById('win').style.display = 'block';
                 document.getElementById('mac').style.display = 'block';
+
+                document.getElementById('os_all').style.fontWeight = 'bold';
                 break;
         }
         return false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]