Browse Source

Switch to source code pro, refs #641

Jordi Boggiano 9 years ago
parent
commit
a07b9f715b

+ 3 - 1
src/Packagist/WebBundle/Resources/public/css/main.css

@@ -29,10 +29,12 @@ html, body {
 
 pre, code {
     background: #fff;
-    font-family: Menlo, Consolas, "Courier New", Courier, monospace;
+    font-family: "Source Code Pro", Menlo, Consolas, "Courier New", Courier, monospace;
     border-radius: 0;
     border: none;
     color: #2d2d32;
+    line-height: 12px;
+    font-size: 12px;
 }
 pre {
   border-left: 2px solid #2d2d32;

+ 16 - 0
src/Packagist/WebBundle/Resources/views/Package/viewPackage.html.twig

@@ -10,6 +10,22 @@
     {{ parent() }}
 {% endblock %}
 
+{% block head_additions %}
+    <script type="text/javascript">
+      WebFontConfig = {
+        google: { families: [ 'Source+Code+Pro::latin' ] }
+      };
+      (function() {
+        var wf = document.createElement('script');
+        wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
+        wf.type = 'text/javascript';
+        wf.async = 'true';
+        var s = document.getElementsByTagName('script')[0];
+        s.parentNode.insertBefore(wf, s);
+      })();
+    </script>
+{% endblock %}
+
 {% block scripts %}
     <script src="{{ asset('bundles/packagistweb/js/view.js')}}"></script>
 {% endblock %}