Przeglądaj źródła

fix flex

master
Muqriz 4 miesięcy temu
rodzic
commit
7f89164125
4 zmienionych plików z 61 dodań i 9 usunięć
  1. 14
    1
      industri.html
  2. 17
    4
      pembangunan.html
  3. 16
    3
      penternakan.html
  4. 14
    1
      pertanian.html

+ 14
- 1
industri.html Wyświetl plik

@@ -106,6 +106,19 @@
106 106
             var numberRegex = /\d/; // Regular expression to check for any digit
107 107
             var matchedFile;
108 108
 
109
+            var keywordMapping = {
110
+                'industri': 'industri.html',
111
+                'pembangunan': 'pembangunan.html',
112
+                'penternakan': 'penternakan.html',
113
+                'pertanian': 'pertanian.html'
114
+            };
115
+
116
+            if (keywordMapping[fileInput]) {
117
+                // If the input matches one of the keywords, redirect to the corresponding file
118
+                window.location.href = keywordMapping[fileInput];
119
+                return;
120
+            }
121
+
109 122
             if (numberRegex.test(fileInput)) {
110 123
                 // Hardcoded list of files containing numbers
111 124
                 var numberFiles = [
@@ -177,7 +190,7 @@
177 190
                 // File found, redirect to it
178 191
                 window.location.href = matchedFile;
179 192
             } else {
180
-                alert('No file containing the input ' + fileInput + ' was found.');
193
+                // alert('No file containing the input ' + fileInput + ' was found.');
181 194
             }
182 195
         });
183 196
     </script>

+ 17
- 4
pembangunan.html Wyświetl plik

@@ -68,8 +68,8 @@
68 68
             </div>
69 69
         </div>
70 70
 
71
-        <div class="text-left pt-1 container text-nowrap flex-wrap">
72
-            <div class="pt-4 flex-wrap" style="display: flex; flex-wrap: wrap;width: 100px;">
71
+        <div class="text-left pt-1 container text-nowrap flex-wrap" style="display: flex;">
72
+            <div class="pt-4 flex-wrap" style="display: flex; flex-wrap: wrap;gap: 10px;">
73 73
                 <h6 style="width: 100%;">Kuantan</h6>
74 74
                 <a href="./details/detail_hsd62438.html" class="button-23 mb-2 mr-2" style="background-color: #1F9027; color: white; border: none;" role="button">HSD 62438</a>
75 75
                 <a href="./details/detail_hsd62441.html" class="button-23 mb-2 mr-2" style="background-color: #1F9027; color: white; border: none;" role="button">HSD 62441</a>
@@ -89,7 +89,7 @@
89 89
         
90 90
 
91 91
 
92
-        <div class="text-left pt-1 pb-5 container text-nowrap flex-wrap">
92
+        <div class="text-left pt-1 pb-5 container text-nowrap flex-wrap" style="display: flex;">
93 93
             <div class="pt-4 text-nowrap flex-wrap">
94 94
                 <h6>Rompin</h6>
95 95
                 <a href="./details/detail_hsd5715.html" class="button-23 mb-2 mr-2"
@@ -132,6 +132,19 @@
132 132
             var numberRegex = /\d/; // Regular expression to check for any digit
133 133
             var matchedFile;
134 134
 
135
+            var keywordMapping = {
136
+                'industri': 'industri.html',
137
+                'pembangunan': 'pembangunan.html',
138
+                'penternakan': 'penternakan.html',
139
+                'pertanian': 'pertanian.html'
140
+            };
141
+
142
+            if (keywordMapping[fileInput]) {
143
+                // If the input matches one of the keywords, redirect to the corresponding file
144
+                window.location.href = keywordMapping[fileInput];
145
+                return;
146
+            }
147
+            
135 148
             if (numberRegex.test(fileInput)) {
136 149
                 // Hardcoded list of files containing numbers
137 150
                 var numberFiles = [
@@ -203,7 +216,7 @@
203 216
                 // File found, redirect to it
204 217
                 window.location.href = matchedFile;
205 218
             } else {
206
-                alert('No file containing the input ' + fileInput + ' was found.');
219
+                // alert('No file containing the input ' + fileInput + ' was found.');
207 220
             }
208 221
         });
209 222
     </script>

+ 16
- 3
penternakan.html Wyświetl plik

@@ -128,8 +128,8 @@
128 128
             </div>
129 129
         </div>
130 130
 
131
-        <div class="text-left pt-1 pb-5 container">
132
-            <div class="pt-4 text-nowrap flex-wrap">
131
+        <div class="text-left pt-1 pb-5 container" style="display: flex;">
132
+            <div class="pt-4 text-nowrap flex-wrap" style="gap: 10px;">
133 133
                 <h6>Rompin</h6>
134 134
                 <a href="./details/detail_hsd4638.html" class="button-23 mb-2 mr-2"
135 135
                     style="background-color: #1F9027; color: white; border: none;" role="button">HSD 4638</a>
@@ -183,6 +183,19 @@
183 183
             var numberRegex = /\d/; // Regular expression to check for any digit
184 184
             var matchedFile;
185 185
 
186
+            var keywordMapping = {
187
+                'industri': 'industri.html',
188
+                'pembangunan': 'pembangunan.html',
189
+                'penternakan': 'penternakan.html',
190
+                'pertanian': 'pertanian.html'
191
+            };
192
+
193
+            if (keywordMapping[fileInput]) {
194
+                // If the input matches one of the keywords, redirect to the corresponding file
195
+                window.location.href = keywordMapping[fileInput];
196
+                return;
197
+            }
198
+
186 199
             if (numberRegex.test(fileInput)) {
187 200
                 // Hardcoded list of files containing numbers
188 201
                 var numberFiles = [
@@ -254,7 +267,7 @@
254 267
                 // File found, redirect to it
255 268
                 window.location.href = matchedFile;
256 269
             } else {
257
-                alert('No file containing the input ' + fileInput + ' was found.');
270
+                // alert('No file containing the input ' + fileInput + ' was found.');
258 271
             }
259 272
         });
260 273
     </script>

+ 14
- 1
pertanian.html Wyświetl plik

@@ -81,6 +81,19 @@
81 81
             var numberRegex = /\d/; // Regular expression to check for any digit
82 82
             var matchedFile;
83 83
 
84
+            var keywordMapping = {
85
+                'industri': 'industri.html',
86
+                'pembangunan': 'pembangunan.html',
87
+                'penternakan': 'penternakan.html',
88
+                'pertanian': 'pertanian.html'
89
+            };
90
+
91
+            if (keywordMapping[fileInput]) {
92
+                // If the input matches one of the keywords, redirect to the corresponding file
93
+                window.location.href = keywordMapping[fileInput];
94
+                return;
95
+            }
96
+
84 97
             if (numberRegex.test(fileInput)) {
85 98
                 // Hardcoded list of files containing numbers
86 99
                 var numberFiles = [
@@ -152,7 +165,7 @@
152 165
                 // File found, redirect to it
153 166
                 window.location.href = matchedFile;
154 167
             } else {
155
-                alert('No file containing the input ' + fileInput + ' was found.');
168
+                // alert('No file containing the input ' + fileInput + ' was found.');
156 169
             }
157 170
         });
158 171
     </script>

Ładowanie…
Anuluj
Zapisz