nolimits4web/framework7-icons
Composer 安装命令:
composer require nolimits4web/framework7-icons
包简介
Free iOS-icons font for Framework7
README 文档
README
Framework7 Icons
The premium and free iOS-icons font for Framework7.
The font is developed to be used with Framework7, but you can use it wherever you see it fits, personal or commercial. It is free to use and licensed under MIT.
Getting Started
-
Download and extract the font pack
-
Copy the
framework7-icons.cssto your project or add this CSS to your own CSS file:@font-face { font-family: 'Framework7 Icons'; font-style: normal; font-weight: 400; src: local('Framework7 Icons'), local('Framework7Icons-Regular'), url('../fonts/Framework7Icons-Regular.woff2') format('woff2'), url('../fonts/Framework7Icons-Regular.woff') format('woff'), url('../fonts/Framework7Icons-Regular.ttf') format('truetype'); } .f7-icons, .framework7-icons { font-family: 'Framework7 Icons'; font-weight: normal; font-style: normal; font-size: 28px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; -moz-osx-font-smoothing: grayscale; -webkit-font-feature-settings: 'liga'; -moz-font-feature-settings: 'liga=1'; -moz-font-feature-settings: 'liga'; font-feature-settings: 'liga'; }
-
Copy the
fontsfolder to your project -
Ensure the font urls within
framework7-icons.cssproperly reference thefontspath within your project. -
Include a reference to the
framework7-icons.cssfile from every webpage you need to use it:<link rel="stylesheet" href="path/to/framework7-icons.css" />
Or with component:
$ component install framework7io/framework7-icons
Or with bower:
$ bower install framework7-icons
Or with npm:
$ npm install framework7-icons
Webpack
When using webpack, you must add loaders for css and fonts.
{ test: /\.css/, loader: 'style-loader!css-loader' }, { test: /\.(woff|woff2|ttf)$/, loader: 'url-loader?limit=100000' },
Then you can import the module like so:
import 'framework7-icons';
HTML Example
You can use framework7.io or included cheatsheet.html file to easily find the icon you want to use. It’s easy to incorporate icons into your web page. Here’s a small example:
<i class="f7-icons">house</i>
This example uses a typographic feature called ligatures, which allows rendering of an icon glyph simply by using its textual name. The replacement is done automatically by the web browser and provides more readable code than the equivalent numeric character reference.
Styling Icons
Sizing
Framework7 Icons look best at 28px, but if an icon needs to be displayed in an alternative size, just use CSS font-size rule:
.size-14 { font-size: 14px; } .size-28 { font-size: 28px; } .size-32 { font-size: 32px; } .size-56 { font-size: 56px; }
<i class="f7-icons size-14">house</i> <i class="f7-icons size-28">house</i> <i class="f7-icons size-32">house</i> <i class="f7-icons size-56">house</i>
Coloring
Using the icon font allows for easy styling of an icon in any color.
.color-black { color: #000; } .color-white { color: #fff; }
<i class="icon f7-icons color-black">house</i> <i class="icon f7-icons color-white">house</i>
Using in data- attributes
Add the following CSS rule:
.f7-icons[data-icon]:before { content: attr(data-icon); color: inherit; }
And now you can use it with data- attributes:
<i class="f7-icons" data-icon="house"></i>
SVG Components
Since v 4.0.0 there are pure SVG components available for React, Svelte and Vue.
In React:
import { House, HeartCircle } from 'framework7-icons/react'; export default () { // ... return ( <div> <House /> ... <HeartCircle /> </div> ) }
In Svelte:
<div> ... <House /> ... <HeartCircle /> ... </div> <script> import { House, HeartCircle } from 'framework7-icons/svelte'; // ... </script>
In Vue:
<template> <div> ... <f7-house /> ... <f7-heart-circle /> ... </div> </template> <script> import { House, HeartCircle } from 'framework7-icons/vue'; export default { components: { f7House: House, f7HeartCircle: HeartCircle, }, ... } </script>
Build Instructions
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 and woff2:
-
Install FontForge, which is the program that creates the font files from the SVG files:
$ brew install fontforge ttfautohint
-
Install woff2
$ git clone --recursive https://github.com/google/woff2.git $ cd woff2 $ make clean all
-
Add or subtract files from the
src/folder you'd like to be apart of the font files. -
Run the build command:
python ./build/generate.py
License
Framework7 Icons font is licensed under the MIT license.
nolimits4web/framework7-icons 适用场景与选型建议
nolimits4web/framework7-icons 是一款 基于 HTML 开发的 Composer 扩展包,目前已累计 50 次下载、GitHub Stars 达 226, 最近一次更新时间为 2016 年 10 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「fonts」 「ios」 「icons」 「icon font」 「web font」 「framework7」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nolimits4web/framework7-icons 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nolimits4web/framework7-icons 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nolimits4web/framework7-icons 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Generate Apple Passbooks from your Symfony application
PHP framework for easy interaction with Apple's Push Notification Service.
A simple library to decode and parse Apple Sign In client tokens.
Automatically preload fonts from the Sage mix manifest
A simple library of SVG page type icons for enhancing your SilverStripe CMS interface.
Firebase cloud messaging http v1 php
统计信息
- 总下载量: 50
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 228
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-10-29