diff --git a/_site/js/customscripts.js b/_site/js/customscripts.js
index a01511920..c905b71af 100644
--- a/_site/js/customscripts.js
+++ b/_site/js/customscripts.js
@@ -1,4 +1,38 @@
+function auto_scroll_x(scrollElement, scrollStep=1, scrollDelayMilSec=1000) {
+ const scrollWidth = scrollElement.scrollWidth - scrollElement.clientWidth;
+ const scrollDelay = scrollDelayMilSec;
+
+ // auto-scrolling
+ const scrollAnimation = setInterval(()=>{
+ if (scrollElement.scrollLeft >= scrollWidth) {
+ scrollStep *= -1;
+ } else if (scrollElement.scrollLeft <= 0) {
+ scrollStep *= -1;
+ }
+ scrollElement.scrollBy(scrollStep, 0);
+ }, scrollDelay);
+
+ // stop auto-scrolling while mouse over element
+ scrollElement.addEventListener("mouseenter", (evt)=>{
+ clearInterval(scrollAnimation);
+ });
+ // continue auto-scrolling when mouse leave element
+ scrollElement.addEventListener("mouseleave", (evt)=>{
+ auto_scroll_x(scrollElement, scrollStep, scrollDelayMilSec);
+ });
+
+ // stop auto-scrolling on mobile after short time
+ const scrollDuration = scrollWidth / scrollStep * scrollDelay;
+ if (scrollWidth < 200) {
+ setTimeout(()=>{
+ clearInterval(scrollAnimation);
+ }, scrollDuration);
+ }
+}
+
+
+
// some small functions
const uniqId = (()=>{let i=0;return()=>{return i++;}})();
@@ -69,6 +103,11 @@ $(document).ready(function() {
}
}
});
+
+ // auto scroll along x-axis
+ $(".auto-scroll-x").each(function() {
+ auto_scroll_x(this, 1, 3000)
+ });
});
// needed for nav tabs on pages. See Formatting > Nav tabs for more details.
diff --git a/_site/workshop23.html b/_site/workshop23.html
index 8267b2a86..34d08e0b3 100644
--- a/_site/workshop23.html
+++ b/_site/workshop23.html
@@ -347,10 +347,6 @@
Freiberg MTEX Workshop 2023
-
-
-
-
Week 1: Learning Crystallographic Texture Analysis with MTEX
Date: 06.03.2023 - 10.03.2023
diff --git a/css/customstyles.css b/css/customstyles.css
index c9da3fb26..262fba2b4 100644
--- a/css/customstyles.css
+++ b/css/customstyles.css
@@ -1289,6 +1289,30 @@ abbr[title]:after {
width: 100%;
}
+/* horizontal scrollable rows */
+.row.no-wrap-scrollable-x {
+ display: flex;
+ overflow-x: auto;
+ white-space: nowrap;
+ /* margin: auto; */
+ scroll-snap-type: x mandatory;
+ outline: 1px solid red;
+}
+.row.no-wrap-scrollable-x > div {
+ display: ruby;
+ white-space: initial;
+ scroll-snap-align: start;
+}
+
+/* show scrollbar at top of container */
+.scrollbar-at-top {
+ transform: rotateX(180deg);
+}
+.scrollbar-at-top > * {
+ padding-top: 10px;
+ transform: rotateX(180deg);
+}
+
/* -------------------------- */
/* important / override rules */
/* -------------------------- */
diff --git a/index.md b/index.md
index bec670e00..b5bdf7952 100644
--- a/index.md
+++ b/index.md
@@ -20,6 +20,7 @@ of material scientists, geologists and mathematicians.
![](https://img.shields.io/github/downloads/mtex-toolbox/mtex/total)
![](https://img.shields.io/github/contributors/mtex-toolbox/mtex)
+
@@ -124,6 +125,7 @@ of material scientists, geologists and mathematicians.
+
@@ -141,7 +143,45 @@ of material scientists, geologists and mathematicians.
-