update public/index.html, src/views/Home/Navbar/Laptop/index.js and src/views/Home/Navbar/Laptop/index.scss

front
Reza_ashrafi 2 years ago
parent 0be1b78bd2
commit 847cf6415b
  1. 139
      public/index.html
  2. 9
      src/views/Home/Navbar/Laptop/index.js
  3. 12
      src/views/Home/Navbar/Laptop/index.scss

@ -1,69 +1,80 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta
name="viewport"
content="width=device-width, initial-scale=1"
user-scalable="false"
/>
<meta name="theme-color" content="#000000" />
<meta name="description" content="دانوین" />
<link
href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css"
rel="stylesheet"
/>
<meta name="mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<head> <title>دانوین</title>
<meta charset="utf-8" /> <!-- Google Tag Manager -->
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <script>
<meta name="viewport" content="width=device-width, initial-scale=1" user-scalable="false" /> // const arJson = require("./ar1.json");
<meta name="theme-color" content="#000000" /> // console.log(JSON.parse(arJson));
<meta name="description" content="دانوین" /> function t(val) {
<link href="https://api.mapbox.com/mapbox-gl-js/v1.10.1/mapbox-gl.css" rel="stylesheet" /> return "*" + val;
<meta name="mobile-web-app-capable" content="yes" /> }
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<title>دانوین</title> (function (w, d, s, l, i) {
<!-- Google Tag Manager --> w[l] = w[l] || [];
<script> w[l].push({
// const arJson = require("./ar1.json"); "gtm.start": new Date().getTime(),
// console.log(JSON.parse(arJson)); event: "gtm.js",
function t(val) { });
return "*" + val; var f = d.getElementsByTagName(s)[0],
} j = d.createElement(s),
dl = l != "dataLayer" ? "&l=" + l : "";
j.async = true;
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
f.parentNode.insertBefore(j, f);
})(window, document, "script", "dataLayer", "GTM-WVV8H9L");
</script>
<!-- End Google Tag Manager -->
</head>
(function (w, d, s, l, i) { <body>
w[l] = w[l] || []; <!-- Google Tag Manager (noscript) -->
w[l].push({ <noscript
"gtm.start": new Date().getTime(), ><iframe
event: "gtm.js", src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L"
}); height="0"
var f = d.getElementsByTagName(s)[0], width="0"
j = d.createElement(s), style="display: none; visibility: hidden"
dl = l != "dataLayer" ? "&l=" + l : ""; ></iframe
j.async = true; ></noscript>
j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl; <!-- End Google Tag Manager (noscript) -->
f.parentNode.insertBefore(j, f); <div id="root"></div>
})(window, document, "script", "dataLayer", "GTM-WVV8H9L"); <script>
</script> if ("serviceWorker" in navigator) {
<!-- End Google Tag Manager --> window.addEventListener("load", function () {
</head> navigator.serviceWorker
.register("./serviceworker.js")
<body> .then((registration) => {
<!-- Google Tag Manager (noscript) --> // Registration was successful
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WVV8H9L" height="0" width="0" console.log(
style="display: none; visibility: hidden"></iframe></noscript> "ServiceWorker registration successful with scope: ",
<!-- End Google Tag Manager (noscript) --> registration.scope
<div id="root"></div> );
<script> })
if ("serviceWorker" in navigator) { .catch((err) => {
window.addEventListener("load", function () { console.log(err);
navigator.serviceWorker });
.register("./serviceworker.js") });
.then((registration) => { }
// Registration was successful const lang = localStorage.getItem("language");
console.log( </script>
"ServiceWorker registration successful with scope: ", </body>
registration.scope </html>
);
})
.catch((err) => {
console.log(err);
});
});
}
const lang = localStorage.getItem("language");
</script>
</body>
</html>

@ -156,7 +156,12 @@ class LaptopNavbar extends Component {
</div> </div>
</> </>
) : ( ) : (
<> <div className="d-flex">
<select className="language-select">
{["fa", "en", "ar"].map((lang, index) => (
<option key={index}>{lang}</option>
))}
</select>
<Link <Link
style={{ fontSize: fontSize.desktop.a }} style={{ fontSize: fontSize.desktop.a }}
to={"/auth"} to={"/auth"}
@ -164,7 +169,7 @@ class LaptopNavbar extends Component {
> >
{window.t("ورود یا ثبتنام")} {window.t("ورود یا ثبتنام")}
</Link> </Link>
</> </div>
)} )}
</div> </div>
</nav> </nav>

@ -2,6 +2,18 @@
max-width: 1250px; max-width: 1250px;
margin: 0px auto; margin: 0px auto;
.language-select {
border: none;
outline: none;
width: 50px;
background-color: #6cbe44;
color: white;
font-weight: 500;
margin-left: 10px;
border-radius: 5px;
padding: 0px 4px;
}
&__header { &__header {
&--right { &--right {
cursor: pointer; cursor: pointer;

Loading…
Cancel
Save