http://redmine.emweb.be/http://redmine.emweb.be/favicon.ico?16934085252021-09-28T09:19:19ZRedmineWt - Improvements #9115: Set the version in WBootstrapTheme C'torhttp://redmine.emweb.be/issues/9115?journal_id=348432021-09-28T09:19:19ZRoel Standaertroel@emweb.be
<ul><li><strong>Target version</strong> set to <i>future</i></li></ul><p>We were actually refactoring the Bootstrap theme to be split up in multiple classes, so <code>WBootstrap2Theme</code>, <code>WBootstrap3Theme</code>, <code>WBootstrap4Theme</code>, and <code>WBootstrap5Theme</code>, since they end up being dissimilar enough to warrant their own class.</p>
<p>The theme directory may be something we can take into consideration.</p>
Wt - Improvements #9115: Set the version in WBootstrapTheme C'torhttp://redmine.emweb.be/issues/9115?journal_id=352452021-10-11T16:08:34ZRathnadhar K V
<ul></ul><p>Namaskara Roel,</p>
<p>That is wonderful.</p>
<p>May I suggest an improvement,</p>
<p>Have a common glue CSS class....WThemeContainer()....(name just a example, you can call it whatever you deem fit).</p>
<p>Now to this WThemeContainer class I add backend (s) ....WBootstrap2Theme ...WBootstrap5Theme....</p>
<p>Say I can add max of 8 backends. </p>
<pre><code class="cpp syntaxhl" data-language="cpp"><span class="kt">int</span> <span class="n">index</span> <span class="o">=</span> <span class="n">WThemeContainer</span><span class="p">(</span><span class="n">WBootStrap5Theme</span><span class="p">,</span><span class="n">responsive</span><span class="o">=</span><span class="nb">true</span><span class="p">,</span><span class="n">path</span><span class="o">=</span><span class="n">path_to_css_file</span><span class="p">);</span>
</code></pre>
<p>index 0 is fixed for Wt.css (fall back option) in case other css are not added.</p>
<p>Now WTheme class will have virtual member functions that is implemented by other CSS classes....</p>
<p>that way I can add any bootstrap similar theme easily ....</p>
<p>so in the application, only WThemeContainer is visible and based on index I get the css classes...</p>
<p>That way my WApplication is decoupled from back end theme....and I can easily add other frameworks' themes.</p>
<p>Regards<br>
Rathnadhar KV</p>
Wt - Improvements #9115: Set the version in WBootstrapTheme C'torhttp://redmine.emweb.be/issues/9115?journal_id=352462021-10-11T16:09:37ZRathnadhar K V
<ul></ul><p>Instead of index as int, you can even get a iterator to the theme within the container.</p>
Wt - Improvements #9115: Set the version in WBootstrapTheme C'torhttp://redmine.emweb.be/issues/9115?journal_id=475202022-09-06T08:12:38ZRoel Standaertroel@emweb.be
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Closed</i></li><li><strong>Target version</strong> deleted (<del><i>future</i></del>)</li></ul><p>I'm closing this since we now have separate Bootstrap classes.</p>
<p>Your idea does not seem feasible to me (or I don't quite understand it), since it's more than just CSS. The theme directly affects what HTML is being generated for the widgets.</p>