Skip to content

Commit c938349

Browse files
committed
ci(deploy): respect path prefix in styles using url()
1 parent be79c3a commit c938349

File tree

4 files changed

+19
-16
lines changed

4 files changed

+19
-16
lines changed

_includes/layouts/base.njk

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
---
2+
---
3+
14
<!doctype html>
25
<html lang="{{ metadata.language }}" class="bg-background h-full">
36
<head>
@@ -7,6 +10,20 @@
710
<meta name="description" content="{{ description or metadata.description }}">
811
{% favicon './public/favicon.svg' %}
912
<link rel="stylesheet" href="/style.css?v={% version %}"/>
13+
{# Insert styles dependent on path prefix here #}
14+
<style type="text/css">
15+
@font-face {
16+
font-family: Cairo;
17+
src: url("/fonts/Cairo/Cairo-Bold.ttf") format("truetype");
18+
font-weight: bold;
19+
}
20+
.bg-dark-tiles {
21+
background-image: url("/img/dark-grey-tile.png");
22+
}
23+
.pagefind-ui__form:after {
24+
background: url("/img/search.svg") no-repeat 2px center;
25+
}
26+
</style>
1027
</head>
1128
<body class="flex flex-col h-full items-center">
1229
<a href="#skip" class="sr-only">Skip to main content</a>

_includes/menu.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<nav class="fixed top-[34px] inset-x-0 bottom-0 bg-gray-dark text-white py-4 lg:relative lg:inset-auto lg:bg-transparent lg:p-0 lg:opacity-100 lg:transform-none peer-checked/menu:opacity-100 peer-checked/menu:transform-none opacity-0 translate-x-full transition-[opacity,transform] overflow-y-auto lg:overflow-visible">
22
<ul class="lg:flex lg:flex-row lg:border-l lg:border-l-white/10 lg:border-r lg:border-r-gray-dark">
33
<li>
4-
<a href="https://plugins.jquery.com/" class="link-nav">Plugins</a>
4+
<a href="/" class="link-nav">Plugins</a>
55
</li>
66
<li class="dropdown">
77
<a href="https://contribute.jquery.org/" class="link-nav">Contribute</a>

styles/search.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
}
55
.pagefind-ui__form:after {
66
content: '';
7-
background: url(/img/search.svg) no-repeat 2px center;
87
position: absolute;
98
right: 0.25rem;
109
top: 50%;

styles/tailwind.config.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const defaultTheme = require('tailwindcss/defaultTheme')
2-
const plugin = require('tailwindcss/plugin')
32

43
module.exports = {
54
mode: 'jit',
@@ -8,7 +7,6 @@ module.exports = {
87
theme: {
98
extend: {
109
backgroundImage: {
11-
'dark-tiles': 'url(/img/dark-grey-tile.png)',
1210
'sidebar-gradient':
1311
'radial-gradient(ellipse at left, #f2f2f2, #ffffff 80%)',
1412
'sidebar-header-gradient': 'linear-gradient(to right, #efefef, #f3f3f3)'
@@ -68,16 +66,5 @@ module.exports = {
6866
serif: ['Cairo', ...defaultTheme.fontFamily.serif]
6967
}
7068
}
71-
},
72-
plugins: [
73-
plugin(function ({ addBase }) {
74-
addBase({
75-
'@font-face': {
76-
fontFamily: 'Cairo',
77-
src: 'url("/fonts/Cairo/Cairo-Bold.ttf") format("truetype")',
78-
fontWeight: 'bold'
79-
}
80-
})
81-
})
82-
]
69+
}
8370
}

0 commit comments

Comments
 (0)