Commit 7c014338 authored by sbiego's avatar sbiego

working change language button

parent aa0b6b3f
...@@ -15,29 +15,10 @@ ...@@ -15,29 +15,10 @@
<h2>{{ .title | markdownify }}</h2> <h2>{{ .title | markdownify }}</h2>
<!-- <p class="item-intro text-muted">{{ .subtitle | markdownify }}</p> --> <!-- <p class="item-intro text-muted">{{ .subtitle | markdownify }}</p> -->
<script> <div id="lang_select" onclick="toggleLang()"></div>
function changeLang() {
desc_it = document.getElementById("desc_it");
desc_en = document.getElementById("desc_en");
lan_sel = document.getElementById("lang_select");
if (desc_it.style.display == "none") { <p class="desc_en" id="desc_en">{{ .description }}</p>
desc_it.style.display = "block"; <p class="desc_it" id="desc_it">{{ .descriptionIT }}</p>
desc_en.style.display = "none";
lan_sel.style.backgroundImage = 'url(../img/flagit.png)';
}
else {
desc_it.style.display = "none";
desc_en.style.display = "block";
lan_sel.style.backgroundImage = 'url(../img/flaguk.png)';
}
}
</script>
<div id="lang_select" onclick="changeLang()"></div>
<p class="desc" id="desc_en">{{ .description }}</p>
<p class="desc" id="desc_it">{{ .descriptionIT }}</p>
{{ $url := printf "img/senzaparole/%s" .img }} {{ $url := printf "img/senzaparole/%s" .img }}
<div class="modal-img-frame"> <div class="modal-img-frame">
<img class="img-responsive img-centered" src="{{ $url | absURL }}" alt=""> <img class="img-responsive img-centered" src="{{ $url | absURL }}" alt="">
......
...@@ -568,32 +568,37 @@ section h3.section-subheading { ...@@ -568,32 +568,37 @@ section h3.section-subheading {
.portfolio-modal .modal-content h2 { .portfolio-modal .modal-content h2 {
animation: appearSoftFromTop .6s; animation: appearSoftFromTop .6s;
} }
.senzaparole #desc_it { .desc_it {
display: block;
} }
.senzaparole #desc_en { .desc_en {
display: none; display: none;
} }
.senzaparole #lang_select { #lang_select {
height: 24px; height: 24px;
width: 24px; width: 24px;
background-image: url("../img/flagit.png"); background-image: url("../img/flaguk.png");
background-size: cover; background-size: cover;
background-color: transparent;
content: '';
text-decoration: none;
border-radius: 15px; border-radius: 15px;
position: absolute; position: fixed;
right: 2px; right: 0;
top: 16px; margin: 22px;
top: 46px;
border: none;
box-shadow: 0 2px 10px -3px rgba(0, 0, 0, 0.6); box-shadow: 0 2px 10px -3px rgba(0, 0, 0, 0.6);
transition: all .3s; transition: all .3s;
cursor: pointer; cursor: pointer;
display: none; /*display: none;*/
} }
.senzaparole #lang_select:hover { #lang_select:hover {
box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.3); box-shadow: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
transform: translateY(2px); transform: translateY(2px);
} }
.senzaparole #lang_select:active { #lang_select:active {
transform: translateY(5px); transform: translateY(5px);
} }
.portfolio-modal .modal-content img { .portfolio-modal .modal-content img {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment