Skip to content

Commit 081784e

Browse files
committed
optimizations
fixed skip to content updated css in seo.njk fixed svg cleaned up css
1 parent 1c797ba commit 081784e

File tree

5 files changed

+28
-8
lines changed

5 files changed

+28
-8
lines changed

_data/metadata.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
22
title: "11ty Gets Tufte",
33
description: "A Tufte CSS Project built with 11ty aka Eleventy for your projects",
4-
url: "https://tufte.000000076.xyz/",
4+
url: "https://tufte.000000076.xyz/", // http://localhost:8080
55
language: "en",
66
locale: "en_US",
77
image: "/img/orange.svg",

_includes/base.njk

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{% include "partials/seo.njk" %}
55
</head>
66
<body>
7-
<a href="#skip" class="visually-hidden">Skip to main content</a>
8-
<main class="fullwidth" id="skip">
7+
<a href="#maincontent" class="skip-link">Skip to main content</a>
8+
<main class="fullwidth" id="maincontent">
99
{{content | safe}}
1010
</main>
1111
{% include "partials/footer.njk" %}

_includes/partials/seo.njk

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","description":"{{metadata.description}}","headline":"{{metadata.title}} - {{metadata.description}}","name":"{{metadata.title}}","url":"{{metadata.url}}{{page.url}}"}</script>
2727
<link rel="apple-touch-icon" href="{{metadata.favicon}}">
2828
<meta name="generator" content="{{ eleventy.generator }}">
29+
<link rel="preload" href="/css/gill-sans-2.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
30+
<noscript><link rel="stylesheet" href="/css/gill-sans-2.css"></noscript>
2931
{%- css %}{% include "public/tufte.css" %}{% endcss %}
3032
<style>{% getBundle "css" %}</style>
3133
{%- js %}{% include "node_modules/@zachleat/heading-anchors/heading-anchors.js" %}{% endjs %}

public/img/11ty-gets-tufte.svg

+1-1
Loading

public/tufte.css

+22-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@charset "UTF-8";
2-
@import url('/css/gill-sans-2.css');
32
@font-face {
43
font-family: "et-book";
54
src: url("/fonts/et-book/et-book-roman-line-figures/et-book-roman-line-figures.eot");
@@ -24,6 +23,7 @@
2423
font-style: normal
2524
}
2625

26+
/* Customization */
2727
.visually-hidden {
2828
clip: rect(0 0 0 0);
2929
clip-path: inset(50%);
@@ -33,6 +33,24 @@
3333
white-space: nowrap;
3434
width: 1px;
3535
}
36+
37+
.skip-link {
38+
background: #000000;
39+
height: 30px;
40+
left: 50%;
41+
padding: 8px;
42+
position: absolute;
43+
transform: translateY(-100%);
44+
transition: transform 0.3s;
45+
46+
}
47+
48+
.skip-link:focus {
49+
transform: translateY(0%);
50+
51+
}
52+
53+
3654
/* Tufte CSS styles */
3755
body {
3856
width: 87.5%;
@@ -42,7 +60,7 @@ body {
4260
background-color: #151515;
4361
color: white;
4462
font-size: 15px;
45-
font-family: et-book, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
63+
font-family: et-book, "Gill Sans Nova", Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
4664
}
4765

4866
main {
@@ -279,11 +297,11 @@ table.fullwidth {
279297

280298
div.table-wrapper {
281299
overflow-x: auto;
282-
font-family: "Gill Sans", "Gill Sans MT", "Trebuchet MS", sans-serif;
300+
font-family: "Gill Sans", "Gill Sans MT", "Gill Sans Nova", "Trebuchet MS", sans-serif;
283301
}
284302

285303
.sans {
286-
font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
304+
font-family: "Gill Sans", "Gill Sans MT", "Gill Sans Nova", Calibri, sans-serif;
287305
letter-spacing: .03em;
288306
}
289307

0 commit comments

Comments
 (0)