mirror of
https://github.com/ionic-team/ionicons.git
synced 2026-12-01 16:56:28 +01:00
refactor: update build scripts
This commit is contained in:
+1
-1
@@ -8,7 +8,6 @@ log.txt
|
||||
*.sublime-project
|
||||
*.sublime-workspace
|
||||
.idea/
|
||||
.sass-cache/
|
||||
.versions/
|
||||
.vscode/
|
||||
node_modules/
|
||||
@@ -16,5 +15,6 @@ tmp/
|
||||
dist/
|
||||
icons/
|
||||
.DS_Store
|
||||
scripts/*.js
|
||||
|
||||
www/
|
||||
+8
-18
@@ -8,23 +8,14 @@
|
||||
],
|
||||
"module": "dist/index.mjs",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/types/index.d.ts",
|
||||
"types": "dist/types/components.d.ts",
|
||||
"unpkg": "dist/ionicons.js",
|
||||
"collection": "dist/collection/collection-manifest.json",
|
||||
"collection:main": "dist/collection/index.js",
|
||||
"scripts": {
|
||||
"build": "npm run lint.ts && npm run build.data && npm run build.icon && npm run generate && npm run build.css && npm run copy.tasks && npm run test",
|
||||
"build.css": "node scripts/build-css.js",
|
||||
"build.data": "node scripts/data.js",
|
||||
"build.icon": "stencil build",
|
||||
"copy.tasks": "node scripts/copy-tasks.js",
|
||||
"dev": "npm run start.docs",
|
||||
"mode.comparison": "node scripts/mode-comparison.js",
|
||||
"generate": "python scripts/generate.py",
|
||||
"lint.ts": "tslint --project .",
|
||||
"lint.ts.fix": "tslint --project . --fix",
|
||||
"start": "npm run start.icon",
|
||||
"start.icon": "stencil build --dev --watch --serve",
|
||||
"build": "tsc -p scripts/tsconfig.json && npm run build.files && stencil build",
|
||||
"build.files": "node scripts/build.js",
|
||||
"start": "stencil build --dev --watch --serve",
|
||||
"release.prepare": "npm run build",
|
||||
"release": "np --any-branch --yolo",
|
||||
"version": "npm run build",
|
||||
@@ -32,11 +23,12 @@
|
||||
"test": "stencil test --spec"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@stencil/core": "1.3.0",
|
||||
"@stencil/sass": "^1.0.1",
|
||||
"@stencil/core": "~1.4.0",
|
||||
"@types/fs-extra": "^8.0.0",
|
||||
"@types/highlight.js": "^9.12.3",
|
||||
"@types/jest": "24.0.13",
|
||||
"@types/puppeteer": "1.12.4",
|
||||
"@types/svgo": "^1.2.1",
|
||||
"archiver": "^3.0.0",
|
||||
"fs-extra": "8.1.0",
|
||||
"highlight.js": "^9.15.8",
|
||||
@@ -46,9 +38,7 @@
|
||||
"pixelmatch": "4.0.2",
|
||||
"puppeteer": "1.7.0",
|
||||
"sass": "^1.20.3",
|
||||
"svgo": "1.2.2",
|
||||
"tslint": "^5.17.0",
|
||||
"tslint-ionic-rules": "0.0.21",
|
||||
"svgo": "1.3.0",
|
||||
"workbox-build": "4.3.1"
|
||||
},
|
||||
"keywords": [
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
# Ionicons
|
||||
|
||||
### [Announcing Ionicons v4!](https://blog.ionicframework.com/announcing-ionicons-v4/)
|
||||
|
||||
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 700+ icons crafted for web, iOS, Android, and desktop apps. Ionicons was built for [Ionic Framework](https://ionicframework.com/), so icons have both Material Design and iOS versions. When used with Ionic, the `ion-icon` component will automatically use the correct version based on your platform. Additionally, when used outside of Ionic, both `ios` and `md` platforms can be chosen by the application.
|
||||
[Ionicons](http://ionicons.com/) is a completely open-source icon set with 1,100+ icons crafted for web, iOS, Android, and desktop apps. Ionicons was built for [Ionic Framework](https://ionicframework.com/), so icons have both Material Design and iOS versions.
|
||||
|
||||
Note: All brand icons are trademarks of their respective owners. The use of these trademarks does not indicate endorsement of the trademark holder by Drifty, nor vice versa.
|
||||
|
||||
Visit [ionicons.com](http://ionicons.com) and check out the search feature, which has keywords identifying common icon names and styles. For example, if you search for “arrow” we call up every icon that could possibly be used as an arrow.
|
||||
|
||||
We intend for this icon pack to be used with [Ionic](http://ionicframework.com/), but it’s by no means limited to it. Use them wherever you see fit, personal or commercial. They are free to use and licensed under [MIT](http://opensource.org/licenses/MIT).
|
||||
|
||||
|
||||
@@ -30,7 +26,7 @@ Also note that only visible icons are loaded, and icons which are "below the fol
|
||||
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing </body> tag, to enable them.
|
||||
|
||||
```html
|
||||
<script src="https://unpkg.com/ionicons@4.2.2/dist/ionicons.js"></script>
|
||||
<script src="https://unpkg.com/ionicons@5.0.0/dist/ionicons.js"></script>
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
@@ -47,31 +43,6 @@ To use a custom SVG, provide its url in the `src` attribute to request the exter
|
||||
<ion-icon src="/path/to/external/file.svg"></ion-icon>
|
||||
```
|
||||
|
||||
### Platform specific icons
|
||||
|
||||
Many icons have both Material Design and iOS versions to provide Platform Continuity for users.
|
||||
|
||||
Platform Continuity means that by default, ionicons running on iOS (Apple products such as iPhone and iPad) will display `ios` styled icons. Alternatively, ionicons running on devices with Material Design theme (commonly seen on Android devices) will see the `md` styled icons.
|
||||
|
||||
### Platform Continuity Within Ionic Apps
|
||||
|
||||
Ionic will automatically use the correct version based on the platform. Note that this feature will only automatically kick-in for Ionic apps. When being used outside of an Ionic app, please see the "Outside Ionic App" section below.
|
||||
|
||||
To specify the icon for each platform, use the `md` and `ios` attributes and provide the platform specific icon name.
|
||||
|
||||
```html
|
||||
<ion-icon ios="ios-heart" md="md-heart"></ion-icon>
|
||||
```
|
||||
|
||||
### Platform Continuity Outside Ionic Apps
|
||||
|
||||
When using Ionicons without the Ionic Framework, the icon will default to the Material Design icon style. To specify the non-default icon style, add a platform prefix to the `name` attribute.
|
||||
|
||||
```html
|
||||
<ion-icon name="ios-heart"></ion-icon>
|
||||
<ion-icon name="md-heart"></ion-icon>
|
||||
```
|
||||
|
||||
### Icon sizes
|
||||
|
||||
To specify the icon size, you can use the size attribute for our pre-defined font sizes.
|
||||
@@ -89,43 +60,6 @@ ion-icon {
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Using the Font Icon
|
||||
|
||||
The font icon is compatible with previous versions of Ionicons. If you're using Ionicons for the first time we strongly recommend using the `ion-icon` web component instead.
|
||||
|
||||
An advantage to the font icon file is that all of the icons are in one file. A disadvantage to the font icon file is that all of the icons are in one file. Additionally, large font files have a negative impact on a webpage's time to first paint.
|
||||
|
||||
In most cases it may be better to request a small number of svgs using the web component method. A bonus with the web component is that it uses Intersection Observer to only request icons which are viewable by the users (icons above the fold). However, if a webpage has to show many icons at once (such as this website's homepage which is showing 700+ icons on one page), the font icon may be a better choice.
|
||||
|
||||
### Installation
|
||||
|
||||
To embed the Ionicons font icon, copy this code into the `<head>` of the HTML document.
|
||||
|
||||
```html
|
||||
<link href="https://unpkg.com/ionicons@4.2.2/dist/css/ionicons.min.css" rel="stylesheet">
|
||||
```
|
||||
|
||||
### Basic usage
|
||||
|
||||
Use the icon index to look up the name of the icon you want to use. The icon's CSS class name will be prefixed with ion-, followed by the platform attribute md-, ios- or logo- and completed wth the icon name.
|
||||
|
||||
```html
|
||||
<i class="ion-md-heart"></i>
|
||||
<i class="ion-ios-heart"></i>
|
||||
|
||||
<i class="ion-md-heart-dislike"></i>
|
||||
<i class="ion-ios-heart-dislike"></i>
|
||||
|
||||
|
||||
<i class="ion-md-cellular"></i>
|
||||
<i class="ion-ios-cellular"></i>
|
||||
|
||||
<i class="ion-logo-facebook"></i>
|
||||
<i class="ion-logo-windows"></i>
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
|
||||
Ionicons is licensed under the [MIT license](http://opensource.org/licenses/MIT).
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
var sass = require('sass');
|
||||
var fs = require('fs-extra');
|
||||
var path = require('path');
|
||||
|
||||
var distScssDir = path.join(__dirname, '..', 'dist', 'scss');
|
||||
var distCssDir = path.join(__dirname, '..', 'dist', 'css');
|
||||
|
||||
fs.emptyDirSync(distCssDir);
|
||||
|
||||
generateCss('ionicons');
|
||||
generateCss('ionicons-core');
|
||||
|
||||
function generateCss(fileName) {
|
||||
var input = path.join(distScssDir, fileName + '.scss');
|
||||
var output = path.join(distCssDir, fileName + '.css');
|
||||
var outputMin = path.join(distCssDir, fileName + '.min.css');
|
||||
|
||||
var opts = {
|
||||
file: input,
|
||||
outputStyle: 'expanded'
|
||||
};
|
||||
|
||||
sass.render(opts, (err, result) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
fs.writeFile(output, result.css.toString(), { encoding: 'utf-8' }, (err) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
var optsMin = {
|
||||
file: input,
|
||||
outputStyle: 'compressed'
|
||||
};
|
||||
|
||||
sass.render(optsMin, (err, result) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
} else {
|
||||
fs.writeFile(outputMin, result.css.toString(), { encoding: 'utf-8' }, (err) => {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,448 @@
|
||||
import fs from 'fs-extra';
|
||||
import { join } from 'path';
|
||||
import Svgo from 'svgo';
|
||||
|
||||
|
||||
async function build(rootDir: string) {
|
||||
const pkgJsonPath = join(rootDir, 'package.json');
|
||||
const srcDir = join(rootDir, 'src');
|
||||
const srcSvgDir = join(srcDir, 'svg');
|
||||
const iconDir = join(rootDir, 'icons');
|
||||
const distDir = join(rootDir, 'dist');
|
||||
const distIoniconsDir = join(distDir, 'ionicons');
|
||||
|
||||
await Promise.all([
|
||||
fs.emptyDir(iconDir),
|
||||
fs.emptyDir(distDir),
|
||||
]);
|
||||
await fs.emptyDir(distIoniconsDir);
|
||||
|
||||
const pkgData = await fs.readJson(pkgJsonPath);
|
||||
const version = pkgData.version as string;
|
||||
|
||||
const srcSvgData = await getSvgs(srcSvgDir, rootDir, distIoniconsDir)
|
||||
|
||||
await optimizeSvgs(srcSvgData);
|
||||
|
||||
await Promise.all([
|
||||
createDataJson(version, srcDir, distDir, srcSvgData),
|
||||
createIconPackage(version, iconDir, srcSvgData),
|
||||
]);
|
||||
|
||||
const svgSymbolsContent = await createSvgSymbols(version, distDir, srcSvgData)
|
||||
|
||||
await createCheatsheet(version, rootDir, distDir, svgSymbolsContent, srcSvgData);
|
||||
|
||||
await copyToTesting(rootDir, distDir, srcSvgData);
|
||||
}
|
||||
|
||||
|
||||
async function optimizeSvgs(srcSvgData: SvgData[]) {
|
||||
// https://github.com/svg/svgo
|
||||
const svgo = new Svgo({
|
||||
full: true,
|
||||
plugins: [
|
||||
{
|
||||
removeAttrs: {
|
||||
attrs: [
|
||||
'fill',
|
||||
'stroke',
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
addClassesToSVGElement: {
|
||||
className: 'ionicon'
|
||||
}
|
||||
},
|
||||
{
|
||||
removeStyleElement: true
|
||||
},
|
||||
{
|
||||
removeScriptElement: true
|
||||
},
|
||||
{
|
||||
removeDimensions: true
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
await Promise.all(srcSvgData.map(async svgData => {
|
||||
return optimizeSvg(svgo, svgData);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
async function copyToTesting(rootDir: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
const testDir = join(rootDir, 'www');
|
||||
const testBuildDir = join(testDir, 'build');
|
||||
const testSvgDir = join(testBuildDir, 'svg');
|
||||
await fs.ensureDir(testSvgDir);
|
||||
|
||||
await Promise.all(srcSvgData.map(async svgData => {
|
||||
const testSvgFilePath = join(testSvgDir, svgData.fileName);
|
||||
await fs.writeFile(testSvgFilePath, svgData.optimizedSvgContent);
|
||||
}));
|
||||
|
||||
const distCheatsheetFilePath = join(distDir, 'cheatsheet.html');
|
||||
const testCheatsheetFilePath = join(testDir, 'cheatsheet.html');
|
||||
await fs.copyFile(distCheatsheetFilePath, testCheatsheetFilePath);
|
||||
}
|
||||
|
||||
|
||||
async function optimizeSvg(svgo: Svgo, svgData: SvgData) {
|
||||
const srcSvgContent = await fs.readFile(svgData.srcFilePath, 'utf8');
|
||||
const optimizedSvg = await svgo.optimize(srcSvgContent, { path: svgData.srcFilePath });
|
||||
|
||||
svgData.optimizedSvgContent = optimizedSvg.data;
|
||||
|
||||
await fs.writeFile(svgData.optimizedFilePath, svgData.optimizedSvgContent);
|
||||
}
|
||||
|
||||
|
||||
async function createSvgSymbols(version: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
srcSvgData = srcSvgData.sort((a, b) => {
|
||||
if (a.iconName < b.iconName) return -1;
|
||||
if (a.iconName > b.iconName) return 1;
|
||||
return 0;
|
||||
});
|
||||
|
||||
const symbolsSvgFilePath = join(distDir, 'ionicons.symbols.svg');
|
||||
|
||||
const lines = [
|
||||
`<svg data-ionicons="${version}" style="display:none">`,
|
||||
`<style>`,
|
||||
`.ionicon {`,
|
||||
` fill: #000;`,
|
||||
` stroke: #000;`,
|
||||
`}`,
|
||||
`</style>`,
|
||||
];
|
||||
|
||||
srcSvgData.forEach(svgData => {
|
||||
const svg = svgData.optimizedSvgContent
|
||||
.replace(
|
||||
`<svg xmlns="http://www.w3.org/2000/svg"`,
|
||||
`<symbol id="${svgData.iconName}"`
|
||||
)
|
||||
.replace(
|
||||
`</svg>`,
|
||||
`</symbol>`
|
||||
)
|
||||
lines.push(svg);
|
||||
});
|
||||
|
||||
lines.push(
|
||||
`</svg>`,
|
||||
``
|
||||
);
|
||||
|
||||
const content = lines.join('\n');
|
||||
|
||||
await fs.writeFile(symbolsSvgFilePath, content);
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
async function createCheatsheet(version: string, rootDir: string, distDir: string, svgSymbolsContent: string, srcSvgData: SvgData[]) {
|
||||
const CheatsheetTmpFilePath = join(rootDir, 'scripts', 'cheatsheet-template.html');
|
||||
const distCheatsheetFilePath = join(distDir, 'cheatsheet.html');
|
||||
|
||||
const c = srcSvgData.map(svgData => (
|
||||
`<svg><use href="#${svgData.iconName}" xlink:href="#${svgData.iconName}"/></svg>`
|
||||
));
|
||||
|
||||
c.push(svgSymbolsContent);
|
||||
|
||||
const html = (await fs.readFile(CheatsheetTmpFilePath, 'utf8'))
|
||||
.replace(/{{version}}/g, version)
|
||||
.replace(/{{count}}/g, srcSvgData.length.toString())
|
||||
.replace(/{{content}}/g, c.join('\n'));
|
||||
|
||||
await fs.writeFile(distCheatsheetFilePath, html);
|
||||
}
|
||||
|
||||
|
||||
async function getSvgs(srcSvgDir: string, rootDir: string, distIoniconsDir: string): Promise<SvgData[]> {
|
||||
const optimizedSvgDir = join(distIoniconsDir, 'svg');
|
||||
await fs.emptyDir(optimizedSvgDir);
|
||||
|
||||
const svgFiles = (await fs.readdir(srcSvgDir)).filter(fileName => {
|
||||
return !fileName.startsWith('.') && fileName.endsWith('.svg');
|
||||
});
|
||||
|
||||
const svgData = await Promise.all(svgFiles.map(async fileName => {
|
||||
// fileName: airplane-outline.svg
|
||||
|
||||
if (fileName.toLowerCase() !== fileName) {
|
||||
throw new Error(`svg filename "${fileName}" must be all lowercase`);
|
||||
}
|
||||
|
||||
// srcFilePath: /src/svg/airplane-outline.svg
|
||||
const srcFilePath = join(srcSvgDir, fileName);
|
||||
|
||||
// optimizedFilePath: /dist/ionicons/svg/airplane-outline.svg
|
||||
const optimizedFilePath = join(optimizedSvgDir, fileName);
|
||||
|
||||
const dotSplit = fileName.split('.');
|
||||
if (dotSplit.length > 2) {
|
||||
throw new Error(`svg filename "${fileName}" cannot contain more than one period`);
|
||||
}
|
||||
|
||||
// iconName: airplane-outline
|
||||
const iconName = dotSplit[0];
|
||||
|
||||
// fileNameMjs: airplane-outline.mjs
|
||||
const fileNameMjs = iconName + '.mjs';
|
||||
|
||||
// fileNameCjs: airplane-outline.mjs
|
||||
const fileNameCjs = iconName + '.js';
|
||||
|
||||
// exportName: airplaneOutline
|
||||
const exportName = camelize(iconName);
|
||||
|
||||
return {
|
||||
fileName,
|
||||
srcFilePath,
|
||||
srcSvgContent: (await fs.readFile(srcFilePath, 'utf8')),
|
||||
optimizedFilePath,
|
||||
optimizedSvgContent: null,
|
||||
iconName,
|
||||
fileNameMjs,
|
||||
fileNameCjs,
|
||||
exportName,
|
||||
}
|
||||
}));
|
||||
|
||||
return svgData.sort((a, b) => {
|
||||
if (a.exportName < b.exportName) return -1;
|
||||
if (a.exportName > b.exportName) return 1;
|
||||
return 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
async function createIconPackage(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconImportsDir = join(iconDir, 'imports');
|
||||
const iconPkgJsonFilePath = join(iconDir, 'package.json');
|
||||
|
||||
await fs.emptyDir(iconImportsDir);
|
||||
|
||||
await Promise.all([
|
||||
createEsmIcons(version, iconDir, iconImportsDir, srcSvgData),
|
||||
createCjsIcons(version, iconDir, iconImportsDir, srcSvgData),
|
||||
createDtsIcons(version, iconDir, srcSvgData),
|
||||
]);
|
||||
|
||||
const iconPkgJson = {
|
||||
name: "ionicons/icons",
|
||||
version,
|
||||
module: "index.mjs",
|
||||
main: "index.js",
|
||||
typings: "index.d.ts",
|
||||
sideEffects: [
|
||||
"imports/"
|
||||
],
|
||||
private: true
|
||||
};
|
||||
|
||||
const jsonStr = JSON.stringify(iconPkgJson, null, 2) + '\n';
|
||||
await fs.writeFile(iconPkgJsonFilePath, jsonStr);
|
||||
}
|
||||
|
||||
|
||||
async function createEsmIcons(version: string, iconDir: string, iconImportsDir: string, srcSvgData: SvgData[]) {
|
||||
const iconEsmFilePath = join(iconDir, 'index.mjs');
|
||||
|
||||
const esmIndex = [
|
||||
`/* Ionicons v${version}, ES Modules */`, ``
|
||||
];
|
||||
|
||||
srcSvgData.forEach(svgData => {
|
||||
// import airplaneOutline from './imports/airplane-outline.mjs';
|
||||
esmIndex.push(`import ${svgData.exportName} from './imports/${svgData.fileNameMjs}';`);
|
||||
});
|
||||
|
||||
srcSvgData.forEach(svgData => {
|
||||
// export { airplaneOutline }
|
||||
esmIndex.push(`export { ${svgData.exportName} }`);
|
||||
});
|
||||
|
||||
// write ./imports/airplane-outline.mjs
|
||||
await Promise.all(srcSvgData.map(async svgData => {
|
||||
// import airplaneOutlineSvg from '../../dist/ionicons/svg/airplane-outline.svg';
|
||||
// export default /*#__PURE__*/ airplaneOutlineSvg;
|
||||
|
||||
const varName = `${svgData.exportName}Svg`;
|
||||
|
||||
const content = [
|
||||
`import ${varName} from '../../dist/ionicons/svg/${svgData.fileName}';`,
|
||||
`export default /*#__PURE__*/ ${varName};`,
|
||||
``
|
||||
].join('\n');
|
||||
|
||||
const esmIconImportFilePath = join(iconImportsDir, svgData.fileNameMjs);
|
||||
await fs.writeFile(esmIconImportFilePath, content);
|
||||
}));
|
||||
|
||||
await fs.writeFile(iconEsmFilePath, esmIndex.join('\n') + '\n');
|
||||
}
|
||||
|
||||
|
||||
async function createCjsIcons(version: string, iconDir: string, iconImportsDir: string, srcSvgData: SvgData[]) {
|
||||
const iconCjsFilePath = join(iconDir, 'index.js');
|
||||
|
||||
const cjsIndex = [
|
||||
`/* Ionicons v${version}, CommonJS */`, ``
|
||||
];
|
||||
|
||||
srcSvgData.forEach(svgData => {
|
||||
// exports.airplaneOutline = /*#__PURE__*/ require('./imports/airplane-outline.js');
|
||||
cjsIndex.push(`exports.${svgData.exportName} = /*#__PURE__*/ require('./imports/${svgData.fileNameCjs}');`);
|
||||
});
|
||||
|
||||
// write ./imports/airplane-outline.js
|
||||
await Promise.all(srcSvgData.map(async svgData => {
|
||||
// module.exports = /*#__PURE__*/ require('../../dist/ionicons/svg/airplane-outline.svg');
|
||||
|
||||
const content = [
|
||||
`module.exports = /*#__PURE__*/ require('../../dist/ionicons/svg/${svgData.fileName}');`,
|
||||
``
|
||||
].join('\n');
|
||||
|
||||
const cjsIconImportFilePath = join(iconImportsDir, svgData.fileNameCjs);
|
||||
await fs.writeFile(cjsIconImportFilePath, content);
|
||||
}));
|
||||
|
||||
await fs.writeFile(iconCjsFilePath, cjsIndex.join('\n') + '\n');
|
||||
}
|
||||
|
||||
|
||||
async function createDtsIcons(version: string, iconDir: string, srcSvgData: SvgData[]) {
|
||||
const iconDtsFilePath = join(iconDir, 'index.d.ts');
|
||||
|
||||
const dtsIndex = [
|
||||
`/* Ionicons v${version}, Types */`, ``
|
||||
];
|
||||
|
||||
srcSvgData.forEach(svgData => {
|
||||
// export declare var airplaneOutline: string;
|
||||
dtsIndex.push(`export declare var ${svgData.exportName}: string;`);
|
||||
});
|
||||
|
||||
await fs.writeFile(iconDtsFilePath, dtsIndex.join('\n') + '\n');
|
||||
}
|
||||
|
||||
|
||||
async function createDataJson(version: string, srcDir: string, distDir: string, srcSvgData: SvgData[]) {
|
||||
const srcDataJsonPath = join(srcDir, 'data.json');
|
||||
const distDataJsonPath = join(distDir, 'data.json');
|
||||
|
||||
let data: JsonData;
|
||||
|
||||
try {
|
||||
data = await fs.readJson(srcDataJsonPath);
|
||||
} catch (e) {
|
||||
data = {} as any;
|
||||
}
|
||||
|
||||
data.icons = data.icons || [];
|
||||
|
||||
// add new icons
|
||||
srcSvgData.forEach(svgData => {
|
||||
if (!data.icons.some(i => i.name === svgData.iconName)) {
|
||||
data.icons.push({
|
||||
name: svgData.iconName
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// remove dead icons
|
||||
data.icons = data.icons.filter(dataIcon => {
|
||||
return srcSvgData.some(svgData => dataIcon.name === svgData.iconName);
|
||||
});
|
||||
|
||||
// sort
|
||||
data.icons = data.icons.sort((a, b) => {
|
||||
if (a.name < b.name) return -1;
|
||||
if (a.name > b.name) return 1;
|
||||
return 0
|
||||
});
|
||||
data.icons.forEach(icon => {
|
||||
icon.tags = icon.tags || icon.name.split('-');
|
||||
icon.tags = icon.tags.sort();
|
||||
});
|
||||
|
||||
const srcJsonStr = JSON.stringify(data, null, 2) + '\n';
|
||||
await fs.writeFile(srcDataJsonPath, srcJsonStr);
|
||||
|
||||
const distJsonData = {
|
||||
name: 'ionicons',
|
||||
version,
|
||||
icons: data.icons
|
||||
};
|
||||
const distJsonStr = JSON.stringify(distJsonData, null, 2) + '\n';
|
||||
await fs.writeFile(distDataJsonPath, distJsonStr);
|
||||
}
|
||||
|
||||
|
||||
function camelize(text: string) {
|
||||
let words = text.split(/[-_]/g); // ok one simple regexp.
|
||||
return words[0].toLowerCase() + words.slice(1).map(upFirst).join('');
|
||||
}
|
||||
|
||||
|
||||
function upFirst(word: string) {
|
||||
return word[0].toUpperCase() + word.toLowerCase().slice(1);
|
||||
}
|
||||
|
||||
|
||||
interface SvgData {
|
||||
/**
|
||||
* airplane-outline.svg
|
||||
*/
|
||||
fileName: string;
|
||||
|
||||
/**
|
||||
* /src/svg/airplane-outline.svg
|
||||
*/
|
||||
srcFilePath: string;
|
||||
|
||||
/**
|
||||
* /dist/ionicons/svg/airplane-outline.svg
|
||||
*/
|
||||
optimizedFilePath: string;
|
||||
|
||||
srcSvgContent: string;
|
||||
optimizedSvgContent: string;
|
||||
|
||||
/**
|
||||
* airplane-outline
|
||||
*/
|
||||
iconName: string;
|
||||
|
||||
/**
|
||||
* airplane-outline.mjs
|
||||
*/
|
||||
fileNameMjs: string;
|
||||
|
||||
/**
|
||||
* airplane-outline.js
|
||||
*/
|
||||
fileNameCjs: string;
|
||||
|
||||
/**
|
||||
* airplaneOutline
|
||||
*/
|
||||
exportName: string;
|
||||
}
|
||||
|
||||
interface JsonData {
|
||||
icons: { name: string; tags?: string[]; } [];
|
||||
version?: string;
|
||||
}
|
||||
|
||||
|
||||
// let's do this
|
||||
build(join(__dirname, '..'));
|
||||
@@ -0,0 +1,53 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Ionicons {{version}} Cheatsheet</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
background: #fff;
|
||||
}
|
||||
h1 {
|
||||
margin: 0;
|
||||
}
|
||||
h3 {
|
||||
margin: 0;
|
||||
}
|
||||
.options {
|
||||
padding: 15px 0 20px 0;
|
||||
}
|
||||
label {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
font-size: 12px;
|
||||
}
|
||||
svg {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.css-styles {
|
||||
fill: yellow;
|
||||
stroke: yellow;
|
||||
background: red;
|
||||
color: white;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ionicons {{version}} Cheatsheet</h1>
|
||||
<h3>{{count}} icons</h3>
|
||||
|
||||
<div class="options">
|
||||
<button id="css-styles">Toggle Styles</button>
|
||||
</div>
|
||||
|
||||
{{content}}
|
||||
|
||||
<script>
|
||||
document.getElementById('css-styles').addEventListener('click', function() {
|
||||
document.body.classList.toggle('css-styles');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,466 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
# ***** BEGIN LICENSE BLOCK *****
|
||||
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
#
|
||||
# The contents of this file are subject to the Mozilla Public License Version
|
||||
# 1.1 (the "License"); you may not use this file except in compliance with
|
||||
# the License. You may obtain a copy of the License at
|
||||
# http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS IS" basis,
|
||||
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
# for the specific language governing rights and limitations under the
|
||||
# License.
|
||||
#
|
||||
# The Original Code is font utility code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Mozilla Corporation.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2009
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# John Daggett <jdaggett@mozilla.com>
|
||||
#
|
||||
# Alternatively, the contents of this file may be used under the terms of
|
||||
# either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
# in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
# of those above. If you wish to allow use of your version of this file only
|
||||
# under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
# use your version of this file under the terms of the MPL, indicate your
|
||||
# decision by deleting the provisions above and replace them with the notice
|
||||
# and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
# the provisions above, a recipient may use your version of this file under
|
||||
# the terms of any one of the MPL, the GPL or the LGPL.
|
||||
#
|
||||
# ***** END LICENSE BLOCK ***** */
|
||||
|
||||
# eotlitetool.py - create EOT version of OpenType font for use with IE
|
||||
#
|
||||
# Usage: eotlitetool.py [-o output-filename] font1 [font2 ...]
|
||||
#
|
||||
|
||||
# OpenType file structure
|
||||
# http://www.microsoft.com/typography/otspec/otff.htm
|
||||
#
|
||||
# Types:
|
||||
#
|
||||
# BYTE 8-bit unsigned integer.
|
||||
# CHAR 8-bit signed integer.
|
||||
# USHORT 16-bit unsigned integer.
|
||||
# SHORT 16-bit signed integer.
|
||||
# ULONG 32-bit unsigned integer.
|
||||
# Fixed 32-bit signed fixed-point number (16.16)
|
||||
# LONGDATETIME Date represented in number of seconds since 12:00 midnight, January 1, 1904. The value is represented as a signed 64-bit integer.
|
||||
#
|
||||
# SFNT Header
|
||||
#
|
||||
# Fixed sfnt version // 0x00010000 for version 1.0.
|
||||
# USHORT numTables // Number of tables.
|
||||
# USHORT searchRange // (Maximum power of 2 <= numTables) x 16.
|
||||
# USHORT entrySelector // Log2(maximum power of 2 <= numTables).
|
||||
# USHORT rangeShift // NumTables x 16-searchRange.
|
||||
#
|
||||
# Table Directory
|
||||
#
|
||||
# ULONG tag // 4-byte identifier.
|
||||
# ULONG checkSum // CheckSum for this table.
|
||||
# ULONG offset // Offset from beginning of TrueType font file.
|
||||
# ULONG length // Length of this table.
|
||||
#
|
||||
# OS/2 Table (Version 4)
|
||||
#
|
||||
# USHORT version // 0x0004
|
||||
# SHORT xAvgCharWidth
|
||||
# USHORT usWeightClass
|
||||
# USHORT usWidthClass
|
||||
# USHORT fsType
|
||||
# SHORT ySubscriptXSize
|
||||
# SHORT ySubscriptYSize
|
||||
# SHORT ySubscriptXOffset
|
||||
# SHORT ySubscriptYOffset
|
||||
# SHORT ySuperscriptXSize
|
||||
# SHORT ySuperscriptYSize
|
||||
# SHORT ySuperscriptXOffset
|
||||
# SHORT ySuperscriptYOffset
|
||||
# SHORT yStrikeoutSize
|
||||
# SHORT yStrikeoutPosition
|
||||
# SHORT sFamilyClass
|
||||
# BYTE panose[10]
|
||||
# ULONG ulUnicodeRange1 // Bits 0-31
|
||||
# ULONG ulUnicodeRange2 // Bits 32-63
|
||||
# ULONG ulUnicodeRange3 // Bits 64-95
|
||||
# ULONG ulUnicodeRange4 // Bits 96-127
|
||||
# CHAR achVendID[4]
|
||||
# USHORT fsSelection
|
||||
# USHORT usFirstCharIndex
|
||||
# USHORT usLastCharIndex
|
||||
# SHORT sTypoAscender
|
||||
# SHORT sTypoDescender
|
||||
# SHORT sTypoLineGap
|
||||
# USHORT usWinAscent
|
||||
# USHORT usWinDescent
|
||||
# ULONG ulCodePageRange1 // Bits 0-31
|
||||
# ULONG ulCodePageRange2 // Bits 32-63
|
||||
# SHORT sxHeight
|
||||
# SHORT sCapHeight
|
||||
# USHORT usDefaultChar
|
||||
# USHORT usBreakChar
|
||||
# USHORT usMaxContext
|
||||
#
|
||||
#
|
||||
# The Naming Table is organized as follows:
|
||||
#
|
||||
# [name table header]
|
||||
# [name records]
|
||||
# [string data]
|
||||
#
|
||||
# Name Table Header
|
||||
#
|
||||
# USHORT format // Format selector (=0).
|
||||
# USHORT count // Number of name records.
|
||||
# USHORT stringOffset // Offset to start of string storage (from start of table).
|
||||
#
|
||||
# Name Record
|
||||
#
|
||||
# USHORT platformID // Platform ID.
|
||||
# USHORT encodingID // Platform-specific encoding ID.
|
||||
# USHORT languageID // Language ID.
|
||||
# USHORT nameID // Name ID.
|
||||
# USHORT length // String length (in bytes).
|
||||
# USHORT offset // String offset from start of storage area (in bytes).
|
||||
#
|
||||
# head Table
|
||||
#
|
||||
# Fixed tableVersion // Table version number 0x00010000 for version 1.0.
|
||||
# Fixed fontRevision // Set by font manufacturer.
|
||||
# ULONG checkSumAdjustment // To compute: set it to 0, sum the entire font as ULONG, then store 0xB1B0AFBA - sum.
|
||||
# ULONG magicNumber // Set to 0x5F0F3CF5.
|
||||
# USHORT flags
|
||||
# USHORT unitsPerEm // Valid range is from 16 to 16384. This value should be a power of 2 for fonts that have TrueType outlines.
|
||||
# LONGDATETIME created // Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer
|
||||
# LONGDATETIME modified // Number of seconds since 12:00 midnight, January 1, 1904. 64-bit integer
|
||||
# SHORT xMin // For all glyph bounding boxes.
|
||||
# SHORT yMin
|
||||
# SHORT xMax
|
||||
# SHORT yMax
|
||||
# USHORT macStyle
|
||||
# USHORT lowestRecPPEM // Smallest readable size in pixels.
|
||||
# SHORT fontDirectionHint
|
||||
# SHORT indexToLocFormat // 0 for short offsets, 1 for long.
|
||||
# SHORT glyphDataFormat // 0 for current format.
|
||||
#
|
||||
#
|
||||
#
|
||||
# Embedded OpenType (EOT) file format
|
||||
# http://www.w3.org/Submission/EOT/
|
||||
#
|
||||
# EOT version 0x00020001
|
||||
#
|
||||
# An EOT font consists of a header with the original OpenType font
|
||||
# appended at the end. Most of the data in the EOT header is simply a
|
||||
# copy of data from specific tables within the font data. The exceptions
|
||||
# are the 'Flags' field and the root string name field. The root string
|
||||
# is a set of names indicating domains for which the font data can be
|
||||
# used. A null root string implies the font data can be used anywhere.
|
||||
# The EOT header is in little-endian byte order but the font data remains
|
||||
# in big-endian order as specified by the OpenType spec.
|
||||
#
|
||||
# Overall structure:
|
||||
#
|
||||
# [EOT header]
|
||||
# [EOT name records]
|
||||
# [font data]
|
||||
#
|
||||
# EOT header
|
||||
#
|
||||
# ULONG eotSize // Total structure length in bytes (including string and font data)
|
||||
# ULONG fontDataSize // Length of the OpenType font (FontData) in bytes
|
||||
# ULONG version // Version number of this format - 0x00020001
|
||||
# ULONG flags // Processing Flags (0 == no special processing)
|
||||
# BYTE fontPANOSE[10] // OS/2 Table panose
|
||||
# BYTE charset // DEFAULT_CHARSET (0x01)
|
||||
# BYTE italic // 0x01 if ITALIC in OS/2 Table fsSelection is set, 0 otherwise
|
||||
# ULONG weight // OS/2 Table usWeightClass
|
||||
# USHORT fsType // OS/2 Table fsType (specifies embedding permission flags)
|
||||
# USHORT magicNumber // Magic number for EOT file - 0x504C.
|
||||
# ULONG unicodeRange1 // OS/2 Table ulUnicodeRange1
|
||||
# ULONG unicodeRange2 // OS/2 Table ulUnicodeRange2
|
||||
# ULONG unicodeRange3 // OS/2 Table ulUnicodeRange3
|
||||
# ULONG unicodeRange4 // OS/2 Table ulUnicodeRange4
|
||||
# ULONG codePageRange1 // OS/2 Table ulCodePageRange1
|
||||
# ULONG codePageRange2 // OS/2 Table ulCodePageRange2
|
||||
# ULONG checkSumAdjustment // head Table CheckSumAdjustment
|
||||
# ULONG reserved[4] // Reserved - must be 0
|
||||
# USHORT padding1 // Padding - must be 0
|
||||
#
|
||||
# EOT name records
|
||||
#
|
||||
# USHORT FamilyNameSize // Font family name size in bytes
|
||||
# BYTE FamilyName[FamilyNameSize] // Font family name (name ID = 1), little-endian UTF-16
|
||||
# USHORT Padding2 // Padding - must be 0
|
||||
#
|
||||
# USHORT StyleNameSize // Style name size in bytes
|
||||
# BYTE StyleName[StyleNameSize] // Style name (name ID = 2), little-endian UTF-16
|
||||
# USHORT Padding3 // Padding - must be 0
|
||||
#
|
||||
# USHORT VersionNameSize // Version name size in bytes
|
||||
# bytes VersionName[VersionNameSize] // Version name (name ID = 5), little-endian UTF-16
|
||||
# USHORT Padding4 // Padding - must be 0
|
||||
#
|
||||
# USHORT FullNameSize // Full name size in bytes
|
||||
# BYTE FullName[FullNameSize] // Full name (name ID = 4), little-endian UTF-16
|
||||
# USHORT Padding5 // Padding - must be 0
|
||||
#
|
||||
# USHORT RootStringSize // Root string size in bytes
|
||||
# BYTE RootString[RootStringSize] // Root string, little-endian UTF-16
|
||||
|
||||
|
||||
|
||||
import optparse
|
||||
import struct
|
||||
|
||||
class FontError(Exception):
|
||||
"""Error related to font handling"""
|
||||
pass
|
||||
|
||||
def multichar(str):
|
||||
vals = struct.unpack('4B', str[:4])
|
||||
return (vals[0] << 24) + (vals[1] << 16) + (vals[2] << 8) + vals[3]
|
||||
|
||||
def multicharval(v):
|
||||
return struct.pack('4B', (v >> 24) & 0xFF, (v >> 16) & 0xFF, (v >> 8) & 0xFF, v & 0xFF)
|
||||
|
||||
class EOT:
|
||||
EOT_VERSION = 0x00020001
|
||||
EOT_MAGIC_NUMBER = 0x504c
|
||||
EOT_DEFAULT_CHARSET = 0x01
|
||||
EOT_FAMILY_NAME_INDEX = 0 # order of names in variable portion of EOT header
|
||||
EOT_STYLE_NAME_INDEX = 1
|
||||
EOT_VERSION_NAME_INDEX = 2
|
||||
EOT_FULL_NAME_INDEX = 3
|
||||
EOT_NUM_NAMES = 4
|
||||
|
||||
EOT_HEADER_PACK = '<4L10B2BL2H7L18x'
|
||||
|
||||
class OpenType:
|
||||
SFNT_CFF = multichar('OTTO') # Postscript CFF SFNT version
|
||||
SFNT_TRUE = 0x10000 # Standard TrueType version
|
||||
SFNT_APPLE = multichar('true') # Apple TrueType version
|
||||
|
||||
SFNT_UNPACK = '>I4H'
|
||||
TABLE_DIR_UNPACK = '>4I'
|
||||
|
||||
TABLE_HEAD = multichar('head') # TrueType table tags
|
||||
TABLE_NAME = multichar('name')
|
||||
TABLE_OS2 = multichar('OS/2')
|
||||
TABLE_GLYF = multichar('glyf')
|
||||
TABLE_CFF = multichar('CFF ')
|
||||
|
||||
OS2_FSSELECTION_ITALIC = 0x1
|
||||
OS2_UNPACK = '>4xH2xH22x10B4L4xH14x2L'
|
||||
|
||||
HEAD_UNPACK = '>8xL'
|
||||
|
||||
NAME_RECORD_UNPACK = '>6H'
|
||||
NAME_ID_FAMILY = 1
|
||||
NAME_ID_STYLE = 2
|
||||
NAME_ID_UNIQUE = 3
|
||||
NAME_ID_FULL = 4
|
||||
NAME_ID_VERSION = 5
|
||||
NAME_ID_POSTSCRIPT = 6
|
||||
PLATFORM_ID_UNICODE = 0 # Mac OS uses this typically
|
||||
PLATFORM_ID_MICROSOFT = 3
|
||||
ENCODING_ID_MICROSOFT_UNICODEBMP = 1 # with Microsoft platformID BMP-only Unicode encoding
|
||||
LANG_ID_MICROSOFT_EN_US = 0x0409 # with Microsoft platformID EN US lang code
|
||||
|
||||
def eotname(ttf):
|
||||
i = ttf.rfind('.')
|
||||
if i != -1:
|
||||
ttf = ttf[:i]
|
||||
return ttf + '.eotlite'
|
||||
|
||||
def readfont(f):
|
||||
data = open(f, 'rb').read()
|
||||
return data
|
||||
|
||||
def get_table_directory(data):
|
||||
"""read the SFNT header and table directory"""
|
||||
datalen = len(data)
|
||||
sfntsize = struct.calcsize(OpenType.SFNT_UNPACK)
|
||||
if sfntsize > datalen:
|
||||
raise FontError, 'truncated font data'
|
||||
sfntvers, numTables = struct.unpack(OpenType.SFNT_UNPACK, data[:sfntsize])[:2]
|
||||
if sfntvers != OpenType.SFNT_CFF and sfntvers != OpenType.SFNT_TRUE:
|
||||
raise FontError, 'invalid font type';
|
||||
|
||||
font = {}
|
||||
font['version'] = sfntvers
|
||||
font['numTables'] = numTables
|
||||
|
||||
# create set of offsets, lengths for tables
|
||||
table_dir_size = struct.calcsize(OpenType.TABLE_DIR_UNPACK)
|
||||
if sfntsize + table_dir_size * numTables > datalen:
|
||||
raise FontError, 'truncated font data, table directory extends past end of data'
|
||||
table_dir = {}
|
||||
for i in range(0, numTables):
|
||||
start = sfntsize + i * table_dir_size
|
||||
end = start + table_dir_size
|
||||
tag, check, bongo, dirlen = struct.unpack(OpenType.TABLE_DIR_UNPACK, data[start:end])
|
||||
table_dir[tag] = {'offset': bongo, 'length': dirlen, 'checksum': check}
|
||||
|
||||
font['tableDir'] = table_dir
|
||||
|
||||
return font
|
||||
|
||||
def get_name_records(nametable):
|
||||
"""reads through the name records within name table"""
|
||||
name = {}
|
||||
# read the header
|
||||
headersize = 6
|
||||
count, strOffset = struct.unpack('>2H', nametable[2:6])
|
||||
namerecsize = struct.calcsize(OpenType.NAME_RECORD_UNPACK)
|
||||
if count * namerecsize + headersize > len(nametable):
|
||||
raise FontError, 'names exceed size of name table'
|
||||
name['count'] = count
|
||||
name['strOffset'] = strOffset
|
||||
|
||||
# read through the name records
|
||||
namerecs = {}
|
||||
for i in range(0, count):
|
||||
start = headersize + i * namerecsize
|
||||
end = start + namerecsize
|
||||
platformID, encodingID, languageID, nameID, namelen, offset = struct.unpack(OpenType.NAME_RECORD_UNPACK, nametable[start:end])
|
||||
if platformID != OpenType.PLATFORM_ID_MICROSOFT or \
|
||||
encodingID != OpenType.ENCODING_ID_MICROSOFT_UNICODEBMP or \
|
||||
languageID != OpenType.LANG_ID_MICROSOFT_EN_US:
|
||||
continue
|
||||
namerecs[nameID] = {'offset': offset, 'length': namelen}
|
||||
|
||||
name['namerecords'] = namerecs
|
||||
return name
|
||||
|
||||
def make_eot_name_headers(fontdata, nameTableDir):
|
||||
"""extracts names from the name table and generates the names header portion of the EOT header"""
|
||||
nameoffset = nameTableDir['offset']
|
||||
namelen = nameTableDir['length']
|
||||
name = get_name_records(fontdata[nameoffset : nameoffset + namelen])
|
||||
namestroffset = name['strOffset']
|
||||
namerecs = name['namerecords']
|
||||
|
||||
eotnames = (OpenType.NAME_ID_FAMILY, OpenType.NAME_ID_STYLE, OpenType.NAME_ID_VERSION, OpenType.NAME_ID_FULL)
|
||||
nameheaders = []
|
||||
for nameid in eotnames:
|
||||
if nameid in namerecs:
|
||||
namerecord = namerecs[nameid]
|
||||
noffset = namerecord['offset']
|
||||
nlen = namerecord['length']
|
||||
nformat = '%dH' % (nlen / 2) # length is in number of bytes
|
||||
start = nameoffset + namestroffset + noffset
|
||||
end = start + nlen
|
||||
nstr = struct.unpack('>' + nformat, fontdata[start:end])
|
||||
nameheaders.append(struct.pack('<H' + nformat + '2x', nlen, *nstr))
|
||||
else:
|
||||
nameheaders.append(struct.pack('4x')) # len = 0, padding = 0
|
||||
|
||||
return ''.join(nameheaders)
|
||||
|
||||
# just return a null-string (len = 0)
|
||||
def make_root_string():
|
||||
return struct.pack('2x')
|
||||
|
||||
def make_eot_header(fontdata):
|
||||
"""given ttf font data produce an EOT header"""
|
||||
fontDataSize = len(fontdata)
|
||||
font = get_table_directory(fontdata)
|
||||
|
||||
# toss out .otf fonts, t2embed library doesn't support these
|
||||
tableDir = font['tableDir']
|
||||
|
||||
# check for required tables
|
||||
required = (OpenType.TABLE_HEAD, OpenType.TABLE_NAME, OpenType.TABLE_OS2)
|
||||
for table in required:
|
||||
if not (table in tableDir):
|
||||
raise FontError, 'missing required table ' + multicharval(table)
|
||||
|
||||
# read name strings
|
||||
|
||||
# pull out data from individual tables to construct fixed header portion
|
||||
# need to calculate eotSize before packing
|
||||
version = EOT.EOT_VERSION
|
||||
flags = 0
|
||||
charset = EOT.EOT_DEFAULT_CHARSET
|
||||
magicNumber = EOT.EOT_MAGIC_NUMBER
|
||||
|
||||
# read values from OS/2 table
|
||||
os2Dir = tableDir[OpenType.TABLE_OS2]
|
||||
os2offset = os2Dir['offset']
|
||||
os2size = struct.calcsize(OpenType.OS2_UNPACK)
|
||||
|
||||
if os2size > os2Dir['length']:
|
||||
raise FontError, 'OS/2 table invalid length'
|
||||
|
||||
os2fields = struct.unpack(OpenType.OS2_UNPACK, fontdata[os2offset : os2offset + os2size])
|
||||
|
||||
panose = []
|
||||
urange = []
|
||||
codepage = []
|
||||
|
||||
weight, fsType = os2fields[:2]
|
||||
panose[:10] = os2fields[2:12]
|
||||
urange[:4] = os2fields[12:16]
|
||||
fsSelection = os2fields[16]
|
||||
codepage[:2] = os2fields[17:19]
|
||||
|
||||
italic = fsSelection & OpenType.OS2_FSSELECTION_ITALIC
|
||||
|
||||
# read in values from head table
|
||||
headDir = tableDir[OpenType.TABLE_HEAD]
|
||||
headoffset = headDir['offset']
|
||||
headsize = struct.calcsize(OpenType.HEAD_UNPACK)
|
||||
|
||||
if headsize > headDir['length']:
|
||||
raise FontError, 'head table invalid length'
|
||||
|
||||
headfields = struct.unpack(OpenType.HEAD_UNPACK, fontdata[headoffset : headoffset + headsize])
|
||||
checkSumAdjustment = headfields[0]
|
||||
|
||||
# make name headers
|
||||
nameheaders = make_eot_name_headers(fontdata, tableDir[OpenType.TABLE_NAME])
|
||||
rootstring = make_root_string()
|
||||
|
||||
# calculate the total eot size
|
||||
eotSize = struct.calcsize(EOT.EOT_HEADER_PACK) + len(nameheaders) + len(rootstring) + fontDataSize
|
||||
fixed = struct.pack(EOT.EOT_HEADER_PACK,
|
||||
*([eotSize, fontDataSize, version, flags] + panose + [charset, italic] +
|
||||
[weight, fsType, magicNumber] + urange + codepage + [checkSumAdjustment]))
|
||||
|
||||
return ''.join((fixed, nameheaders, rootstring))
|
||||
|
||||
|
||||
def write_eot_font(eot, header, data):
|
||||
open(eot,'wb').write(''.join((header, data)))
|
||||
return
|
||||
|
||||
def main():
|
||||
|
||||
# deal with options
|
||||
p = optparse.OptionParser()
|
||||
p.add_option('--output', '-o', default="world")
|
||||
options, args = p.parse_args()
|
||||
|
||||
# iterate over font files
|
||||
for f in args:
|
||||
data = readfont(f)
|
||||
if len(data) == 0:
|
||||
print 'Error reading %s' % f
|
||||
else:
|
||||
eot = eotname(f)
|
||||
header = make_eot_header(data)
|
||||
write_eot_font(eot, header, data)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
# Font generation script from FontCustom
|
||||
# https://github.com/FontCustom/fontcustom/
|
||||
# http://fontcustom.com/
|
||||
|
||||
import fontforge
|
||||
import os, errno
|
||||
import md5
|
||||
import subprocess
|
||||
import tempfile
|
||||
import json
|
||||
import copy
|
||||
|
||||
SCRIPTS_FONT_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
INPUT_SVG_DIR = os.path.join(SCRIPTS_FONT_DIR, '..', '..', 'src', 'svg')
|
||||
OUTPUT_FONT_DIR = os.path.join(SCRIPTS_FONT_DIR, '..', '..', 'docs', 'fonts')
|
||||
OUTPUT_IONICONS_FONT_DIR = os.path.join(OUTPUT_FONT_DIR, 'ionicons')
|
||||
MANIFEST_PATH = os.path.join(SCRIPTS_FONT_DIR, '..', 'manifest.json')
|
||||
AUTO_WIDTH = True
|
||||
KERNING = 15
|
||||
|
||||
cp = 0xf100
|
||||
m = md5.new()
|
||||
|
||||
f = fontforge.font()
|
||||
f.encoding = 'UnicodeFull'
|
||||
f.design_size = 16
|
||||
f.em = 512
|
||||
f.ascent = 448
|
||||
f.descent = 64
|
||||
|
||||
manifest_file = open(MANIFEST_PATH, 'r')
|
||||
manifest_data = json.loads(manifest_file.read())
|
||||
manifest_file.close()
|
||||
print "Load Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_FONT_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_IONICONS_FONT_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
# ensure each icon is actually used in the manifest
|
||||
clean_manifest_data = copy.deepcopy(manifest_data)
|
||||
clean_manifest_data['icons'] = []
|
||||
for ionicon in manifest_data['icons']:
|
||||
svg_path = os.path.join(INPUT_SVG_DIR, '%s.svg' % (ionicon['name']))
|
||||
if os.path.isfile(svg_path):
|
||||
clean_manifest_data['icons'].append({
|
||||
"code": ionicon['code'],
|
||||
"name": ionicon['name']
|
||||
})
|
||||
else:
|
||||
print 'removed from manifest: %s' % (ionicon['name'])
|
||||
|
||||
manifest_data = copy.deepcopy(clean_manifest_data)
|
||||
|
||||
font_name = manifest_data['name']
|
||||
m.update(font_name + ';')
|
||||
m.update(manifest_data['prefix'] + ';')
|
||||
|
||||
for dirname, dirnames, filenames in os.walk(INPUT_SVG_DIR):
|
||||
for filename in filenames:
|
||||
name, ext = os.path.splitext(filename)
|
||||
filePath = os.path.join(dirname, filename)
|
||||
size = os.path.getsize(filePath)
|
||||
|
||||
if ext in ['.svg', '.eps']:
|
||||
|
||||
# see if this file is already in the manifest
|
||||
chr_code = None
|
||||
for ionicon in manifest_data['icons']:
|
||||
if ionicon['name'] == name:
|
||||
chr_code = ionicon['code']
|
||||
break
|
||||
|
||||
if chr_code is None:
|
||||
# this is a new src icon
|
||||
print 'New Icon: \n - %s' % (name)
|
||||
|
||||
while True:
|
||||
chr_code = '0x%x' % (cp)
|
||||
already_exists = False
|
||||
for ionicon in manifest_data['icons']:
|
||||
if ionicon.get('code') == chr_code:
|
||||
already_exists = True
|
||||
cp += 1
|
||||
chr_code = '0x%x' % (cp)
|
||||
continue
|
||||
if not already_exists:
|
||||
break
|
||||
|
||||
print ' - %s' % chr_code
|
||||
manifest_data['icons'].append({
|
||||
'name': name,
|
||||
'code': chr_code
|
||||
})
|
||||
|
||||
if ext in ['.svg']:
|
||||
# hack removal of <switch> </switch> tags
|
||||
svgfile = open(filePath, 'r+')
|
||||
tmpsvgfile = tempfile.NamedTemporaryFile(suffix=ext, delete=False)
|
||||
svgtext = svgfile.read()
|
||||
svgfile.seek(0)
|
||||
|
||||
# replace the <switch> </switch> tags with 'nothing'
|
||||
svgtext = svgtext.replace('<switch>', '')
|
||||
svgtext = svgtext.replace('</switch>', '')
|
||||
|
||||
tmpsvgfile.file.write(svgtext)
|
||||
|
||||
svgfile.close()
|
||||
tmpsvgfile.file.close()
|
||||
|
||||
filePath = tmpsvgfile.name
|
||||
# end hack
|
||||
|
||||
m.update(name + str(size) + ';')
|
||||
glyph = f.createChar( int(chr_code, 16) )
|
||||
glyph.importOutlines(filePath)
|
||||
|
||||
# if we created a temporary file, let's clean it up
|
||||
if tmpsvgfile:
|
||||
os.unlink(tmpsvgfile.name)
|
||||
|
||||
# set glyph size explicitly or automatically depending on autowidth
|
||||
if AUTO_WIDTH:
|
||||
glyph.left_side_bearing = glyph.right_side_bearing = 0
|
||||
glyph.round()
|
||||
|
||||
# resize glyphs if autowidth is enabled
|
||||
if AUTO_WIDTH:
|
||||
f.autoWidth(0, 0, 512)
|
||||
|
||||
fontfile = '%s/ionicons' % (OUTPUT_FONT_DIR)
|
||||
|
||||
f.fontname = font_name
|
||||
f.familyname = font_name
|
||||
f.fullname = font_name
|
||||
|
||||
print 'Generate TTF Font File'
|
||||
f.generate(fontfile + '.ttf')
|
||||
|
||||
print 'Generate SVG Font File'
|
||||
f.generate(fontfile + '.svg')
|
||||
|
||||
# Fix SVG header for webkit
|
||||
# from: https://github.com/fontello/font-builder/blob/master/bin/fontconvert.py
|
||||
svgfile = open(fontfile + '.svg', 'r+')
|
||||
svgtext = svgfile.read()
|
||||
svgfile.seek(0)
|
||||
svgfile.write(svgtext.replace('''<svg>''', '''<svg xmlns="http://www.w3.org/2000/svg">'''))
|
||||
svgfile.close()
|
||||
|
||||
scriptPath = os.path.dirname(os.path.realpath(__file__))
|
||||
try:
|
||||
subprocess.Popen([scriptPath + '/sfnt2woff', fontfile + '.ttf'], stdout=subprocess.PIPE)
|
||||
except OSError:
|
||||
# If the local version of sfnt2woff fails (i.e., on Linux), try to use the
|
||||
# global version. This allows us to avoid forcing OS X users to compile
|
||||
# sfnt2woff from source, simplifying install.
|
||||
subprocess.call(['sfnt2woff', fontfile + '.ttf'])
|
||||
|
||||
# eotlitetool.py script to generate IE7-compatible .eot fonts
|
||||
print 'Generate EOT Font File'
|
||||
subprocess.call('python ' + scriptPath + '/eotlitetool.py ' + fontfile + '.ttf -o ' + fontfile + '.eot', shell=True)
|
||||
subprocess.call('mv ' + fontfile + '.eotlite ' + fontfile + '.eot', shell=True)
|
||||
|
||||
print 'Hint TTF file'
|
||||
subprocess.call('ttfautohint -s -f -n ' + fontfile + '.ttf ' + fontfile + '-hinted.ttf > /dev/null 2>&1 && mv ' + fontfile + '-hinted.ttf ' + fontfile + '.ttf', shell=True)
|
||||
|
||||
print 'Generate WOFF2 Font File'
|
||||
subprocess.call('woff2_compress ' + fontfile + '.ttf', shell=True)
|
||||
|
||||
manifest_data['icons'] = sorted(manifest_data['icons'], key=lambda k: k['name'])
|
||||
|
||||
print "Save Manifest, Icons: %s" % ( len(manifest_data['icons']) )
|
||||
f = open(MANIFEST_PATH, 'w')
|
||||
f.write( json.dumps(manifest_data, indent=2, separators=(',', ': ')) )
|
||||
f.close()
|
||||
Binary file not shown.
@@ -1,295 +0,0 @@
|
||||
from subprocess import call
|
||||
import os, errno
|
||||
import shutil
|
||||
import subprocess
|
||||
import json
|
||||
import codecs
|
||||
from collections import OrderedDict
|
||||
import hashlib
|
||||
|
||||
|
||||
SCRIPTS_PATH = os.path.dirname(os.path.abspath(__file__))
|
||||
ROOT_PATH = os.path.join(SCRIPTS_PATH, '..')
|
||||
SRC_PATH = os.path.join(ROOT_PATH, 'src')
|
||||
DIST_PATH = os.path.join(ROOT_PATH, 'dist')
|
||||
SVGO_CONFIG_PATH = os.path.join(ROOT_PATH, '.svgo.yml')
|
||||
INPUT_SVG_DIR = os.path.join(SRC_PATH, 'svg')
|
||||
OUTPUT_SVG_DIR = os.path.join(DIST_PATH, 'svg')
|
||||
DATA_PATH = os.path.join(DIST_PATH, 'data')
|
||||
FONTS_DOCS_PATH = os.path.join(ROOT_PATH, 'docs', 'fonts')
|
||||
CSS_FOLDER_PATH = os.path.join(DIST_PATH, 'css')
|
||||
INPUT_SCSS_FOLDER_PATH = os.path.join(SRC_PATH, 'scss')
|
||||
OUTPUT_SCSS_FOLDER_PATH = os.path.join(DIST_PATH, 'scss')
|
||||
|
||||
|
||||
def main():
|
||||
try:
|
||||
os.makedirs(DIST_PATH)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
try:
|
||||
os.makedirs(OUTPUT_SVG_DIR)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
if requires_update():
|
||||
generate_font_files()
|
||||
|
||||
data = get_build_data()
|
||||
|
||||
rename_svg_glyph_names(data)
|
||||
generate_scss(data)
|
||||
generate_svg_files()
|
||||
generate_cheatsheet(data)
|
||||
|
||||
if requires_update():
|
||||
generate_docs_designer_pack_zip()
|
||||
|
||||
|
||||
def requires_update():
|
||||
m = hashlib.sha256()
|
||||
|
||||
for filename in os.listdir(INPUT_SVG_DIR):
|
||||
filename = os.path.join(INPUT_SVG_DIR, filename)
|
||||
with open(filename, 'rb') as inputfile:
|
||||
data = inputfile.read()
|
||||
m.update(data)
|
||||
|
||||
current_hash = m.hexdigest()
|
||||
|
||||
manifest_path = os.path.join(SCRIPTS_PATH, 'manifest.json')
|
||||
|
||||
f = codecs.open(manifest_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
last_hash = data.get('hash')
|
||||
f.close()
|
||||
|
||||
fonts_folder_exists = os.path.exists(FONTS_DOCS_PATH)
|
||||
|
||||
print 'old hash: %s' % (last_hash)
|
||||
print 'new hash: %s' % (current_hash)
|
||||
print 'fonts folder exists: %s' % (fonts_folder_exists)
|
||||
|
||||
if last_hash != current_hash or (not fonts_folder_exists):
|
||||
print "Generating fonts..."
|
||||
data['hash'] = current_hash
|
||||
|
||||
with open(manifest_path, 'w') as outfile:
|
||||
json.dump(data, outfile)
|
||||
|
||||
return True
|
||||
|
||||
print "SVGs unchanged, skip generating fonts"
|
||||
return False
|
||||
|
||||
|
||||
def generate_font_files():
|
||||
print "Generate Fonts"
|
||||
cmd = "fontforge -script %s/font/generate_font.py" % (SCRIPTS_PATH)
|
||||
call(cmd, shell=True)
|
||||
|
||||
|
||||
def generate_docs_designer_pack_zip():
|
||||
print "Generate Docs Designer Pack Zip"
|
||||
cmd = "node %s/build-zip.js" % (SCRIPTS_PATH)
|
||||
call(cmd, shell=True)
|
||||
|
||||
|
||||
def generate_svg_files():
|
||||
print "Generate SVG Files"
|
||||
shutil.rmtree(OUTPUT_SVG_DIR)
|
||||
if not os.path.exists(OUTPUT_SVG_DIR):
|
||||
os.makedirs(OUTPUT_SVG_DIR)
|
||||
|
||||
cmd = 'svgo -f %s -o %s --config=%s' % (INPUT_SVG_DIR, OUTPUT_SVG_DIR, SVGO_CONFIG_PATH)
|
||||
cwd = os.path.join(os.path.dirname(__file__), '../node_modules/svgo/bin')
|
||||
subprocess.call([cmd], shell=True, cwd=cwd)
|
||||
|
||||
for filename in os.listdir(OUTPUT_SVG_DIR):
|
||||
svg_path = os.path.join(OUTPUT_SVG_DIR, filename)
|
||||
svg_read_file = open(svg_path, 'r')
|
||||
svg_text = svg_read_file.read()
|
||||
|
||||
svg_text = svg_text.replace(' width="512px"', '')
|
||||
svg_text = svg_text.replace(' width="512"', '')
|
||||
svg_text = svg_text.replace(' height="512px"', '')
|
||||
svg_text = svg_text.replace(' height="512"', '')
|
||||
|
||||
if 'viewBox="0 0 512 512"' not in svg_text:
|
||||
svg_text = svg_text.replace('xmlns="http://www.w3.org/2000/svg"', 'xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"')
|
||||
|
||||
svg_write_file = open(svg_path, 'w')
|
||||
svg_write_file.write(svg_text)
|
||||
svg_write_file.close()
|
||||
|
||||
|
||||
def rename_svg_glyph_names(data):
|
||||
# hacky and slow (but safe) way to rename glyph-name attributes
|
||||
svg_path = os.path.join(FONTS_DOCS_PATH, 'ionicons.svg')
|
||||
svg_file = codecs.open(svg_path, 'r+', 'utf-8')
|
||||
svg_text = svg_file.read()
|
||||
svg_file.seek(0)
|
||||
|
||||
for ionicon in data['icons']:
|
||||
# uniF2CA
|
||||
org_name = 'uni%s' % (ionicon['code'].replace('0x', '').upper())
|
||||
ion_name = 'ion-%s' % (ionicon['name'])
|
||||
svg_text = svg_text.replace(org_name, ion_name)
|
||||
|
||||
svg_file.write(svg_text)
|
||||
svg_file.close()
|
||||
|
||||
|
||||
def generate_scss(data):
|
||||
try:
|
||||
os.makedirs(OUTPUT_SCSS_FOLDER_PATH)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
raise
|
||||
|
||||
print "Generate SCSS"
|
||||
font_name = data['name']
|
||||
font_version = data['version']
|
||||
css_prefix = data['prefix']
|
||||
|
||||
ionicons_core_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons-core.scss')
|
||||
ionicons_core_file_path_output = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-core.scss')
|
||||
shutil.copyfile(ionicons_core_file_path_input, ionicons_core_file_path_output)
|
||||
|
||||
ionicons_scc_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons.scss')
|
||||
ionicons_scc_file_path_output = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons.scss')
|
||||
shutil.copyfile(ionicons_scc_file_path_input, ionicons_scc_file_path_output)
|
||||
|
||||
variables_file_path_input = os.path.join(INPUT_SCSS_FOLDER_PATH, 'ionicons-variables.scss')
|
||||
variables_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-variables.scss')
|
||||
shutil.copyfile(variables_file_path_input, variables_file_path)
|
||||
|
||||
common_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-common.scss')
|
||||
icons_file_path = os.path.join(OUTPUT_SCSS_FOLDER_PATH, 'ionicons-icons.scss')
|
||||
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Variables')
|
||||
d.append('// --------------------------\n')
|
||||
d.append('$ionicons-font-path: "../fonts" !default;')
|
||||
d.append('$ionicons-font-family: "%s" !default;' % (font_name) )
|
||||
d.append('$ionicons-version: "%s" !default;' % (font_version) )
|
||||
|
||||
f = codecs.open(variables_file_path, 'w', 'utf-8')
|
||||
f.write( u'\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Common CSS')
|
||||
d.append('// --------------------------\n')
|
||||
|
||||
group = [ '.%s' % (data['name'].lower()) ]
|
||||
for ionicon in data['icons']:
|
||||
group.append('.%s%s:before' % (css_prefix, ionicon['name']) )
|
||||
|
||||
d.append( ',\n'.join(group) )
|
||||
|
||||
d.append('{')
|
||||
d.append(' @extend .ion;')
|
||||
d.append('}')
|
||||
|
||||
f = codecs.open(common_file_path, 'w', 'utf-8')
|
||||
f.write( '\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
d = []
|
||||
d.append('@charset "UTF-8";')
|
||||
d.append('// Ionicons Icon Font CSS')
|
||||
d.append('// --------------------------\n')
|
||||
|
||||
for ionicon in data['icons']:
|
||||
chr_code = ionicon['code'].replace('0x', '\\')
|
||||
d.append('.%s%s:before { content: "%s"; }' % (css_prefix, ionicon['name'], chr_code) )
|
||||
|
||||
f = codecs.open(icons_file_path, 'w', 'utf-8')
|
||||
f.write( '\n'.join(d) )
|
||||
f.close()
|
||||
|
||||
|
||||
def generate_cheatsheet(data):
|
||||
print "Generate Cheatsheet"
|
||||
|
||||
cheatsheet_file_path = os.path.join(DIST_PATH, 'cheatsheet.html')
|
||||
template_path = os.path.join(SRC_PATH, 'cheatsheet', 'template.html')
|
||||
icon_row_path = os.path.join(SRC_PATH, 'cheatsheet', 'icon-row.html')
|
||||
|
||||
f = codecs.open(template_path, 'r', 'utf-8')
|
||||
template_html = f.read()
|
||||
f.close()
|
||||
|
||||
f = codecs.open(icon_row_path, 'r', 'utf-8')
|
||||
icon_row_template = f.read()
|
||||
f.close()
|
||||
|
||||
content = []
|
||||
icon_names = []
|
||||
|
||||
for ionicon in data['icons']:
|
||||
name = ""
|
||||
if ionicon['name'].startswith('ios-'):
|
||||
name = ionicon['name'][4:]
|
||||
|
||||
elif ionicon['name'].startswith('md-'):
|
||||
name = ionicon['name'][3:]
|
||||
|
||||
if name not in icon_names:
|
||||
icon_names.append(name)
|
||||
|
||||
icon_names.sort()
|
||||
|
||||
for icon_name in icon_names:
|
||||
if icon_name != "":
|
||||
item_row = icon_row_template.replace('{{name}}', icon_name)
|
||||
item_row = item_row.replace('{{prefix}}', data['prefix'])
|
||||
|
||||
content.append(item_row)
|
||||
|
||||
template_html = template_html.replace("{{title}}", 'Cheatsheet')
|
||||
template_html = template_html.replace("{{font_name}}", data["name"])
|
||||
template_html = template_html.replace("{{font_version}}", data["version"])
|
||||
template_html = template_html.replace("{{icon_count}}", str(len(icon_names)) )
|
||||
template_html = template_html.replace("{{content}}", '\n'.join(content) )
|
||||
|
||||
f = codecs.open(cheatsheet_file_path, 'w', 'utf-8')
|
||||
f.write(template_html)
|
||||
f.close()
|
||||
|
||||
|
||||
def get_build_data():
|
||||
manifest_path = os.path.join(SCRIPTS_PATH, 'manifest.json')
|
||||
|
||||
f = codecs.open(manifest_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
|
||||
package_json_path = os.path.join(ROOT_PATH, 'package.json')
|
||||
f = codecs.open(package_json_path, 'r', 'utf-8')
|
||||
package_data = json.loads(f.read())
|
||||
f.close()
|
||||
|
||||
data['version'] = package_data['version']
|
||||
|
||||
return data
|
||||
|
||||
|
||||
def get_tag_data():
|
||||
tag_data_path = os.path.join(SCRIPTS_PATH, 'tags.json')
|
||||
|
||||
f = codecs.open(tag_data_path, 'r', 'utf-8')
|
||||
data = json.loads(f.read())
|
||||
f.close()
|
||||
return data
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,34 +0,0 @@
|
||||
# Build
|
||||
|
||||
npm run build
|
||||
|
||||
|
||||
# Data
|
||||
|
||||
Update the src/data.json file with each icon and search tags.
|
||||
|
||||
|
||||
# Cheatsheet
|
||||
|
||||
docs/cheatsheet.html
|
||||
|
||||
|
||||
## Install
|
||||
|
||||
This repo already comes with all the files built and ready to go, but can also build the fonts from the source. Requires Python, FontForge, WOFF2, SVGO and Sass:
|
||||
|
||||
1) Install FontForge, which is the program that creates the font files from the SVG files:
|
||||
|
||||
$ brew install fontforge ttfautohint
|
||||
|
||||
2) Install Google's WOFF2 font compressor
|
||||
|
||||
https://github.com/google/woff2
|
||||
|
||||
3) Add or subtract files from the `src/` folder you'd like to be apart of the build.
|
||||
|
||||
4) Modify any settings in the `scripts/manifest.json` file. You can change the name of the font-family and CSS classname prefix.
|
||||
|
||||
5) Run the build command:
|
||||
|
||||
npm run build
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"module": "commonjs",
|
||||
"target": "esnext"
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
<tr class="mode-row">
|
||||
<td>
|
||||
{{name}}
|
||||
</td>
|
||||
<td class="align-center">
|
||||
<ion-icon name="ios-{{name}}" lazy></ion-icon>
|
||||
</div>
|
||||
<td class="align-center">
|
||||
<ion-icon name="md-{{name}}" lazy></ion-icon>
|
||||
</div>
|
||||
</tr>
|
||||
@@ -1,143 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{font_name}} {{title}}</title>
|
||||
<style>
|
||||
* {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Eina Bold */
|
||||
@font-face {
|
||||
font-family: 'Eina';
|
||||
src: url('../assets/fonts/34E6DB_F_0.eot');
|
||||
src: url('../assets/fonts/34E6DB_F_0.eot?#iefix') format('embedded-opentype'),
|
||||
url('../assets/fonts/34E6DB_F_0.woff2') format('woff2'),
|
||||
url('../assets/fonts/34E6DB_F_0.woff') format('woff'),
|
||||
url('../assets/fonts/34E6DB_F_0.ttf') format('truetype');
|
||||
font-weight: 700;
|
||||
unicode-range: U+000-5FF;
|
||||
}
|
||||
|
||||
/* Eina Regular */
|
||||
@font-face {
|
||||
font-family: 'Eina';
|
||||
src: url('../assets/fonts/34E6DB_D_0.eot');
|
||||
src: url('../assets/fonts/34E6DB_D_0.eot?#iefix') format('embedded-opentype'),
|
||||
url('../assets/fonts/34E6DB_D_0.woff2') format('woff2'),
|
||||
url('../assets/fonts/34E6DB_D_0.woff') format('woff'),
|
||||
url('../assets/fonts/34E6DB_D_0.ttf') format('truetype');
|
||||
font-weight: 400;
|
||||
unicode-range: U+000-5FF;
|
||||
}
|
||||
|
||||
body {
|
||||
background: #fff;
|
||||
color: #444;
|
||||
font: 16px/1.5 'Eina', "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
a, a:visited {
|
||||
color: #888;
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover, a:focus { color: #000; }
|
||||
|
||||
header {
|
||||
overflow: hidden;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
float: left;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
main {
|
||||
margin: 0 auto;
|
||||
padding: 0 20px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
border-spacing: 0;
|
||||
}
|
||||
|
||||
tr {
|
||||
padding: 0 0 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 4px;
|
||||
width: 33%;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ddd;
|
||||
white-space: nowrap;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
color: #888;
|
||||
}
|
||||
|
||||
|
||||
ion-icon {
|
||||
display: block;
|
||||
margin: 5px 0;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
padding: 20px 0;
|
||||
}
|
||||
|
||||
.heart {
|
||||
display: inline-block;
|
||||
padding-top: 4px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
color: red;
|
||||
vertical-align: sub;
|
||||
}
|
||||
|
||||
</style>
|
||||
<script src="ionicons.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main>
|
||||
<header>
|
||||
<h1>{{font_name}} {{title}}, {{icon_count}} icons</h1>
|
||||
</header>
|
||||
<table>
|
||||
<tr>
|
||||
<th>
|
||||
Icon Name
|
||||
</th>
|
||||
<th>
|
||||
iOS
|
||||
</th>
|
||||
<th>
|
||||
Material Design
|
||||
</th>
|
||||
</tr>
|
||||
{{content}}
|
||||
</table>
|
||||
<footer>
|
||||
Made with <ion-icon class="heart" name="md-heart"></ion-icon> by the <a href="http://ionicframework.com/">Ionic Team</a>
|
||||
</footer>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
+2
-2
@@ -41,7 +41,7 @@ export namespace Components {
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
'mode'?: "ios" | "md";
|
||||
'mode': string;
|
||||
/**
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
@@ -103,7 +103,7 @@ declare namespace LocalJSX {
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
'mode'?: "ios" | "md";
|
||||
'mode'?: string;
|
||||
/**
|
||||
* Specifies which icon to use from the built-in set of icons.
|
||||
*/
|
||||
@@ -1,5 +0,0 @@
|
||||
import { setMode } from '@stencil/core';
|
||||
|
||||
export default () => {
|
||||
setMode((el: any) => el.tagName === 'ION-ICON' ? el.mode || el.getAttribute('mode') : null);
|
||||
};
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
.icon-inner,
|
||||
svg {
|
||||
.ionicon {
|
||||
display: block;
|
||||
|
||||
height: 100%;
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
import { Build, Component, Element, Host, Prop, State, Watch, getMode, h } from '@stencil/core';
|
||||
import { getSvgContent } from './request';
|
||||
import { Build, Component, Element, Host, Prop, State, Watch, h } from '@stencil/core';
|
||||
import { getSvgContent, ioniconContent } from './request';
|
||||
import { getName, getUrl } from './utils';
|
||||
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-icon',
|
||||
assetsDir: 'svg',
|
||||
@@ -14,13 +11,17 @@ import { getName, getUrl } from './utils';
|
||||
})
|
||||
export class Icon {
|
||||
private io?: IntersectionObserver;
|
||||
mode = getIonMode(this);
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
@State() private svgContent?: string;
|
||||
@State() private isVisible = false;
|
||||
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
*/
|
||||
@Prop({ mutable: true }) mode = getIonMode();
|
||||
|
||||
/**
|
||||
* The color to use for the background of the item.
|
||||
*/
|
||||
@@ -119,8 +120,13 @@ export class Icon {
|
||||
if (Build.isBrowser && this.isVisible) {
|
||||
const url = getUrl(this);
|
||||
if (url) {
|
||||
getSvgContent(url)
|
||||
.then(svgContent => this.svgContent = svgContent);
|
||||
if (ioniconContent.has(url)) {
|
||||
// sync if it's already loaded
|
||||
this.svgContent = ioniconContent.get(url);
|
||||
} else {
|
||||
// async if it hasn't been loaded
|
||||
getSvgContent(url).then(() => this.svgContent = ioniconContent.get(url));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,10 +135,7 @@ export class Icon {
|
||||
// user did not provide a label
|
||||
// come up with the label based on the icon name
|
||||
if (label) {
|
||||
this.ariaLabel = label
|
||||
.replace('ios-', '')
|
||||
.replace('md-', '')
|
||||
.replace(/\-/g, ' ');
|
||||
this.ariaLabel = label.replace(/\-/g, ' ');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,9 +161,7 @@ export class Icon {
|
||||
}
|
||||
|
||||
|
||||
const getIonMode = (ref: any) => {
|
||||
return getMode(ref) || document.documentElement.getAttribute('mode') || 'md';
|
||||
};
|
||||
const getIonMode = () => (Build.isBrowser && document.documentElement.getAttribute('mode')) || 'md';
|
||||
|
||||
|
||||
const createColorClasses = (color: string | undefined) => {
|
||||
|
||||
@@ -7,19 +7,19 @@
|
||||
|
||||
## Properties
|
||||
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | ----------- |
|
||||
| `ariaLabel` | `aria-label` | Specifies the label to use for accessibility. Defaults to the icon name. | `string \| undefined` | `undefined` |
|
||||
| `color` | `color` | The color to use for the background of the item. | `string \| undefined` | `undefined` |
|
||||
| `flipRtl` | `flip-rtl` | Specifies whether the icon should horizontally flip when `dir` is `"rtl"`. | `boolean \| undefined` | `undefined` |
|
||||
| `icon` | `icon` | A combination of both `name` and `src`. If a `src` url is detected it will set the `src` property. Otherwise it assumes it's a built-in named SVG and set the `name` property. | `any` | `undefined` |
|
||||
| `ios` | `ios` | Specifies which icon to use on `ios` mode. | `string \| undefined` | `undefined` |
|
||||
| `lazy` | `lazy` | If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`. | `boolean` | `false` |
|
||||
| `md` | `md` | Specifies which icon to use on `md` mode. | `string \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `"ios" \| "md"` | `undefined` |
|
||||
| `name` | `name` | Specifies which icon to use from the built-in set of icons. | `string \| undefined` | `undefined` |
|
||||
| `size` | `size` | The size of the icon. Available options are: `"small"` and `"large"`. | `string \| undefined` | `undefined` |
|
||||
| `src` | `src` | Specifies the exact `src` of an SVG file to use. | `string \| undefined` | `undefined` |
|
||||
| Property | Attribute | Description | Type | Default |
|
||||
| ----------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------- | -------------- |
|
||||
| `ariaLabel` | `aria-label` | Specifies the label to use for accessibility. Defaults to the icon name. | `string \| undefined` | `undefined` |
|
||||
| `color` | `color` | The color to use for the background of the item. | `string \| undefined` | `undefined` |
|
||||
| `flipRtl` | `flip-rtl` | Specifies whether the icon should horizontally flip when `dir` is `"rtl"`. | `boolean \| undefined` | `undefined` |
|
||||
| `icon` | `icon` | A combination of both `name` and `src`. If a `src` url is detected it will set the `src` property. Otherwise it assumes it's a built-in named SVG and set the `name` property. | `any` | `undefined` |
|
||||
| `ios` | `ios` | Specifies which icon to use on `ios` mode. | `string \| undefined` | `undefined` |
|
||||
| `lazy` | `lazy` | If enabled, ion-icon will be loaded lazily when it's visible in the viewport. Default, `false`. | `boolean` | `false` |
|
||||
| `md` | `md` | Specifies which icon to use on `md` mode. | `string \| undefined` | `undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. | `string` | `getIonMode()` |
|
||||
| `name` | `name` | Specifies which icon to use from the built-in set of icons. | `string \| undefined` | `undefined` |
|
||||
| `size` | `size` | The size of the icon. Available options are: `"small"` and `"large"`. | `string \| undefined` | `undefined` |
|
||||
| `src` | `src` | Specifies the exact `src` of an SVG file to use. | `string \| undefined` | `undefined` |
|
||||
|
||||
|
||||
----------------------------------------------
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { validateContent } from './validate';
|
||||
|
||||
|
||||
const requests = new Map<string, Promise<string>>();
|
||||
export const ioniconContent = new Map<string, string>();
|
||||
const requests = new Map<string, Promise<any>>();
|
||||
|
||||
|
||||
export const getSvgContent = (url: string) => {
|
||||
@@ -11,12 +12,13 @@ export const getSvgContent = (url: string) => {
|
||||
if (!req) {
|
||||
// we don't already have a request
|
||||
req = fetch(url).then(rsp => {
|
||||
if (rsp.status <= 299) {
|
||||
return rsp.text();
|
||||
if (rsp.ok) {
|
||||
return rsp.text().then(svgContent => {
|
||||
ioniconContent.set(url, validateContent(svgContent));
|
||||
});
|
||||
}
|
||||
return Promise.resolve(null);
|
||||
|
||||
}).then(svgContent => validateContent(svgContent));
|
||||
ioniconContent.set(url, '');
|
||||
});
|
||||
|
||||
// cache for the same requests
|
||||
requests.set(url, req);
|
||||
|
||||
@@ -15,9 +15,7 @@ export const getIconMap = (): Map<string, string> => {
|
||||
|
||||
export const addIcons = (icons: {[name: string]: string }) => {
|
||||
const map = getIconMap();
|
||||
Object.keys(icons).forEach(name => {
|
||||
map.set(name, icons[name]);
|
||||
});
|
||||
Object.keys(icons).forEach(name => map.set(name, icons[name]));
|
||||
};
|
||||
|
||||
|
||||
@@ -48,58 +46,53 @@ export const getUrl = (i: Icon) => {
|
||||
};
|
||||
|
||||
|
||||
const getNamedUrl = (name: string) => {
|
||||
const url = getIconMap().get(name);
|
||||
const getNamedUrl = (iconName: string) => {
|
||||
const url = getIconMap().get(iconName);
|
||||
if (url) {
|
||||
return url;
|
||||
}
|
||||
return getAssetPath(`svg/${name}.svg`);
|
||||
return getAssetPath(`svg/${iconName}.svg`);
|
||||
};
|
||||
|
||||
|
||||
export const getName = (
|
||||
name: string | undefined,
|
||||
iconName: string | undefined,
|
||||
icon: string | undefined,
|
||||
mode: string | undefined,
|
||||
ios: string | undefined,
|
||||
md: string | undefined
|
||||
) => {
|
||||
// default to "md" if somehow the mode wasn't set
|
||||
mode = (mode && mode.toLowerCase()) === 'ios' ? 'ios' : 'md';
|
||||
mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';
|
||||
|
||||
// if an icon was passed in using the ios or md attributes
|
||||
// set the iconName to whatever was passed in
|
||||
if (ios && mode === 'ios') {
|
||||
name = ios.toLowerCase();
|
||||
iconName = toLower(ios);
|
||||
|
||||
} else if (md && mode === 'md') {
|
||||
name = md.toLowerCase();
|
||||
iconName = toLower(md);
|
||||
|
||||
} else {
|
||||
if (!name && icon && !isSrc(icon)) {
|
||||
name = icon;
|
||||
if (!iconName && icon && !isSrc(icon)) {
|
||||
iconName = icon;
|
||||
}
|
||||
if (isStr(name)) {
|
||||
name = name.toLowerCase();
|
||||
if (!/^md-|^ios-|^logo-/.test(name)) {
|
||||
// this does not have one of the defaults
|
||||
// so lets auto add in the mode prefix for them
|
||||
name = mode + '-' + name;
|
||||
}
|
||||
if (isStr(iconName)) {
|
||||
iconName = toLower(iconName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!isStr(name) || name.trim() === '') {
|
||||
if (!isStr(iconName) || iconName.trim() === '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
// only allow alpha characters and dash
|
||||
const invalidChars = name.replace(/[a-z]|-|\d/gi, '');
|
||||
const invalidChars = iconName.replace(/[a-z]|-|\d/gi, '');
|
||||
if (invalidChars !== '') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return name;
|
||||
return iconName;
|
||||
};
|
||||
|
||||
export const getSrc = (src: string | undefined) => {
|
||||
@@ -112,9 +105,8 @@ export const getSrc = (src: string | undefined) => {
|
||||
return null;
|
||||
};
|
||||
|
||||
export const isSrc = (str: string) => {
|
||||
return str.length > 0 && /(\/|\.)/.test(str);
|
||||
};
|
||||
|
||||
export const isSrc = (str: string) => str.length > 0 && /(\/|\.)/.test(str);
|
||||
|
||||
export const isStr = (val: any): val is string => typeof val === 'string';
|
||||
|
||||
export const toLower = (val: string) => val.toLowerCase();
|
||||
@@ -1,9 +1,7 @@
|
||||
import { isStr } from './utils';
|
||||
|
||||
|
||||
export const validateContent = (
|
||||
svgContent: string | null
|
||||
) => {
|
||||
export const validateContent = (svgContent: string | null) => {
|
||||
if (svgContent) {
|
||||
const div = document.createElement('div');
|
||||
div.innerHTML = svgContent;
|
||||
|
||||
@@ -1,853 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
|
||||
<title>Ionicons Icon Component</title>
|
||||
<script type="module" src="/build/ionicons.esm.js"></script>
|
||||
<script nomodule src="/build/ionicons.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Ionicons</h1>
|
||||
|
||||
<h2>Mode: default (md)</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="at"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="football"></ion-icon>
|
||||
<ion-icon name="analytics"></ion-icon>
|
||||
<ion-icon name="grid"></ion-icon>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
<ion-icon name="watch"></ion-icon>
|
||||
<ion-icon name="switch"></ion-icon>
|
||||
|
||||
<h2>Mode: ios</h2>
|
||||
<ion-icon mode="ios" name="cellular"></ion-icon>
|
||||
<ion-icon mode="ios" name="at"></ion-icon>
|
||||
<ion-icon mode="ios" name="call"></ion-icon>
|
||||
<ion-icon mode="ios" name="football"></ion-icon>
|
||||
<ion-icon mode="ios" name="analytics"></ion-icon>
|
||||
<ion-icon mode="ios" name="grid"></ion-icon>
|
||||
<ion-icon mode="ios" name="funnel"></ion-icon>
|
||||
<ion-icon mode="ios" name="watch"></ion-icon>
|
||||
<ion-icon mode="ios" name="switch"></ion-icon>
|
||||
|
||||
<h2>Colors</h2>
|
||||
<ion-icon color="primary" name="cellular"></ion-icon>
|
||||
<ion-icon color="secondary" name="at"></ion-icon>
|
||||
<ion-icon color="tertiary" name="call"></ion-icon>
|
||||
<ion-icon color="success" name="football"></ion-icon>
|
||||
<ion-icon color="warning" name="analytics"></ion-icon>
|
||||
<ion-icon color="danger" name="grid"></ion-icon>
|
||||
<ion-icon color="light" name="funnel"></ion-icon>
|
||||
<ion-icon color="medium" name="watch"></ion-icon>
|
||||
<ion-icon color="dark" name="switch"></ion-icon>
|
||||
|
||||
<h2>Logos</h2>
|
||||
<ion-icon name="logo-ionic"></ion-icon>
|
||||
<ion-icon name="logo-github"></ion-icon>
|
||||
<ion-icon name="logo-instagram"></ion-icon>
|
||||
<ion-icon name="logo-android"></ion-icon>
|
||||
<ion-icon name="logo-javascript"></ion-icon>
|
||||
<ion-icon name="logo-npm"></ion-icon>
|
||||
<ion-icon name="logo-reddit"></ion-icon>
|
||||
<ion-icon name="logo-tux"></ion-icon>
|
||||
<ion-icon name="logo-buffer"></ion-icon>
|
||||
|
||||
<h2>Logos: colors</h2>
|
||||
<ion-icon color="primary" name="logo-ionic"></ion-icon>
|
||||
<ion-icon color="secondary" name="logo-github"></ion-icon>
|
||||
<ion-icon color="tertiary" name="logo-instagram"></ion-icon>
|
||||
<ion-icon color="success" name="logo-android"></ion-icon>
|
||||
<ion-icon color="warning" name="logo-javascript"></ion-icon>
|
||||
<ion-icon color="danger" name="logo-npm"></ion-icon>
|
||||
<ion-icon color="light" name="logo-reddit"></ion-icon>
|
||||
<ion-icon color="medium" name="logo-tux"></ion-icon>
|
||||
<ion-icon color="dark" name="logo-buffer"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs</h2>
|
||||
<ion-icon src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs: colors</h2>
|
||||
<ion-icon color="primary" src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon color="secondary" src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon color="tertiary" src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon color="success" src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon color="warning" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon color="danger" src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon color="light" src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon color="medium" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon color="dark" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom CSS</h2>
|
||||
<ion-icon class="custom" name="grid"></ion-icon>
|
||||
<ion-icon class="custom" name="funnel"></ion-icon>
|
||||
<ion-icon class="custom" name="watch"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-reddit"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-javascript"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-npm"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h1>RTL</h1>
|
||||
|
||||
<h2>Default: Non-arrows</h2>
|
||||
<ion-icon name="cut"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="checkbox"></ion-icon>
|
||||
<ion-icon name="brush"></ion-icon>
|
||||
|
||||
<h2>Flip: Non-arrows</h2>
|
||||
<ion-icon name="cut" flip-rtl></ion-icon>
|
||||
<ion-icon name="call" flip-rtl></ion-icon>
|
||||
<ion-icon name="checkbox" flip-rtl></ion-icon>
|
||||
<ion-icon name="brush" flip-rtl></ion-icon>
|
||||
|
||||
<h2>Auto Flip: arrows</h2>
|
||||
<ion-icon name="arrow-up"></ion-icon>
|
||||
<ion-icon name="arrow-forward"></ion-icon>
|
||||
<ion-icon name="arrow-down"></ion-icon>
|
||||
<ion-icon name="arrow-back"></ion-icon>
|
||||
|
||||
<h2>Un-flip: arrows</h2>
|
||||
<ion-icon name="arrow-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-back" flip-rtl="false"></ion-icon>
|
||||
|
||||
<h2>Every Icon</h2>
|
||||
<ion-icon name="ios-add-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-add-circle"></ion-icon>
|
||||
<ion-icon name="ios-add"></ion-icon>
|
||||
<ion-icon name="ios-airplane"></ion-icon>
|
||||
<ion-icon name="ios-alarm"></ion-icon>
|
||||
<ion-icon name="ios-albums"></ion-icon>
|
||||
<ion-icon name="ios-alert"></ion-icon>
|
||||
<ion-icon name="ios-american-football"></ion-icon>
|
||||
<ion-icon name="ios-analytics"></ion-icon>
|
||||
<ion-icon name="ios-aperture"></ion-icon>
|
||||
<ion-icon name="ios-apps"></ion-icon>
|
||||
<ion-icon name="ios-appstore"></ion-icon>
|
||||
<ion-icon name="ios-archive"></ion-icon>
|
||||
<ion-icon name="ios-arrow-back"></ion-icon>
|
||||
<ion-icon name="ios-arrow-down"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropdown-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropdown"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropleft-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropleft"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropright-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropright"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropup-circle"></ion-icon>
|
||||
<ion-icon name="ios-arrow-dropup"></ion-icon>
|
||||
<ion-icon name="ios-arrow-forward"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-back"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-down"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-forward"></ion-icon>
|
||||
<ion-icon name="ios-arrow-round-up"></ion-icon>
|
||||
<ion-icon name="ios-arrow-up"></ion-icon>
|
||||
<ion-icon name="ios-at"></ion-icon>
|
||||
<ion-icon name="ios-attach"></ion-icon>
|
||||
<ion-icon name="ios-backspace"></ion-icon>
|
||||
<ion-icon name="ios-barcode"></ion-icon>
|
||||
<ion-icon name="ios-baseball"></ion-icon>
|
||||
<ion-icon name="ios-basket"></ion-icon>
|
||||
<ion-icon name="ios-basketball"></ion-icon>
|
||||
<ion-icon name="ios-battery-charging"></ion-icon>
|
||||
<ion-icon name="ios-battery-dead"></ion-icon>
|
||||
<ion-icon name="ios-battery-full"></ion-icon>
|
||||
<ion-icon name="ios-beaker"></ion-icon>
|
||||
<ion-icon name="ios-bed"></ion-icon>
|
||||
<ion-icon name="ios-beer"></ion-icon>
|
||||
<ion-icon name="ios-bicycle"></ion-icon>
|
||||
<ion-icon name="ios-bluetooth"></ion-icon>
|
||||
<ion-icon name="ios-boat"></ion-icon>
|
||||
<ion-icon name="ios-body"></ion-icon>
|
||||
<ion-icon name="ios-bonfire"></ion-icon>
|
||||
<ion-icon name="ios-book"></ion-icon>
|
||||
<ion-icon name="ios-bookmark"></ion-icon>
|
||||
<ion-icon name="ios-bookmarks"></ion-icon>
|
||||
<ion-icon name="ios-bowtie"></ion-icon>
|
||||
<ion-icon name="ios-briefcase"></ion-icon>
|
||||
<ion-icon name="ios-browsers"></ion-icon>
|
||||
<ion-icon name="ios-brush"></ion-icon>
|
||||
<ion-icon name="ios-bug"></ion-icon>
|
||||
<ion-icon name="ios-build"></ion-icon>
|
||||
<ion-icon name="ios-bulb"></ion-icon>
|
||||
<ion-icon name="ios-bus"></ion-icon>
|
||||
<ion-icon name="ios-business"></ion-icon>
|
||||
<ion-icon name="ios-cafe"></ion-icon>
|
||||
<ion-icon name="ios-calculator"></ion-icon>
|
||||
<ion-icon name="ios-calendar"></ion-icon>
|
||||
<ion-icon name="ios-call"></ion-icon>
|
||||
<ion-icon name="ios-camera"></ion-icon>
|
||||
<ion-icon name="ios-car"></ion-icon>
|
||||
<ion-icon name="ios-card"></ion-icon>
|
||||
<ion-icon name="ios-cart"></ion-icon>
|
||||
<ion-icon name="ios-cash"></ion-icon>
|
||||
<ion-icon name="ios-cellular"></ion-icon>
|
||||
<ion-icon name="ios-chatboxes"></ion-icon>
|
||||
<ion-icon name="ios-chatbubbles"></ion-icon>
|
||||
<ion-icon name="ios-checkbox-outline"></ion-icon>
|
||||
<ion-icon name="ios-checkbox"></ion-icon>
|
||||
<ion-icon name="ios-checkmark-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-checkmark-circle"></ion-icon>
|
||||
<ion-icon name="ios-checkmark"></ion-icon>
|
||||
<ion-icon name="ios-clipboard"></ion-icon>
|
||||
<ion-icon name="ios-clock"></ion-icon>
|
||||
<ion-icon name="ios-close-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-close-circle"></ion-icon>
|
||||
<ion-icon name="ios-close"></ion-icon>
|
||||
<ion-icon name="ios-cloud-circle"></ion-icon>
|
||||
<ion-icon name="ios-cloud-done"></ion-icon>
|
||||
<ion-icon name="ios-cloud-download"></ion-icon>
|
||||
<ion-icon name="ios-cloud-outline"></ion-icon>
|
||||
<ion-icon name="ios-cloud-upload"></ion-icon>
|
||||
<ion-icon name="ios-cloud"></ion-icon>
|
||||
<ion-icon name="ios-cloudy-night"></ion-icon>
|
||||
<ion-icon name="ios-cloudy"></ion-icon>
|
||||
<ion-icon name="ios-code-download"></ion-icon>
|
||||
<ion-icon name="ios-code-working"></ion-icon>
|
||||
<ion-icon name="ios-code"></ion-icon>
|
||||
<ion-icon name="ios-cog"></ion-icon>
|
||||
<ion-icon name="ios-color-fill"></ion-icon>
|
||||
<ion-icon name="ios-color-filter"></ion-icon>
|
||||
<ion-icon name="ios-color-palette"></ion-icon>
|
||||
<ion-icon name="ios-color-wand"></ion-icon>
|
||||
<ion-icon name="ios-compass"></ion-icon>
|
||||
<ion-icon name="ios-construct"></ion-icon>
|
||||
<ion-icon name="ios-contact"></ion-icon>
|
||||
<ion-icon name="ios-contacts"></ion-icon>
|
||||
<ion-icon name="ios-contract"></ion-icon>
|
||||
<ion-icon name="ios-contrast"></ion-icon>
|
||||
<ion-icon name="ios-copy"></ion-icon>
|
||||
<ion-icon name="ios-create"></ion-icon>
|
||||
<ion-icon name="ios-crop"></ion-icon>
|
||||
<ion-icon name="ios-cube"></ion-icon>
|
||||
<ion-icon name="ios-cut"></ion-icon>
|
||||
<ion-icon name="ios-desktop"></ion-icon>
|
||||
<ion-icon name="ios-disc"></ion-icon>
|
||||
<ion-icon name="ios-document"></ion-icon>
|
||||
<ion-icon name="ios-done-all"></ion-icon>
|
||||
<ion-icon name="ios-download"></ion-icon>
|
||||
<ion-icon name="ios-easel"></ion-icon>
|
||||
<ion-icon name="ios-egg"></ion-icon>
|
||||
<ion-icon name="ios-exit"></ion-icon>
|
||||
<ion-icon name="ios-expand"></ion-icon>
|
||||
<ion-icon name="ios-eye-off"></ion-icon>
|
||||
<ion-icon name="ios-eye"></ion-icon>
|
||||
<ion-icon name="ios-fastforward"></ion-icon>
|
||||
<ion-icon name="ios-female"></ion-icon>
|
||||
<ion-icon name="ios-filing"></ion-icon>
|
||||
<ion-icon name="ios-film"></ion-icon>
|
||||
<ion-icon name="ios-finger-print"></ion-icon>
|
||||
<ion-icon name="ios-fitness"></ion-icon>
|
||||
<ion-icon name="ios-flag"></ion-icon>
|
||||
<ion-icon name="ios-flame"></ion-icon>
|
||||
<ion-icon name="ios-flash-off"></ion-icon>
|
||||
<ion-icon name="ios-flash"></ion-icon>
|
||||
<ion-icon name="ios-flashlight"></ion-icon>
|
||||
<ion-icon name="ios-flask"></ion-icon>
|
||||
<ion-icon name="ios-flower"></ion-icon>
|
||||
<ion-icon name="ios-folder-open"></ion-icon>
|
||||
<ion-icon name="ios-folder"></ion-icon>
|
||||
<ion-icon name="ios-football"></ion-icon>
|
||||
<ion-icon name="ios-funnel"></ion-icon>
|
||||
<ion-icon name="ios-gift"></ion-icon>
|
||||
<ion-icon name="ios-git-branch"></ion-icon>
|
||||
<ion-icon name="ios-git-commit"></ion-icon>
|
||||
<ion-icon name="ios-git-compare"></ion-icon>
|
||||
<ion-icon name="ios-git-merge"></ion-icon>
|
||||
<ion-icon name="ios-git-network"></ion-icon>
|
||||
<ion-icon name="ios-git-pull-request"></ion-icon>
|
||||
<ion-icon name="ios-glasses"></ion-icon>
|
||||
<ion-icon name="ios-globe"></ion-icon>
|
||||
<ion-icon name="ios-grid"></ion-icon>
|
||||
<ion-icon name="ios-hammer"></ion-icon>
|
||||
<ion-icon name="ios-hand"></ion-icon>
|
||||
<ion-icon name="ios-happy"></ion-icon>
|
||||
<ion-icon name="ios-headset"></ion-icon>
|
||||
<ion-icon name="ios-heart-dislike"></ion-icon>
|
||||
<ion-icon name="ios-heart-empty"></ion-icon>
|
||||
<ion-icon name="ios-heart-half"></ion-icon>
|
||||
<ion-icon name="ios-heart"></ion-icon>
|
||||
<ion-icon name="ios-help-buoy"></ion-icon>
|
||||
<ion-icon name="ios-help-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-help-circle"></ion-icon>
|
||||
<ion-icon name="ios-help"></ion-icon>
|
||||
<ion-icon name="ios-home"></ion-icon>
|
||||
<ion-icon name="ios-hourglass"></ion-icon>
|
||||
<ion-icon name="ios-ice-cream"></ion-icon>
|
||||
<ion-icon name="ios-image"></ion-icon>
|
||||
<ion-icon name="ios-images"></ion-icon>
|
||||
<ion-icon name="ios-infinite"></ion-icon>
|
||||
<ion-icon name="ios-information-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-information-circle"></ion-icon>
|
||||
<ion-icon name="ios-information"></ion-icon>
|
||||
<ion-icon name="ios-jet"></ion-icon>
|
||||
<ion-icon name="ios-journal"></ion-icon>
|
||||
<ion-icon name="ios-key"></ion-icon>
|
||||
<ion-icon name="ios-keypad"></ion-icon>
|
||||
<ion-icon name="ios-laptop"></ion-icon>
|
||||
<ion-icon name="ios-leaf"></ion-icon>
|
||||
<ion-icon name="ios-link"></ion-icon>
|
||||
<ion-icon name="ios-list-box"></ion-icon>
|
||||
<ion-icon name="ios-list"></ion-icon>
|
||||
<ion-icon name="ios-locate"></ion-icon>
|
||||
<ion-icon name="ios-lock"></ion-icon>
|
||||
<ion-icon name="ios-log-in"></ion-icon>
|
||||
<ion-icon name="ios-log-out"></ion-icon>
|
||||
<ion-icon name="ios-magnet"></ion-icon>
|
||||
<ion-icon name="ios-mail-open"></ion-icon>
|
||||
<ion-icon name="ios-mail-unread"></ion-icon>
|
||||
<ion-icon name="ios-mail"></ion-icon>
|
||||
<ion-icon name="ios-male"></ion-icon>
|
||||
<ion-icon name="ios-man"></ion-icon>
|
||||
<ion-icon name="ios-map"></ion-icon>
|
||||
<ion-icon name="ios-medal"></ion-icon>
|
||||
<ion-icon name="ios-medical"></ion-icon>
|
||||
<ion-icon name="ios-medkit"></ion-icon>
|
||||
<ion-icon name="ios-megaphone"></ion-icon>
|
||||
<ion-icon name="ios-menu"></ion-icon>
|
||||
<ion-icon name="ios-mic-off"></ion-icon>
|
||||
<ion-icon name="ios-mic"></ion-icon>
|
||||
<ion-icon name="ios-microphone"></ion-icon>
|
||||
<ion-icon name="ios-moon"></ion-icon>
|
||||
<ion-icon name="ios-more"></ion-icon>
|
||||
<ion-icon name="ios-move"></ion-icon>
|
||||
<ion-icon name="ios-musical-note"></ion-icon>
|
||||
<ion-icon name="ios-musical-notes"></ion-icon>
|
||||
<ion-icon name="ios-navigate"></ion-icon>
|
||||
<ion-icon name="ios-notifications-off"></ion-icon>
|
||||
<ion-icon name="ios-notifications-outline"></ion-icon>
|
||||
<ion-icon name="ios-notifications"></ion-icon>
|
||||
<ion-icon name="ios-nuclear"></ion-icon>
|
||||
<ion-icon name="ios-nutrition"></ion-icon>
|
||||
<ion-icon name="ios-open"></ion-icon>
|
||||
<ion-icon name="ios-options"></ion-icon>
|
||||
<ion-icon name="ios-outlet"></ion-icon>
|
||||
<ion-icon name="ios-paper-plane"></ion-icon>
|
||||
<ion-icon name="ios-paper"></ion-icon>
|
||||
<ion-icon name="ios-partly-sunny"></ion-icon>
|
||||
<ion-icon name="ios-pause"></ion-icon>
|
||||
<ion-icon name="ios-paw"></ion-icon>
|
||||
<ion-icon name="ios-people"></ion-icon>
|
||||
<ion-icon name="ios-person-add"></ion-icon>
|
||||
<ion-icon name="ios-person"></ion-icon>
|
||||
<ion-icon name="ios-phone-landscape"></ion-icon>
|
||||
<ion-icon name="ios-phone-portrait"></ion-icon>
|
||||
<ion-icon name="ios-photos"></ion-icon>
|
||||
<ion-icon name="ios-pie"></ion-icon>
|
||||
<ion-icon name="ios-pin"></ion-icon>
|
||||
<ion-icon name="ios-pint"></ion-icon>
|
||||
<ion-icon name="ios-pizza"></ion-icon>
|
||||
<ion-icon name="ios-planet"></ion-icon>
|
||||
<ion-icon name="ios-play-circle"></ion-icon>
|
||||
<ion-icon name="ios-play"></ion-icon>
|
||||
<ion-icon name="ios-podium"></ion-icon>
|
||||
<ion-icon name="ios-power"></ion-icon>
|
||||
<ion-icon name="ios-pricetag"></ion-icon>
|
||||
<ion-icon name="ios-pricetags"></ion-icon>
|
||||
<ion-icon name="ios-print"></ion-icon>
|
||||
<ion-icon name="ios-pulse"></ion-icon>
|
||||
<ion-icon name="ios-qr-scanner"></ion-icon>
|
||||
<ion-icon name="ios-quote"></ion-icon>
|
||||
<ion-icon name="ios-radio-button-off"></ion-icon>
|
||||
<ion-icon name="ios-radio-button-on"></ion-icon>
|
||||
<ion-icon name="ios-radio"></ion-icon>
|
||||
<ion-icon name="ios-rainy"></ion-icon>
|
||||
<ion-icon name="ios-recording"></ion-icon>
|
||||
<ion-icon name="ios-redo"></ion-icon>
|
||||
<ion-icon name="ios-refresh-circle"></ion-icon>
|
||||
<ion-icon name="ios-refresh"></ion-icon>
|
||||
<ion-icon name="ios-remove-circle-outline"></ion-icon>
|
||||
<ion-icon name="ios-remove-circle"></ion-icon>
|
||||
<ion-icon name="ios-remove"></ion-icon>
|
||||
<ion-icon name="ios-reorder"></ion-icon>
|
||||
<ion-icon name="ios-repeat"></ion-icon>
|
||||
<ion-icon name="ios-resize"></ion-icon>
|
||||
<ion-icon name="ios-restaurant"></ion-icon>
|
||||
<ion-icon name="ios-return-left"></ion-icon>
|
||||
<ion-icon name="ios-return-right"></ion-icon>
|
||||
<ion-icon name="ios-reverse-camera"></ion-icon>
|
||||
<ion-icon name="ios-rewind"></ion-icon>
|
||||
<ion-icon name="ios-ribbon"></ion-icon>
|
||||
<ion-icon name="ios-rocket"></ion-icon>
|
||||
<ion-icon name="ios-rose"></ion-icon>
|
||||
<ion-icon name="ios-sad"></ion-icon>
|
||||
<ion-icon name="ios-save"></ion-icon>
|
||||
<ion-icon name="ios-school"></ion-icon>
|
||||
<ion-icon name="ios-search"></ion-icon>
|
||||
<ion-icon name="ios-send"></ion-icon>
|
||||
<ion-icon name="ios-settings"></ion-icon>
|
||||
<ion-icon name="ios-share-alt"></ion-icon>
|
||||
<ion-icon name="ios-share"></ion-icon>
|
||||
<ion-icon name="ios-shirt"></ion-icon>
|
||||
<ion-icon name="ios-shuffle"></ion-icon>
|
||||
<ion-icon name="ios-skip-backward"></ion-icon>
|
||||
<ion-icon name="ios-skip-forward"></ion-icon>
|
||||
<ion-icon name="ios-snow"></ion-icon>
|
||||
<ion-icon name="ios-speedometer"></ion-icon>
|
||||
<ion-icon name="ios-square-outline"></ion-icon>
|
||||
<ion-icon name="ios-square"></ion-icon>
|
||||
<ion-icon name="ios-star-half"></ion-icon>
|
||||
<ion-icon name="ios-star-outline"></ion-icon>
|
||||
<ion-icon name="ios-star"></ion-icon>
|
||||
<ion-icon name="ios-stats"></ion-icon>
|
||||
<ion-icon name="ios-stopwatch"></ion-icon>
|
||||
<ion-icon name="ios-subway"></ion-icon>
|
||||
<ion-icon name="ios-sunny"></ion-icon>
|
||||
<ion-icon name="ios-swap"></ion-icon>
|
||||
<ion-icon name="ios-switch"></ion-icon>
|
||||
<ion-icon name="ios-sync"></ion-icon>
|
||||
<ion-icon name="ios-tablet-landscape"></ion-icon>
|
||||
<ion-icon name="ios-tablet-portrait"></ion-icon>
|
||||
<ion-icon name="ios-tennisball"></ion-icon>
|
||||
<ion-icon name="ios-text"></ion-icon>
|
||||
<ion-icon name="ios-thermometer"></ion-icon>
|
||||
<ion-icon name="ios-thumbs-down"></ion-icon>
|
||||
<ion-icon name="ios-thumbs-up"></ion-icon>
|
||||
<ion-icon name="ios-thunderstorm"></ion-icon>
|
||||
<ion-icon name="ios-time"></ion-icon>
|
||||
<ion-icon name="ios-timer"></ion-icon>
|
||||
<ion-icon name="ios-today"></ion-icon>
|
||||
<ion-icon name="ios-train"></ion-icon>
|
||||
<ion-icon name="ios-transgender"></ion-icon>
|
||||
<ion-icon name="ios-trash"></ion-icon>
|
||||
<ion-icon name="ios-trending-down"></ion-icon>
|
||||
<ion-icon name="ios-trending-up"></ion-icon>
|
||||
<ion-icon name="ios-trophy"></ion-icon>
|
||||
<ion-icon name="ios-tv"></ion-icon>
|
||||
<ion-icon name="ios-umbrella"></ion-icon>
|
||||
<ion-icon name="ios-undo"></ion-icon>
|
||||
<ion-icon name="ios-unlock"></ion-icon>
|
||||
<ion-icon name="ios-videocam"></ion-icon>
|
||||
<ion-icon name="ios-volume-high"></ion-icon>
|
||||
<ion-icon name="ios-volume-low"></ion-icon>
|
||||
<ion-icon name="ios-volume-mute"></ion-icon>
|
||||
<ion-icon name="ios-volume-off"></ion-icon>
|
||||
<ion-icon name="ios-walk"></ion-icon>
|
||||
<ion-icon name="ios-wallet"></ion-icon>
|
||||
<ion-icon name="ios-warning"></ion-icon>
|
||||
<ion-icon name="ios-watch"></ion-icon>
|
||||
<ion-icon name="ios-water"></ion-icon>
|
||||
<ion-icon name="ios-wifi"></ion-icon>
|
||||
<ion-icon name="ios-wine"></ion-icon>
|
||||
<ion-icon name="ios-woman"></ion-icon>
|
||||
<ion-icon name="logo-android"></ion-icon>
|
||||
<ion-icon name="logo-angular"></ion-icon>
|
||||
<ion-icon name="logo-apple"></ion-icon>
|
||||
<ion-icon name="logo-bitbucket"></ion-icon>
|
||||
<ion-icon name="logo-bitcoin"></ion-icon>
|
||||
<ion-icon name="logo-buffer"></ion-icon>
|
||||
<ion-icon name="logo-chrome"></ion-icon>
|
||||
<ion-icon name="logo-closed-captioning"></ion-icon>
|
||||
<ion-icon name="logo-codepen"></ion-icon>
|
||||
<ion-icon name="logo-css3"></ion-icon>
|
||||
<ion-icon name="logo-designernews"></ion-icon>
|
||||
<ion-icon name="logo-dribbble"></ion-icon>
|
||||
<ion-icon name="logo-dropbox"></ion-icon>
|
||||
<ion-icon name="logo-euro"></ion-icon>
|
||||
<ion-icon name="logo-facebook"></ion-icon>
|
||||
<ion-icon name="logo-flickr"></ion-icon>
|
||||
<ion-icon name="logo-foursquare"></ion-icon>
|
||||
<ion-icon name="logo-freebsd-devil"></ion-icon>
|
||||
<ion-icon name="logo-game-controller-a"></ion-icon>
|
||||
<ion-icon name="logo-game-controller-b"></ion-icon>
|
||||
<ion-icon name="logo-github"></ion-icon>
|
||||
<ion-icon name="logo-google"></ion-icon>
|
||||
<ion-icon name="logo-googleplus"></ion-icon>
|
||||
<ion-icon name="logo-hackernews"></ion-icon>
|
||||
<ion-icon name="logo-html5"></ion-icon>
|
||||
<ion-icon name="logo-instagram"></ion-icon>
|
||||
<ion-icon name="logo-ionic"></ion-icon>
|
||||
<ion-icon name="logo-ionitron"></ion-icon>
|
||||
<ion-icon name="logo-javascript"></ion-icon>
|
||||
<ion-icon name="logo-linkedin"></ion-icon>
|
||||
<ion-icon name="logo-markdown"></ion-icon>
|
||||
<ion-icon name="logo-model-s"></ion-icon>
|
||||
<ion-icon name="logo-no-smoking"></ion-icon>
|
||||
<ion-icon name="logo-nodejs"></ion-icon>
|
||||
<ion-icon name="logo-npm"></ion-icon>
|
||||
<ion-icon name="logo-octocat"></ion-icon>
|
||||
<ion-icon name="logo-pinterest"></ion-icon>
|
||||
<ion-icon name="logo-playstation"></ion-icon>
|
||||
<ion-icon name="logo-polymer"></ion-icon>
|
||||
<ion-icon name="logo-python"></ion-icon>
|
||||
<ion-icon name="logo-reddit"></ion-icon>
|
||||
<ion-icon name="logo-rss"></ion-icon>
|
||||
<ion-icon name="logo-sass"></ion-icon>
|
||||
<ion-icon name="logo-skype"></ion-icon>
|
||||
<ion-icon name="logo-slack"></ion-icon>
|
||||
<ion-icon name="logo-snapchat"></ion-icon>
|
||||
<ion-icon name="logo-steam"></ion-icon>
|
||||
<ion-icon name="logo-tumblr"></ion-icon>
|
||||
<ion-icon name="logo-tux"></ion-icon>
|
||||
<ion-icon name="logo-twitch"></ion-icon>
|
||||
<ion-icon name="logo-twitter"></ion-icon>
|
||||
<ion-icon name="logo-usd"></ion-icon>
|
||||
<ion-icon name="logo-vimeo"></ion-icon>
|
||||
<ion-icon name="logo-vk"></ion-icon>
|
||||
<ion-icon name="logo-whatsapp"></ion-icon>
|
||||
<ion-icon name="logo-windows"></ion-icon>
|
||||
<ion-icon name="logo-wordpress"></ion-icon>
|
||||
<ion-icon name="logo-xbox"></ion-icon>
|
||||
<ion-icon name="logo-xing"></ion-icon>
|
||||
<ion-icon name="logo-yahoo"></ion-icon>
|
||||
<ion-icon name="logo-yen"></ion-icon>
|
||||
<ion-icon name="logo-youtube"></ion-icon>
|
||||
<ion-icon name="md-add-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-add-circle"></ion-icon>
|
||||
<ion-icon name="md-add"></ion-icon>
|
||||
<ion-icon name="md-airplane"></ion-icon>
|
||||
<ion-icon name="md-alarm"></ion-icon>
|
||||
<ion-icon name="md-albums"></ion-icon>
|
||||
<ion-icon name="md-alert"></ion-icon>
|
||||
<ion-icon name="md-american-football"></ion-icon>
|
||||
<ion-icon name="md-analytics"></ion-icon>
|
||||
<ion-icon name="md-aperture"></ion-icon>
|
||||
<ion-icon name="md-apps"></ion-icon>
|
||||
<ion-icon name="md-appstore"></ion-icon>
|
||||
<ion-icon name="md-archive"></ion-icon>
|
||||
<ion-icon name="md-arrow-back"></ion-icon>
|
||||
<ion-icon name="md-arrow-down"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropdown-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropdown"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropleft-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropleft"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropright-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropright"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropup-circle"></ion-icon>
|
||||
<ion-icon name="md-arrow-dropup"></ion-icon>
|
||||
<ion-icon name="md-arrow-forward"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-back"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-down"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-forward"></ion-icon>
|
||||
<ion-icon name="md-arrow-round-up"></ion-icon>
|
||||
<ion-icon name="md-arrow-up"></ion-icon>
|
||||
<ion-icon name="md-at"></ion-icon>
|
||||
<ion-icon name="md-attach"></ion-icon>
|
||||
<ion-icon name="md-backspace"></ion-icon>
|
||||
<ion-icon name="md-barcode"></ion-icon>
|
||||
<ion-icon name="md-baseball"></ion-icon>
|
||||
<ion-icon name="md-basket"></ion-icon>
|
||||
<ion-icon name="md-basketball"></ion-icon>
|
||||
<ion-icon name="md-battery-charging"></ion-icon>
|
||||
<ion-icon name="md-battery-dead"></ion-icon>
|
||||
<ion-icon name="md-battery-full"></ion-icon>
|
||||
<ion-icon name="md-beaker"></ion-icon>
|
||||
<ion-icon name="md-bed"></ion-icon>
|
||||
<ion-icon name="md-beer"></ion-icon>
|
||||
<ion-icon name="md-bicycle"></ion-icon>
|
||||
<ion-icon name="md-bluetooth"></ion-icon>
|
||||
<ion-icon name="md-boat"></ion-icon>
|
||||
<ion-icon name="md-body"></ion-icon>
|
||||
<ion-icon name="md-bonfire"></ion-icon>
|
||||
<ion-icon name="md-book"></ion-icon>
|
||||
<ion-icon name="md-bookmark"></ion-icon>
|
||||
<ion-icon name="md-bookmarks"></ion-icon>
|
||||
<ion-icon name="md-bowtie"></ion-icon>
|
||||
<ion-icon name="md-briefcase"></ion-icon>
|
||||
<ion-icon name="md-browsers"></ion-icon>
|
||||
<ion-icon name="md-brush"></ion-icon>
|
||||
<ion-icon name="md-bug"></ion-icon>
|
||||
<ion-icon name="md-build"></ion-icon>
|
||||
<ion-icon name="md-bulb"></ion-icon>
|
||||
<ion-icon name="md-bus"></ion-icon>
|
||||
<ion-icon name="md-business"></ion-icon>
|
||||
<ion-icon name="md-cafe"></ion-icon>
|
||||
<ion-icon name="md-calculator"></ion-icon>
|
||||
<ion-icon name="md-calendar"></ion-icon>
|
||||
<ion-icon name="md-call"></ion-icon>
|
||||
<ion-icon name="md-camera"></ion-icon>
|
||||
<ion-icon name="md-car"></ion-icon>
|
||||
<ion-icon name="md-card"></ion-icon>
|
||||
<ion-icon name="md-cart"></ion-icon>
|
||||
<ion-icon name="md-cash"></ion-icon>
|
||||
<ion-icon name="md-cellular"></ion-icon>
|
||||
<ion-icon name="md-chatboxes"></ion-icon>
|
||||
<ion-icon name="md-chatbubbles"></ion-icon>
|
||||
<ion-icon name="md-checkbox-outline"></ion-icon>
|
||||
<ion-icon name="md-checkbox"></ion-icon>
|
||||
<ion-icon name="md-checkmark-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-checkmark-circle"></ion-icon>
|
||||
<ion-icon name="md-checkmark"></ion-icon>
|
||||
<ion-icon name="md-clipboard"></ion-icon>
|
||||
<ion-icon name="md-clock"></ion-icon>
|
||||
<ion-icon name="md-close-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-close-circle"></ion-icon>
|
||||
<ion-icon name="md-close"></ion-icon>
|
||||
<ion-icon name="md-cloud-circle"></ion-icon>
|
||||
<ion-icon name="md-cloud-done"></ion-icon>
|
||||
<ion-icon name="md-cloud-download"></ion-icon>
|
||||
<ion-icon name="md-cloud-outline"></ion-icon>
|
||||
<ion-icon name="md-cloud-upload"></ion-icon>
|
||||
<ion-icon name="md-cloud"></ion-icon>
|
||||
<ion-icon name="md-cloudy-night"></ion-icon>
|
||||
<ion-icon name="md-cloudy"></ion-icon>
|
||||
<ion-icon name="md-code-download"></ion-icon>
|
||||
<ion-icon name="md-code-working"></ion-icon>
|
||||
<ion-icon name="md-code"></ion-icon>
|
||||
<ion-icon name="md-cog"></ion-icon>
|
||||
<ion-icon name="md-color-fill"></ion-icon>
|
||||
<ion-icon name="md-color-filter"></ion-icon>
|
||||
<ion-icon name="md-color-palette"></ion-icon>
|
||||
<ion-icon name="md-color-wand"></ion-icon>
|
||||
<ion-icon name="md-compass"></ion-icon>
|
||||
<ion-icon name="md-construct"></ion-icon>
|
||||
<ion-icon name="md-contact"></ion-icon>
|
||||
<ion-icon name="md-contacts"></ion-icon>
|
||||
<ion-icon name="md-contract"></ion-icon>
|
||||
<ion-icon name="md-contrast"></ion-icon>
|
||||
<ion-icon name="md-copy"></ion-icon>
|
||||
<ion-icon name="md-create"></ion-icon>
|
||||
<ion-icon name="md-crop"></ion-icon>
|
||||
<ion-icon name="md-cube"></ion-icon>
|
||||
<ion-icon name="md-cut"></ion-icon>
|
||||
<ion-icon name="md-desktop"></ion-icon>
|
||||
<ion-icon name="md-disc"></ion-icon>
|
||||
<ion-icon name="md-document"></ion-icon>
|
||||
<ion-icon name="md-done-all"></ion-icon>
|
||||
<ion-icon name="md-download"></ion-icon>
|
||||
<ion-icon name="md-easel"></ion-icon>
|
||||
<ion-icon name="md-egg"></ion-icon>
|
||||
<ion-icon name="md-exit"></ion-icon>
|
||||
<ion-icon name="md-expand"></ion-icon>
|
||||
<ion-icon name="md-eye-off"></ion-icon>
|
||||
<ion-icon name="md-eye"></ion-icon>
|
||||
<ion-icon name="md-fastforward"></ion-icon>
|
||||
<ion-icon name="md-female"></ion-icon>
|
||||
<ion-icon name="md-filing"></ion-icon>
|
||||
<ion-icon name="md-film"></ion-icon>
|
||||
<ion-icon name="md-finger-print"></ion-icon>
|
||||
<ion-icon name="md-fitness"></ion-icon>
|
||||
<ion-icon name="md-flag"></ion-icon>
|
||||
<ion-icon name="md-flame"></ion-icon>
|
||||
<ion-icon name="md-flash-off"></ion-icon>
|
||||
<ion-icon name="md-flash"></ion-icon>
|
||||
<ion-icon name="md-flashlight"></ion-icon>
|
||||
<ion-icon name="md-flask"></ion-icon>
|
||||
<ion-icon name="md-flower"></ion-icon>
|
||||
<ion-icon name="md-folder-open"></ion-icon>
|
||||
<ion-icon name="md-folder"></ion-icon>
|
||||
<ion-icon name="md-football"></ion-icon>
|
||||
<ion-icon name="md-funnel"></ion-icon>
|
||||
<ion-icon name="md-gift"></ion-icon>
|
||||
<ion-icon name="md-git-branch"></ion-icon>
|
||||
<ion-icon name="md-git-commit"></ion-icon>
|
||||
<ion-icon name="md-git-compare"></ion-icon>
|
||||
<ion-icon name="md-git-merge"></ion-icon>
|
||||
<ion-icon name="md-git-network"></ion-icon>
|
||||
<ion-icon name="md-git-pull-request"></ion-icon>
|
||||
<ion-icon name="md-glasses"></ion-icon>
|
||||
<ion-icon name="md-globe"></ion-icon>
|
||||
<ion-icon name="md-grid"></ion-icon>
|
||||
<ion-icon name="md-hammer"></ion-icon>
|
||||
<ion-icon name="md-hand"></ion-icon>
|
||||
<ion-icon name="md-happy"></ion-icon>
|
||||
<ion-icon name="md-headset"></ion-icon>
|
||||
<ion-icon name="md-heart-dislike"></ion-icon>
|
||||
<ion-icon name="md-heart-empty"></ion-icon>
|
||||
<ion-icon name="md-heart-half"></ion-icon>
|
||||
<ion-icon name="md-heart"></ion-icon>
|
||||
<ion-icon name="md-help-buoy"></ion-icon>
|
||||
<ion-icon name="md-help-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-help-circle"></ion-icon>
|
||||
<ion-icon name="md-help"></ion-icon>
|
||||
<ion-icon name="md-home"></ion-icon>
|
||||
<ion-icon name="md-hourglass"></ion-icon>
|
||||
<ion-icon name="md-ice-cream"></ion-icon>
|
||||
<ion-icon name="md-image"></ion-icon>
|
||||
<ion-icon name="md-images"></ion-icon>
|
||||
<ion-icon name="md-infinite"></ion-icon>
|
||||
<ion-icon name="md-information-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-information-circle"></ion-icon>
|
||||
<ion-icon name="md-information"></ion-icon>
|
||||
<ion-icon name="md-jet"></ion-icon>
|
||||
<ion-icon name="md-journal"></ion-icon>
|
||||
<ion-icon name="md-key"></ion-icon>
|
||||
<ion-icon name="md-keypad"></ion-icon>
|
||||
<ion-icon name="md-laptop"></ion-icon>
|
||||
<ion-icon name="md-leaf"></ion-icon>
|
||||
<ion-icon name="md-link"></ion-icon>
|
||||
<ion-icon name="md-list-box"></ion-icon>
|
||||
<ion-icon name="md-list"></ion-icon>
|
||||
<ion-icon name="md-locate"></ion-icon>
|
||||
<ion-icon name="md-lock"></ion-icon>
|
||||
<ion-icon name="md-log-in"></ion-icon>
|
||||
<ion-icon name="md-log-out"></ion-icon>
|
||||
<ion-icon name="md-magnet"></ion-icon>
|
||||
<ion-icon name="md-mail-open"></ion-icon>
|
||||
<ion-icon name="md-mail-unread"></ion-icon>
|
||||
<ion-icon name="md-mail"></ion-icon>
|
||||
<ion-icon name="md-male"></ion-icon>
|
||||
<ion-icon name="md-man"></ion-icon>
|
||||
<ion-icon name="md-map"></ion-icon>
|
||||
<ion-icon name="md-medal"></ion-icon>
|
||||
<ion-icon name="md-medical"></ion-icon>
|
||||
<ion-icon name="md-medkit"></ion-icon>
|
||||
<ion-icon name="md-megaphone"></ion-icon>
|
||||
<ion-icon name="md-menu"></ion-icon>
|
||||
<ion-icon name="md-mic-off"></ion-icon>
|
||||
<ion-icon name="md-mic"></ion-icon>
|
||||
<ion-icon name="md-microphone"></ion-icon>
|
||||
<ion-icon name="md-moon"></ion-icon>
|
||||
<ion-icon name="md-more"></ion-icon>
|
||||
<ion-icon name="md-move"></ion-icon>
|
||||
<ion-icon name="md-musical-note"></ion-icon>
|
||||
<ion-icon name="md-musical-notes"></ion-icon>
|
||||
<ion-icon name="md-navigate"></ion-icon>
|
||||
<ion-icon name="md-notifications-off"></ion-icon>
|
||||
<ion-icon name="md-notifications-outline"></ion-icon>
|
||||
<ion-icon name="md-notifications"></ion-icon>
|
||||
<ion-icon name="md-nuclear"></ion-icon>
|
||||
<ion-icon name="md-nutrition"></ion-icon>
|
||||
<ion-icon name="md-open"></ion-icon>
|
||||
<ion-icon name="md-options"></ion-icon>
|
||||
<ion-icon name="md-outlet"></ion-icon>
|
||||
<ion-icon name="md-paper-plane"></ion-icon>
|
||||
<ion-icon name="md-paper"></ion-icon>
|
||||
<ion-icon name="md-partly-sunny"></ion-icon>
|
||||
<ion-icon name="md-pause"></ion-icon>
|
||||
<ion-icon name="md-paw"></ion-icon>
|
||||
<ion-icon name="md-people"></ion-icon>
|
||||
<ion-icon name="md-person-add"></ion-icon>
|
||||
<ion-icon name="md-person"></ion-icon>
|
||||
<ion-icon name="md-phone-landscape"></ion-icon>
|
||||
<ion-icon name="md-phone-portrait"></ion-icon>
|
||||
<ion-icon name="md-photos"></ion-icon>
|
||||
<ion-icon name="md-pie"></ion-icon>
|
||||
<ion-icon name="md-pin"></ion-icon>
|
||||
<ion-icon name="md-pint"></ion-icon>
|
||||
<ion-icon name="md-pizza"></ion-icon>
|
||||
<ion-icon name="md-planet"></ion-icon>
|
||||
<ion-icon name="md-play-circle"></ion-icon>
|
||||
<ion-icon name="md-play"></ion-icon>
|
||||
<ion-icon name="md-podium"></ion-icon>
|
||||
<ion-icon name="md-power"></ion-icon>
|
||||
<ion-icon name="md-pricetag"></ion-icon>
|
||||
<ion-icon name="md-pricetags"></ion-icon>
|
||||
<ion-icon name="md-print"></ion-icon>
|
||||
<ion-icon name="md-pulse"></ion-icon>
|
||||
<ion-icon name="md-qr-scanner"></ion-icon>
|
||||
<ion-icon name="md-quote"></ion-icon>
|
||||
<ion-icon name="md-radio-button-off"></ion-icon>
|
||||
<ion-icon name="md-radio-button-on"></ion-icon>
|
||||
<ion-icon name="md-radio"></ion-icon>
|
||||
<ion-icon name="md-rainy"></ion-icon>
|
||||
<ion-icon name="md-recording"></ion-icon>
|
||||
<ion-icon name="md-redo"></ion-icon>
|
||||
<ion-icon name="md-refresh-circle"></ion-icon>
|
||||
<ion-icon name="md-refresh"></ion-icon>
|
||||
<ion-icon name="md-remove-circle-outline"></ion-icon>
|
||||
<ion-icon name="md-remove-circle"></ion-icon>
|
||||
<ion-icon name="md-remove"></ion-icon>
|
||||
<ion-icon name="md-reorder"></ion-icon>
|
||||
<ion-icon name="md-repeat"></ion-icon>
|
||||
<ion-icon name="md-resize"></ion-icon>
|
||||
<ion-icon name="md-restaurant"></ion-icon>
|
||||
<ion-icon name="md-return-left"></ion-icon>
|
||||
<ion-icon name="md-return-right"></ion-icon>
|
||||
<ion-icon name="md-reverse-camera"></ion-icon>
|
||||
<ion-icon name="md-rewind"></ion-icon>
|
||||
<ion-icon name="md-ribbon"></ion-icon>
|
||||
<ion-icon name="md-rocket"></ion-icon>
|
||||
<ion-icon name="md-rose"></ion-icon>
|
||||
<ion-icon name="md-sad"></ion-icon>
|
||||
<ion-icon name="md-save"></ion-icon>
|
||||
<ion-icon name="md-school"></ion-icon>
|
||||
<ion-icon name="md-search"></ion-icon>
|
||||
<ion-icon name="md-send"></ion-icon>
|
||||
<ion-icon name="md-settings"></ion-icon>
|
||||
<ion-icon name="md-share-alt"></ion-icon>
|
||||
<ion-icon name="md-share"></ion-icon>
|
||||
<ion-icon name="md-shirt"></ion-icon>
|
||||
<ion-icon name="md-shuffle"></ion-icon>
|
||||
<ion-icon name="md-skip-backward"></ion-icon>
|
||||
<ion-icon name="md-skip-forward"></ion-icon>
|
||||
<ion-icon name="md-snow"></ion-icon>
|
||||
<ion-icon name="md-speedometer"></ion-icon>
|
||||
<ion-icon name="md-square-outline"></ion-icon>
|
||||
<ion-icon name="md-square"></ion-icon>
|
||||
<ion-icon name="md-star-half"></ion-icon>
|
||||
<ion-icon name="md-star-outline"></ion-icon>
|
||||
<ion-icon name="md-star"></ion-icon>
|
||||
<ion-icon name="md-stats"></ion-icon>
|
||||
<ion-icon name="md-stopwatch"></ion-icon>
|
||||
<ion-icon name="md-subway"></ion-icon>
|
||||
<ion-icon name="md-sunny"></ion-icon>
|
||||
<ion-icon name="md-swap"></ion-icon>
|
||||
<ion-icon name="md-switch"></ion-icon>
|
||||
<ion-icon name="md-sync"></ion-icon>
|
||||
<ion-icon name="md-tablet-landscape"></ion-icon>
|
||||
<ion-icon name="md-tablet-portrait"></ion-icon>
|
||||
<ion-icon name="md-tennisball"></ion-icon>
|
||||
<ion-icon name="md-text"></ion-icon>
|
||||
<ion-icon name="md-thermometer"></ion-icon>
|
||||
<ion-icon name="md-thumbs-down"></ion-icon>
|
||||
<ion-icon name="md-thumbs-up"></ion-icon>
|
||||
<ion-icon name="md-thunderstorm"></ion-icon>
|
||||
<ion-icon name="md-time"></ion-icon>
|
||||
<ion-icon name="md-timer"></ion-icon>
|
||||
<ion-icon name="md-today"></ion-icon>
|
||||
<ion-icon name="md-train"></ion-icon>
|
||||
<ion-icon name="md-transgender"></ion-icon>
|
||||
<ion-icon name="md-trash"></ion-icon>
|
||||
<ion-icon name="md-trending-down"></ion-icon>
|
||||
<ion-icon name="md-trending-up"></ion-icon>
|
||||
<ion-icon name="md-trophy"></ion-icon>
|
||||
<ion-icon name="md-tv"></ion-icon>
|
||||
<ion-icon name="md-umbrella"></ion-icon>
|
||||
<ion-icon name="md-undo"></ion-icon>
|
||||
<ion-icon name="md-unlock"></ion-icon>
|
||||
<ion-icon name="md-videocam"></ion-icon>
|
||||
<ion-icon name="md-volume-high"></ion-icon>
|
||||
<ion-icon name="md-volume-low"></ion-icon>
|
||||
<ion-icon name="md-volume-mute"></ion-icon>
|
||||
<ion-icon name="md-volume-off"></ion-icon>
|
||||
<ion-icon name="md-walk"></ion-icon>
|
||||
<ion-icon name="md-wallet"></ion-icon>
|
||||
<ion-icon name="md-warning"></ion-icon>
|
||||
<ion-icon name="md-watch"></ion-icon>
|
||||
<ion-icon name="md-water"></ion-icon>
|
||||
<ion-icon name="md-wifi"></ion-icon>
|
||||
<ion-icon name="md-wine"></ion-icon>
|
||||
<ion-icon name="md-woman"></ion-icon>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
font-size: 32px;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.custom {
|
||||
stroke: red;
|
||||
fill: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,2 +0,0 @@
|
||||
export { addIcons } from './icon/utils';
|
||||
export * from './components';
|
||||
+6898
-2338
File diff suppressed because it is too large
Load Diff
+133
@@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html>
|
||||
<html dir="ltr" lang="en" mode="ios">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
|
||||
<title>Ionicons Icon Component</title>
|
||||
<script type="module" src="/build/ionicons.esm.js"></script>
|
||||
<script nomodule src="/build/ionicons.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<h1>Ionicons</h1>
|
||||
|
||||
<h2>Default</h2>
|
||||
<ion-icon name="cellular"></ion-icon>
|
||||
<ion-icon name="at"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="football"></ion-icon>
|
||||
<ion-icon name="analytics"></ion-icon>
|
||||
<ion-icon name="grid"></ion-icon>
|
||||
<ion-icon name="funnel"></ion-icon>
|
||||
<ion-icon name="watch"></ion-icon>
|
||||
<ion-icon name="add-circle-outline"></ion-icon>
|
||||
|
||||
<h2>Mode from html ios mode attribute</h2>
|
||||
<ion-icon md="logo-android-outline" ios="logo-apple-outline"></ion-icon>
|
||||
<ion-icon md="logo-android-outline" ios="logo-apple-outline"></ion-icon>
|
||||
|
||||
<h2>Mode set on icon</h2>
|
||||
<ion-icon mode="ios" md="logo-android-outline" ios="logo-apple-outline"></ion-icon>
|
||||
<ion-icon mode="md" md="logo-android-outline" ios="logo-apple-outline"></ion-icon>
|
||||
|
||||
<h2>Colors</h2>
|
||||
<ion-icon color="primary" name="cellular"></ion-icon>
|
||||
<ion-icon color="secondary" name="at"></ion-icon>
|
||||
<ion-icon color="tertiary" name="call"></ion-icon>
|
||||
<ion-icon color="success" name="football"></ion-icon>
|
||||
<ion-icon color="warning" name="analytics"></ion-icon>
|
||||
<ion-icon color="danger" name="grid"></ion-icon>
|
||||
<ion-icon color="light" name="funnel"></ion-icon>
|
||||
<ion-icon color="medium" name="watch"></ion-icon>
|
||||
<ion-icon color="dark" name="switch"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs</h2>
|
||||
<ion-icon src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom SVGs: colors</h2>
|
||||
<ion-icon color="primary" src="./assets/bug_report.svg"></ion-icon>
|
||||
<ion-icon color="secondary" src="./assets/chat.svg"></ion-icon>
|
||||
<ion-icon color="tertiary" src="./assets/commute.svg"></ion-icon>
|
||||
<ion-icon color="success" src="./assets/copyright.svg"></ion-icon>
|
||||
<ion-icon color="warning" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon color="danger" src="./assets/lock_open.svg"></ion-icon>
|
||||
<ion-icon color="light" src="./assets/toll.svg"></ion-icon>
|
||||
<ion-icon color="medium" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon color="dark" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h2>Custom CSS</h2>
|
||||
<ion-icon class="custom" name="grid"></ion-icon>
|
||||
<ion-icon class="custom" name="funnel"></ion-icon>
|
||||
<ion-icon class="custom" name="watch"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-react-outline"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-javascript-outline"></ion-icon>
|
||||
<ion-icon class="custom" name="logo-angular-outline"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/done_all.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/web_asset.svg"></ion-icon>
|
||||
<ion-icon class="custom" src="./assets/work_outline.svg"></ion-icon>
|
||||
|
||||
<h1>RTL</h1>
|
||||
|
||||
<h2>Default: Non-arrows</h2>
|
||||
<ion-icon name="cut"></ion-icon>
|
||||
<ion-icon name="call"></ion-icon>
|
||||
<ion-icon name="checkbox"></ion-icon>
|
||||
<ion-icon name="brush"></ion-icon>
|
||||
|
||||
<h2>Flip: Non-arrows</h2>
|
||||
<ion-icon name="cut" flip-rtl></ion-icon>
|
||||
<ion-icon name="call" flip-rtl></ion-icon>
|
||||
<ion-icon name="checkbox" flip-rtl></ion-icon>
|
||||
<ion-icon name="brush" flip-rtl></ion-icon>
|
||||
|
||||
<h2>Auto Flip: arrows</h2>
|
||||
<ion-icon name="arrow-up"></ion-icon>
|
||||
<ion-icon name="arrow-forward"></ion-icon>
|
||||
<ion-icon name="arrow-down"></ion-icon>
|
||||
<ion-icon name="arrow-back"></ion-icon>
|
||||
|
||||
<h2>Un-flip: arrows</h2>
|
||||
<ion-icon name="arrow-up" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-forward" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-down" flip-rtl="false"></ion-icon>
|
||||
<ion-icon name="arrow-back" flip-rtl="false"></ion-icon>
|
||||
|
||||
<p>
|
||||
<a href="./cheatsheet.html">Cheatsheet</a>
|
||||
</p>
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 16px;
|
||||
font-size: 32px;
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin: 15px 0 5px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.custom {
|
||||
stroke: red;
|
||||
fill: blue;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,2 @@
|
||||
export { addIcons } from './components/icon/utils';
|
||||
export * from './components';
|
||||
+4
-8
@@ -2,11 +2,10 @@ import { Config } from '@stencil/core';
|
||||
|
||||
export const config: Config = {
|
||||
namespace: 'ionicons',
|
||||
srcDir: 'src/components/',
|
||||
globalScript: 'src/components/global.ts',
|
||||
outputTargets: [
|
||||
{
|
||||
type: 'dist',
|
||||
empty: false
|
||||
},
|
||||
{
|
||||
type: 'docs-readme'
|
||||
@@ -15,14 +14,11 @@ export const config: Config = {
|
||||
type: 'www',
|
||||
copy: [
|
||||
{
|
||||
src: '../svg/',
|
||||
dest: './build/svg/'
|
||||
},
|
||||
{
|
||||
src: './test/*.svg',
|
||||
src: './components/test/*.svg',
|
||||
dest: './assets/'
|
||||
}
|
||||
]
|
||||
],
|
||||
empty: false
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
{
|
||||
"extends": "tslint-ionic-rules",
|
||||
"rules": {
|
||||
"no-conditional-assignment": false,
|
||||
"no-non-null-assertion": false,
|
||||
"no-unnecessary-type-assertion": false,
|
||||
"prefer-for-of": false,
|
||||
"no-import-side-effect": false,
|
||||
"ordered-imports": [true, {
|
||||
"named-imports-order": "lowercase-last"
|
||||
}]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user