pax_global_header00006660000000000000000000000064122753552660014527gustar00rootroot0000000000000052 comment=2821d8b3b5c9aea7a7dd6cd2fa330a38beed797d drupal7-mod-fontawesome-1.0/000077500000000000000000000000001227535526600160475ustar00rootroot00000000000000drupal7-mod-fontawesome-1.0/README.txt000066400000000000000000000023021227535526600175420ustar00rootroot00000000000000 CONTENTS OF THIS FILE --------------------- * Introduction * Installation * Credits INTRODUCTION ------------ Font Awesome is the iconic font designed for use with Twitter Bootstrap. http://fortawesome.github.com/Font-Awesome/ "fontawesome" provides integration of "Font Awesome" with Drupal. Once enabled "Font Awesome" icon fonts could be used as:- 1) Within HTML (node/block/view/panel):- Inside HTML you can place Font Awesome icons just about anywhere with the tag. E.g:- "Font Awesome 4.0.3" you can use like :- Example for Info Icon See more examples of using "Font Awesome" within HTML at:- http://fortawesome.github.io/Font-Awesome/examples/ 2) With "Icon API" module This module adds support for "Icon API" (https://drupal.org/project/icon) INSTALLATION ------------ 1. Download & extract "Font-Awesome" from http://fortawesome.github.com/Font-Awesome/ and place inside "sites/all/libraries/fontawesome" directory. CSS file should be sites/all/libraries/fontawesome/css/font-awesome.css 2. Enable the module at Administer >> Site building >> Modules. CREDITS ------- * Rob Loach (RobLoach) http://robloach.net * Inder Singh (inders) http://indersingh.comdrupal7-mod-fontawesome-1.0/fontawesome.info000066400000000000000000000003161227535526600212530ustar00rootroot00000000000000name = Font Awesome description = Iconic font designed for use with Twitter Bootstrap. core = 7.x php = 5 dependencies[] = libraries (>=7.x-2.0) files[] = fontawesome.install files[] = fontawesome.module drupal7-mod-fontawesome-1.0/fontawesome.install000066400000000000000000000013121227535526600217630ustar00rootroot00000000000000 $fontawesome['name'], 'severity' => $fontawesome['installed'] ? REQUIREMENT_OK : REQUIREMENT_WARNING, 'value' => $fontawesome['installed'] ? $fontawesome['version'] : $fontawesome['error message'], ); } return $requirements; } drupal7-mod-fontawesome-1.0/fontawesome.module000066400000000000000000000463631227535526600216210ustar00rootroot00000000000000' . t('Font Awesome is an iconic font designed for use with Twitter Bootstrap.', array( '@fontawesome' => 'http://fortawesome.github.com/Font-Awesome/', '@bootstrap' => 'http://twitter.github.com/bootstrap', )) . '

