[Pas2js] Modern UI for pas2js

cbsistem cbsistem at yahoo.com.br
Sat Feb 23 17:34:48 CET 2019


it would be interesting to use expressions or variables as a parameter. It is
not necessary to leave the filename fixed.

example:

var
  _filename:string;

begin
   _filename:= request.params['myfile'];

 {$INCLUDESTRING _filename } ;  //use variables

end;


tanks


Michael Van Canneyt wrote
> On Wed, 20 Feb 2019, warleyalex via Pas2js wrote:
> 
>> I recreated/translated an old project "Project ATM for pas2js"
>> LIVE PREVIEW: https://pas2js.github.io/master/projATM/www/index.html
>> use the PIN = 1234 
>>
>> This is really a simple app! Really, I'm interested in doing it with
>> Lazarus
>> this designer entirely, and get minimum/lower file JS footprint.
>>
>> Gentlemen, how to you see the method of drawing UI in Lazarus? 
>>
>> Basically, there are 2 ways to create a modern UI in Lazarus.
>>
>> 1. components /UI/Frameworks based on "custom paint"
>> 2. implement basic CSS drawing and positioning around LCL
>>
>> a long time ago I tried the second option. And it's quite easy to
>> implement
>> basic drawing using CSS. But there are too many challenges for me. And I
>> think this concept to design UI is wrong. I sincerely don't the TMS Core
>> approach. I always prefer handwritting HTML and CSS approach to design
>> complex apps.
> 
> I understand that some people like this. It is also more in line with
> modern
> frameworks like Angular/React/Vue. That is why I am working on
> 
> a) A templating engine for the client part. Something like
> 
>    
> MyComponent:=LoadComponent(GetElementByID('mycontainer'),'component.html','component.js');
> 
>     should be easily doable.
>     I think a 'component' (in the sense of webcomponent) can correspond to
> a combination of a unit and a html template.
> 
> b) integrating cef in the IDE designer using the custom form designer.
> 
>>
>> ---------
>> OFFTOPIC: Please  implement the "Multi line strings" feature, which can
>> be
>> quite useful when you have multi-line string content, a long format
>> string,
>> a snippet of CSS or HTML etc. Something like the syntax of Prism/Oxygen:
>>
>> var s := #"
>>   Lorem ipsum 'dolor' sit amet, consectetur adipiscing elit.
>>   Duis l'ipsum odio, pretium ""hendrerit"" varius sed,
>>   aliquet vitae elit.
>>   Sed eu libero nec nisl ""malesuada"" dignissim.
>> ";
> 
> This will not happen.
> 
>>
>> or feature like  {$INCLUDE 'page1.html'} to include a file as a string it
>> would be nice addiction.
> 
> But this can be done. There is even a feature request in FPC for it, with
> a
> patch. {$INCLUDESTRING 'page.html'}
> 
> Michael.
> _______________________________________________
> Pas2js maillist  -  

> Pas2js at .freepascal

> http://lists.freepascal.org/cgi-bin/mailman/listinfo/pas2js





-----
Cristiano Barbosa
--
Sent from: http://pas2js.38893.n8.nabble.com/


More information about the Pas2js mailing list