Skip to content

Xhtml5#13

Open
fdd26 wants to merge 18 commits intoCode-Society-Lab:mainfrom
fdd26:xhtml5
Open

Xhtml5#13
fdd26 wants to merge 18 commits intoCode-Society-Lab:mainfrom
fdd26:xhtml5

Conversation

@fdd26
Copy link
Contributor

@fdd26 fdd26 commented Mar 6, 2026

XHTML5 make the code XML parser compliant. Minor JavaScript fixes to avoid broken web page, put Lenis together, add truthy checks, add some fallback color CSS to avoid WebKit var()

@fdd26
Copy link
Contributor Author

fdd26 commented Mar 6, 2026

img attributes are used by the image preloader and ignored by the final WebKit renderer and media queries override.

Copy link
Contributor

@PenguinBoi12 PenguinBoi12 left a comment

Choose a reason for hiding this comment

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

Some changes that you made breaks the design:

Before After
image Image image Image

The smooth scroll is broken on Firefox. When I think about it, there's a css rule for that that we could apply on html directly so we don't have to do all this to get the smooth scroll.

html {
    scroll-behavior: smooth;
}

PS. This and removing lenis should've been done in another PR.

Also, as far as I know, CSS var hss been supported on every major browser for a while.

<link rel="preconnect" href="https://www.gstatic.com" />
<link rel="preconnect" href="https://unpkg.com" />

<script type="text/javascript">//<!--
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the reason for doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Pre-initialize the new HTML5 tags so that CSS can be applied on them on non-WebKit browsers.

<section id="info" class="bg-secondary">
<div class="container-fluid info-container d-flex flex-fill">
<section id="info" class="section bg-secondary"><a id="Info" name="Info"></a>
<div id="info-section" class="container-fluid info-container d-flex flex-fill">
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you add sections? They don't seem to be used.

<div class="col-lg-6 d-flex justify-content-center align-items-center separation left">
<div class="row flex-column align-items-center box">
<div class="col-md-6">
<div id="goal-content" class="row flex-column align-items-center box"><a id="our-goal" name="our-goal"></a>
Copy link
Contributor

Choose a reason for hiding this comment

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

?

<a id="our-goal" name="our-goal"></a>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's called a proper HTML anchor works in all browsers

Copy link
Contributor

Choose a reason for hiding this comment

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

I understand but it's not used. We don't want to add unused code.

@fdd26
Copy link
Contributor Author

fdd26 commented Mar 15, 2026

Tested in Chrome, Safari, Firefox and Edge on Windows 11.

@fdd26 fdd26 requested a review from PenguinBoi12 March 15, 2026 23:06
document.getElementById('scroll-down').addEventListener('click', (e) => lenis.scrollTo("#info"));
});
</script>
<script type="text/javascript">//<!--
Copy link
Contributor

@PenguinBoi12 PenguinBoi12 Mar 15, 2026

Choose a reason for hiding this comment

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

This whole thing is not needed anymore since we have you added smooth scroll to html and this code doesn't replicate the mousewheel smooth scroll anyway (which we wanted to remove). Instead we could change the arrow button to this:

<a href="#info">
  <div class="floating-arrow">
    <img alt="Scroll down arrow" src="./images/arrow.svg" id="scroll-down" style="cursor:pointer;" border="0" height="90" width="130" />
  </div>
</a>

Also, same thing about //<!--

<link rel="preconnect" href="https://www.gstatic.com" />
<link rel="preconnect" href="https://unpkg.com" />

<script type="text/javascript">//<!--
Copy link
Contributor

Choose a reason for hiding this comment

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

We really don't need //<!--, as far as I know its only for old browser and we don't care about supporting them. All modern browser should handle script tag correctly. Also, I don't think this whole script is unnecessary. I pretty much always use Firefox, which it doesn't use webkit, and it works perfectly. You have to give me a better example of why this would be needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's not only old browser, but XML parsers like Rest Assured testing frameworks, which bad trip if there is any <> inside the script or style tags.

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.

2 participants