Skip to content

Commit 948d8ee

Browse files
authored
[4.x] Adding Tailwind CSS v4 support (#254)
1 parent fc32d05 commit 948d8ee

20 files changed

+3487
-11143
lines changed

404.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<div class="text-5xl md:text-15xl text-gray-800 border-primary border-b">404</div>
1515
<div class="w-16 h-1 bg-purple-light my-3 md:my-6"></div>
1616
<p class="text-gray-800 text-2xl md:text-3xl font-light mb-8"><?php _e( 'Sorry, the page you are looking for could not be found.', 'tailpress' ); ?></p>
17-
<a href="<?php echo get_bloginfo( 'url' ); ?>" class="bg-primary px-4 py-2 rounded text-white">
17+
<a href="<?php echo get_bloginfo( 'url' ); ?>" class="bg-primary px-4 py-2 rounded-xs text-white">
1818
<?php _e( 'Go Home', 'tailpress' ); ?>
1919
</a>
2020
</div>

README.MD

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
<p><img src="http://tailpress.io/images/tailpress100.svg" width="260" alt="TailPress"></p>
1+
<p align="center"><a href="https://tailpress.io" target="_blank"><img src="https://tailpress.io/images/tailpress100.svg" width="260" alt="TailPress"></a></p>
22

3-
[![GitHub release](https://img.shields.io/github/release/jeffreyvr/tailpress?include_prereleases=&sort=semver)](https://github.com/jeffreyvr/tailpress/releases/)
4-
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)
3+
<p align="center">
4+
<a href="https://github.com/jeffreyvr/tailpress/releases/"><img src="https://img.shields.io/github/release/jeffreyvr/tailpress?include_prereleases=&sort=semver" alt="GitHub release"></a>
5+
<a href="#license"><img src="https://img.shields.io/badge/License-MIT-blue" alt="License"></a>
6+
</p>
57

6-
# Introduction
8+
## About TailPress
79

810
TailPress is a minimal boilerplate theme for WordPress using [Tailwind CSS](https://tailwindcss.com/).
911

1012
## Getting started
1113

12-
### Using the installer
14+
You can use the TailPress [installer](#installer), or you can simply [clone](#clone-repository) this repository.
1315

14-
You can get started using the installer (using composer):
16+
### Installer
1517

16-
```bash
17-
composer global require jeffreyvanrossum/tailpress-installer
18+
To use installer, you need to install it globally via Composer:
1819

19-
tailpress new example-theme
20-
```
20+
`composer global require jeffreyvanrossum/tailpress-installer`
21+
22+
Afterwards, you can run:
23+
24+
`tailpress new example-theme`
2125

2226
*If the tailpress command is not found, make sure to place Composer's global vendor bin in your `$PATH` ([see](#command-tailpress-not-found)).*
2327

2428
Flags you can pass when using the installer:
2529
- Set a theme name `--name="Example Theme"`
26-
- Choose your compiler, mix or esbuild: `--compiler="esbuild"`
2730
- Initialize a git repository `--git`
2831
- Set the git branch name `--branch="main"`
2932

@@ -34,28 +37,26 @@ Once your theme is ready, don't forget to cd into the directory.
3437

3538
You will be asked if you would like to have WordPress installed as well. Keep in mind that you still need a local development environment for PHP and MySQL.
3639

37-
### Regular method
40+
### Clone repository
3841

3942
* Clone repo `git clone https://github.com/jeffreyvr/tailpress.git && cd tailpress`
4043
* Run `rm -rf .git` to remove git (or `rmdir .git` for Windows)
4144
* Run `npm install`
4245
* Run `npm run watch` to start developing
4346

44-
### General
47+
## Resources and compiling
4548

4649
You will find the editable CSS and Javascript files within the `/resources` folder.
4750

4851
Before you use your theme in production, make sure you run `npm run production`.
4952

50-
## NPM Scripts
51-
5253
There are several NPM scripts available. You'll find the full list in the `package.json` file under "scripts". A script is executed through the terminal by running `npm run script-name`.
5354

5455
| Script | Description |
5556
|------------|--------------------------------------------------------------------------------|
56-
| production | Creates a production (minified) build of app.js, app.css and editor-style.css. |
57+
| production | Creates a production (minified) build of app.js, app.css and editor-style.css. |
5758
| dev | Creates a development build of app.js, app.css and editor-style.css. |
58-
| watch | Runs several watch scripts concurrently. |
59+
| watch | Recompiles after changes are made. |
5960

6061
## Tips
6162

@@ -87,7 +88,6 @@ You could also find the composer's global installation path by running `composer
8788
* [Screencasts](https://www.youtube.com/playlist?list=PL6GBdOp044SHIOSCZejodwr1HcYsC43wG)
8889
* [Tailwind CSS Documentation](https://tailwindcss.com/docs)
8990
* [Laravel Mix Documentation](https://laravel-mix.com)
90-
* [Esbuild Documentation](https://esbuild.github.io)
9191

9292
## Contributors
9393

comments.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
<?php
6666
comment_form(
6767
array(
68-
'class_submit' => 'bg-primary text-white cursor-pointer rounded font-bold py-2 px-4',
68+
'class_submit' => 'bg-primary text-white cursor-pointer rounded-xs font-bold py-2 px-4',
6969
'comment_field' => '<textarea id="comment" name="comment" class="bg-gray-200 w-full py-2 px-3" aria-required="true"></textarea>',
7070
)
7171
);

css/app.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/editor-style.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

header.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@
6868
</div>
6969
</header>
7070

71-
<div id="content" class="site-content flex-grow">
71+
<div id="content" class="site-content grow">
7272

7373
<?php if ( is_front_page() ) { ?>
7474
<!-- Start introduction -->
7575
<div class="container mx-auto">
76-
<div class="px-12 py-16 my-12 rounded-xl bg-gradient-to-r from-blue-50 from-10% via-sky-100 via-30% to-blue-200 to-90%">
77-
<div class="mx-auto max-w-screen-md">
76+
<div class="px-12 py-16 my-12 rounded-xl bg-linear-to-r from-blue-50 from-10% via-sky-100 via-30% to-blue-200 to-90%">
77+
<div class="mx-auto max-w-(--breakpoint-md)">
7878
<h1 class="text-3xl lg:text-6xl tracking-tight font-extrabold text-gray-800 mb-6">Start building your next <a href="https://tailwindcss.com" class="text-secondary">Tailwind CSS</a> flavoured WordPress theme
7979
with <a href="https://tailpress.io" class="text-primary">TailPress</a>.</h1>
8080
<p class="text-gray-600 text-xl font-medium mb-10">TailPress is your go-to starting
8181
point for developing WordPress themes with Tailwind CSS and comes with basic block-editor support out
8282
of the box.</p>
8383
<a href="https://github.com/jeffreyvr/tailpress"
84-
class="w-full sm:w-auto flex-none bg-gray-900 text-white text-lg leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-none transition-colors duration-200">View
84+
class="w-full sm:w-auto flex-none bg-gray-900 text-white text-lg leading-6 font-semibold py-3 px-6 border border-transparent rounded-xl focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-gray-900 focus:outline-hidden transition-colors duration-200">View
8585
on GitHub</a>
8686
</div>
8787
</div>

js/app.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mix-manifest.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"/js/app.js": "/js/app.js?id=435e606374bb44ea06de4ae5b0e31f61",
3-
"/css/editor-style.css": "/css/editor-style.css?id=03a0a90cc989a9d4c480a752574b37c3",
4-
"/css/app.css": "/css/app.css?id=1574f199e487c866afb056200ee1e6ce"
2+
"/js/app.js": "/js/app.js?id=0d7422a8ae75252433a07d493b311670",
3+
"/css/editor-style.css": "/css/editor-style.css?id=483ba8c1078ac43dba2289eb68afbe0a",
4+
"/css/app.css": "/css/app.css?id=503b9c303eb8e7ceee7d18c2ff7354d8"
55
}

0 commit comments

Comments
 (0)