Skip to content

Commit afa4d41

Browse files
committed
fixed responsive design
1 parent acdadd9 commit afa4d41

File tree

4 files changed

+243
-163
lines changed

4 files changed

+243
-163
lines changed

docs/css/styles.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,17 @@ html, body { height: 100%; }
146146
.scroll-touch {
147147
overflow-y: auto;
148148
-webkit-overflow-scrolling: touch;
149+
}
150+
151+
@media (max-width: 640px) {
152+
#raceGraph {
153+
height: 250px !important;
154+
}
155+
}
156+
157+
/* orta ve üstü ekranlarda Chart.js’in kendi responsive ölçülerini kullansın */
158+
@media (min-width: 641px) {
159+
#raceGraph {
160+
height: auto !important;
161+
}
149162
}

docs/index.html

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ <h2 class="text-3xl font-bold mb-4 text-indigo-600">
5050
</section>
5151

5252
<!-- WIKI -->
53-
<section id="wikiSection" class="container mx-auto p-8 flex flex-col md:flex-row gap-10">
54-
<nav class="w-full md:w-64 bg-blue-900/90 rounded-2xl shadow-md p-6 sticky top-24">
53+
<section id="wikiSection" class="container mx-auto p-4 md:p-8 flex flex-col md:flex-row gap-4 md:gap-10">
54+
<nav class="w-full md:w-64 bg-blue-900/90 rounded-2xl shadow-md p-4 md:p-6 md:sticky md:top-24">
5555
<h2 class="text-xl font-bold border-b pb-3 mb-5 text-gray-800 dark:text-gray-100">Contents</h2>
5656
<ul class="space-y-3 text-gray-700 dark:text-gray-300">
5757
<li><a href="#intro" class="block px-3 py-2 rounded hover:bg-indigo-600/90 transition">Welcome</a></li>
@@ -85,7 +85,7 @@ <h2 class="text-xl font-bold border-b pb-3 mb-5 text-gray-800 dark:text-gray-100
8585
</nav>
8686

8787
<div class="flex-1">
88-
<article id="intro" class="bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
88+
<article id="intro" class="bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
8989
<h2 class="text-3xl font-bold text-indigo-600 mb-4">Welcome to the Algorithm Wiki</h2>
9090
<p class="mb-3">
9191
Explore foundational algorithms used in pathfinding, sorting, and decision-making.
@@ -96,7 +96,7 @@ <h2 class="text-3xl font-bold text-indigo-600 mb-4">Welcome to the Algorithm Wik
9696
</article>
9797

9898
<!-- BFS -->
99-
<article id="bfs" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
99+
<article id="bfs" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
100100
<h3 class="text-2xl font-bold text-indigo-500 mb-4">Breadth-First Search (BFS)</h3>
101101
<p class="mb-3">BFS explores a graph layer by layer from the start node, guaranteeing the shortest path in
102102
unweighted graphs. It employs a <em>queue</em> to track frontier nodes.</p>
@@ -123,7 +123,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
123123
</article>
124124

125125
<!-- DFS -->
126-
<article id="dfs" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
126+
<article id="dfs" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
127127
<h3 class="text-2xl font-bold text-indigo-500 mb-4">Depth-First Search (DFS)</h3>
128128
<p class="mb-3">DFS dives deep along branches before backtracking, using recursion or an explicit
129129
<em>stack</em>. It excels at exploring tree-like structures and detecting cycles.</p>
@@ -150,7 +150,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
150150
</article>
151151

152152
<!-- Dijkstra -->
153-
<article id="dijkstra" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
153+
<article id="dijkstra" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
154154
<h3 class="text-2xl font-bold text-indigo-500 mb-4">Dijkstra’s Algorithm</h3>
155155
<p class="mb-3">Dijkstra computes shortest paths in graphs with non-negative edge weights by expanding the node
156156
with the smallest tentative distance stored in a <em>min-heap</em>.</p>
@@ -178,7 +178,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
178178
</article>
179179

180180
<!-- A* -->
181-
<article id="astar" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
181+
<article id="astar" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
182182
<h3 class="text-2xl font-bold text-indigo-500 mb-4">A* Search Algorithm</h3>
183183
<p class="mb-3">A* augments Dijkstra with a heuristic function <code>h(n)</code> estimating remaining cost to
184184
the goal, dramatically reducing explored nodes while preserving optimality if the heuristic is
@@ -213,7 +213,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
213213
</article>
214214

