Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 6b6f667

Browse files
committed
Replace font-awesome css with fontello svg font
1 parent 8e00331 commit 6b6f667

File tree

4 files changed

+44
-4
lines changed

4 files changed

+44
-4
lines changed

css/style.css

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
font-weight: 500;
1717
src: local('Fira Sans Medium'), url("../fonts/FiraSans-Medium.woff") format('woff');
1818
}
19+
@font-face {
20+
font-family: 'fontello';
21+
src: url('../fonts/fontello.svg?32953337#fontello') format('svg');
22+
font-weight: normal;
23+
font-style: normal;
24+
}
1925

2026
body {
2127
font-family: 'Fira Sans', "Helvetica Neue", Helvetica, Arial, sans-serif;
@@ -277,10 +283,33 @@ ul.laundry-list {
277283
outline: none;
278284
}
279285

280-
.fa-external-link {
286+
[class^="icon-"]:before, [class*=" icon-"]:before {
287+
font-family: "fontello";
288+
font-style: normal;
289+
font-weight: normal;
290+
speak: none;
291+
292+
display: inline-block;
293+
text-decoration: inherit;
294+
width: 1em;
295+
margin-right: .2em;
296+
text-align: center;
297+
/* opacity: .8; */
298+
299+
/* For safety - reset parent styles, that can break glyph codes*/
300+
font-variant: normal;
301+
text-transform: none;
302+
303+
/* fix buttons height, for twitter bootstrap */
304+
line-height: 1em;
305+
281306
position: relative;
282307
float: right;
308+
font-size: 120%;
309+
283310
}
311+
312+
.icon-link-ext:before { content: '\e800'; } /* '' */
284313

285314
#result {
286315
background-color: #E2EEF6;

fonts/fontello.svg

Lines changed: 12 additions & 0 deletions
Loading

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
title: The Rust Programming Language
44
---
55

6-
<link href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
76
<div class="row install-row">
87
<div class="col-md-8">
98
<p class="pitch">

js/editor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ function handleResult(statusCode, message) {
121121
}
122122
}
123123

124-
// Called on successful program run: take edit contents and run in playground
124+
// Called on successful program run: display output and link to playground
125125
function handleSuccess(message) {
126126
resultDiv.style.backgroundColor = successColor;
127127
var program = encodeURIComponent(editor.getValue());
128128
var output = "<a href=\"http://play.rust-lang.org/?code=" + program +
129-
"&run=1\"><i class=\"fa fa-external-link\"></i></a>"
129+
"&run=1\"><i class=\"icon-link-ext\"></i></a>"
130130
// console.log(output);
131131
resultDiv.innerHTML = output + escapeHTML(message);
132132
}

0 commit comments

Comments
 (0)