Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>retrozinndev</title>
<link rel="icon" href="https://github.com/retrozinndev.png">
<link rel="stylesheet" href="resources/stylesheet.css">
<link rel="stylesheet" href="/resources/stylesheet.css">
<script src="/resources/js/redirect-lang.js"></script>
</head>
<header class="navigation-header">
<section id="top">
Expand All @@ -28,16 +29,9 @@
</section>
</header>
<body>
<script>
const browserLang = navigator.language;
if(browserLang.startsWith("pt")) {
window.location.href="/br";
} else {
window.location.href="/en";
}
</script>
<main>
<div class="container">
<br>
<div class="detect-lang">
<h1>Detecting browser language and redirecting...</h1>
</div>
Expand Down
6 changes: 6 additions & 0 deletions resources/js/redirect-lang.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const browserLang = navigator.language;
if(browserLang.startsWith("pt")) {
window.location.href="/br";
} else {
window.location.href="/en";
}