⚒️ Add a pageStyles block to base template (#98)

* Import typekit fonts as link

* Declare pageStyles block in base template

* Uninstall prism-themes package
This commit is contained in:
EJ Mason 2020-03-19 16:20:47 -07:00 committed by GitHub
parent c39fbd7af6
commit fa5ce187f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 14 deletions

View File

@ -11,8 +11,10 @@
name="description"
content="{{ renderData.description or description or metadata.description }}"
>
<link rel="stylesheet" href="https://use.typekit.net/qlo3dpu.css" rel="preload"/>
<link rel="stylesheet" href="{{ '/assets/css/base.css' | url }}">
{% block pageStyles %}
{% endblock pageStyles %}
</head>
<body>
{% block content %}{% endblock content %}

View File

@ -1,7 +1,10 @@
{% extends 'layouts/base.njk' %}
{% set pageType = 'Page' %}
{% set titleWithPath = title + ' « Documentation « ' %}
{% block pageStyles %}
{# Code highlighting #}
<link rel="stylesheet" href="https://unpkg.com/prism-themes@^1.3/themes/prism-a11y-dark.css"/>
{% endblock %}
{% block content %}
<div class="article-content">
{% include 'components/sub-page-header.njk' %}

View File

@ -21,9 +21,6 @@
@import 'components/word', 'components/lists', 'components/definitions',
'components/flag';
// 5.1 Code Highlighting
@import '~prism-themes/themes/prism-a11y-dark';
// 6. Page-specific styles
@import './layouts/pages';

View File

@ -1,5 +1,3 @@
@import url('https://use.typekit.net/qlo3dpu.css');
$sans-serif: monotype-grotesque, 'Lucida Sans', sans-serif;
$serif: orpheuspro, Palatino, Times, serif;
$ext-sans: monotype-grotesque-extended, Arial Black, sans-serif;

5
package-lock.json generated
View File

@ -11252,11 +11252,6 @@
"parse-ms": "^0.1.0"
}
},
"prism-themes": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/prism-themes/-/prism-themes-1.3.0.tgz",
"integrity": "sha512-4hDQyNuBRyWVvwHeTH4yY5TIWrl6BHmhoh85kgfTFgwklGerWA3R2RFp7Sg0zPCnQS8SsloKsEIN3ao63KhiIw=="
},
"prismjs": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/prismjs/-/prismjs-1.17.1.tgz",

View File

@ -52,8 +52,7 @@
"dependencies": {
"@11ty/eleventy": "^0.10.0",
"markdown-it-anchor": "^5.2.5",
"markdown-it-prism": "^2.0.3",
"prism-themes": "^1.3.0"
"markdown-it-prism": "^2.0.3"
},
"devDependencies": {
"ava": "^3.5.0",