Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,27 +34,6 @@
* @return string The parsed CSS The parsed CSS.
*/

/**
* Include the Awesome Font.
*/
function theme_essential_set_fontwww($css) {
global $CFG, $PAGE;
if(empty($CFG->themewww)){
$themewww = $CFG->wwwroot."/theme";
} else {
$themewww = $CFG->themewww;
}
$tag = '[[setting:fontwww]]';

$theme = theme_config::load('essential');
if (!empty($theme->settings->bootstrapcdn)) {
$css = str_replace($tag, '//netdna.bootstrapcdn.com/font-awesome/4.0.0/fonts/', $css);
} else {
$css = str_replace($tag, $themewww.'/essential/fonts/', $css);
}
return $css;
}

/**
* Adds the logo to CSS.
*
Expand Down Expand Up @@ -504,7 +483,6 @@ function theme_essential_process_css($css, $theme) {

// Set the font path.

$css = theme_essential_set_fontwww($css);
return $css;
}

Expand Down
17 changes: 11 additions & 6 deletions style/essential.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ a {
font-style: normal !important;
}

@font-face {
font-family: 'FontAwesome';
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'FontAwesome';
src: url([[font:theme|fontawesome-webfont.eot]]);
src: url([[font:theme|fontawesome-webfont.eot]]) format('embedded-opentype'),
url([[font:theme|fontawesome-webfont.woff]]) format('woff'),
url([[font:theme|fontawesome-webfont.ttf]]) format('truetype'),
url([[font:theme|fontawesome-webfont.svg]]) format('svg');
font-weight: normal;
font-style: normal;
}

/* @end */

Expand Down Expand Up @@ -1845,4 +1850,4 @@ table.calendarmonth.calendartable {

.back-to-top:hover{
text-decoration: none;
}
}
14 changes: 7 additions & 7 deletions style/settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
/* @group Core */

@font-face {
font-family: 'FontAwesome';
font-family: 'FontAwesome';
src: url([[font:theme|fontawesome-webfont.eot]]);
src: url([[font:theme|fontawesome-webfont.eot]]) format('embedded-opentype'),
url([[font:theme|fontawesome-webfont.woff]]) format('woff'),
url([[font:theme|fontawesome-webfont.ttf]]) format('truetype'),
url([[font:theme|fontawesome-webfont.svg]]) format('svg');
font-weight: normal;
font-style: normal;
src: url('[[setting:fontwww]]fontawesome-webfont.eot?v=4.0.0');
src: url('[[setting:fontwww]]fontawesome-webfont.eot?#iefix&v=4.0.0') format('embedded-opentype'),
url('[[setting:fontwww]]fontawesome-webfont.woff?v=4.0.0') format('woff'),
url('[[setting:fontwww]]fontawesome-webfont.ttf?v=4.0.0') format('truetype'),
url('[[setting:fontwww]]fontawesome-webfont.svg#fontawesomeregular?v=4.0.0') format('svg');
}

body{
Expand Down Expand Up @@ -518,4 +518,4 @@ body,
* This adds the special autohide css in autohide.css if the setting is enabled.
*/

[[setting:autohide]]
[[setting:autohide]]