DokuWiki

It's better when it's simple

User Tools

Site Tools


devel:ideas:templatestyler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Both sides next revision
devel:ideas:templatestyler [2015-04-06 04:07]
sancaya [Discussion]
devel:ideas:templatestyler [2015-08-11 12:00]
ach added note about finished implementation
Line 1: Line 1:
 ====== Template Styler ====== ====== Template Styler ======
 +
 +:!: This has now been implemented as the [[plugin:Styling]] plugin and integrated into the core since Detritus.
  
 Most DokuWiki [[:templates]] contain a ''[[devel:style.ini]]'' file which lets you customise various aspects of each template (main colours, layout width, font sizes, etc). There is currently no user-friendly way to do that as you would need to update that file manually on the file system level. Most DokuWiki [[:templates]] contain a ''[[devel:style.ini]]'' file which lets you customise various aspects of each template (main colours, layout width, font sizes, etc). There is currently no user-friendly way to do that as you would need to update that file manually on the file system level.
Line 59: Line 61:
  
 In order to edit template and see how it would change, we might do this: In order to edit template and see how it would change, we might do this:
-  * Plugin adds an element to a page that invokes style editing (like [[plugin:loadskin]] does). So a user can edit template styles from any DokuWiki page. +  * Plugin adds an element to a page (like [[plugin:loadskin]] does) to open style editing. So a user could edit template styles from any DokuWiki page. 
-  * This element (#1) would toggle an ovelapping div (#2) over the page. So a user could use control elements to edit styles, not interfering with page content. See picture: [[https://forum.dokuwiki.org/thread/12449]]+  * See picture: [[https://forum.dokuwiki.org/thread/12449]]. This element (#1) would toggle an ovelapping div (#2) over the page. So a user could use control elements to edit styles, not interfering with page content.
   * Clicking "save" there we can send an action request through AJAX, like <code>   * Clicking "save" there we can send an action request through AJAX, like <code>
 jQuery.ajax({ jQuery.ajax({
Line 68: Line 70:
 }); </code> }); </code>
   * Plugin would take data from this request, for example like ''?do=style&__background_site__=#F3F1E5'' and process, updating conf/tpl/<...>/style.ini etc.   * Plugin would take data from this request, for example like ''?do=style&__background_site__=#F3F1E5'' and process, updating conf/tpl/<...>/style.ini etc.
 +  * Javascript rebuilds the page styles according to received data.
 What do you think? --- [[user>sancaya|Constant Illumination]] //2015-04-06 03:54// What do you think? --- [[user>sancaya|Constant Illumination]] //2015-04-06 03:54//
  
devel/ideas/templatestyler.txt · Last modified: 2015-08-11 12:00 by ach