File tree Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Expand file tree Collapse file tree 4 files changed +27
-11
lines changed Original file line number Diff line number Diff line change 8
8
< body >
9
9
< div id ="app "> </ div >
10
10
<!-- built files will be auto injected -->
11
- < script type ="text/javascript " src ="./node_modules/node-vibrant/dist/vibrant.js "> </ script >
12
11
< script >
13
- Vibrant . from ( 'logo.png' ) . getPalette ( ) . then ( function ( palette ) {
14
- var css = document . createElement ( 'style' )
15
- css . type = 'text/css'
16
- var styles = 'a {color:' + palette . Vibrant . getHex ( ) + ';} footer {background-color:' + palette . DarkMuted . getHex ( ) + ';}'
17
- if ( css . styleSheet ) css . styleSheet . cssText = style
18
- else css . appendChild ( document . createTextNode ( styles ) )
19
- document . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( css )
20
- } ) ;
12
+
21
13
</ script >
22
14
</ body >
23
15
</ html >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div id =" app" >
3
- <router-link to =" /" ><img src =" logo.png" class =" logo" ></router-link >
3
+ <router-link to =" /" ><img src =" /static/ logo-large .png" class =" logo" ></router-link >
4
4
<a href =" /admin" class =" admin" >Admin</a >
5
5
<router-view />
6
6
<footer >
10
10
</template >
11
11
12
12
<script >
13
+ import Vibrant from ' node-vibrant'
14
+
13
15
export default {
14
16
name: ' app'
15
17
}
18
+ Vibrant .from (' /static/logo-large.png' ).getPalette ().then (function (palette ) {
19
+ // import Vibrant from 'node-vibrant'
20
+ var css = document .createElement (' style' )
21
+ css .type = ' text/css'
22
+ var vibrant = null
23
+ var muted = null
24
+ console .log (palette)
25
+ try {
26
+ vibrant = palette .Vibrant .getHex ()
27
+ } catch (e) {
28
+ vibrant = palette .LightVibrant .getHex ()
29
+ }
30
+ try {
31
+ muted = palette .Muted .getHex ()
32
+ } catch (e) {
33
+ muted = palette .DarkVibrant .getHex ()
34
+ }
35
+ var styles = ' a {color:' + vibrant + ' ;} footer {background-color:' + muted + ' ;color:' + vibrant + ' ;}'
36
+ if (css .styleSheet ) css .styleSheet .cssText = styles
37
+ else css .appendChild (document .createTextNode (styles))
38
+ document .getElementsByTagName (' head' )[0 ].appendChild (css)
39
+ })
16
40
</script >
17
41
18
42
<style >
Original file line number Diff line number Diff line change 2
2
<div class =" hello" v-if =" loaded" >
3
3
<h1 >{{ episode.title }}</h1 >
4
4
<p >{{ episode.summary }}</p >
5
- <audio controls =" controls" preload =" none " >
5
+ <audio controls =" controls" preload =" auto " >
6
6
Your browser doesn't support the audio tag!
7
7
<source :src =" episode.url" >
8
8
</audio >
File renamed without changes.
You can’t perform that action at this time.
0 commit comments