You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2024/11/04 08:49:00 UTC
(plc4x-build-tools) branch develop updated: chore(plc4x-site-skin): Fixed footer when viewing on narrow screens and carousel with bootstrap 5
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git
The following commit(s) were added to refs/heads/develop by this push:
new ab449ee chore(plc4x-site-skin): Fixed footer when viewing on narrow screens and carousel with bootstrap 5
ab449ee is described below
commit ab449ee70ffc61bb09a80a2cc4897f3419593024
Author: hutcheb <be...@gmail.com>
AuthorDate: Mon Nov 4 16:48:48 2024 +0800
chore(plc4x-site-skin): Fixed footer when viewing on narrow screens and carousel with bootstrap 5
---
.../src/main/resources/META-INF/maven/site.vm | 31 ++++++++++++----------
.../src/main/resources/css/themes/plc4x.css | 10 +++----
2 files changed, 22 insertions(+), 19 deletions(-)
diff --git a/plc4x-site-skin/src/main/resources/META-INF/maven/site.vm b/plc4x-site-skin/src/main/resources/META-INF/maven/site.vm
index fbc6d96..41e339d 100644
--- a/plc4x-site-skin/src/main/resources/META-INF/maven/site.vm
+++ b/plc4x-site-skin/src/main/resources/META-INF/maven/site.vm
@@ -61,6 +61,7 @@
#if( $decoration.body.head )
$render.eval( $decoration.body.head )
#end
+ <link rel="icon" type="image/x-icon" href="icon.ico">
$headContent
</head>
<body class="composite">
@@ -114,7 +115,8 @@
</main>
<footer class="pt-4 my-md-5 pt-md-5 w-100 border-top">
<div class="row justify-content-md-center" style="font-size: 13px">
- <div class="col col-6 text-center">
+ <div class="col"></div>
+ <div class="col-6 text-center">
#if( $decoration.body.footer )
$render.eval( $decoration.body.footer )
#else
@@ -127,6 +129,7 @@
and blur effect added.</div>
#end
</div>
+ <div class="col"></div>
</div>
</footer>
</div>
@@ -139,21 +142,21 @@
<script src="$relativePath/js/popper.min.js"></script>
<script src="$relativePath/js/bootstrap.min.js"></script>
<script type="text/javascript">
- $('.carousel .carousel-item').each(function(){
- var next = $(this).next();
- if (!next.length) {
- next = $(this).siblings(':first');
- }
- next.children(':first-child').clone().appendTo($(this));
+ let items = document.querySelectorAll('.carousel .carousel-item')
- for (let i = 0; i < 3; i++) {
- next=next.next();
- if (!next.length) {
- next = $(this).siblings(':first');
- }
- next.children(':first-child').clone().appendTo($(this));
+ items.forEach((el) => {
+ const minPerSlide = 4
+ let next = el.nextElementSibling
+ for (var i=1; i<minPerSlide; i++) {
+ if (!next) {
+ // wrap carousel by using first child
+ next = items[0]
+ }
+ let cloneChild = next.cloneNode(true)
+ el.appendChild(cloneChild.children[0])
+ next = next.nextElementSibling
}
- });
+ })
</script>
</body>
</html>
diff --git a/plc4x-site-skin/src/main/resources/css/themes/plc4x.css b/plc4x-site-skin/src/main/resources/css/themes/plc4x.css
index 7901815..7e2e89a 100644
--- a/plc4x-site-skin/src/main/resources/css/themes/plc4x.css
+++ b/plc4x-site-skin/src/main/resources/css/themes/plc4x.css
@@ -852,20 +852,20 @@ span.icon > [class^="icon-"], span.icon > [class*=" icon-"] { cursor: default; }
@media (min-width: 768px) {
- .carousel-inner .carousel-item-right.active,
+ .carousel-inner .carousel-item-end.active,
.carousel-inner .carousel-item-next {
transform: translateX(33.333%);
}
- .carousel-inner .carousel-item-left.active,
+ .carousel-inner .carousel-item-start.active,
.carousel-inner .carousel-item-prev {
transform: translateX(-33.333%);
}
}
-.carousel-inner .carousel-item-right,
-.carousel-inner .carousel-item-left{
- transform: translateX(0);
+.carousel-inner .carousel-item-end,
+.carousel-inner .carousel-item-start {
+ transform: translateX(0);
}
#integrationCarousel {