'; } } /** * Implements hook_init(). */ function fontawesome_init() { // Load up the Font Awesome CSS file. drupal_load('module', 'libraries'); libraries_load('fontawesome'); } /** * Implements hook_libraries_info(). */ function fontawesome_libraries_info() { $libraries['fontawesome'] = array( 'name' => 'Font Awesome', 'vendor url' => 'http://fortawesome.github.com/Font-Awesome/', 'download url' => 'https://github.com/FortAwesome/Font-Awesome/zipball/master', 'version arguments' => array( 'file' => 'css/font-awesome.css', 'pattern' => '/((?:\d+\.?){2,3})/', 'lines' => 10, 'cols' => 14, ), 'files' => array( 'css' => array( 'css/font-awesome.css', ), ), ); return $libraries; } /** * Implements hook_icon_providers(). */ function fontawesome_icon_providers() { $providers['fontawesome'] = array( 'title' => t('fontawesome'), 'url' => 'http://fontawesome.io', 'default bundle' => array( 'render' => 'html_tag', 'settings' => fontawesome_default_settings(), ), ); return $providers; } /** * Provide default bundle settings. */ function fontawesome_default_settings() { return array( 'tag' => 'i', ); } /** * Implements hook_icon_bundle_configure(). */ function fontawesome_icon_bundle_configure(&$settings, &$form_state, &$complete_form) { $bundle = $form_state['bundle']; if ($bundle['provider'] === 'fontawesome') { $settings['tag'] = array( '#type' => 'select', '#title' => t('HTML Markup'), '#description' => t('Choose the HTML markup tag that Font Awesome icons should be created with. Typically, this is an %i tag, however it can be changed to suite the theme requirements.', array('%i' => '')), '#options' => drupal_map_assoc(array('i', 'span', 'div')), '#default_value' => isset($bundle['settings']['tag']) ? $bundle['settings']['tag'] : 'span', ); } } /** * Define render hook information. * * @see hook_icon_render_hooks() */ function fontawesome_icon_render_hooks() { $hooks['html_tag'] = array(); return $hooks; } /** * Implements hook_preprocess_icon(). */ function fontawesome_preprocess_icon(&$variables) { if (!empty($variables['bundle']['provider']) && $variables['bundle']['provider'] === 'fontawesome') { $variables['attributes']['class'][] = 'fa'; } } /** * @desc Implements hook_preprocess_icon_RENDER_HOOK(). */ function fontawesome_preprocess_icon_html_tag(&$variables) { $bundle = &$variables['bundle']; $icon = &$variables['icon']; // Sanitize and add icon class here. $class = drupal_html_class($icon); $library = libraries_load('fontawesome'); $lib_class = 'icon'; if(isset($library['version']) && floor($library['version'])>3){ $lib_class = 'fa'; } $variables['attributes']['class'][] = $lib_class . ' ' . $lib_class . '-' . $class; } /** * @desc return HTML tag emement with fontawesome icon classed * @param $variables * @return */ function theme_icon_html_tag($variables) { $output = ''; $bundle = $variables['bundle']; $icon = $variables['icon']; $output = theme('html_tag', array( 'element' => array( '#tag' => isset($bundle['settings']['tag']) ? $bundle['settings']['tag'] : 'span', '#attributes' => $variables['attributes'], '#value' =>' ', ), )); return $output; } /**@TODO: Grab these icons from css/Json file. * @desc Implements hook_icon_bundles(). */ function fontawesome_icon_bundles() { $bundles['fontawesome'] = array( 'render' => 'html_tag', 'provider' => 'fontawesome', 'title' => t('FontAwsome: Icons'), 'icons' => array( 'rub' => 'rub', 'ruble' => 'ruble', 'rouble' => 'rouble', 'pagelines' => 'pagelines', 'stack-exchange' => 'stack-exchange', 'arrow-circle-o-right' => 'arrow-circle-o-right', 'arrow-circle-o-left' => 'arrow-circle-o-left', 'caret-square-o-left' => 'caret-square-o-left', 'toggle-left' => 'toggle-left', 'dot-circle-o' => 'dot-circle-o', 'wheelchair' => 'wheelchair', 'vimeo-square' => 'vimeo-square', 'try' => 'try', 'turkish-lira' => 'turkish-lira', 'plus-square-o' => 'plus-square-o', 'adjust' => 'adjust', 'anchor' => 'anchor', 'archive' => 'archive', 'arrows' => 'arrows', 'arrows-h' => 'arrows-h', 'arrows-v' => 'arrows-v', 'asterisk' => 'asterisk', 'ban' => 'ban', 'bar-chart-o' => 'bar-chart-o', 'barcode' => 'barcode', 'bars' => 'bars', 'beer' => 'beer', 'bell' => 'bell', 'bell-o' => 'bell-o', 'bolt' => 'bolt', 'book' => 'book', 'bookmark' => 'bookmark', 'bookmark-o' => 'bookmark-o', 'briefcase' => 'briefcase', 'bug' => 'bug', 'building-o' => 'building-o', 'bullhorn' => 'bullhorn', 'bullseye' => 'bullseye', 'calendar' => 'calendar', 'calendar-o' => 'calendar-o', 'camera' => 'camera', 'camera-retro' => 'camera-retro', 'caret-square-o-down' => 'caret-square-o-down', 'caret-square-o-left' => 'caret-square-o-left', 'caret-square-o-right' => 'caret-square-o-right', 'caret-square-o-up' => 'caret-square-o-up', 'certificate' => 'certificate', 'check' => 'check', 'check-circle' => 'check-circle', 'check-circle-o' => 'check-circle-o', 'check-square' => 'check-square', 'check-square-o' => 'check-square-o', 'circle' => 'circle', 'circle-o' => 'circle-o', 'clock-o' => 'clock-o', 'cloud' => 'cloud', 'cloud-download' => 'cloud-download', 'cloud-upload' => 'cloud-upload', 'code' => 'code', 'code-fork' => 'code-fork', 'coffee' => 'coffee', 'cog' => 'cog', 'cogs' => 'cogs', 'comment' => 'comment', 'comment-o' => 'comment-o', 'comments' => 'comments', 'comments-o' => 'comments-o', 'compass' => 'compass', 'credit-card' => 'credit-card', 'crop' => 'crop', 'crosshairs' => 'crosshairs', 'cutlery' => 'cutlery', 'dashboard' => 'dashboard', 'desktop' => 'desktop', 'dot-circle-o' => 'dot-circle-o', 'download' => 'download', 'edit' => 'edit', 'ellipsis-h' => 'ellipsis-h', 'ellipsis-v' => 'ellipsis-v', 'envelope' => 'envelope', 'envelope-o' => 'envelope-o', 'eraser' => 'eraser', 'exchange' => 'exchange', 'exclamation' => 'exclamation', 'exclamation-circle' => 'exclamation-circle', 'exclamation-triangle' => 'exclamation-triangle', 'external-link' => 'external-link', 'external-link-square' => 'external-link-square', 'eye' => 'eye', 'eye-slash' => 'eye-slash', 'female' => 'female', 'fighter-jet' => 'fighter-jet', 'film' => 'film', 'filter' => 'filter', 'fire' => 'fire', 'fire-extinguisher' => 'fire-extinguisher', 'flag' => 'flag', 'flag-checkered' => 'flag-checkered', 'flag-o' => 'flag-o', 'flash' => 'flash', 'flask' => 'flask', 'folder' => 'folder', 'folder-o' => 'folder-o', 'folder-open' => 'folder-open', 'folder-open-o' => 'folder-open-o', 'frown-o' => 'frown-o', 'gamepad' => 'gamepad', 'gavel' => 'gavel', 'gear' => 'gear', 'gears' => 'gears', 'gift' => 'gift', 'glass' => 'glass', 'globe' => 'globe', 'group' => 'group', 'hdd-o' => 'hdd-o', 'headphones' => 'headphones', 'heart' => 'heart', 'heart-o' => 'heart-o', 'home' => 'home', 'inbox' => 'inbox', 'info' => 'info', 'info-circle' => 'info-circle', 'key' => 'key', 'keyboard-o' => 'keyboard-o', 'laptop' => 'laptop', 'leaf' => 'leaf', 'legal' => 'legal', 'lemon-o' => 'lemon-o', 'level-down' => 'level-down', 'level-up' => 'level-up', 'lightbulb-o' => 'lightbulb-o', 'location-arrow' => 'location-arrow', 'lock' => 'lock', 'magic' => 'magic', 'magnet' => 'magnet', 'mail-forward' => 'mail-forward', 'mail-reply' => 'mail-reply', 'mail-reply-all' => 'mail-reply-all', 'male' => 'male', 'map-marker' => 'map-marker', 'meh-o' => 'meh-o', 'microphone' => 'microphone', 'microphone-slash' => 'microphone-slash', 'minus' => 'minus', 'minus-circle' => 'minus-circle', 'minus-square' => 'minus-square', 'minus-square-o' => 'minus-square-o', 'mobile' => 'mobile', 'mobile-phone' => 'mobile-phone', 'money' => 'money', 'moon-o' => 'moon-o', 'music' => 'music', 'pencil' => 'pencil', 'pencil-square' => 'pencil-square', 'pencil-square-o' => 'pencil-square-o', 'phone' => 'phone', 'phone-square' => 'phone-square', 'picture-o' => 'picture-o', 'plane' => 'plane', 'plus' => 'plus', 'plus-circle' => 'plus-circle', 'plus-square' => 'plus-square', 'plus-square-o' => 'plus-square-o', 'power-off' => 'power-off', 'print' => 'print', 'puzzle-piece' => 'puzzle-piece', 'qrcode' => 'qrcode', 'question' => 'question', 'question-circle' => 'question-circle', 'quote-left' => 'quote-left', 'quote-right' => 'quote-right', 'random' => 'random', 'refresh' => 'refresh', 'reply' => 'reply', 'reply-all' => 'reply-all', 'retweet' => 'retweet', 'road' => 'road', 'rocket' => 'rocket', 'rss' => 'rss', 'rss-square' => 'rss-square', 'search' => 'search', 'search-minus' => 'search-minus', 'search-plus' => 'search-plus', 'share' => 'share', 'share-square' => 'share-square', 'share-square-o' => 'share-square-o', 'shield' => 'shield', 'shopping-cart' => 'shopping-cart', 'sign-in' => 'sign-in', 'sign-out' => 'sign-out', 'signal' => 'signal', 'sitemap' => 'sitemap', 'smile-o' => 'smile-o', 'sort' => 'sort', 'sort-alpha-asc' => 'sort-alpha-asc', 'sort-alpha-desc' => 'sort-alpha-desc', 'sort-amount-asc' => 'sort-amount-asc', 'sort-amount-desc' => 'sort-amount-desc', 'sort-asc' => 'sort-asc', 'sort-desc' => 'sort-desc', 'sort-down' => 'sort-down', 'sort-numeric-asc' => 'sort-numeric-asc', 'sort-numeric-desc' => 'sort-numeric-desc', 'sort-up' => 'sort-up', 'spinner' => 'spinner', 'square' => 'square', 'square-o' => 'square-o', 'star' => 'star', 'star-half' => 'star-half', 'star-half-empty' => 'star-half-empty', 'star-half-full' => 'star-half-full', 'star-half-o' => 'star-half-o', 'star-o' => 'star-o', 'subscript' => 'subscript', 'suitcase' => 'suitcase', 'sun-o' => 'sun-o', 'superscript' => 'superscript', 'tablet' => 'tablet', 'tachometer' => 'tachometer', 'tag' => 'tag', 'tags' => 'tags', 'tasks' => 'tasks', 'terminal' => 'terminal', 'thumb-tack' => 'thumb-tack', 'thumbs-down' => 'thumbs-down', 'thumbs-o-down' => 'thumbs-o-down', 'thumbs-o-up' => 'thumbs-o-up', 'thumbs-up' => 'thumbs-up', 'ticket' => 'ticket', 'times' => 'times', 'times-circle' => 'times-circle', 'times-circle-o' => 'times-circle-o', 'tint' => 'tint', 'toggle-down' => 'toggle-down', 'toggle-left' => 'toggle-left', 'toggle-right' => 'toggle-right', 'toggle-up' => 'toggle-up', 'trash-o' => 'trash-o', 'trophy' => 'trophy', 'truck' => 'truck', 'umbrella' => 'umbrella', 'unlock' => 'unlock', 'unlock-alt' => 'unlock-alt', 'unsorted' => 'unsorted', 'upload' => 'upload', 'user' => 'user', 'users' => 'users', 'video-camera' => 'video-camera', 'volume-down' => 'volume-down', 'volume-off' => 'volume-off', 'volume-up' => 'volume-up', 'warning' => 'warning', 'wheelchair' => 'wheelchair', 'wrench' => 'wrench', 'check-square' => 'check-square', 'check-square-o' => 'check-square-o', 'circle' => 'circle', 'circle-o' => 'circle-o', 'dot-circle-o' => 'dot-circle-o', 'minus-square' => 'minus-square', 'minus-square-o' => 'minus-square-o', 'plus-square' => 'plus-square', 'plus-square-o' => 'plus-square-o', 'square' => 'square', 'square-o' => 'square-o', 'bitcoin' => 'bitcoin', 'btc' => 'btc', 'cny' => 'cny', 'dollar' => 'dollar', 'eur' => 'eur', 'euro' => 'euro', 'gbp' => 'gbp', 'inr' => 'inr', 'jpy' => 'jpy', 'krw' => 'krw', 'money' => 'money', 'rmb' => 'rmb', 'rouble' => 'rouble', 'rub' => 'rub', 'ruble' => 'ruble', 'rupee' => 'rupee', 'try' => 'try', 'turkish-lira' => 'turkish-lira', 'usd' => 'usd', 'won' => 'won', 'yen' => 'yen', 'align-center' => 'align-center', 'align-justify' => 'align-justify', 'align-left' => 'align-left', 'align-right' => 'align-right', 'bold' => 'bold', 'chain' => 'chain', 'chain-broken' => 'chain-broken', 'clipboard' => 'clipboard', 'columns' => 'columns', 'copy' => 'copy', 'cut' => 'cut', 'dedent' => 'dedent', 'eraser' => 'eraser', 'file' => 'file', 'file-o' => 'file-o', 'file-text' => 'file-text', 'file-text-o' => 'file-text-o', 'files-o' => 'files-o', 'floppy-o' => 'floppy-o', 'font' => 'font', 'indent' => 'indent', 'italic' => 'italic', 'link' => 'link', 'list' => 'list', 'list-alt' => 'list-alt', 'list-ol' => 'list-ol', 'list-ul' => 'list-ul', 'outdent' => 'outdent', 'paperclip' => 'paperclip', 'paste' => 'paste', 'repeat' => 'repeat', 'rotate-left' => 'rotate-left', 'rotate-right' => 'rotate-right', 'save' => 'save', 'scissors' => 'scissors', 'strikethrough' => 'strikethrough', 'table' => 'table', 'text-height' => 'text-height', 'text-width' => 'text-width', 'th' => 'th', 'th-large' => 'th-large', 'th-list' => 'th-list', 'underline' => 'underline', 'undo' => 'undo', 'unlink' => 'unlink', 'angle-double-down' => 'angle-double-down', 'angle-double-left' => 'angle-double-left', 'angle-double-right' => 'angle-double-right', 'angle-double-up' => 'angle-double-up', 'angle-down' => 'angle-down', 'angle-left' => 'angle-left', 'angle-right' => 'angle-right', 'angle-up' => 'angle-up', 'arrow-circle-down' => 'arrow-circle-down', 'arrow-circle-left' => 'arrow-circle-left', 'arrow-circle-o-down' => 'arrow-circle-o-down', 'arrow-circle-o-left' => 'arrow-circle-o-left', 'arrow-circle-o-right' => 'arrow-circle-o-right', 'arrow-circle-o-up' => 'arrow-circle-o-up', 'arrow-circle-right' => 'arrow-circle-right', 'arrow-circle-up' => 'arrow-circle-up', 'arrow-down' => 'arrow-down', 'arrow-left' => 'arrow-left', 'arrow-right' => 'arrow-right', 'arrow-up' => 'arrow-up', 'arrows' => 'arrows', 'arrows-alt' => 'arrows-alt', 'arrows-h' => 'arrows-h', 'arrows-v' => 'arrows-v', 'caret-down' => 'caret-down', 'caret-left' => 'caret-left', 'caret-right' => 'caret-right', 'caret-square-o-down' => 'caret-square-o-down', 'caret-square-o-left' => 'caret-square-o-left', 'caret-square-o-right' => 'caret-square-o-right', 'caret-square-o-up' => 'caret-square-o-up', 'caret-up' => 'caret-up', 'chevron-circle-down' => 'chevron-circle-down', 'chevron-circle-left' => 'chevron-circle-left', 'chevron-circle-right' => 'chevron-circle-right', 'chevron-circle-up' => 'chevron-circle-up', 'chevron-down' => 'chevron-down', 'chevron-left' => 'chevron-left', 'chevron-right' => 'chevron-right', 'chevron-up' => 'chevron-up', 'hand-o-down' => 'hand-o-down', 'hand-o-left' => 'hand-o-left', 'hand-o-right' => 'hand-o-right', 'hand-o-up' => 'hand-o-up', 'long-arrow-down' => 'long-arrow-down', 'long-arrow-left' => 'long-arrow-left', 'long-arrow-right' => 'long-arrow-right', 'long-arrow-up' => 'long-arrow-up', 'toggle-down' => 'toggle-down', 'toggle-left' => 'toggle-left', 'toggle-right' => 'toggle-right', 'toggle-up' => 'toggle-up', 'arrows-alt' => 'arrows-alt', 'backward' => 'backward', 'compress' => 'compress', 'eject' => 'eject', 'expand' => 'expand', 'fast-backward' => 'fast-backward', 'fast-forward' => 'fast-forward', 'forward' => 'forward', 'pause' => 'pause', 'play' => 'play', 'play-circle' => 'play-circle', 'play-circle-o' => 'play-circle-o', 'step-backward' => 'step-backward', 'step-forward' => 'step-forward', 'stop' => 'stop', 'youtube-play' => 'youtube-play', 'adn' => 'adn', 'android' => 'android', 'apple' => 'apple', 'bitbucket' => 'bitbucket', 'bitbucket-square' => 'bitbucket-square', 'bitcoin' => 'bitcoin', 'btc' => 'btc', 'css3' => 'css3', 'dribbble' => 'dribbble', 'dropbox' => 'dropbox', 'facebook' => 'facebook', 'facebook-square' => 'facebook-square', 'flickr' => 'flickr', 'foursquare' => 'foursquare', 'github' => 'github', 'github-alt' => 'github-alt', 'github-square' => 'github-square', 'gittip' => 'gittip', 'google-plus' => 'google-plus', 'google-plus-square' => 'google-plus-square', 'html5' => 'html5', 'instagram' => 'instagram', 'linkedin' => 'linkedin', 'linkedin-square' => 'linkedin-square', 'linux' => 'linux', 'maxcdn' => 'maxcdn', 'pagelines' => 'pagelines', 'pinterest' => 'pinterest', 'pinterest-square' => 'pinterest-square', 'renren' => 'renren', 'skype' => 'skype', 'stack-exchange' => 'stack-exchange', 'stack-overflow' => 'stack-overflow', 'trello' => 'trello', 'tumblr' => 'tumblr', 'tumblr-square' => 'tumblr-square', 'twitter' => 'twitter', 'twitter-square' => 'twitter-square', 'vimeo-square' => 'vimeo-square', 'vk' => 'vk', 'weibo' => 'weibo', 'windows' => 'windows', 'xing' => 'xing', 'xing-square' => 'xing-square', 'youtube' => 'youtube', 'youtube-play' => 'youtube-play', 'youtube-square' => 'youtube-square', 'ambulance' => 'ambulance', 'h-square' => 'h-square', 'hospital-o' => 'hospital-o', 'medkit' => 'medkit', 'plus-square' => 'plus-square', 'stethoscope' => 'stethoscope', 'user-md' => 'user-md', 'wheelchair' => 'wheelchair', ), ); return $bundles; }