Skip to content

Commit 589774d

Browse files
committed
Update SSR
1 parent cd1dd2f commit 589774d

File tree

8 files changed

+110
-147
lines changed

8 files changed

+110
-147
lines changed

dist/vue-clock.cjs.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const _=1e3,f=12;function k(e){return e>=12?"PM":"AM"}function p(e){return(parseInt(e,10)>=10?"":"0")+e}var b={data(){return{hours:0,minutes:0,seconds:0,hourtime:""}},mounted(){this.$options.timer=window.setTimeout(this.updateDateTime,_)},beforeDestroy(){window.clearTimeout(this.$options.timer)},methods:{updateDateTime(){const e=new Date();this.hours=e.getHours(),this.minutes=p(e.getMinutes()),this.seconds=p(e.getSeconds()),this.hourtime=k(this.hours),this.hours=this.hours%f||f,this.$options.timer=window.setTimeout(this.updateDateTime,_)}}};function E(e,t,s,n,d,l,c,r,A,v){typeof c!="boolean"&&(A=r,r=c,c=!1);const i=typeof s=="function"?s.options:s;e&&e.render&&(i.render=e.render,i.staticRenderFns=e.staticRenderFns,i._compiled=!0,d&&(i.functional=!0)),n&&(i._scopeId=n);let a;if(l?(a=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(o=__VUE_SSR_CONTEXT__),t&&t.call(this,A(o)),o&&o._registeredComponents&&o._registeredComponents.add(l)},i._ssrRegister=a):t&&(a=c?function(o){t.call(this,v(o,this.$root.$options.shadowRoot))}:function(o){t.call(this,r(o))}),a)if(i.functional){const o=i.render;i.render=function(g,m){return a.call(m),o(g,m)}}else{const o=i.beforeCreate;i.beforeCreate=o?[].concat(o,a):[a]}return s}const y=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function w(e){return(t,s)=>T(t,s)}let u;const h={};function T(e,t){const s=y?t.media||"default":e,n=h[s]||(h[s]={ids:new Set(),styles:[]});if(!n.ids.has(e)){n.ids.add(e);let d=t.source;if(t.map&&(d+=`
2-
/*# sourceURL=`+t.map.sources[0]+" */",d+=`
3-
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),n.element||(n.element=document.createElement("style"),n.element.type="text/css",t.media&&n.element.setAttribute("media",t.media),u===void 0&&(u=document.head||document.getElementsByTagName("head")[0]),u.appendChild(n.element)),"styleSheet"in n.element)n.styles.push(d),n.element.styleSheet.cssText=n.styles.filter(Boolean).join(`
4-
`);else{const l=n.ids.size-1,c=document.createTextNode(d),r=n.element.childNodes;r[l]&&n.element.removeChild(r[l]),r.length?n.element.insertBefore(c,r[l]):n.element.appendChild(c)}}}const x=b;var C=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.hourtime!=""?s("div",{staticClass:"clock"},[s("div",{staticClass:"clock__hours"},[s("span",{staticClass:"clock__hourtime",domProps:{textContent:e._s(e.hourtime)}}),e._v(" "),s("span",{domProps:{textContent:e._s(e.hours)}})]),e._v(" "),s("div",{staticClass:"clock__minutes",domProps:{textContent:e._s(e.minutes)}}),e._v(" "),s("div",{staticClass:"clock__seconds",domProps:{textContent:e._s(e.seconds)}})]):e._e()},S=[];C._withStripped=!0;const R=function(e){if(!e)return;e("data-v-6294754c_0",{source:`
1+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const SECOND=1e3,HOUR=12;function getHourTime(e){return e>=12?"PM":"AM"}function getZeroPad(e){return(parseInt(e,10)>=10?"":"0")+e}var script={data(){return{hours:0,minutes:0,seconds:0,hourtime:""}},mounted(){this.$options.timer=window.setTimeout(this.updateDateTime,SECOND)},beforeDestroy(){window.clearTimeout(this.$options.timer)},methods:{updateDateTime(){const e=new Date();this.hours=e.getHours(),this.minutes=getZeroPad(e.getMinutes()),this.seconds=getZeroPad(e.getSeconds()),this.hourtime=getHourTime(this.hours),this.hours=this.hours%HOUR||HOUR,this.$options.timer=window.setTimeout(this.updateDateTime,SECOND)}}};function normalizeComponent(e,t,s,n,a,l,c,r,u,m){typeof c!="boolean"&&(u=r,r=c,c=!1);const i=typeof s=="function"?s.options:s;e&&e.render&&(i.render=e.render,i.staticRenderFns=e.staticRenderFns,i._compiled=!0,a&&(i.functional=!0)),n&&(i._scopeId=n);let d;if(l?(d=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__!="undefined"&&(o=__VUE_SSR_CONTEXT__),t&&t.call(this,u(o)),o&&o._registeredComponents&&o._registeredComponents.add(l)},i._ssrRegister=d):t&&(d=c?function(o){t.call(this,m(o,this.$root.$options.shadowRoot))}:function(o){t.call(this,r(o))}),d)if(i.functional){const o=i.render;i.render=function(f,A){return d.call(A),o(f,A)}}else{const o=i.beforeCreate;i.beforeCreate=o?[].concat(o,d):[d]}return s}const isOldIE=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());function createInjector(e){return(t,s)=>addStyle(t,s)}let HEAD;const styles={};function addStyle(e,t){const s=isOldIE?t.media||"default":e,n=styles[s]||(styles[s]={ids:new Set(),styles:[]});if(!n.ids.has(e)){n.ids.add(e);let a=t.source;if(t.map&&(a+=`
2+
/*# sourceURL=`+t.map.sources[0]+" */",a+=`
3+
/*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(t.map))))+" */"),n.element||(n.element=document.createElement("style"),n.element.type="text/css",t.media&&n.element.setAttribute("media",t.media),HEAD===void 0&&(HEAD=document.head||document.getElementsByTagName("head")[0]),HEAD.appendChild(n.element)),"styleSheet"in n.element)n.styles.push(a),n.element.styleSheet.cssText=n.styles.filter(Boolean).join(`
4+
`);else{const l=n.ids.size-1,c=document.createTextNode(a),r=n.element.childNodes;r[l]&&n.element.removeChild(r[l]),r.length?n.element.insertBefore(c,r[l]):n.element.appendChild(c)}}}const __vue_script__=script;var __vue_render__=function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.hourtime!=""?s("div",{staticClass:"clock"},[s("div",{staticClass:"clock__hours"},[s("span",{staticClass:"clock__hourtime",domProps:{textContent:e._s(e.hourtime)}}),e._v(" "),s("span",{domProps:{textContent:e._s(e.hours)}})]),e._v(" "),s("div",{staticClass:"clock__minutes",domProps:{textContent:e._s(e.minutes)}}),e._v(" "),s("div",{staticClass:"clock__seconds",domProps:{textContent:e._s(e.seconds)}})]):e._e()},__vue_staticRenderFns__=[];__vue_render__._withStripped=!0;const __vue_inject_styles__=function(e){if(!e)return;e("data-v-6294754c_0",{source:`
55
.clock[data-v-6294754c] {
66
background: #fff;
77
border: 0.3rem solid #fff;
@@ -124,4 +124,4 @@ export default {
124124
left: 8px;
125125
}
126126
</style>
127-
`]},media:void 0})},D="data-v-6294754c",B=void 0,N=!1,$=E({render:C,staticRenderFns:S},R,x,D,N,B,!1,w,void 0,void 0);export default $;
127+
`]},media:void 0})},__vue_scope_id__="data-v-6294754c",__vue_module_identifier__=void 0,__vue_is_functional_template__=!1,__vue_component__=normalizeComponent({render:__vue_render__,staticRenderFns:__vue_staticRenderFns__},__vue_inject_styles__,__vue_script__,__vue_scope_id__,__vue_is_functional_template__,__vue_module_identifier__,!1,createInjector,void 0,void 0);function install(e){if(install.installed)return;install.installed=!0,e.component("VueClock",__vue_component__)}const plugin={install};let globalVue=null;typeof window!="undefined"?globalVue=window.Vue:typeof global!="undefined"&&(globalVue=global.Vue),globalVue&&globalVue.use(plugin),exports.default=__vue_component__,exports.install=install;

dist/vue-clock.esm.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
.clock[data-v-6294754c] {
3+
background: #fff;
4+
border: 0.3rem solid #fff;
5+
border-radius: 0.5rem;
6+
display: inline-block;
7+
margin-bottom: 1em;
8+
}
9+
.clock__hours[data-v-6294754c],
10+
.clock__minutes[data-v-6294754c],
11+
.clock__seconds[data-v-6294754c] {
12+
background: linear-gradient(to bottom, #26303b 50%, #2c3540 50%);
13+
display: inline-block;
14+
color: #fff;
15+
font-family: 'Nunito', sans-serif;
16+
font-size: 3rem;
17+
font-weight: 300;
18+
padding: 0.5rem 1rem;
19+
text-align: center;
20+
position: relative;
21+
}
22+
.clock__hours[data-v-6294754c] {
23+
border-right: 0.15rem solid #fff;
24+
border-radius: 0.5rem 0 0 0.5rem;
25+
}
26+
.clock__minutes[data-v-6294754c] {
27+
border-right: 0.15rem solid #fff;
28+
}
29+
.clock__seconds[data-v-6294754c] {
30+
border-radius: 0 0.5rem 0.5rem 0;
31+
}
32+
.clock__hourtime[data-v-6294754c] {
33+
font-size: 1rem;
34+
position: absolute;
35+
top: 2px;
36+
left: 8px;
37+
}

dist/vue-clock.esm.js

Lines changed: 1 addition & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)