|
958 | 958 | </a> |
959 | 959 | </div> |
960 | 960 |
|
961 | | - <div |
962 | | - class="pr-6 mt-10 lg:pr-12 xl:block" |
963 | | - > |
964 | | - <ul class="flex"> |
965 | | - <li class="ml-2"> |
966 | | - <a |
967 | | - class="text-blue-dark text-sm uppercase hmc_highlight_hover" |
968 | | - href="https://2024.dashboard.survey.helmholtz-metadaten.de" |
969 | | - > |
970 | | - Data Professionals Survey 2024 |
971 | | - </a> |
972 | | - </li> |
973 | | - </ul> |
| 961 | + |
| 962 | + <div class="flex" id="survey-nav"> |
| 963 | + <div |
| 964 | + class="mt-10 mr-3" |
| 965 | + > |
| 966 | + <ul class="flex"> |
| 967 | + <li class="ml-2"> |
| 968 | + <a |
| 969 | + class="text-blue-dark text-sm uppercase survey-link" |
| 970 | + style="color: #002864;" |
| 971 | + href="https://2021.dashboard.survey.helmholtz-metadaten.de" |
| 972 | + data-survey="2021" |
| 973 | + > |
| 974 | + HMC Community Survey 2021 |
| 975 | + </a> |
| 976 | + </li> |
| 977 | + </ul> |
| 978 | + </div> |
| 979 | + <div class="mt-10">|</div> |
| 980 | + <div |
| 981 | + class="pr-6 mt-10" |
| 982 | + > |
| 983 | + <ul class="flex"> |
| 984 | + <li class="ml-2"> |
| 985 | + <a |
| 986 | + class="text-blue-dark text-sm uppercase survey-link" |
| 987 | + style="color: #002864;" |
| 988 | + href="https://2024.dashboard.survey.helmholtz-metadaten.de" |
| 989 | + data-survey="2024" |
| 990 | + > |
| 991 | + HMC Data Professionals Survey 2024 |
| 992 | + </a> |
| 993 | + </li> |
| 994 | + </ul> |
| 995 | + </div> |
974 | 996 | </div> |
975 | 997 | </div> |
976 | 998 |
|
|
2033 | 2055 | } |
2034 | 2056 | </script> |
2035 | 2057 |
|
| 2058 | + <!-- Survey Navigation Handler --> |
| 2059 | + <script> |
| 2060 | + // Variable to track which survey is selected (default: 2021) |
| 2061 | + var selected = '2021'; |
| 2062 | + |
| 2063 | + document.addEventListener('DOMContentLoaded', function() { |
| 2064 | + // Determine which survey is currently active based on URL |
| 2065 | + var currentUrl = window.location.hostname; |
| 2066 | + if (currentUrl.includes('2024.dashboard')) { |
| 2067 | + selected = '2024'; |
| 2068 | + } else { |
| 2069 | + selected = '2021'; |
| 2070 | + } |
| 2071 | + |
| 2072 | + // Apply active styling to the selected survey link |
| 2073 | + var links = document.querySelectorAll('.survey-link'); |
| 2074 | + links.forEach(function(link) { |
| 2075 | + var survey = link.getAttribute('data-survey'); |
| 2076 | + if (survey === selected) { |
| 2077 | + link.style.color = '#14c8ff'; |
| 2078 | + |
| 2079 | + } else { |
| 2080 | + link.style.color = '#002864'; |
| 2081 | + |
| 2082 | + } |
| 2083 | + }); |
| 2084 | + |
| 2085 | + // Add click handlers to update selected variable |
| 2086 | + links.forEach(function(link) { |
| 2087 | + link.addEventListener('click', function() { |
| 2088 | + selected = link.getAttribute('data-survey'); |
| 2089 | + }); |
| 2090 | + }); |
| 2091 | + }); |
| 2092 | + </script> |
| 2093 | + |
2036 | 2094 | <!-- Matomo --> |
2037 | 2095 | <script> |
2038 | 2096 | var _paq = (window._paq = window._paq || []); |
|
0 commit comments