mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-11 13:05:16 +00:00
examples: When linking to directories, append a '/' to the URL.
This works without it, but generates an extra redirect on the web server to the same a URL with the '/' appended, so we might as well supply it ourselves and remove the extra roundtrip to the server.
This commit is contained in:
@@ -227,7 +227,7 @@ sub handle_example_dir {
|
|||||||
|
|
||||||
my $other_examples_html = "<ul>";
|
my $other_examples_html = "<ul>";
|
||||||
foreach my $example (get_examples_for_category($category)) {
|
foreach my $example (get_examples_for_category($category)) {
|
||||||
$other_examples_html .= "<li><a href='/$project/$category/$example'>$category/$example</a></li>";
|
$other_examples_html .= "<li><a href='/$project/$category/$example/'>$category/$example</a></li>";
|
||||||
}
|
}
|
||||||
$other_examples_html .= "</ul>";
|
$other_examples_html .= "</ul>";
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ sub generate_example_thumbnail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return "
|
return "
|
||||||
<a href='/$project/$category/$example'>
|
<a href='/$project/$category/$example/'>
|
||||||
<div>
|
<div>
|
||||||
<img src='$example_image_url' $example_mouseover_html />
|
<img src='$example_image_url' $example_mouseover_html />
|
||||||
<div>$example_no_num</div>
|
<div>$example_no_num</div>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<nav class="breadcrumb">
|
<nav class="breadcrumb">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/@project_name@/">@project_name@</a></li>
|
<li><a href="/@project_name@/">@project_name@</a></li>
|
||||||
<li><a href="/@project_name@/@category_name@">@category_name@</a></li>
|
<li><a href="/@project_name@/@category_name@/">@category_name@</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<h1>@project_name@ examples: @category_description@</h1>
|
<h1>@project_name@ examples: @category_description@</h1>
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<main>
|
<main>
|
||||||
<nav class="breadcrumb">
|
<nav class="breadcrumb">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/@project_name@">@project_name@</a></li>
|
<li><a href="/@project_name@/">@project_name@</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<h1>@project_name@ examples</h1>
|
<h1>@project_name@ examples</h1>
|
||||||
|
|||||||
@@ -202,9 +202,9 @@
|
|||||||
<div id="content">
|
<div id="content">
|
||||||
<nav class="breadcrumb">
|
<nav class="breadcrumb">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="/@project_name@">@project_name@</a></li>
|
<li><a href="/@project_name@/">@project_name@</a></li>
|
||||||
<li><a href="/@project_name@/@category_name@">@category_name@</a></li>
|
<li><a href="/@project_name@/@category_name@/">@category_name@</a></li>
|
||||||
<li><a href="/@project_name@/@category_name@/@example_name@">@example_name@</a></li>
|
<li><a href="/@project_name@/@category_name@/@example_name@/">@example_name@</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
Reference in New Issue
Block a user