Skip to content

Conversation

@J-PIE-314
Copy link
Contributor

@J-PIE-314 J-PIE-314 commented Apr 27, 2025

Instead of leading you to the list of all screenshots, the featured screenshot will now lead you to its respective webpage.

Instead of leading you to the list of all screenshots, the featured screenshot should now lead you to its respective webpage.
Copy link
Member

@2TallTyler 2TallTyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this change, this had been bothering me for a while but never enough to actually fix it. 😉

Copy link
Contributor

@auge8472 auge8472 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I miss the slash as separator between the base.url and the page for the screenshot in question in random_screenshot.id.

@glx22
Copy link
Contributor

glx22 commented Apr 28, 2025

Well <img src> right under doesn't have the slash either.

@J-PIE-314
Copy link
Contributor Author

@glx22 is correct, there is no need for the slash to be visible in the code here, and the build preview confirms this: preview

@J-PIE-314 J-PIE-314 requested a review from auge8472 April 28, 2025 12:07
@auge8472
Copy link
Contributor

@glx22 is correct, there is no need for the slash to be visible in the code here, and the build preview confirms this: preview

Then I want to ask, why the current link to the screenshots page (the one which should be replaced) has this hardcoded slash. Does it mean, that {{ site.baseurl }} sometimes contains a trailing slash on its own and sometimes not, depending to its value? I don't find anyting regarding in the repo, I'm at least confused.

@J-PIE-314
Copy link
Contributor Author

The slash should be generated by the code: {{ random_screenshot.id }}.
According to mademistakes.com:
"baseurl is only necessary when hosting your site in a sub-directory. Project sites hosted on GitHub Pages are the common use-case of this variable."

@auge8472
Copy link
Contributor

The slash should be generated by the code: {{ random_screenshot.id }}.

Thank you for the hint. Didn't see anything in the _config.yml because there base_url is empty, so it wasn't clear to me, what happens. Anyway.

@2TallTyler 2TallTyler changed the title Display a larger resolution of the featured screenshot when clicked Change: Display a larger resolution of the featured screenshot when clicked Apr 28, 2025
@2TallTyler 2TallTyler merged commit 068c824 into OpenTTD:main Apr 28, 2025
7 checks passed
@J-PIE-314 J-PIE-314 deleted the patch-1 branch April 28, 2025 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants