Skip to content

Commit

Permalink
DDF-3785 create codice webfont for custom icons (#3194)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexabird authored and andrewkfiedler committed Apr 30, 2018
1 parent 25ab5ae commit e40622e
Show file tree
Hide file tree
Showing 9 changed files with 1,162 additions and 55 deletions.
1 change: 1 addition & 0 deletions ui/packages/catalog-ui-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"bootstrap": "3.3.7",
"cesium": "1.44",
"clipboard": "1.7.1",
"codice-icons": "*",
"density-clustering": "1.3.0",
"dropzone": "4.3.0",
"eonasdan-bootstrap-datetimepicker": "Eonasdan/bootstrap-datetimepicker#4.17.47",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,5 @@ require([
};

require('js/ApplicationStart');
require('codice-icons/target/codice.font');
});
19 changes: 19 additions & 0 deletions ui/packages/codice-icons/codice-icons/map-marker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions ui/packages/codice-icons/codice.font.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
'files': [
'./codice-icons/*.svg'
],
'fontName': 'codice-icons',
'classPrefix': 'cf-',
'baseSelector': '.cf',
'types': ['eot', 'woff', 'woff2', 'ttf', 'svg'],
'fixedWidth': true,
'embed': true,
'fileName': 'app.[fontname].[chunkhash].[ext]'
};
3 changes: 3 additions & 0 deletions ui/packages/codice-icons/codice.font.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.cf:before {
vertical-align: middle;
}
23 changes: 23 additions & 0 deletions ui/packages/codice-icons/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "codice-icons",
"author": "Codice",
"description": "A custom icon webfont for Codice.",
"version": "1.0.0",
"license": "LGPL-3.0",
"scripts": {
"build": "webpack && ace package"
},
"dependencies": {
"css-loader": "0.28.11",
"style-loader": "0.21.0",
"webfonts-loader": "4.1.0",
"webpack": "4.6.0",
"webpack-cli": "2.0.15"
},
"files": [
"target/"
],
"context-path": "/codice/icons",
"main": "codice.font.config.js",
"devDependencies": {}
}
32 changes: 32 additions & 0 deletions ui/packages/codice-icons/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const path = require('path');

module.exports = {
entry: [
'./codice.font.config.js',
'./codice.font.css'
],
output: {
path: path.resolve(__dirname, 'target'),
publicPath: '/',
filename: 'codice.font.js'
},
module: {
rules: [
{
test: /\.font\.config\.js/,
use: [
'style-loader',
'css-loader',
'webfonts-loader'
]
},
{
test: /\.css/,
use: [
'style-loader',
'css-loader'
]
}
]
}
};
5 changes: 5 additions & 0 deletions ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,11 @@
<type>jar</type>
<classifier>cesium-assets</classifier>
</artifact>
<artifact>
<file>packages/codice-icons/target/codice-icons.jar</file>
<type>jar</type>
<classifier>codice-icons</classifier>
</artifact>
<artifact>
<file>packages/geowebcache-admin-plugin/target/geowebcache-admin-plugin.jar</file>
<type>jar</type>
Expand Down
Loading

0 comments on commit e40622e

Please sign in to comment.