215215
<!-- Bubble Sort -->
216-
<article id="bubble-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
216+
<article id="bubble-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
217217
<h3 class="text-2xl font-bold text-emerald-600 mb-4">Bubble Sort</h3>
218218
<p class="mb-3">Repeatedly swaps adjacent out-of-order elements, letting the largest “bubble” to the end each
219219
pass. Simple but slow (quadratic time).</p>
@@ -233,7 +233,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
233233
</article>
234234

235235
<!-- Selection Sort -->
236-
<article id="selection-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
236+
<article id="selection-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
237237
<h3 class="text-2xl font-bold text-emerald-600 mb-4">Selection Sort</h3>
238238
<p class="mb-3">Finds the smallest element in the unsorted region and swaps it to the front. Performs
239239
<em>n</em> passes regardless of initial order.</p>
@@ -252,7 +252,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
252252
</article>
253253

254254
<!-- Insertion Sort -->
255-
<article id="insertion-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
255+
<article id="insertion-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
256256
<h3 class="text-2xl font-bold text-emerald-600 mb-4">Insertion Sort</h3>
257257
<p class="mb-3">Builds the final sorted list one element at a time by inserting each new element into the correct
258258
position among already-sorted elements.</p>
@@ -270,7 +270,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
270270
</article>
271271

272272
<!-- Merge Sort -->
273-
<article id="merge-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
273+
<article id="merge-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
274274
<h3 class="text-2xl font-bold text-emerald-600 mb-4">Merge Sort</h3>
275275
<p class="mb-3">Divide-and-conquer: recursively splits the list, sorts each half, then merges sorted halves. It’s
276276
stable and guarantees O(n log n).</p>
@@ -296,7 +296,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
296296
</article>
297297

298298
<!-- Quick Sort -->
299-
<article id="quick-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
299+
<article id="quick-sort" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
300300
<h3 class="text-2xl font-bold text-emerald-600 mb-4">Quick Sort</h3>
301301
<p class="mb-3">Picks a pivot, partitions elements into &lt; pivot, = pivot, &gt; pivot, then recursively sorts
302302
partitions. Average O(n log n) time and <em>in-place</em> (O(log n) extra space).</p>
@@ -314,7 +314,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
314314
</article>
315315

316316
<!-- Greedy -->
317-
<article id="greedy" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
317+
<article id="greedy" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
318318
<h3 class="text-2xl font-bold text-fuchsia-500 mb-4">Greedy Assignment</h3>
319319
<p class="mb-3">Iteratively picks the locally best pair (highest score), removes them from the pool, and repeats
320320
until empty. Fast (typically O(n²)) but may miss the global optimum.</p>
@@ -332,7 +332,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
332332
</article>
333333

334334
<!-- Monte Carlo -->
335-
<article id="monte-carlo" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
335+
<article id="monte-carlo" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
336336
<h3 class="text-2xl font-bold text-fuchsia-500 mb-4">Monte Carlo Search</h3>
337337
<p class="mb-3">Generates many random assignments, scores each, and retains the best. Quality improves with more
338338
iterations but runtime grows linearly.</p>
@@ -352,7 +352,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
352352
</article>
353353

354354
<!-- Simulated Annealing -->
355-
<article id="simulated-annealing" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
355+
<article id="simulated-annealing" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
356356
<h3 class="text-2xl font-bold text-fuchsia-500 mb-4">Simulated Annealing</h3>
357357
<p class="mb-3">Starts with a random solution, applies random swaps, and occasionally accepts worse moves with
358358
probability exp(-Δ/T). Temperature <em>T</em> gradually cools, reducing uphill moves over time.</p>
@@ -377,7 +377,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
377377
</article>
378378

379379
<!-- Genetic Algorithm -->
380-
<article id="genetic" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
380+
<article id="genetic" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
381381
<h3 class="text-2xl font-bold text-fuchsia-500 mb-4">Genetic Algorithm</h3>
382382
<p class="mb-3">Maintains a population of candidate solutions, selects parents by fitness, produces offspring via
383383
crossover and mutation, and iterates across generations.</p>
@@ -395,7 +395,7 @@ <h4 class="text-lg font-semibold mb-2">Pseudocode</h4>
395395
</article>
396396

397397
<!-- Tabu Search -->
398-
<article id="tabu" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-8">
398+
<article id="tabu" class="hidden bg-white border-2 border-indigo-600 rounded-2xl shadow-md p-6 md:p-8">
399399
<h3 class="text-2xl font-bold text-fuchsia-500 mb-4">Tabu Search</h3>
400400
<p class="mb-3">Explores the neighborhood of the current solution while maintaining a short-term memory
401401
(<em>tabu list</em>) of recent moves to prevent cycling.</p>

0 commit comments

Comments
 (0)