Skip to content
This repository has been archived by the owner on May 24, 2021. It is now read-only.

Commit

Permalink
upgrade(styles): Outsource CSS in dedicated file
Browse files Browse the repository at this point in the history
- Update webpack bundling

BREAKING CHANGE: new file style.css
  • Loading branch information
alexander-heimbuch committed Jul 29, 2017
1 parent 3126b60 commit 51a0a72
Show file tree
Hide file tree
Showing 30 changed files with 445 additions and 196 deletions.
1 change: 1 addition & 0 deletions docs/standalone.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
</head>
<body>
<PodlovePlayer></PodlovePlayer>
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"devDependencies": {
"ava": "0.18.2",
"babel-core": "6.22.0",
"babel-loader": "7.0.0",
"babel-loader": "^7.1.1",
"babel-plugin-add-module-exports": "0.2.1",
"babel-plugin-lodash": "3.2.11",
"babel-plugin-transform-object-rest-spread": "6.23.0",
Expand All @@ -90,15 +90,16 @@
"css-loader": "0.25.0",
"cz-conventional-changelog": "^2.0.0",
"eslint-plugin-html": "3.0.0",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "0.11.1",
"generate-changelog": "1.1.0",
"html-webpack-plugin": "2.26.0",
"inject-loader": "3.0.0",
"html-webpack-plugin": "^2.29.0",
"inject-loader": "^3.0.1",
"lolex": "1.6.0",
"node-sass": "4.1.1",
"nyc": "10.1.2",
"raw-loader": "0.5.1",
"sass-loader": "4.1.1",
"sass-loader": "^6.0.6",
"semver": "5.3.0",
"sinon": "2.1.0",
"snazzy": "7.0.0",
Expand All @@ -108,10 +109,10 @@
"transform-runtime": "0.0.0",
"vue-loader": "^12.2.2",
"vue-template-compiler": "^2.4.2",
"webpack": "2.3.2",
"webpack": "^3.4.1",
"webpack-bundle-analyzer": "2.4.0",
"webpack-dashboard": "0.3.0",
"webpack-dev-server": "2.4.5"
"webpack-dev-server": "^2.6.1"
},
"engines": {
"node": ">=5.0.0"
Expand Down
8 changes: 5 additions & 3 deletions src/components/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@

<style lang="scss">
@import 'variables';
@import 'resets/resets';
@import 'global';
@import 'utils';
@import 'font';
@import 'resets/resets';
@import 'inputs';
@import 'embed';
@import 'utils';
@import 'share';
@import 'transitions';
@import 'animations';
.podlove {
display: block;
Expand Down
1 change: 0 additions & 1 deletion src/components/player/control-bar/PlayButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@

<style lang="scss">
@import 'variables';
$button-width: 50px;
.play-button {
display: flex;
Expand Down
2 changes: 0 additions & 2 deletions src/components/player/progress-bar/CurrentChapter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
</script>

<style lang="scss">
@import 'animations';
.timer-chapter {
width: 100%;
text-align: center;
Expand Down
9 changes: 0 additions & 9 deletions src/components/player/progress-bar/Progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,6 @@
<style lang="scss">
@import 'variables';
$progress-height: 44px;
$progress-track-height: 2px;
$progress-thumb-height: 14px;
$progress-thumb-width: 6px;
$progress-thumb-active-height: 18px;
$progress-thumb-active-width: 8px;
.progress {
width: 100%;
position: relative;
Expand Down
3 changes: 0 additions & 3 deletions src/components/player/progress-bar/Timer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ export default {
@import 'variables';
@import 'font';
$timer-width: 80px;
$timer-height: 20px;
// Timer
.timer-progress {
display: flex;
Expand Down
19 changes: 9 additions & 10 deletions src/components/shared/InputSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@
<style lang="scss">
@import 'variables';
.input-select {
display: block;
width: 100%;
border-width: 1px;
border-style: solid;
border-radius: 0;
padding: $padding / 4;
height: $input-height;
}
.input-select {
display: block;
width: 100%;
border-width: 1px;
border-style: solid;
border-radius: 0;
padding: $padding / 4;
height: $input-height;
}
</style>
1 change: 0 additions & 1 deletion src/components/shared/InputSlider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

<style lang="scss">
@import 'variables';
$slider-height: 44px;
.input-slider {
height: $slider-height;
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/Overlay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

<style lang="scss">
@import 'variables';
@import 'animations';
.overlay-container {
position: absolute;
Expand Down
1 change: 0 additions & 1 deletion src/components/shared/Slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@

<style lang="scss">
@import 'variables';
$slider-height: 44px;
.podlove-player--slider {
height: $slider-height;
Expand Down
16 changes: 8 additions & 8 deletions src/components/shared/TabHeaderItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
@import 'variables';
.tab-header-item {
display: flex;
align-items: center;
justify-content: center;
padding: ($padding / 2) $padding;
width: 100%;
margin: 0;
height: $tabs-header-height;
transition: all $animation-duration;
display: flex;
align-items: center;
justify-content: center;
padding: ($padding / 2) $padding;
width: 100%;
margin: 0;
height: $tabs-header-height;
transition: all $animation-duration;
.caption {
display: flex;
Expand Down
1 change: 0 additions & 1 deletion src/components/tabs/audio/Audio.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

<style lang="scss">
@import 'variables';
@import 'inputs';
.audio {
width: 100%;
Expand Down
5 changes: 0 additions & 5 deletions src/components/tabs/audio/AudioRate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,3 @@
}
}
</script>

<style lang="scss">
@import 'variables';
@import 'inputs';
</style>
1 change: 0 additions & 1 deletion src/components/tabs/audio/AudioVolume.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@

<style lang="scss">
@import 'variables';
@import 'inputs';
.audio {
.mute-control {
Expand Down
2 changes: 0 additions & 2 deletions src/components/tabs/chapters/ChapterEntry.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@
@import 'variables';
@import 'font';
$index-width: 40px;
.chapters--entry {
width: 100%;
position: relative;
Expand Down
2 changes: 0 additions & 2 deletions src/components/tabs/share/Share.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
<style lang="scss">
@import 'variables';
$content-meta-height: 75px;
.share {
padding: $padding 0 0 0;
Expand Down
6 changes: 2 additions & 4 deletions src/components/tabs/share/ShareChannels.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<ul class="channel-list">
<li><ChannelTwitterComponent :text="shareText"></ChannelTwitterComponent></li>
<li><ChannelFacebookComponent :link="link"></ChannelFacebookComponent></li>
<li><ChannelGooglePlusComponent :link="link"></ChannelGooglePlusComponent></li>
<li><ChannelFacebookComponent :link="shareLink"></ChannelFacebookComponent></li>
<li><ChannelGooglePlusComponent :link="shareLink"></ChannelGooglePlusComponent></li>
<li><ChannelMailComponent :text="shareText" :subject="shareSubject"></ChannelMailComponent></li>
<li v-if="type !== 'show'"><ChannelEmbedComponent :color="theme.tabs.share.platform.button"></ChannelEmbedComponent></li>
</ul>
Expand Down Expand Up @@ -127,8 +127,6 @@
<style lang="scss">
@import 'variables';
$button-size: 60px;
.channel-list {
display: flex;
justify-content: center;
Expand Down
4 changes: 1 addition & 3 deletions src/components/tabs/share/ShareEmbed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@

<style lang="scss">
@import 'variables';
@import 'utils';
@import 'inputs';
.embed-code {
width: 100%;
Expand All @@ -108,7 +106,7 @@
.embed-overlay {
.overlay {
width: 250px;
width: $share-embed-width;
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/components/tabs/share/ShareLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,3 @@
}
}
</script>

<style lang="scss">
@import 'inputs';
</style>
6 changes: 0 additions & 6 deletions src/components/tabs/share/channels/ChannelEmbed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,3 @@
}
}
</script>

<style lang="scss">
@import 'share';
$channel-color: #888;
</style>
2 changes: 0 additions & 2 deletions src/components/tabs/share/channels/ChannelFacebook.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
</script>

<style lang="scss">
@import 'share';
$channel-color: #3b5998;
.channel-icon.facebook {
Expand Down
2 changes: 0 additions & 2 deletions src/components/tabs/share/channels/ChannelGooglePlus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
</script>

<style lang="scss">
@import 'share';
$channel-color: #dd4b39;
.channel-icon.google-plus {
Expand Down
2 changes: 0 additions & 2 deletions src/components/tabs/share/channels/ChannelMail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
</script>

<style lang="scss">
@import 'share';
$channel-color: #888;
.channel-icon.mail {
Expand Down
6 changes: 1 addition & 5 deletions src/core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@ const createRenderer = instance => {
return instance
}

const Renderer = createRenderer(Vue)

export {
Renderer
}
export const Renderer = createRenderer(Vue)
2 changes: 2 additions & 0 deletions src/embed/embed.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const configNode = (config = {}) =>
.then(config => tag('script', `window.PODLOVE = ${JSON.stringify(config)}`))

// Player Logic
const styleBundle = config => tag('link', '', {rel: 'stylesheet', href: `${get(config.reference, 'base', '.')}/style.css`})
const vendorBundle = config => tag('script', '', {type: 'text/javascript', src: `${get(config.reference, 'base', '.')}/vendor.js`})
const appBundle = config => tag('script', '', {type: 'text/javascript', src: `${get(config.reference, 'base', '.')}/window.js`})

Expand All @@ -108,6 +109,7 @@ window.podlovePlayer = (selector, config) => {
return Bluebird.all([
playerEntry,
configNode(config),
styleBundle(config),
vendorBundle(config),
appBundle(config),
dynamicResizer
Expand Down
1 change: 1 addition & 0 deletions src/statics/share.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
overflow: hidden;
}
</style>
<link rel="stylesheet" href="style.css">
</head>
<body>
<PodlovePlayer></PodlovePlayer>
Expand Down
16 changes: 16 additions & 0 deletions src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,22 @@ $input-height: 35px;
$addon-button-width: 80px;
$mute-control-width: calc(60px + #{$padding});
$content-option-width: 175px;
$button-width: 50px;
$slider-height: 44px;
$index-width: 40px;

$progress-height: 44px;
$progress-track-height: 2px;
$progress-thumb-height: 14px;
$progress-thumb-width: 6px;
$progress-thumb-active-height: 18px;
$progress-thumb-active-width: 8px;

$timer-width: 80px;
$timer-height: 20px;

$content-meta-height: 75px;
$share-embed-width: 250px;

// levels
$tab-shadow: 100;
Expand Down
Loading

0 comments on commit 51a0a72

Please sign in to comment.