Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Themes & Styling

New created theme with dev tools (tailwind) - no logo or stylesheets working?

Started by maddin 4 years ago · 3 replies · 720 views
4 years ago

Hi there,

I play around with Grav CMS and its plugin dev tools. With this plugin I had successfully created a theme with tailwind.

I am a bit confused about a thing with this theme. In the "head" of the page I can see this code:
<link rel="icon" type="image/png" href="/user/themes/taily/images/logo.png" />

I can click on the link and I see the Grav-logo in a new browser window.

But I can not see this image on the page itself. Why?

The code in base.html.twig of the image is this:
<link rel="icon" type="image/png" href="{{ url('theme://images/logo.png')|e }}" />

Also the whole page output seems not working right now. It seems that the stylesheet is not loading exactly!

How can I fix it?

4 years ago

@wmcig, It looks like the tailwind theme generated with $ bin/plugin devtools new-theme is totally broken.

Template /user/themes/taily/templates/partials/base.html.twig loads css as follows:

TWIG
{% do assets.addCss('theme://dist/css/app' ~ extension ~ '.css', 98) %}

However, that file does not exist at all...

You might consider creating an issue at https://github.com/getgrav/grav-plugin-devtools/issues

4 years ago

Opened an issue on Github. Hope that will be fixed very soon.

4 years ago

@wmcig, Just learned something...

The tailwind theme generated by devtools is not a "prêt-à-porter " theme. You first need to:

  • $ cd user/themes/yourtheme
  • $ npm install
  • $ npm run build

But even that is not enough... the /dist/css/app.css that is loaded by the template still not not exist. The npm script generates /dist/css/site.css.

A patch has already created at the repo, but probably a new release must be created. The latest release dates from Oct. 26, 2021 while the new commit is from March 14, 2022.

I've added a comment to the issue.

last edited 12/21/22 by pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by Pedro M, 2 months ago
4 197 2 months ago
Themes & Styling · by Ian, 2 months ago
3 92 2 months ago
Themes & Styling · by Norbert, 2 years ago
11 454 3 months ago
Themes & Styling · by Lukáš Findeis, 3 months ago
0 47 3 months ago
Themes & Styling · by Sebadamus, 4 months ago
5 127 3 months ago