Skip to content

Commit 5dbc39b

Browse files
authored
Tailwind 4 (#885)
* Tailwind 4 package * Configure tailwind 4 * Update tailwind * Fix for tailwind 4 * Minify * Remove reference to fontawesome
1 parent 3b804ff commit 5dbc39b

File tree

7 files changed

+580
-579
lines changed

7 files changed

+580
-579
lines changed

docs/_layouts/page.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<meta name="description" content="JqTree is a jQuery widget for displaying a tree structure in html" />
99
<link rel="stylesheet" href="{{ site.baseurl }}/static/monokai.css" />
10-
<link rel="stylesheet" href="{{ site.baseurl }}/static/bower_components/fontawesome/css/all.min.css" />
1110
<link rel="stylesheet" href="{{ site.baseurl }}/static/documentation.css" />
1211
<link rel="stylesheet" href="{{ site.baseurl }}/jqtree.css" />
1312
<link rel="stylesheet" href="{{ site.baseurl }}/static/example.css" />

docs/documentation.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1-
@tailwind base;
2-
@tailwind components;
3-
@tailwind utilities;
1+
@import "tailwindcss";
2+
3+
@plugin "@tailwindcss/typography";
4+
5+
@theme {
6+
--container-8xl: 90rem;
7+
}

docs/index.html

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,35 @@
44
---
55

66
<div class="mx-auto max-w-8xl">
7-
<div class="hidden lg:block fixed inset-0 px-8 left-[max(0px,calc(50%-45rem))] right-auto w-[19.5rem] overflow-y-auto">
8-
<nav>
7+
<div
8+
class="hidden lg:block fixed inset-0 px-8 left-[max(0px,calc(50%-45rem))] right-auto w-[19.5rem] overflow-y-auto">
9+
<nav class="mb-8">
910
<ul>
1011
{% assign level = 0 %}
1112

1213
{% for entry in site.entries %}
13-
{% if entry.section %}
14-
{% if level == 1 %}
15-
</ul>
16-
</li>
17-
{% endif %}
18-
<li class="mt-8">
19-
<a class="mb-3 block font-semibold text-slate-700 hover:text-slate-900" href="#{{ entry.name }}">{{ entry.title }}</a>
20-
<ul class="space-y-2 border-l border-slate-100">
21-
{% assign level = 1 %}
14+
{% if entry.section %}
15+
{% if level == 1 %}
16+
</ul>
17+
</li>
18+
{% endif %}
19+
<li class="mt-8">
20+
<a class="mb-3 block font-semibold text-slate-700 hover:text-slate-900" href="#{{ entry.name }}">{{
21+
entry.title }}</a>
22+
<ul class="space-y-2 border-l border-slate-100">
23+
{% assign level = 1 %}
2224
{% else %}
23-
<li>
24-
<a class="block border-l pl-4 border-transparent hover:border-slate-400 text-slate-700 hover:text-slate-900" href="#{{ entry.name }}">{{ entry.title }}</a>
25-
</li>
25+
<li>
26+
<a class="block border-l pl-4 border-transparent hover:border-slate-400 text-slate-700 hover:text-slate-900"
27+
href="#{{ entry.name }}">{{ entry.title }}</a>
28+
</li>
2629
{% endif %}
27-
{% endfor %}
30+
{% endfor %}
2831

29-
{% if level == 1 %}
30-
</ul>
31-
</li>
32-
{% endif %}
32+
{% if level == 1 %}
33+
</ul>
34+
</li>
35+
{% endif %}
3336
</ul>
3437
</nav>
3538
</div>
@@ -42,23 +45,26 @@ <h1 class="text-gray-900 tracking-tight font-extrabold text-6xl">
4245
It supports json data, loading via ajax and drag-and-drop.
4346
</p>
4447
<div class="mt-8">
45-
<a class="rounded-md shadow text-lg text-white px-10 py-4 bg-indigo-600 hover:bg-indigo-700" href="https://github.com/mbraak/jqTree/tarball/master">Download jqTree</a>
48+
<a class="rounded-md shadow text-lg text-white px-10 py-4 bg-indigo-600 hover:bg-indigo-700"
49+
href="https://github.com/mbraak/jqTree/tarball/master">Download jqTree</a>
4650
</div>
4751
</div>
4852
<div class="px-8 py-8">
4953
{% for entry in site.entries %}
50-
{% if entry.hide_title %}
51-
<div id="{{ entry.name }}"></div>
52-
{% elsif entry.section %}
53-
<h3 class="text-4xl mb-8 font-extrabold text-slate-900 tracking-tight" id="{{ entry.name }}">{{ entry.title }}</h3>
54-
{% else %}
55-
<h4 class="text-xl mb-4 font-bold text-slate-900 tracking-tight" id="{{ entry.name }}">{{ entry.title }}</h4>
56-
{% endif %}
57-
{% if entry.output.size > 1 %}
58-
<div class="mb-16 text-slate-700 doc-entry prose">
59-
{{ entry.output }}
60-
</div>
61-
{% endif %}
54+
{% if entry.hide_title %}
55+
<div id="{{ entry.name }}"></div>
56+
{% elsif entry.section %}
57+
<h3 class="text-4xl mb-8 font-extrabold text-slate-900 tracking-tight" id="{{ entry.name }}">{{ entry.title
58+
}}</h3>
59+
{% else %}
60+
<h4 class="text-xl mb-4 font-bold text-slate-900 tracking-tight" id="{{ entry.name }}">{{ entry.title }}
61+
</h4>
62+
{% endif %}
63+
{% if entry.output.size > 1 %}
64+
<div class="mb-16 text-slate-700 doc-entry prose">
65+
{{ entry.output }}
66+
</div>
67+
{% endif %}
6268
{% endfor %}
6369
</div>
6470
</div>

docs/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,23 @@
55
"jekyll-build": "bundle exec jekyll build",
66
"jekyll-serve": "bundle exec jekyll serve",
77
"build_docs_css": "pnpm tailwind && pnpm build_example_css && pnpm copy_jqtree && pnpm copy_vendor_files",
8-
"tailwind": "tailwindcss -i documentation.css -o static/documentation.css",
8+
"tailwind": "tailwindcss -m -i documentation.css -o static/documentation.css",
99
"build_example_css": "postcss -o static/example.css static/example.postcss",
1010
"copy_jqtree": "cp ../tree.jquery.js . && cp ../jqtree.css .",
1111
"copy_vendor_files": "./copy_vendor_files"
1212
},
1313
"devDependencies": {
14-
"@tailwindcss/typography": "^0.5.15",
14+
"@tailwindcss/cli": "^4.0.4",
15+
"@tailwindcss/postcss": "^4.0.4",
16+
"@tailwindcss/typography": "^0.5.16",
1517
"autoprefixer": "^10.4.20",
1618
"jquery": "^3.7.1",
17-
"jquery-mockjax": "^2.7.0-beta.0",
18-
"postcss": "^8.4.49",
19+
"jquery-mockjax": "2.7.0-beta.0",
20+
"postcss": "^8.5.1",
1921
"postcss-cli": "^11.0.0",
2022
"postcss-import": "^16.1.0",
2123
"postcss-load-config": "^6.0.1",
22-
"postcss-nested": "^7",
23-
"tailwindcss": "^3.4.16"
24+
"postcss-nested": "^7.0.2",
25+
"tailwindcss": "^4.0.4"
2426
}
2527
}

0 commit comments

Comments
 (0)