Spoova 2.6 Layouts
The template engine layouts syntaxes has been modified for css and javascript rex files. The earlier layout template format flags error for IDEs which makes it harder to detect when real errors occur. This minor issue has been fixed. While the old layout formats are still supported, the newly introduced layouts addresses this issue.
CSS Layouts
The layout format below is a sample of the old css layout format which flags false errors for IDEs.
old: sample.rex.css
  #style:blockid
  
  body {
     background-color : red;
  } 
  
  #style;
                                        
While the layout above is still supported, the new layout format below is much preferable
new: sample.rex.css
  /* style........ blockid: */ 
  
  body {
     background-color : red;
  } 
  
  /* style........ blockid; */
                                        
The commenting block above is the new syntax for sectionalizing css layout files. It is defined by an opening comment block and a closing comment block with slight differences. The opening comment block has a single padding space at both the beginning and the end of its content. The content itself is preceded by a string "style" followed by any length of dot character, then finally ended with the opening unique id along with a colon suffix. The closing comment block is similar to the opening comment block except that the unique id is ended with a semicolon delimiter suffix. Any content that stays within these comment blocks is considered as a css code. Also, just like the old layout we can have multiple layouts within a css template layout file. An example of this is shown below:
  /* style........ theme1: */ 
  
  body {
     background-color : white;
  } 
  
  /* style........ theme1; */
  
  
  
  /* style........ theme2: */ 
  
  body {
     background-color : black;
  } 
  
  /* style........ theme2; */
                                        

Javascript Layouts
The layout format below is a sample of the old css layout format which flags false errors for IDEs.
old: sample.rex.js
  #script:blockid
  
  function hello() {
  
      alert('hello');
  
  } 
  
  #script;
                                        
While the layout above is still supported, the new layout format below is much preferable
new: sample.rex.css
  /* script........ blockid: */ 
  
  function hello() {
  
      alert('hello');
  
  } 
  
  /* script........ blockid; */
                                        
The commenting block above is the new syntax for sectionalizing css layout files. It is defined by an opening comment block and a closing comment block with slight differences. The opening comment block has a single padding space at both the beginning and the end of its content. The content itself is preceded by a string "style" followed by any length of dot character, then finally ended with the opening unique id along with a colon suffix. The closing comment block is similar to the opening comment block except that the unique id is ended with a semicolon delimiter suffix. Any content that stays within these comment blocks is considered as a css code. Also, just like the old layout we can have multiple layouts within a css template layout file. An example of this is shown below:
  /* #script........ js1: */ 
  
  function hello() {
  
      alert('hello');
  
  } 
  
  /* #script........ js1; */
  
  
  
  /* #script........ js2: */ 
  
  hello();
  
  /* #script........ js2; */
                                        
The javascript template also supports inline comment. This is shown below.
  // #script........ js1:  
  
  function hello() {
  
     alert('hello');
  
  }
  
  // #script........ js1; 
  
                                      
It is important to keep the single space after the comment slashes before declaring the script hash. Also, the script @script() importing directive remains the same.