Skip to content

Commit f730248

Browse files
committed
feat: update 404 page styling and enhance broken link reporting details
Signed-off-by: ananyaa <dk80655@gmail.com>
1 parent be49a0f commit f730248

2 files changed

Lines changed: 21 additions & 10 deletions

File tree

‎src/sections/404/404.style.js‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ const L404SectionWrapper = styled.section`
2121
}
2222
.button-row {
2323
display: flex;
24-
flex-direction: row;
25-
justify-content: center;
26-
gap: 1.5rem;
27-
flex-wrap: wrap;
28-
margin-top: 2.5rem;
24+
flex-direction: column;
2925
3026
img {
3127
display: block;
@@ -38,6 +34,7 @@ const L404SectionWrapper = styled.section`
3834
}
3935
4036
button {
37+
margin-top: 2.5rem;
4138
color: black;
4239
}
4340
}

‎src/sections/404/index.js‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,28 @@ const L404 = () => {
9090
if (typeof window !== "undefined") {
9191
const brokenUrl = window.location.href;
9292
const referrer = document.referrer || "Direct / Bookmark";
93+
const platform = navigator.platform || "Unknown OS";
9394
const userAgent = navigator.userAgent;
9495
const issueTitle = encodeURIComponent("[404] Broken Link Found");
9596
const issueBody = encodeURIComponent(
96-
"### 404 Broken Link Report\n\n" +
97-
`- **Broken URL:** ${brokenUrl}\n` +
98-
`- **Referrer:** ${referrer}\n` +
99-
`- **User Agent:** ${userAgent}\n\n` +
100-
"*Reported automatically by the 404 Page.*",
97+
"### Description\n\n" +
98+
"Broken link encountered on the Layer5 website.\n\n" +
99+
`- Broken URL: ${brokenUrl}\n` +
100+
`- Referrer: ${referrer}\n\n` +
101+
"### Expected Behavior\n\n" +
102+
"The requested page should resolve successfully instead of returning a 404 page.\n\n" +
103+
"### Screenshots\n\n" +
104+
"N/A\n\n" +
105+
"### Environment:\n" +
106+
`- Host OS: ${platform}\n` +
107+
`- Browser: ${userAgent}\n\n` +
108+
"---\n\n" +
109+
'<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/layer5/5-light-small.svg" width="24px" align="left" /><h2>Contributor Resources and <a href="https://layer5.io/community/handbook">Handbook</a></h2>\n\n' +
110+
"The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the [`master` branch](https://github.com/layer5io/layer5/tree/master).\n" +
111+
"- 📚 See [contributing instructions](https://github.com/layer5io/layer5/blob/master/CONTRIBUTING.md).\n" +
112+
"- 🎨 Wireframes and [designs for Layer5 site](https://www.figma.com/file/5ZwEkSJwUPitURD59YHMEN/Layer5-Designs) in Figma [(open invite)](https://www.figma.com/team_invite/redeem/GvB8SudhEOoq3JOvoLaoMs)\n" +
113+
"- 🙋🏾🙋🏼 Questions: [Discussion Forum](https://discuss.meshery.io) and [Community Slack](https://slack.layer5.io).\n\n" +
114+
'<img src="https://raw.githubusercontent.com/layer5io/layer5/master/.github/assets/images/buttons/community.webp" height="22px" align="left" />Join the Layer5 Community by submitting your [community member form](https://layer5.io/newcomer).',
101115
);
102116
setReportUrl(
103117
`https://github.com/layer5io/layer5/issues/new?template=bug_report.md&title=${issueTitle}&body=${issueBody}`,

0 commit comments

Comments
 (0)