Skip to content

Commit

Permalink
examples: fixup URLs for project subfolder
Browse files Browse the repository at this point in the history
  • Loading branch information
superzazu authored and icculus committed Dec 5, 2024
1 parent 56da4e8 commit 58f8e25
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions build-scripts/build-web-examples.pl
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ sub handle_example_dir {

my $other_examples_html = "<ul>";
foreach my $example (get_examples_for_category($category)) {
$other_examples_html .= "<li><a href='/$category/$example'>$category/$example</a></li>";
$other_examples_html .= "<li><a href='/$project/$category/$example'>$category/$example</a></li>";
}
$other_examples_html .= "</ul>";

Expand Down Expand Up @@ -225,7 +225,7 @@ sub handle_category_dir {
# !!! FIXME: image
my $example_image_url = "https://placehold.co/600x400/png";
$examples_list_html .= "
<a href='/$category/$example'>
<a href='/$project/$category/$example'>
<div>
<img src='$example_image_url' />
<div>$category/$example</div>
Expand Down Expand Up @@ -297,7 +297,7 @@ sub handle_category_dir {
# !!! FIXME: image
my $example_image_url = "https://placehold.co/600x400/png";
$homepage_list_html .= "
<a href='/$category/$example'>
<a href='/$project/$category/$example'>
<div>
<img src='$example_image_url' />
<div>$category/$example</div>
Expand Down
10 changes: 7 additions & 3 deletions examples/template-category.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@project_name@ Examples: @category_name@</title>
<link rel="stylesheet" type="text/css" href="/examples.css" />
<link
rel="stylesheet"
type="text/css"
href="/@project_name@/examples.css"
/>
<style>
main > h1 {
margin-top: 0;
Expand All @@ -19,8 +23,8 @@
<main>
<nav class="breadcrumb">
<ul>
<li><a href="/">@project_name@</a></li>
<li><a href="/@category_name@">@category_name@</a></li>
<li><a href="/@project_name@/">@project_name@</a></li>
<li><a href="/@project_name@/@category_name@">@category_name@</a></li>
</ul>
</nav>
<h1>@project_name@ examples: @category_name@</h1>
Expand Down
8 changes: 6 additions & 2 deletions examples/template-homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@project_name@ Examples</title>
<link rel="stylesheet" type="text/css" href="/examples.css" />
<link
rel="stylesheet"
type="text/css"
href="/@project_name@/examples.css"
/>
<style>
main > h1 {
margin-top: 0;
Expand All @@ -19,7 +23,7 @@
<main>
<nav class="breadcrumb">
<ul>
<li><a href="/">@project_name@</a></li>
<li><a href="/@project_name@">@project_name@</a></li>
</ul>
</nav>
<h1>@project_name@ examples</h1>
Expand Down
8 changes: 4 additions & 4 deletions examples/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>@project_name@ Example: @category_name@/@example_name@</title>
<link rel="stylesheet" type="text/css" href="/examples.css" />
<link rel="stylesheet" type="text/css" href="/@project_name@/examples.css" />
<style>
main {
display: flex;
Expand Down Expand Up @@ -182,9 +182,9 @@
<div id="content">
<nav class="breadcrumb">
<ul>
<li><a href="/">@project_name@</a></li>
<li><a href="/@category_name@">@category_name@</a></li>
<li><a href="/@category_name@/@example_name@">@example_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@/@example_name@">@example_name@</a></li>
</ul>
</nav>
<h1>@project_name@ example: @category_name@/@example_name@</h1>
Expand Down

0 comments on commit 58f8e25

Please sign in to comment.