rejetto forum

a new beginning...

rejetto · 86 · 69372

0 Members and 1 Guest are viewing this topic.

Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
You might find it interesting to know that these days I am a professional software engineer and I'm proud to say that HFS and its template scripting is how I got my (unconventional) start.

wow, that's totally unexpected and amusing :D
let's have a coffee next time I stop by NYC


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
I don't interested in Node for some reasons. But I wonder if there will be a template engine, just like the old classic HFS2.

I will make something but I'm not sure what. I'm postponing the matter as we are at an early stage.
When plugin will be possible they will surely be javascript, and not the hfs2 scripting language.
Consider that all the "template" stuff at the moment resides in the "frontend" folder, and is a totally separated software that you may change or rewrite.
The frontend/template is calling server's API to build the final content. This is the new architecture.
The current state of the work doesn't allow you to replicate old scripting language, as it was server-side, while frontend is totally client-side.
Future plugins may add the server-side commands you miss.
I don't think we'll miss the old language, javascript on the server is so much more nice and powerful.


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
... So it successfully reads it but then cannot rewrite it. ...

Thanks. The folder was read-only. Now it works. :)

Next I'll test my template.
Need to learn typescript first (modified).


try also other themes like live

« Last Edit: January 07, 2022, 12:31:32 PM by dj »


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
Few obstacles here in testing, but overall great ;)

OS: Manjaro
Environment: Node.js v17.2.0
Browsers: Firefox 96.0b3, Chromium 96.0.4664.93

Since exe is not needed here, I just take the hfs0.3.0.zip from release.

First node complains cannot find module './QuickZipStream'.
Seeking around, and found there's a quickZipStream.js in root folder.
So in filesystems like ext4 filenames are case-sensitive. Be aware of that :D

By correcting the letter-case and specifying a port (other than 80), it started successfully.

Then a google stuff stalking around:
Code: [Select]
<link href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined" rel="stylesheet" id="iconsFile">
By blocking the request, the list loads blazing fast.
And, seems there's missing a CSS rule: #root { margin: auto; } ::)

By adding home folder to config.yaml, it is listed. There are many items, but listing is still that fast.

Without icons loaded it looks silly (for the long alt duplicate strings). Wish there can be a better (local) approach.

By the way, it is almost impossible for a normal user to edit the 244kb minified javascript to fit normal/special needs. Starting from source is tough.
... Yes I'm thinking about template again ::) no need to think too much, just go with our own pace :D
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
thanks for reporting the quick*.js problem. I reuploaded the release so that it's fixed.
Can you tell me why you removed the icons file ?
the strings in place of the icons are the way those icons work. The fact they appear is unwanted.
Not relying on the google server for the icons was already in the to-do.
ok for the margin:auto.

you should NOT try to edit the minified javascript.
They are not supposed to be edited for the time being.
The frontend will soon have some customization capabilities, I still need to understand what's really needed.
For those that need HEAVY customization, totally replacing the "frontend" folder will be an option.
Anyway, that should be the last option. Let's try to focus on customizing the default frontend without touching it.
Tell me what you would like to customize exactly.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Next I'll test my template.
Need to learn typescript first (modified).

I don't think you should learn typescript.
I want the default frontend to be customizable to some extent. Let's talk about your needs, as stated in my post above.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile

Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 203
  • Computer-brain boy
    • View Profile
thanks for reporting the quick*.js problem. I reuploaded the release so that it's fixed.
Can you tell me why you removed the icons file ?

The lower-cased "quick" is found in 0.4.0. Also fix that :)
Oh right, all google services are banned in my locale, including the search engine, its resource api/cdn, and captcha...

For those that need HEAVY customization, totally replacing the "frontend" folder will be an option.
Anyway, that should be the last option. Let's try to focus on customizing the default frontend without touching it.
Tell me what you would like to customize exactly.

Yeah, this inspires me to go deeper... ::)
My goal is to make "old" templates (of HFS2) to be able to be used in this brand new version.
Because this project will develop in time, but the Delphi version will still have audience for a long time.
Why don't just cover them both :D
I don't like the so-called "compatibility" either. But this time it's not "compatible" but "universal", right ::)

So here it comes: the "Tradit-TPL" plan, it aims to add a layer to this new version to support legacy templates.
In attachment there's a WIP version that can do sections & few symbols. Of course macros are on-the-way.
It uses some concepts from PHFS. So we can just walk toward :D
Read the readme in archive and follow it to try.
If have no interest in it, just let the community take the job. :D

PS. Dynamic page and Ajax have different pros & cons. Selection is by one's preference.
PPS. I personally want to renew the development of my template but keep one codebase and some traditions of Throwback.



While making above work, I've found a possible bug in `frontEndApis.file_list`:

Argument `sse` is directly from url query, so it's string. Even when we pass `?sse=0` it is still true.
So may convert it to number along with `offset` and `limit`.

Cheers~
« Last Edit: January 04, 2022, 02:40:32 PM by NaitLee »
"Computation is not forbidden magic."
Takeback Template | PHFS


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
sorry for the lowercase, i fixed the zips.
I'm not sure how that shit survived, but i now cleared the "dist" folder and hopefully it won't happen again.
I'm not willing to support the old template system. It was conceived 20 years ago and I think we can have better things now.
The new system is totally different, and there's so much work to do going forward.
The line you say is correct, it means that when SSE is used then data is transmitted via sseSrv.send, not by returning it.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Argument `sse` is directly from url query, so it's string. Even when we pass `?sse=0` it is still true.
So may convert it to number along with `offset` and `limit`.

or you can just NOT pass it to have it falsy.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
just to be clear, the fact that at the moment I don't plan to introduce compatibility with old templates doesn't mean I won't help you with your project.
I had a look at your sources. My suggestion is to change my sources for testing purposes only, but after you clearly identify your needs we should try to imagine it as a plugin to put in the "plugins" folder.
Apparently you may need to to totally replace the serveStaticFrontend.
If we want to play with expanding plugins capabilities we should do it possibly without passing by official releases distribution.
You may use git, or I may pass you files/changes privately.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
https://github.com/rejetto/hfs/releases/tag/v0.5.0-alpha

@NaitLee have a look at the new plugin example, it may be what you need for your project.
Refer to the README file for details


Offline dj

  • Tireless poster
  • ****
    • Posts: 291
  • 👣 🐾
    • View Profile
    • PWAs
@NaitLee have a look at the new plugin example, it may be what you need for your project.
Refer to the README file for details

Have you another example of the middleware plugin?
I don't make sense of it .
Can we manipulate the DOM?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
middleware is server side.
DOM is client side.
if you need to manipulate the DOM you need something else.
anyway, the default frontend is a React application, I don't think you can freely mess with the DOM.
I suspect that those of you who want to keep the old methods may need a totally different frontend, completely replace the frontend folder.
The middleware thing is probably useless.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
anyway, if you tell me about what are your DOM needs, i may think of something.
Of course you should first see if it's solvable with style alone.