forked from platypush/platypush
Fixed carousel style
This commit is contained in:
parent
1e193f8346
commit
3c9a633907
12 changed files with 24 additions and 11 deletions
2
platypush/backend/http/dist/index.html
vendored
2
platypush/backend/http/dist/index.html
vendored
|
@ -1 +1 @@
|
||||||
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>platypush</title><link href="/static/css/chunk-2dcde994.9a64be0a.css" rel="prefetch"><link href="/static/css/chunk-4bbbb9a3.4d06e8fc.css" rel="prefetch"><link href="/static/css/chunk-5710a9bc.40372d79.css" rel="prefetch"><link href="/static/css/chunk-62a3d08e.46dc0c5b.css" rel="prefetch"><link href="/static/css/chunk-7c2209ed.a669bf94.css" rel="prefetch"><link href="/static/css/chunk-f0cefcde.2bd45425.css" rel="prefetch"><link href="/static/js/chunk-2dcde994.af8aa6cd.js" rel="prefetch"><link href="/static/js/chunk-4bbbb9a3.d3030ed8.js" rel="prefetch"><link href="/static/js/chunk-5710a9bc.aefd4d41.js" rel="prefetch"><link href="/static/js/chunk-62a3d08e.15815e60.js" rel="prefetch"><link href="/static/js/chunk-7c2209ed.46b43454.js" rel="prefetch"><link href="/static/js/chunk-f0cefcde.8bf9c8a1.js" rel="prefetch"><link href="/static/css/app.1d25e432.css" rel="preload" as="style"><link href="/static/js/app.6a1bcb04.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.71d8c4c8.js" rel="preload" as="script"><link href="/static/css/app.1d25e432.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.71d8c4c8.js"></script><script src="/static/js/app.6a1bcb04.js"></script></body></html>
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico"><title>platypush</title><link href="/static/css/chunk-2dcde994.9a64be0a.css" rel="prefetch"><link href="/static/css/chunk-4bbbb9a3.4d06e8fc.css" rel="prefetch"><link href="/static/css/chunk-5710a9bc.40372d79.css" rel="prefetch"><link href="/static/css/chunk-62a3d08e.46dc0c5b.css" rel="prefetch"><link href="/static/css/chunk-7c2209ed.a669bf94.css" rel="prefetch"><link href="/static/css/chunk-ed4988aa.53a5d02c.css" rel="prefetch"><link href="/static/js/chunk-2dcde994.af8aa6cd.js" rel="prefetch"><link href="/static/js/chunk-4bbbb9a3.d3030ed8.js" rel="prefetch"><link href="/static/js/chunk-5710a9bc.aefd4d41.js" rel="prefetch"><link href="/static/js/chunk-62a3d08e.15815e60.js" rel="prefetch"><link href="/static/js/chunk-7c2209ed.46b43454.js" rel="prefetch"><link href="/static/js/chunk-ed4988aa.fb022ef7.js" rel="prefetch"><link href="/static/css/app.45b363ac.css" rel="preload" as="style"><link href="/static/js/app.0d61a5ab.js" rel="preload" as="script"><link href="/static/js/chunk-vendors.71d8c4c8.js" rel="preload" as="script"><link href="/static/css/app.45b363ac.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but platypush doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/static/js/chunk-vendors.71d8c4c8.js"></script><script src="/static/js/app.0d61a5ab.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/dist/static/js/app.0d61a5ab.js
vendored
Normal file
2
platypush/backend/http/dist/static/js/app.0d61a5ab.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
platypush/backend/http/dist/static/js/app.0d61a5ab.js.map
vendored
Normal file
1
platypush/backend/http/dist/static/js/app.0d61a5ab.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
platypush/backend/http/dist/static/js/chunk-ed4988aa.fb022ef7.js
vendored
Normal file
2
platypush/backend/http/dist/static/js/chunk-ed4988aa.fb022ef7.js
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ed4988aa"],{"7c73c":function(e,t,r){"use strict";r("7f9b")},"7f9b":function(e,t,r){},"9e28":function(e,t,r){},c845:function(e,t,r){"use strict";r.r(t);var a=r("7a23"),s=Object(a["F"])("data-v-cac91b06");Object(a["u"])("data-v-cac91b06");var o={class:"image-carousel"},i={ref:"background",class:"background"},n={key:1,class:"row info-container"},h={class:"col-6 weather-container"},c={key:0},u={class:"col-6 date-time-container"};Object(a["s"])();var m=s((function(e,t,r,s,m,d){var l=Object(a["z"])("Loading"),f=Object(a["z"])("Weather"),w=Object(a["z"])("DateTime");return Object(a["r"])(),Object(a["e"])("div",o,[m.images.length?Object(a["f"])("",!0):(Object(a["r"])(),Object(a["e"])(l,{key:0})),Object(a["h"])("div",i,null,512),Object(a["h"])("img",{ref:"img",src:d.imgURL,alt:"Your carousel images",style:{display:m.images.length?"block":"none"}},null,12,["src"]),d._showDate||d._showTime?(Object(a["r"])(),Object(a["e"])("div",n,[Object(a["h"])("div",h,[d._showWeather?(Object(a["r"])(),Object(a["e"])(f,{key:1,"show-icon":d._showWeatherIcon,"show-summary":d._showWeatherSummary,"show-temperature":d._showTemperature,"icon-color":r.weatherIconColor,"icon-size":r.weatherIconSize,animate:d._animateWeatherIcon},null,8,["show-icon","show-summary","show-temperature","icon-color","icon-size","animate"])):(Object(a["r"])(),Object(a["e"])("span",c," "))]),Object(a["h"])("div",u,[d._showTime||d._showDate?(Object(a["r"])(),Object(a["e"])(w,{key:0,"show-date":d._showDate,"show-time":d._showTime,"show-seconds":d._showSeconds},null,8,["show-date","show-time","show-seconds"])):Object(a["f"])("",!0)])])):Object(a["f"])("",!0)])})),d=(r("a9e3"),r("96cf"),r("1da1")),l=r("3e54"),f=r("3a5e"),w=r("365a"),g=r("5b43"),p={name:"ImageCarousel",components:{Weather:g["default"],DateTime:w["default"],Loading:f["a"]},mixins:[l["a"]],props:{imgDir:{type:String,required:!0},refreshSeconds:{type:Number,required:!1,default:15},showDate:{type:Boolean,required:!1,default:!1},showTime:{type:Boolean,required:!1,default:!1},showSeconds:{type:Boolean,required:!1,default:!1},showWeather:{type:Boolean,required:!1,default:!1},showTemperature:{type:Boolean,required:!1,default:!0},showWeatherIcon:{type:Boolean,required:!1,default:!0},showWeatherSummary:{type:Boolean,required:!1,default:!0},weatherIconColor:{type:String,required:!1,default:"white"},weatherIconSize:{type:Number,required:!1,default:70},animateWeatherIcon:{required:!1,default:!0}},data:function(){return{images:[],currentImage:void 0,loading:!1}},computed:{imgURL:function(){var e=8008;return"backend.http"in this.$root.config&&"port"in this.$root.config["backend.http"]&&(e=this.$root.config["backend.http"].port),"//"+window.location.hostname+":"+e+this.currentImage},_showDate:function(){return this.parseBoolean(this.showDate)},_showTime:function(){return this.parseBoolean(this.showTime)},_showSeconds:function(){return this.parseBoolean(this.showSeconds)},_showTemperature:function(){return this.parseBoolean(this.showTemperature)},_showWeather:function(){return this.parseBoolean(this.showWeather)},_showWeatherIcon:function(){return this.parseBoolean(this.showWeatherIcon)},_showWeatherSummary:function(){return this.parseBoolean(this.showWeatherSummary)},_animateWeatherIcon:function(){return this.parseBoolean(this.animateWeatherIcon)}},methods:{refresh:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.images.length){t.next=10;break}return e.loading=!0,t.prev=2,t.next=5,e.request("utils.search_web_directory",{directory:e.imgDir,extensions:[".jpg",".jpeg",".png"]});case 5:e.images=t.sent,e.shuffleImages();case 7:return t.prev=7,e.loading=!1,t.finish(7);case 10:e.images.length&&(e.currentImage=e.images.pop());case 11:case"end":return t.stop()}}),t,null,[[2,,7,10]])})))()},onNewImage:function(){if(this.$refs.img&&(this.$refs.background.style["background-image"]="url("+this.imgURL+")",this.$refs.img.style.width="auto",this.$refs.img.width>this.$refs.img.height)){var e=this.$refs.img.width/this.$refs.img.height;4/3<=e<=16/9&&(this.$refs.img.style.width="100%"),e<=4/3&&(this.$refs.img.style.height="100%")}},shuffleImages:function(){for(var e=this.images.length-1;e>0;e--){var t=Math.floor(Math.random()*(e+1)),r=this.images[e];this.images[e]=this.images[t],this.images[t]=r}}},mounted:function(){this.$refs.img.addEventListener("load",this.onNewImage),this.$refs.img.addEventListener("error",this.refresh),this.refresh(),setInterval(this.refresh,Math.round(1e3*this.refreshSeconds))}};r("7c73c"),r("d233");p.render=m,p.__scopeId="data-v-cac91b06";t["default"]=p},d233:function(e,t,r){"use strict";r("9e28")}}]);
|
||||||
|
//# sourceMappingURL=chunk-ed4988aa.fb022ef7.js.map
|
File diff suppressed because one or more lines are too long
|
@ -1,2 +0,0 @@
|
||||||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f0cefcde"],{1549:function(e,t,r){"use strict";r("84c9")},"84c9":function(e,t,r){},"9e28":function(e,t,r){},c845:function(e,t,r){"use strict";r.r(t);var s=r("7a23"),o=Object(s["F"])("data-v-8830e3f6");Object(s["u"])("data-v-8830e3f6");var a={class:"image-carousel"},i={ref:"background",class:"background"},n={key:1,class:"row info-container"},h={class:"col-6 weather-container"},c={key:0},u={class:"col-6 date-time-container"};Object(s["s"])();var m=o((function(e,t,r,o,m,d){var l=Object(s["z"])("Loading"),f=Object(s["z"])("Weather"),w=Object(s["z"])("DateTime");return Object(s["r"])(),Object(s["e"])("div",a,[m.images.length?Object(s["f"])("",!0):(Object(s["r"])(),Object(s["e"])(l,{key:0})),Object(s["h"])("div",i,null,512),Object(s["h"])("img",{ref:"img",src:d.imgURL,alt:"Your carousel images",style:{display:m.images.length?"block":"none"}},null,12,["src"]),d._showDate||d._showTime?(Object(s["r"])(),Object(s["e"])("div",n,[Object(s["h"])("div",h,[d._showWeather?(Object(s["r"])(),Object(s["e"])(f,{key:1,"show-icon":d._showWeatherIcon,"show-summary":d._showWeatherSummary,"show-temperature":d._showTemperature,"icon-color":r.weatherIconColor,"icon-size":r.weatherIconSize,animate:d._animateWeatherIcon},null,8,["show-icon","show-summary","show-temperature","icon-color","icon-size","animate"])):(Object(s["r"])(),Object(s["e"])("span",c," "))]),Object(s["h"])("div",u,[d._showTime||d._showDate?(Object(s["r"])(),Object(s["e"])(w,{key:0,"show-date":d._showDate,"show-time":d._showTime,"show-seconds":d._showSeconds},null,8,["show-date","show-time","show-seconds"])):Object(s["f"])("",!0)])])):Object(s["f"])("",!0)])})),d=(r("a9e3"),r("96cf"),r("1da1")),l=r("3e54"),f=r("3a5e"),w=r("365a"),g=r("5b43"),p={name:"ImageCarousel",components:{Weather:g["default"],DateTime:w["default"],Loading:f["a"]},mixins:[l["a"]],props:{imgDir:{type:String,required:!0},refreshSeconds:{type:Number,required:!1,default:15},showDate:{type:Boolean,required:!1,default:!1},showTime:{type:Boolean,required:!1,default:!1},showSeconds:{type:Boolean,required:!1,default:!1},showWeather:{type:Boolean,required:!1,default:!1},showTemperature:{type:Boolean,required:!1,default:!0},showWeatherIcon:{type:Boolean,required:!1,default:!0},showWeatherSummary:{type:Boolean,required:!1,default:!0},weatherIconColor:{type:String,required:!1,default:"white"},weatherIconSize:{type:Number,required:!1,default:40},animateWeatherIcon:{required:!1,default:!0}},data:function(){return{images:[],currentImage:void 0,loading:!1}},computed:{imgURL:function(){var e=8008;return"backend.http"in this.$root.config&&"port"in this.$root.config["backend.http"]&&(e=this.$root.config["backend.http"].port),"//"+window.location.hostname+":"+e+this.currentImage},_showDate:function(){return this.parseBoolean(this.showDate)},_showTime:function(){return this.parseBoolean(this.showTime)},_showSeconds:function(){return this.parseBoolean(this.showSeconds)},_showTemperature:function(){return this.parseBoolean(this.showTemperature)},_showWeather:function(){return this.parseBoolean(this.showWeather)},_showWeatherIcon:function(){return this.parseBoolean(this.showWeatherIcon)},_showWeatherSummary:function(){return this.parseBoolean(this.showWeatherSummary)},_animateWeatherIcon:function(){return this.parseBoolean(this.animateWeatherIcon)}},methods:{refresh:function(){var e=this;return Object(d["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.images.length){t.next=10;break}return e.loading=!0,t.prev=2,t.next=5,e.request("utils.search_web_directory",{directory:e.imgDir,extensions:[".jpg",".jpeg",".png"]});case 5:e.images=t.sent,e.shuffleImages();case 7:return t.prev=7,e.loading=!1,t.finish(7);case 10:e.images.length&&(e.currentImage=e.images.pop());case 11:case"end":return t.stop()}}),t,null,[[2,,7,10]])})))()},onNewImage:function(){if(this.$refs.img&&(this.$refs.background.style["background-image"]="url("+this.imgURL+")",this.$refs.img.style.width="auto",this.$refs.img.width>this.$refs.img.height)){var e=this.$refs.img.width/this.$refs.img.height;4/3<=e<=16/9&&(this.$refs.img.style.width="100%"),e<=4/3&&(this.$refs.img.style.height="100%")}},shuffleImages:function(){for(var e=this.images.length-1;e>0;e--){var t=Math.floor(Math.random()*(e+1)),r=this.images[e];this.images[e]=this.images[t],this.images[t]=r}}},mounted:function(){this.$refs.img.addEventListener("load",this.onNewImage),this.$refs.img.addEventListener("error",this.refresh),this.refresh(),setInterval(this.refresh,Math.round(1e3*this.refreshSeconds))}};r("1549"),r("d233");p.render=m,p.__scopeId="data-v-8830e3f6";t["default"]=p},d233:function(e,t,r){"use strict";r("9e28")}}]);
|
|
||||||
//# sourceMappingURL=chunk-f0cefcde.8bf9c8a1.js.map
|
|
|
@ -104,7 +104,7 @@ export default {
|
||||||
weatherIconSize: {
|
weatherIconSize: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
default: 40,
|
default: 70,
|
||||||
},
|
},
|
||||||
|
|
||||||
// If false then the weather icon will be animated.
|
// If false then the weather icon will be animated.
|
||||||
|
@ -283,6 +283,10 @@ export default {
|
||||||
.weather-container {
|
.weather-container {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
|
||||||
|
.weather {
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
margin-bottom: -0.5em;
|
margin-bottom: -0.5em;
|
||||||
|
@ -291,6 +295,8 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.date-time {
|
.date-time {
|
||||||
|
margin-right: 1em;
|
||||||
|
|
||||||
.date {
|
.date {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,3 +131,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue