Skip to content

Commit

Permalink
Merge pull request #202 from tfsojon/chandu
Browse files Browse the repository at this point in the history
fixed issue #40
  • Loading branch information
devopstoday11 authored Jul 8, 2023
2 parents 13369a4 + a922818 commit 06cab35
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 106 deletions.
4 changes: 4 additions & 0 deletions config/_default/languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ languageName = "En"
languageCode = "en-us"
contentDir = "content/english"
weight = 1

[en.params]
# copyright
copyright = "Copyright @ IntelOps, Inc."

Expand All @@ -15,6 +17,8 @@ languageName = "Fr"
languageCode = "fr-fr"
contentDir = "content/french"
weight = 2

[fr.params]
home = "Accueil"
# copyright
copyright = "Copyright @ IntelOps, Inc."
53 changes: 0 additions & 53 deletions themes/delta/layouts/open-source/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,6 @@ <h1 class="title text-xl mb-3 {{if not .title_color}}text-white{{end}}" {{with .
{{with .Params.image_and_content_block}}
{{if .enable}}
<div class="position-relative">
<div class="anim-block d-none d-lg-block">
<div class="anim-block-inner">
<div class="assets">
{{ partial "image.html" (dict "Src" "images/square.svg" "Class" "img-fluid asset-bg-image" ) }}

{{ range $i, $e := .blocks }}
{{ if .enable }}
<div data-image>
{{with .image}}
{{ partial "image.html" (dict "Src" . "Class" "img-fluid" ) }}
{{end}}
</div>
{{ end }}
{{ end }}
</div>
</div>
</div>

{{ range .blocks }}
{{ if .enable }}
Expand All @@ -82,42 +65,6 @@ <h1 class="title text-xl mb-3 {{if not .title_color}}text-white{{end}}" {{with .
{{end}}
{{end}}

<script>
// Get the elements
const mainSection = document.querySelector('.the-main-section');
const assets = document.querySelector('.assets');
const assetImages = document.querySelectorAll('[data-image]');
const sections = document.querySelectorAll('[data-section]');
assetImages[0].classList.add('show');

window.addEventListener('scroll', function() {
// Loop through the sections and get the position of each one
for (let i = 0; i < sections.length; i++) {
const sectionPos = sections[i].getBoundingClientRect().top;

if (sectionPos < (window.innerHeight / 2) && sectionPos > (-window.innerHeight / 2)) {
if (i === 0) {
assets.classList.add('assets-left');
assets.classList.remove('assets-right');
} else if (i % 2 === 1) {
assets.classList.remove('assets-left');
assets.classList.add('assets-right');
} else {
assets.classList.add('assets-left');
assets.classList.remove('assets-right');
}
}

if (sectionPos < (window.innerHeight / 2) && sectionPos > (-window.innerHeight / 2)) {
assetImages[i].classList.add('show');
} else {
assetImages[i].classList.remove('show');
}

}
});
</script>

{{if .Params.call_to_action.enable}}
{{ partial "call-to-action-3.html" . }}
{{end}}
Expand Down
1 change: 1 addition & 0 deletions themes/delta/layouts/partials/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<span>Search Intelops ..</span>
</button>
{{ end }}
<br>

{{ with site.Params.newsletter }}
{{ if .enable }}
Expand Down
53 changes: 0 additions & 53 deletions themes/delta/layouts/services/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,6 @@ <h1 class="title text-xl mb-3 {{if not .title_color}}text-white{{end}}" {{with .
{{with .Params.image_and_content_block}}
{{if .enable}}
<div class="position-relative">
<div class="anim-block d-none d-lg-block">
<div class="anim-block-inner">
<div class="assets">
{{ partial "image.html" (dict "Src" "images/square.svg" "Class" "img-fluid asset-bg-image" ) }}

{{ range $i, $e := .blocks }}
{{ if .enable }}
<div data-image>
{{with .image}}
{{ partial "image.html" (dict "Src" . "Class" "img-fluid" ) }}
{{end}}
</div>
{{ end }}
{{ end }}
</div>
</div>
</div>

{{ range .blocks }}
{{ if .enable }}
Expand All @@ -82,42 +65,6 @@ <h1 class="title text-xl mb-3 {{if not .title_color}}text-white{{end}}" {{with .
{{end}}
{{end}}

<script>
// Get the elements
const mainSection = document.querySelector('.the-main-section');
const assets = document.querySelector('.assets');
const assetImages = document.querySelectorAll('[data-image]');
const sections = document.querySelectorAll('[data-section]');
assetImages[0].classList.add('show');

window.addEventListener('scroll', function() {
// Loop through the sections and get the position of each one
for (let i = 0; i < sections.length; i++) {
const sectionPos = sections[i].getBoundingClientRect().top;

if (sectionPos < (window.innerHeight / 2) && sectionPos > (-window.innerHeight / 2)) {
if (i === 0) {
assets.classList.add('assets-left');
assets.classList.remove('assets-right');
} else if (i % 2 === 1) {
assets.classList.remove('assets-left');
assets.classList.add('assets-right');
} else {
assets.classList.add('assets-left');
assets.classList.remove('assets-right');
}
}

if (sectionPos < (window.innerHeight / 2) && sectionPos > (-window.innerHeight / 2)) {
assetImages[i].classList.add('show');
} else {
assetImages[i].classList.remove('show');
}

}
});
</script>

{{if .Params.call_to_action.enable}}
{{ partial "call-to-action-3.html" . }}
{{end}}
Expand Down

0 comments on commit 06cab35

Please sign in to comment.