Skip to content

Commit

Permalink
english completed
Browse files Browse the repository at this point in the history
  • Loading branch information
IndieHum committed Jan 20, 2025
1 parent 97695de commit fcdfc76
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 34 deletions.
2 changes: 0 additions & 2 deletions css/main-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
--color-dark: #2f2f2f;
--color-light: #fff;
--color-brand: #57bd84;
--font-fam: 'Lato', sans-serif;
--btn-width: 6rem;
--bez: cubic-bezier(0, 0, 0.43, 1.49);
}
Expand All @@ -17,7 +16,6 @@
box-sizing: border-box;
margin: 0;
padding: 0;
direction: rtl;
text-align: right;
}

Expand Down
2 changes: 1 addition & 1 deletion js/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export function PageChange(event) {
const SelectedLanguage = event.target.value;
switch (SelectedLanguage) {
case "fa":
window.location.assign("index.html");
window.location.assign("../index.html");
break;
case "en":
window.location.assign("./lang/en/index-en.html");
Expand Down
23 changes: 4 additions & 19 deletions lang/en/css/font.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
@font-face {
font-family: 'vazir-bold';
src: url(../fonts/Vazirmatn-Bold.woff2);
font-family: 'mono-bold';
src: url(../fonts/lato.bold.ttf);
}

@font-face {
font-family: 'vazir-light';
src: url(../fonts/Vazirmatn-Light.woff2);
}

@font-face {
font-family: 'vazir-medium';
src: url(../fonts/Vazirmatn-Medium.woff2);
}

@font-face {
font-family: 'vazir-regular';
src: url(../fonts/Vazirmatn-Regular.woff2);
}

@font-face {
font-family: 'vazir-semiBold';
src: url(../fonts/Vazirmatn-SemiBold.woff2);
font-family: 'mono-light';
src: url(../fonts/lato.medium.ttf);
}
13 changes: 5 additions & 8 deletions lang/en/css/main-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@
--color-dark: #2f2f2f;
--color-light: #fff;
--color-brand: #57bd84;
--font-fam: 'Lato', sans-serif;
--btn-width: 6rem;
--bez: cubic-bezier(0, 0, 0.43, 1.49);
}

*,
*::before,
*::after {
font-family: 'vazir-medium', Arial, sans-serif;
font-family: 'mono-light', Arial, sans-serif;
box-sizing: border-box;
margin: 0;
padding: 0;
direction: rtl;
text-align: right;
}

h1 {
font-family: 'vazir-bold', Arial, sans-serif;
font-family: 'mono-bold', Arial, sans-serif;
}

label {
Expand Down Expand Up @@ -114,12 +111,12 @@ button {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
width: var(--btn-width);
font-size: larger;
font-family: 'vazir-bold';
font-family: 'mono-light';
background: var(--color-brand);
border-radius: var(--rad) 0 0 var(--rad);
border-radius: 0 var(--rad) var(--rad) 0;
border: none;
text-align: center;
cursor: pointer;
Expand Down
Binary file added lang/en/fonts/lato.bold.ttf
Binary file not shown.
Binary file added lang/en/fonts/lato.medium.ttf
Binary file not shown.
4 changes: 2 additions & 2 deletions lang/en/index-en.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<body>
<header>
<section class="left-section">
<select id="">
<select id="lang-toggle">
<option value="en">English</option>
<option value="fa">فارسی</option>
</select>
Expand All @@ -36,7 +36,7 @@
<main>
<section>
<h1>ZAAL | a shortcut between search engines</h1>
<p>With Zaal, you can search once and see results several times in different search engines</p>
<p>search once and see results several times in different search engines</p>
</section>
<section>
<form onsubmit="event.preventDefault();" role="search" class="search-form">
Expand Down
4 changes: 2 additions & 2 deletions lang/en/js/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ export function PageChange(event) {
const SelectedLanguage = event.target.value;
switch (SelectedLanguage) {
case "fa":
window.location.assign("index.html");
window.location.assign("../../index.html");
break;
case "en":
window.location.assign("./lang/en/index-en.html");
window.location.assign("../index-en.html");
break;
default:
return;
Expand Down
3 changes: 3 additions & 0 deletions lang/en/js/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { Searching } from "./search.js";
import { PageChange } from "./lang.js";

const SearchBtn = document.getElementById("search-btn");
const SEnodes = document.querySelectorAll("input[type='checkbox']");
const NewWinRadio = document.getElementById("nwindow");
const NewTabRadio = document.getElementById("ntab");
const LangToggle = document.getElementById("lang-toggle")

let SEchecked = [];
// when it is true: new tab - false: new window
Expand Down Expand Up @@ -32,6 +34,7 @@ const searchFunc = () => {

function mainFunc() {
NewTabRadio.checked = true;
LangToggle.addEventListener("change", PageChange);
SearchBtn.addEventListener("click", searchFunc);
}

Expand Down

0 comments on commit fcdfc76

Please sign in to comment.