Need info about Plone js/css

@vangheem, did you mean @JotaMG should use a clone of GitHub - plone/plonetheme.barceloneta: The default theme for Plone Classic UI (but with all names and metadata changed) to make it work? Or did you mean, @JotaMG should checkout newest plone.app.theming where the discussed bug is fixed?

By the way, I like the simple theme idea - some really simple, bare theme without any dependencies to Bootstrap - that would help to develop new themes.

If one doesn't want all the JS functionality, one can just disable it and see if the site is still usable for anonymous users (should be usable...).

@thet No. The error that he is seeing is caused by: https://github.com/plone/plone.app.theming

We do have a link to Plone 5-compatible packages on the plone.org/products page.

The new Plone.org is making significant progress and will be launched Real Soon Now. Everyone on the team needed a break after the massive P5 push and Bucharest.

1 Like

I do not know what is your use case exactly, but:

  • JS/CSS are mainly needed for contributors (bare HTML would not allow to build a modern interface for contributors, because they need a richtext editor, they need dynanic pickilist, modals, etc.)
  • JS/CSS which are not specifically for contributors (enabling tooltips, live search, etc.) are necessary if you use the default theme, but you can create very easily a custom theme which does not involve those features.

If you do that, your markup and your CSS can be as light as you want, you will have no JS anywhere, and your Plone site will be really fast, even on old hardware with slow connection.

Ok, with the new https://github.com/plone/plone.app.theming it works, thanks.
And yes the legacy bundle seems to not be necessary.

Now, if someone is wiling to help to make a "light" theme, I can work on that. I have not used Plone for a long time, since P4.1, so everything in P5 feels like new to me.

My sugestion is to have something like the plonetheme.sunburst, that in my opinion is not so ugly, it needs much less Css and Js, and works ok, just need to make it responsive.

(maybe if someone that knows better the current core can try to see if Sunburst runs in P5, it will be a welcome start)

What do you think?

Yes Eric, that is the sugestion I leave on the previous post.
(my use case and I think for many people also is to only have jquery - css, the less the better - it can be added later, if needed)
Anyone can help kickstart this?
I think it will be necessary to create a specific P5 Js/Css bundle for this ligth theme, right?

Diazo creates automatically the bundles for your theme, so you do need to worry about that.
Creating a Plone theme is very easy with Diazo compare to Plone 4 regular themes.
You just need to provide a static theme (you can download one here for instance: http://startbootstrap.com/template-categories/all/ or wherever, it is not Plone specific, any web theme can work).
And then you inject your Plone content into your theme using Diazo rules (in your rules.xml file).

See http://docs.plone.org/external/plone.app.theming/docs/index.html and also http://training.plone.org/5/theming/index.html

Creating a Python package for your theme is not even necessary, see http://rapidoplone.readthedocs.org/en/latest/easy-plone.html#theme-it

1 Like

I had already tried the last approach you sugest, it kind of worked but then I was unable to edit or create content, among other things.
Is there a simple way to just theme the front-end, and still have the barceloneta theme for the logged users??

Oh yes, that's very easy.
Just copy the barceloneta theme (you can do it from the theming editor interface directly), and then in your rules.xml, just add a rule for anonymous users to use your HTML template, and wrap all the Barceloneta rules into a rule for logged-in users.
It will like this:

<rules css:if-content=".userrole-anonymous:not(.template-login_form):not(.template-mail_password_form)">
    <theme href="your_own_template.html" />
    ... here your rules to insert title, description, main content, whatever...
</rules>
<rules css:if-content=".userrole-authenticated, .template-login_form, .template-mail_password_form">
    <theme href="index.html" />
... all the Barcelontea rules...
</rules>

That way all your pages served to anonymous visitor will use your_own_template.html (where you can put the JS or CSSS you want and forget about the ones produced by Plone), and if you are logged then you see the default Plone theme.
Note: there is one useful exception: generally you prefer anonymous visitors to see the login page themed with Barceloneta.

1 Like

There is a slightly better way to do this.

http://docs.plone.org/adapt-and-extend/theming/barceloneta.html#using-the-barceloneta-theme-only-for-the-backend

It will show the toolbar on both frontend and backend view but the backend views will use barceloneta and the frontend ones will use your own custom theme.
The downside is there is currently no very minimal bundle for just whats needed for the toolbar only.

1 Like

That's nice indeed.
But which kind of the use cases would need the toolbar in the frontend ?

so you can browse around the site, edit/cut/copy/paste etc on the themed site (with the toolbar) but when you switch to tinymce or sitesettings or any plone dialog, it switches back to Barceloneta. It means you don't switch between two tabs, one logged in and one not.

Ok, I see, that way the contributor can see the pages the way they are displayed to visitors. Good point.

Still trying to learn... stupid question:

with Plone 5 , are collective.dexteritytextindexer or collective.folderishtypes needed??
do they add some new feature/functionality to the P5 default content types?

Also, by the way, are there any recommended add-ons that extend or add important and/or relevant features to the P5 dexterity content types?

Thanks!

collective.folderishtypes is useful with Plone 5 if you want your non-folderish contents to be folderish.

I do not think collective.dexteritytextindexer is useful anymore.

@JotaMG, it would be great if you just open a new topic, this follow up question has no relation to Plone js/css.

Did someone make another way of designating which Dexterity fields should be included in SearchableText that I'm not aware of?

Actually no, I was wrong.
So collective.dexteritytextindexer would be useful, nevertheless it is not Plone 5 compliant at the moment.
I am pretty sure there are not many changes to do to make it compliant, but still, we need to work on it.

Here is a PR https://github.com/collective/collective.dexteritytextindexer/pull/13, the changes were small.

A post was split to a new topic: How to add TinyMCE plugin to plone.logged.compiled script?