DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:stylingpages

stylingpages Plugin

Compatible with DokuWiki

  • 2018-04-22 "Greebo" yes
  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" unknown
  • 2015-08-10 "Detritus" unknown

plugin Allows users to change the css/js files of this plugin with wikitext.

Last updated on
2018-10-06
Provides
Action
Repository
Source

Tagged with css, javascript, style, styling

The intended use of this plugin is to manage the css/less/js files that the wiki reads from the plugin folder.

By default the configuration is empty.

:!: WARNING :!: this plugin can be abused to change other files, use it with care

Installation

Install the plugin using the Plugin Manager and the download URL above, which points to the latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

I use it to:

  • customize the template (a.k.a. theme)
  • add an advertisement
  • style classes for plugin wrap
  • …anything else that can be done with css and javascript after the page is loaded…

:!: WARNING :!: I recommend you restrict page edits with ACL when you allow script.js

See README for more examples.

This example creates, replaces, or deletes these files when the page wiki:styling is saved:

  • all.css and all.less - for all media types
  • screen.css and screen.less - for screen media type (style.css and style.less are alternatives)
  • print.css and print.less - for print media type
  • speech.css and speech.less - for speech media type
  • script.js

Configuration:

wiki:styling=/^(all|screen|print|speech)\.(css|less)$/, wiki:styling=/^script\.js$/

Wikitext of wiki:styling:

<code css all.css>
/* placed in <stylingpages_plugin_dir>/all.css */
#dokuwiki__site::before {
  content: 'Hello from stylingpages';
  color: black;
  background: white;
  border: 1px solid red;
}
</code>

<code css all.css>
/* combined with the code above (same file) */
#dokuwiki__site::after {
  content: 'Hello from stylingpages';
  color: black;
  background: white;
  border: 1px solid red;
}
</code>

<code javascript script.js>
/* placed in <stylingpages_plugin_dir>/script.js */
alert('Hello from stylingpages');
</code>

Development

Change Log

Known Bugs and Issues

ToDo/Wish List

Create an issue if you want something.

FAQ

No FAQ entries yet.

Discussion

I prefer issues, but you can also leave messages here. — flaviojsflaviojs

2018-10-06 17:05

plugin/stylingpages.txt · Last modified: 2018-10-29 19:29 by flaviojs