main
HerrHase 1 year ago
parent bb6f00d93c
commit 40be2ac9e1

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -18,13 +18,13 @@
</h1>
</div>
<div class="bar__main justify-end">
<a class="button button--small m-left-sm-3 m-bottom-0" href="https://gitea.node001.net/tiny-components/notification" rel="noopener" target="_blank">
<a class="button button--small m-left-sm-3 m-bottom-0" href="https://gitea.node001.net/tiny-components/slider" rel="noopener" target="_blank">
Gitea
<svg class="m-left-3 icon fill-text" aria-hidden="true">
<use xlink:href="/symbol-defs.svg#icon-gitea"></use>
</svg>
</a>
<a class="button button--small m-left-sm-3 m-bottom-0" href="https://gitea.node001.net/tiny-components/notification" rel="noopener" target="_blank">
<a class="button button--small m-left-sm-3 m-bottom-0" href="https://gitea.node001.net/tiny-components/slider" rel="noopener" target="_blank">
Github
<svg class="m-left-3 icon fill-text" aria-hidden="true">
<use xlink:href="/symbol-defs.svg#icon-github"></use>

@ -1,13 +1 @@
(self["webpackChunk_tiny_components_slider"] = self["webpackChunk_tiny_components_slider"] || []).push([["spritemap"],{
/***/ "?c20d":
/*!******************************!*\
!*** spritemap-dummy-module ***!
\******************************/
/***/ (() => {
/***/ })
}]);
(self.webpackChunk_tiny_components_slider=self.webpackChunk_tiny_components_slider||[]).push([[355],{256:()=>{}}]);

@ -72,24 +72,28 @@ export default {
// getting current max
const max = this.state.max
const element = this.$('.' + this.state.classes.item)
// setting max to show visible
this.state.max = 0
this.state.width = this.$('.' + this.state.classes.item).offsetWidth
if (element) {
// check how many elements can visible in element
this.$$('.' + this.state.classes.item).forEach((element, index) => {
if (element.offsetLeft < this.root.offsetWidth) {
this.state.max++;
}
})
// setting max to show visible
this.state.max = 0
this.state.width = element.offsetWidth
// change position to fit new max value
const value = Math.abs(this.state.max - max)
// check how many elements can visible in element
this.$$('.' + this.state.classes.item).forEach((element, index) => {
if (element.offsetLeft < this.root.offsetWidth) {
this.state.max++;
}
})
// @TODO check this, at 0 it makes me mad
if (this.state.position >= value && this.state.position > 1) {
this.state.position -= value
// change position to fit new max value
const value = Math.abs(this.state.max - max)
// @TODO check this, at 0 it makes me mad
if (this.state.position >= value && this.state.position > 1) {
this.state.position -= value
}
}
},

@ -67,6 +67,7 @@ mix
extend: {
content: [
path.join(__dirname, 'src/**.riot'),
path.join(__dirname, 'src/**.js'),
path.join(__dirname, 'example/index.html')
]
}

Loading…
Cancel
Save