Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft.com
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Давид Добряков
etersoft.com
Commits
8adeda0a
Commit
8adeda0a
authored
Mar 19, 2020
by
Davyd Dobryakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update changing language
parent
1921a14f
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
123 additions
and
99 deletions
+123
-99
.index.html.swp
.index.html.swp
+0
-0
index.html
de/index.html
+33
-29
index.html
en/index.html
+42
-38
index.html
index.html
+7
-5
language.js
src/js/language.js
+10
-20
slider.js
src/js/slider.js
+1
-3
common.scss
src/scss/utils/common.scss
+30
-4
No files found.
.index.html.swp
0 → 100644
View file @
8adeda0a
File added
de/index.html
View file @
8adeda0a
...
@@ -9,35 +9,39 @@
...
@@ -9,35 +9,39 @@
</head>
</head>
<body>
<body>
<header>
<header
class=
"top-0"
>
<nav>
<nav
class=
"transparent"
>
<div
class=
"logo"
>
<div
class=
"logo"
>
<a
href=
"./"
>
<a
href=
"./"
>
<img
src=
"../src/images/logo.png"
alt=
""
>
<img
src=
"../src/images/logo.png"
alt=
""
>
</a>
</a>
</div>
</div>
<ul
class=
"menu-right"
>
<div
class=
"menu-right"
>
<li><a
href=
"#about"
>
Über uns
</a></li>
<ul
class=
"menu-right"
>
<li><a
href=
"#products"
>
Produkt
</a></li>
<li><a
href=
"#about"
>
Über uns
</a></li>
<li><a
href=
"#services"
>
Dienstleistungen
</a></li>
<li><a
href=
"#products"
>
Produkt
</a></li>
<li><a
href=
"#contact-us"
>
Kontaktieren Sie uns
</a></li>
<li><a
href=
"#services"
>
Dienstleistungen
</a></li>
<select
id=
"changeLanguage"
name=
"change-language"
>
<li><a
href=
"#contact-us"
>
Kontaktieren Sie uns
</a></li>
<option
value=
"ru"
><img
src=
"../src/image/ru.png"
alt=
""
>
Ru
</option>
</ul>
<option
value=
"en"
><img
src=
"../src/image/uk.png"
alt=
""
>
En
</option>
<div
class=
"change-language"
>
<option
value=
"de"
><img
src=
"../src/image/de.png"
alt=
""
>
De
</option>
<ul
class=
"language-list"
id=
"changeLanguage"
>
</select>
<li
class=
"language-list-item"
><a
href=
"../"
data-lang=
"ru"
>
Ru
</a></li>
<div
class=
"menu-button"
id=
"menuButton"
>
<li
class=
"language-list-item"
><a
href=
"/en"
data-lang=
"en"
>
En
</a></li>
<span
class=
"burger-icon"
></span>
<li
class=
"language-list-item active"
><a
href=
"/de"
data-lang=
"de"
>
De
</a></li>
</div>
</ul>
</ul>
</div>
</nav>
<div
class=
"menu-button"
id=
"menuButton"
>
</header>
<span
class=
"burger-icon"
></span>
<menu
id=
"menu"
>
</div>
<a
href=
"#about"
><span>
Über uns
</span></a>
</div>
<a
href=
"#products"
><span>
Produkt
</span></a>
</nav>
<a
href=
"#services"
><span>
Dienstleistungen
</span></a>
</header>
<a
href=
"#contact-us"
><span>
Kontaktieren Sie uns
</span></a>
<menu
id=
"menu"
class=
"menu"
>
</menu>
<a
href=
"#about"
><span>
Über uns
</span></a>
<a
href=
"#products"
><span>
Produkt
</span></a>
<a
href=
"#services"
><span>
Dienstleistungen
</span></a>
<a
href=
"#contact-us"
><span>
Kontaktieren Sie uns
</span></a>
</menu>
<div
class=
"hello-banner"
>
<div
class=
"hello-banner"
>
<div
class=
"hello-banner__gradient"
></div>
<div
class=
"hello-banner__gradient"
></div>
<div
class=
"hello-banner__img"
></div>
<div
class=
"hello-banner__img"
></div>
...
...
en/index.html
View file @
8adeda0a
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"en"
>
<html
lang=
"en"
>
<head>
<head>
<meta
charset=
"UTF-8"
>
<meta
charset=
"UTF-8"
>
<title>
Eterlanding
</title>
<title>
Etersoft — Решения для перехода на Linux и свободное ПО
</title>
<link
rel=
"stylesheet"
href=
"../dist/app.css"
>
<link
rel=
"stylesheet"
href=
"../dist/app.css"
>
<meta
name=
"viewport"
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
<meta
name=
"viewport"
</head>
content=
"width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
>
</head>
<body>
<header>
<body>
<nav>
<header
class=
"top-0"
>
<div
class=
"logo"
>
<nav
class=
"transparent"
>
<a
href=
"./"
>
<div
class=
"logo"
>
<img
src=
"../src/images/logo.png"
alt=
""
>
<a
href=
"./"
>
</a>
<img
src=
"../src/images/logo.png"
alt=
""
>
</div>
</a>
<ul
class=
"menu-right"
>
</div>
<li><a
href=
"#about"
>
About us
</a></li>
<div
class=
"menu-right"
>
<li><a
href=
"#products"
>
Products
</a></li>
<ul
class=
"menu-right"
>
<li><a
href=
"#services"
>
Services
</a></li>
<li><a
href=
"#about"
>
About us
</a></li>
<li><a
href=
"#contact-us"
>
Contact us
</a></li>
<li><a
href=
"#products"
>
Products
</a></li>
<select
id=
"changeLanguage"
name=
"change-language"
>
<li><a
href=
"#services"
>
Services
</a></li>
<option
value=
"ru"
><img
src=
"../src/image/ru.png"
alt=
""
>
Ru
</option>
<li><a
href=
"#contact-us"
>
Contact us
</a></li>
<option
value=
"en"
><img
src=
"../src/image/uk.png"
alt=
""
>
En
</option>
</ul>
<option
value=
"de"
><img
src=
"../src/image/de.png"
alt=
""
>
De
</option>
<div
class=
"change-language"
>
</select>
<ul
class=
"language-list"
id=
"changeLanguage"
>
<div
class=
"menu-button"
id=
"menuButton"
>
<li
class=
"language-list-item"
><a
href=
"../"
data-lang=
"ru"
>
Ru
</a></li>
<span
class=
"burger-icon"
></span>
<li
class=
"language-list-item active"
><a
href=
"/en"
data-lang=
"en"
>
En
</a></li>
</div>
<li
class=
"language-list-item"
><a
href=
"/de"
data-lang=
"de"
>
De
</a></li>
</ul>
</ul>
</div>
</nav>
<div
class=
"menu-button"
id=
"menuButton"
>
</header>
<span
class=
"burger-icon"
></span>
<menu
id=
"menu"
>
</div>
<a
href=
"#about"
><span>
About us
</span></a>
</div>
<a
href=
"#products"
><span>
Products
</span></a>
</nav>
<a
href=
"#services"
><span>
Services
</span></a>
</header>
<a
href=
"#contact-us"
><span>
Contact us
</span></a>
<menu
id=
"menu"
class=
"menu"
>
</menu>
<a
href=
"#about"
><span>
About us
</span></a>
<a
href=
"#products"
><span>
Products
</span></a>
<a
href=
"#services"
><span>
Services
</span></a>
<a
href=
"#contact-us"
><span>
Contact us
</span></a>
</menu>
<div
class=
"hello-banner"
>
<div
class=
"hello-banner"
>
<div
class=
"hello-banner__gradient"
></div>
<div
class=
"hello-banner__gradient"
></div>
<div
class=
"hello-banner__img"
></div>
<div
class=
"hello-banner__img"
></div>
...
...
index.html
View file @
8adeda0a
...
@@ -24,11 +24,13 @@
...
@@ -24,11 +24,13 @@
<li><a
href=
"#services"
>
Услуги
</a></li>
<li><a
href=
"#services"
>
Услуги
</a></li>
<li><a
href=
"#contact-us"
>
Контакты
</a></li>
<li><a
href=
"#contact-us"
>
Контакты
</a></li>
</ul>
</ul>
<select
id=
"changeLanguage"
name=
"change-language"
class=
"change-language"
>
<div
class=
"change-language"
>
<option
value=
"ru"
>
Ru
</option>
<ul
class=
"language-list"
id=
"changeLanguage"
>
<option
value=
"en"
>
En
</option>
<li
class=
"language-list-item active"
><a
href=
"../"
data-lang=
"ru"
>
Ru
</a></li>
<option
value=
"de"
>
De
</option>
<li
class=
"language-list-item"
><a
href=
"/en"
data-lang=
"en"
>
En
</a></li>
</select>
<li
class=
"language-list-item"
><a
href=
"/de"
data-lang=
"de"
>
De
</a></li>
</ul>
</div>
<div
class=
"menu-button"
id=
"menuButton"
>
<div
class=
"menu-button"
id=
"menuButton"
>
<span
class=
"burger-icon"
></span>
<span
class=
"burger-icon"
></span>
</div>
</div>
...
...
src/js/language.js
View file @
8adeda0a
let
changeLanguage
=
document
.
getElementById
(
'changeLanguage
'
);
let
languageOptions
=
document
.
querySelectorAll
(
'.language-list-item a
'
);
let
pageLanguage
=
document
.
querySelector
(
'
html'
).
lang
;
let
pageLanguage
=
document
.
querySelector
(
'
.language-list-item.active a'
).
dataset
[
'lang'
]
;
let
userLanguage
=
navigator
.
language
.
slice
(
0
,
2
);
let
userLanguage
=
navigator
.
language
.
slice
(
0
,
2
);
let
currentLanguage
=
localStorage
.
language
===
undefined
?
userLanguage
:
localStorage
.
language
;
let
currentLanguage
=
localStorage
.
language
===
undefined
?
userLanguage
:
localStorage
.
language
;
if
(
changeLanguage
.
value
!==
currentLanguage
)
{
let
languageOptions
=
changeLanguage
.
getElementsByTagName
(
'option'
);
for
(
let
i
=
0
;
i
<
languageOptions
.
length
;
i
++
)
{
if
(
languageOptions
[
i
].
value
===
currentLanguage
)
{
languageOptions
[
i
].
selected
=
true
;
}
}
}
changeLanguage
.
addEventListener
(
'change'
,
function
(
e
)
{
e
.
preventDefault
();
let
languageValue
=
changeLanguage
.
value
;
let
languagePath
=
getLanguagePath
(
languageValue
);
localStorage
.
setItem
(
'language'
,
languageValue
);
currentLanguage
=
localStorage
.
language
;
window
.
location
=
languagePath
;
})
function
getLanguagePath
(
languageValue
)
{
function
getLanguagePath
(
languageValue
)
{
let
languagePath
=
languageValue
===
'ru'
?
'../'
:
'../'
+
languageValue
;
let
languagePath
=
languageValue
===
'ru'
?
'../'
:
'../'
+
languageValue
;
...
@@ -37,3 +19,11 @@ window.addEventListener('load', function() {
...
@@ -37,3 +19,11 @@ window.addEventListener('load', function() {
window
.
location
=
languagePath
;
window
.
location
=
languagePath
;
}
}
})
})
// add listener to languageOptions for collecting data in localStorage
Array
.
from
(
languageOptions
).
map
((
option
)
=>
{
option
.
addEventListener
(
'click'
,
function
()
{
lang
=
option
.
dataset
[
'lang'
];
localStorage
.
language
=
lang
;
})
})
src/js/slider.js
View file @
8adeda0a
...
@@ -166,8 +166,6 @@ var multiItemSlider = (function() {
...
@@ -166,8 +166,6 @@ var multiItemSlider = (function() {
};
};
})();
})();
var
slider
=
multiItemSlider
(
".slider"
,
{
multiItemSlider
(
".slider"
,
{
isCycling
:
true
isCycling
:
true
});
});
slider
();
src/scss/utils/common.scss
View file @
8adeda0a
...
@@ -250,12 +250,40 @@ a:hover {
...
@@ -250,12 +250,40 @@ a:hover {
.change-language
{
.change-language
{
background
:
$default-color
;
background
:
$default-color
;
border
:
1px
solid
$border-base
;
border-radius
:
5px
;
order
:
2
;
order
:
2
;
padding
:
0
.25rem
;
padding
:
0
.25rem
;
}
}
.language-list
{
display
:
flex
;
flex-flow
:
row
wrap
;
}
.
language-list-item
:
:
after
{
color
:
$light-color
!
important
;
content
:
'|'
;
}
.language-list-item
:last-child::after
{
content
:
''
;
}
.language-list-item
a
{
color
:
$light-color
!
important
;
}
.language-list-item
a
:hover
{
color
:
$neutral-primary
!
important
;
}
.language-list-item.active
a
{
color
:
$neutral-primary
!
important
;
}
.language-list-item.active
a
:hover
{
color
:
$light-color
!
important
;
}
.pt-2
{
.pt-2
{
padding-top
:
2rem
!
important
;
padding-top
:
2rem
!
important
;
}
}
...
@@ -273,5 +301,3 @@ a:hover {
...
@@ -273,5 +301,3 @@ a:hover {
margin
:
0
auto
;
margin
:
0
auto
;
width
:
100%
;
width
:
100%
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment