Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request #25 from Tripwire/fonts
Browse files Browse the repository at this point in the history
Font Dependencies
  • Loading branch information
cdaringe authored Mar 3, 2017
2 parents e7c6ef4 + 7536120 commit c9f770f
Show file tree
Hide file tree
Showing 105 changed files with 1,676 additions and 7,357 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"nsp": "^2.6.2",
"perish": "^1.0.1",
"pify": "^2.3.0",
"postcss-cli": "^3.0.0-beta",
"postcss-cssnext": "^2.8.0",
"postcss-import": "^9.1.0",
"postcss-loader": "^1.1.0",
Expand All @@ -56,7 +57,9 @@
},
"dependencies": {
"d3": "^4.4.0",
"elegant-icons": "^0.0.1",
"flexbox-react": "^4.1.0",
"lato-font": "^2.0.0",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"semantic-ui-react": "^0.66.0"
Expand Down
6 changes: 4 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ require('perish')
const build = require('./builder')

build.clean()
.then(() => build.react())
.then(() => build.semantic())
.then(() => build.octagon_componentJs())
.then(() => build.octagon_componentCss())
.then(() => build.octagon_copyAssets())
.then(() => build.semantic_init())
.then(() => console.log('dist build successfully'))
25 changes: 21 additions & 4 deletions scripts/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,47 @@ module.exports = {
get projectRoot () { return path.resolve(__dirname, '..') },
get semanticDist () { return path.join(this.semanticPath, 'dist') },
get semanticPath () { return path.join(this.projectRoot, 'semantic') },
get postCssConfig () { return path.join(this.projectRoot, 'scripts', 'postcss.config.js') },
get stylesDist () { return path.join(this.distDir, 'styles') },
get assetsDist () { return path.join(this.distDir, 'assets') },
clean () {
return Promise.all([remove(this.distDir), remove(this.semanticDist)])
},
getBin (bin) {
return path.join(this.projectRoot, 'node_modules', '.bin', bin) + (isWin ? '.cmd' : '')
},
semantic () {
semantic_init () {
// source maps not yet available!
// ref: https://github.com/Semantic-Org/Semantic-UI/issues/2171
return this._semanticBuild()
return this.semantic_build()
.then(() => copy(this.semanticDist, this.stylesDist))
},
_semanticBuild () {
semantic_build () {
return exec([this.getBin('gulp'), 'build'].join(' '), { cwd: this.semanticPath, stdio: 'inherit' })
.then(([stdout]) => console.log(stdout))
},
react (opts) {
octagon_componentJs (opts) {
opts = opts || {}
const args = [this.getBin('babel'), 'src', '-d', this.componentDist, '--ignore', '*.stories.js', '--source-maps']
if (opts.watch) args.push('--watch')
return Promise.resolve()
.then(() => mkdirp(this.componentDist))
.then(() => exec(args.join(' '), { cwd: this.projectRoot, stdio: 'inherit' }))
.then(([stdout]) => console.log(stdout))
},
octagon_componentCss (opts) {
opts = opts || {}
const outputDir = path.join(this.componentDist, 'styles', 'components')
const inputDir = path.join(this.projectRoot, 'src', 'styles', 'components', '*.css')
const args = [this.getBin('postcss'), inputDir, '-d', outputDir, '-c', this.postCssConfig]
return Promise.resolve()
.then(() => mkdirp(this.componentDist))
.then(() => exec(args.join(' '), { cwd: this.projectRoot, stdio: 'inherit' }))
.then(([stdout]) => console.log(stdout))
},
octagon_copyAssets (opts) {
const assetSource = path.join(this.projectRoot, 'src', 'assets')
return Promise.resolve('success')
.then(() => copy(assetSource, this.assetsDist))
}
}
9 changes: 9 additions & 0 deletions scripts/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
plugins: [
require('postcss-import'),
require('postcss-cssnext'), // permit future css rules
require('postcss-neat'), // @TODO investigate purging? may be unused
require('rucksack-css'), // css function superset (e.g. less like syntax)
require('autoprefixer')({ browsers: ['last 2 version'] })
]
}
8 changes: 4 additions & 4 deletions semantic/src/themes/tripwire/elements/icon.variables
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
url("@{fontPath}/@{fontName}.ttf") format('truetype'),
url("@{fontPath}/@{fontName}.svg#icons") format('svg'),

url("../../src/styles/fonts/ElegantIcons.woff") format('woff'),
url("../../src/styles/fonts/ElegantIcons.eot") format('embedded-opentype'),
url("../../src/styles/fonts/ElegantIcons.ttf") format('truetype'),
url("../../src/styles/fonts/ElegantIcons.svg#icons") format('svg'),
url("../../node_modules/elegant-icons/fonts/ElegantIcons.woff") format('woff'),
url("../../node_modules/elegant-icons/fonts/ElegantIcons.eot") format('embedded-opentype'),
url("../../node_modules/elegant-icons/fonts/ElegantIcons.ttf") format('truetype'),
url("../../node_modules/elegant-icons/fonts/ElegantIcons.svg#icons") format('svg'),
;

@opacity: 1;
Expand Down
1,343 changes: 1,343 additions & 0 deletions semantic/src/themes/tripwire/globals/site.overrides

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions semantic/src/themes/tripwire/modules/popup.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,34 @@
}

.ui.popup.red:before {
box-shadow: -1px -1px 0 0 @red !important;
color: @red !important;

}
.ui.popup:before{
color: darken(@borderColor, 10);
}


.ui.popup.yellow {
border: 1px solid @yellow !important;
}

.ui.popup.yellow:before {
box-shadow: -1px -1px 0 0 @yellow !important;
color: @yellow !important;
}

.ui.popup.grey {
border: 1px solid @grey !important;
}

.ui.popup.grey:before {
box-shadow: -1px -1px 0 0 @grey !important;
color: @grey !important;
}

.ui.popup.blue {
border: 1px solid @blue !important;
}

.ui.popup.blue:before {
box-shadow: -1px -1px 0 0 @blue !important;
color: @blue !important;
}
8 changes: 4 additions & 4 deletions semantic/src/themes/tripwire/modules/popup.variables
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
@arrowCenterBackground: @arrowBackground;
@arrowBottomBackground: @arrowBackground;

@arrowBoxShadow: @arrowStroke @arrowStroke 0px 0px @arrowColor;
@leftArrowBoxShadow: @arrowStroke -@arrowStroke 0px 0px @arrowColor;
@rightArrowBoxShadow: -@arrowStroke @arrowStroke 0px 0px @arrowColor;
@bottomArrowBoxShadow: -@arrowStroke -@arrowStroke 0px 0px @arrowColor;
@arrowBoxShadow: @arrowStroke @arrowStroke 0px 0px;
@leftArrowBoxShadow: @arrowStroke -@arrowStroke 0px 0px;
@rightArrowBoxShadow: -@arrowStroke @arrowStroke 0px 0px;
@bottomArrowBoxShadow: -@arrowStroke -@arrowStroke 0px 0px;

/*-------------------
Types
Expand Down
2 changes: 1 addition & 1 deletion src/components/charts/CircleChart/Circle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const CircleChart = (props) => {
textAnchor='middle'
dy='.35em'
fontSize='2.5em'
fontWeight='lighter'
fontWeight='300'
>
{endPercentValue}
</text>
Expand Down
12 changes: 5 additions & 7 deletions src/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/*@import url('https://fonts.googleapis.com/css?family=Lato:300,400,400i,700');*/
@import "fonts/typography.css";
@import 'fonts/style.css';
@import 'fonts/Lato/latofonts.css';
@import "variables.css";
.svg-overflow-visible svg {
/*@import "variables.css";*/
/*@import "./elegant-icons.css";*/
/*@import "./lato.css";*/
/*.svg-overflow-visible svg {
overflow: visible;
}
} */
10 changes: 5 additions & 5 deletions src/styles/fonts/style.css → src/styles/elegant-icons.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@font-face {
font-family: 'ElegantIcons';
src:url('fonts/ElegantIcons.eot');
src:url('fonts/ElegantIcons.eot?#iefix') format('embedded-opentype'),
url('fonts/ElegantIcons.woff') format('woff'),
url('fonts/ElegantIcons.ttf') format('truetype'),
url('fonts/ElegantIcons.svg#ElegantIcons') format('svg');
src:url('../../node_modules/elegant-icons/fonts/ElegantIcons.eot');
src:url('../../node_modules/elegant-icons/fonts/ElegantIcons.eot?#iefix') format('embedded-opentype'),
url('../../node_modules/elegant-icons/fonts/ElegantIcons.woff') format('woff'),
url('../../node_modules/elegant-icons/fonts/ElegantIcons.ttf') format('truetype'),
url('../../node_modules/elegant-icons/fonts/ElegantIcons.svg#ElegantIcons') format('svg');
font-weight: normal;
font-style: normal;
}
Expand Down
Binary file removed src/styles/fonts/ElegantIcons.eot
Binary file not shown.
Loading

0 comments on commit c9f770f

Please sign in to comment.