mirror of https://github.com/nextcloud/calendar
Remove iconfont
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6ce866f29c
commit
38f9b53ddf
File diff suppressed because it is too large
Load Diff
|
@ -93,7 +93,6 @@
|
|||
"babel-jest": "^29.1.0",
|
||||
"babel-loader-exclude-node-modules-except": "^1.2.1",
|
||||
"ical.js": "^1.5.0",
|
||||
"iconfont-plugin-webpack": "^1.1.4",
|
||||
"jest": "^29.0.3",
|
||||
"jest-environment-jsdom": "^29.0.3",
|
||||
"jest-serializer-vue": "^2.0.2",
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
# Automated icons font builder
|
||||
If you want to use an icon as a background on the components you need to use this tool.
|
||||
|
||||
1. Put any 16x16 icon in this folder with a proper filename
|
||||
2. On your component scss import the font scss: `@import '~Fonts/scss/iconfont-vue';`
|
||||
3. On your scss rule, use the `iconfont` mixin:
|
||||
``` scss
|
||||
.icon-test {
|
||||
@include iconfont('arrow-right-double');
|
||||
}
|
||||
```
|
||||
|
||||
# Results
|
||||
- Your scss selector will now use the `:before` pseudo-element with the unicode content matching your icon.
|
||||
``` scss
|
||||
.icon-test:before {
|
||||
font-family: 'iconfont-vue';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
content: "\EA03";
|
||||
}
|
||||
```
|
||||
|
||||
- The font will automatically be embeded on the library.
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13.5 0h-11C1.2 0 .1 1.1.1 2.4v11.1c0 1.3 1.1 2.4 2.4 2.4h11c1.3 0 2.4-1.1 2.4-2.4V2.4c0-1.3-1.1-2.4-2.4-2.4zM6.7 12.7L2.2 8.1l1.5-1.4 3 3.1L12.3 4l1.4 1.4-7 7.3z"/></svg>
|
Before Width: | Height: | Size: 241 B |
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M13.5-.1h-11C1.1-.1 0 1 0 2.4v11.2c0 1.4 1.1 2.5 2.5 2.5h11.1c1.4 0 2.5-1.1 2.5-2.5V2.4C16 1 14.9-.1 13.5-.1zm.6 14.3H1.9V1.8h12.2v12.4z"/></svg>
|
Before Width: | Height: | Size: 215 B |
|
@ -280,15 +280,19 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@import '../fonts/scss/iconfont-calendar-app.scss';
|
||||
|
||||
.calendar-grid-checkbox {
|
||||
border-color: transparent;
|
||||
@include iconfont('checkbox');
|
||||
border-style: solid;
|
||||
border-width: 2px;
|
||||
border-radius: 4px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.calendar-grid-checkbox-checked {
|
||||
border-color: transparent;
|
||||
@include iconfont('checkbox-checked');
|
||||
border-style: solid;
|
||||
border-width: 8px;
|
||||
border-radius: 4px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
const path = require('path')
|
||||
const webpack = require('webpack')
|
||||
const md5 = require('md5')
|
||||
|
||||
const webpackConfig = require('@nextcloud/webpack-vue-config')
|
||||
const webpackRules = require('@nextcloud/webpack-vue-config/rules')
|
||||
const BabelLoaderExcludeNodeModulesExcept = require('babel-loader-exclude-node-modules-except')
|
||||
const IconfontPlugin = require('iconfont-plugin-webpack')
|
||||
|
||||
const appVersion = JSON.stringify(process.env.npm_package_version)
|
||||
|
||||
// Add dashboard entry
|
||||
webpackConfig.entry.dashboard = path.join(__dirname, 'src', 'dashboard.js')
|
||||
|
@ -49,17 +45,6 @@ webpackRules.RULE_SCSS.use = [
|
|||
]
|
||||
|
||||
webpackConfig.plugins.push(
|
||||
new IconfontPlugin({
|
||||
src: './src/assets/iconfont',
|
||||
family: `iconfont-calendar-app-${md5(appVersion)}`,
|
||||
dest: {
|
||||
font: './src/fonts/[family].[type]',
|
||||
css: './src/fonts/scss/iconfont-calendar-app.scss',
|
||||
},
|
||||
watch: {
|
||||
pattern: './src/assets/iconfont/*.svg',
|
||||
},
|
||||
}),
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /^\.\/locale$/,
|
||||
contextRegExp: /moment$/,
|
||||
|
|
Loading…
Reference in New Issue