Skip to content

Commit

Permalink
use svg icons
Browse files Browse the repository at this point in the history
billerickson committed Jan 8, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent c0093a3 commit 352bd6a
Showing 19 changed files with 44 additions and 597 deletions.
7 changes: 0 additions & 7 deletions assets/icons/Read Me.txt

This file was deleted.

5 changes: 5 additions & 0 deletions assets/icons/angle-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/angle-left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/angle-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/angle-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions assets/icons/close.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
152 changes: 0 additions & 152 deletions assets/icons/demo-files/demo.css

This file was deleted.

30 changes: 0 additions & 30 deletions assets/icons/demo-files/demo.js

This file was deleted.

134 changes: 0 additions & 134 deletions assets/icons/demo.html

This file was deleted.

Binary file removed assets/icons/fonts/icomoon.eot
Binary file not shown.
16 changes: 0 additions & 16 deletions assets/icons/fonts/icomoon.svg

This file was deleted.

Binary file removed assets/icons/fonts/icomoon.ttf
Binary file not shown.
Binary file removed assets/icons/fonts/icomoon.woff
Binary file not shown.
Binary file removed assets/icons/fonts/icomoon.woff2
Binary file not shown.
5 changes: 5 additions & 0 deletions assets/icons/menu.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
209 changes: 0 additions & 209 deletions assets/icons/selection.json

This file was deleted.

45 changes: 0 additions & 45 deletions assets/icons/style.css

This file was deleted.

10 changes: 10 additions & 0 deletions inc/helper-functions.php
Original file line number Diff line number Diff line change
@@ -139,3 +139,13 @@ function ea_bg_image_style( $image_id = false, $image_size = 'full' ) {
if( !empty( $image_id ) )
return ' style="background-image: url(' . wp_get_attachment_image_url( $image_id, $image_size ) . ');"';
}

/**
* Get Icon
*
*/
function ea_icon( $slug = '' ) {
$icon_path = get_template_directory() . '/assets/icons/' . $slug . '.svg';
if( file_exists( $icon_path ) )
return file_get_contents( $icon_path );
}
8 changes: 4 additions & 4 deletions inc/navigation.php
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ function ea_header_navigation() {

if( has_nav_menu( 'mobile' ) ) {
echo '<div class="nav-mobile">';
echo '<a class="mobile-menu-toggle" href="#"><i class="icon-menu"></i></a>';
echo '<a class="mobile-menu-toggle" href="#">' . ea_icon( 'menu' ) . '</a>';
echo '</div>';
}
}
@@ -35,7 +35,7 @@ function ea_header_navigation() {
function ea_mobile_menu() {
if( has_nav_menu( 'mobile' ) ) {
echo '<div id="sidr-mobile-menu" class="sidr right">';
echo '<a class="sidr-menu-close" href="#"><i class="icon-close"></i></a>';
echo '<a class="sidr-menu-close" href="#">' . ea_icon( 'close' ) . '</a>';
wp_nav_menu( array( 'theme_location' => 'mobile' ) );
echo '</div>';
}
@@ -71,8 +71,8 @@ function ea_archive_paginated_navigation() {
'format' => '?paged=%#%',
'current' => max( 1, get_query_var( 'paged' ) ),
'total' => $wp_query->max_num_pages,
'prev_text' => '<i class="icon-angle-left"></i>',
'next_text' => '<i class="icon-angle-right"></i>',
'prev_text' => ea_icon( 'angle-left' ),
'next_text' => ea_icon( 'angle-right' ),
) );

if( $navigation ) {

0 comments on commit 352bd6a

Please sign in to comment.