rejetto forum

The "Takeback" template - A different & modern taste

NaitLee · 67 · 17837

Poll

Do you want a tool for creating templates easily?

Yes, I know nothing about coding, but I can do Windows Paint
2 (25%)
Yes, I can do HTML/CSS, but not javascript nor macro
2 (25%)
Yes, I can do Web basics, but not HFS macro
3 (37.5%)
No, I'm a full-code developer
1 (12.5%)

Total Members Voted: 8

0 Members and 1 Guest are viewing this topic.

Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 170
  • Computer brained boy
    • View Profile
    • A Normal Webpage
Want Fuh-2.0-Liked grid filelist in Takeback? Use the diff tpl in attachment :D
Check out my template and PHFS ;)


Offline dj

  • Tireless poster
  • ****
    • Posts: 280
  • 👣 🐾
    • View Profile
    • PWAs
What should I do now?

Learn Nodejs and do further work on HFS3 :D
« Last Edit: February 06, 2021, 07:44:30 AM by dj »


Offline danny

  • Tireless poster
  • ****
    • Posts: 273
    • View Profile
Yes, HFS3,
Or, refit a master-scheduler to HFS2x so that it can't get overloaded/flooded by 1 thing.  Currently, I think that the only schedule is in downloads; but, upload, draw UI, archive, etc are unscheduled/conflict.  Would be better if all functions were inside a scheduler (task-swapper) module so that all get near-equal cpu time.
« Last Edit: February 09, 2021, 08:18:41 AM by danny »


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 170
  • Computer brained boy
    • View Profile
    • A Normal Webpage
Learn Nodejs and do further work on HFS3 :D

Ah, for some reasons I don't want to learn Node.
And by the way, I'm not really a tech-master, cannot do large projects with multiple files relied to each other, at least for now.
Sorry for that.

Besides, I just trying to make a template interpreter for a minimal "HFS" in Python, cross platform and lightweight for template making & debugging.
It's been a long time since last trial and I've messed up... Now trying to re-write...

P.S. I worry about that if anything unfortunate happened then we cannot use our beloved HFS 2, so I had such an idea. I'm not wondering to replace it. Don't think too much :)
P.S.2. I want to get away from the hand of Windows, should I write my Linux experience on this forum/elsewhere like GitHub Pages to help other guys who want so?

Would be better if all functions were inside a scheduler (task-swapper) module so that all get near-equal cpu time.

@Rapid has a version of HFS 2 that splitted server and client code. Have a try on that?
Check out my template and PHFS ;)


Offline Rapid

  • Occasional poster
  • *
    • Posts: 48
    • View Profile
    • R&Q Portal
...
@Rapid has a version of HFS 2 that splitted server and client code. Have a try on that?
I'm just trying to split.
One of the problems is that macroses are rely on client side


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2043
    • View Profile
in theory any language can be used to create a template interpreter, you need to create a syntax parser for two types of macros: {. .} and {::}, in an execution tree pointing to a reference table with the different macro names and the procedures for the associated actions

most of the hfs macros are processed in scriptLib.pas and the parser in parserLib.pas

an hfs interpreter written in java would allow portability on several platforms,

using php would surely be possible but it would certainly have limits because it is already an interpreted language


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 170
  • Computer brained boy
    • View Profile
    • A Normal Webpage
Takeback 0.3 is done :) see first post

Features:

Basic things
File Preview, comment
Music player, lyric support (.lrc)
Login, Logout, Change password
File/Folder Manipulation
anti-file-corrupt
thumbs, slideshow
Generator
Localize
« Last Edit: April 14, 2021, 04:50:32 AM by NaitLee »
Check out my template and PHFS ;)


Offline danny

  • Tireless poster
  • ****
    • Posts: 273
    • View Profile
compact lazyload script
Code: [Select]
<script>document.addEventListener("DOMContentLoaded",function(){var e,t;"IntersectionObserver"in window?(e=document.querySelectorAll(".lazy"),t=new IntersectionObserver(function(e,n){e.forEach(function(n){n.isIntersecting&&setTimeout(()=>{var e=n.target;e.src=e.dataset.src,e.classList.remove("lazy"),t.unobserve(e)},181)})}),e.forEach(function(e){t.observe(e)})):alert("Your browser needs an update")});</script>has 181ms delay in-between photos so that the server has some time to perform other tasks or serve multiple users 

The new version of Takeback seems to spend more time with macros; maybe there are some tasks that can be done with javascript (many client CPUs) instead of macro (one server CPU)? 
« Last Edit: April 28, 2021, 03:19:13 PM by danny »


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 170
  • Computer brained boy
    • View Profile
    • A Normal Webpage
compact lazyload script...

In takeback 0.2 I used your script, it works well
In new version I used native lazyload because I want to keep it simple
Check out my template and PHFS ;)


Offline vladimirov70

  • Occasional poster
  • *
    • Posts: 22
    • View Profile
    • Concept of Public Security

Offline 9M127

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
Hey man. I really enjoy your amazing template! And THX for your translating here, that's nice!~
As a Chinese user, I can see there a tiny mistake in your translation. It's in the "Properties" > "flags" menu, the check button "No downloads" is translated as "不记录下载". In English “不记录下载” means "Don't log downloads". I was confused by it for a time, until I tried to have the flag "不记录下载"  of one of my folders checked, and the files under that folder is could not be downloaded anymore. So, honestly I believe its a wrong translation for "No downloads". A correct translation for this flag is “不允许下载”. So i hope you can correct that.
I also have a suggestion that you can make a tiny change to your template to improve your template. Yesterday, when I was trying to select a background image in your template-generator, I noticed the background-size of background-image is set to some fixed sizes rather than "cover". Fixed sizes are good for repeated pictures which users want to show as background, but mostly, users want their pictures extend and cover to the entire page. So I think it's a good idea to set up a selection for it in your template-generator.
I'm not a web development or scripting professional, even my college major is not much related to computer science. So above could be rash advices, go with your gut young man!
Appreciate your passion for computer science, thanks for your contribution here again! ;)


Offline NaitLee

  • Tireless poster
  • ****
    • Posts: 170
  • Computer brained boy
    • View Profile
    • A Normal Webpage
Hey man. I really enjoy your amazing template! And THX for your translating here, that's nice!~

Oh thank you!

For the "fixed size" problem, it's when I "inheriting" the star field css and forgot to delete them, also forgot to test.

I'll fix them :)
Check out my template and PHFS ;)


Offline 9M127

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
Hi there, guy!
I found another bug these days. When you click "Archive" after selecting a folder, or Multi-Selecting 2 or more folders, it won't work as we expected. The browser would show an error of Empty Response. I notice there's a same bug in the default template of HFS 2.4. I'm using Edge browser based on chromium.


Offline LeoNeeson

  • Tireless poster
  • ****
    • Posts: 768
  • Status: On hiatus (sporadically here)
    • View Profile
    • twitter.com/LeoNeeson
Hi there, guy!
I notice there's a same bug in the default template of HFS 2.4.
Does it work fine using HFS v2.3m? (assuming you are using the latest HFS v2.4.0 RC7). My question is important to know if there was some "regression" on the latest version (if you have time, please test old builds, one by one, like RC6, RC5, RC4, RC3, etc until finding the last working version). Always make a backup of your *.ini, *.vfs and *.tpl files before doing any test.


Offline 9M127

  • Occasional poster
  • *
    • Posts: 5
    • View Profile
Does it work fine using HFS v2.3m? (assuming you are using the latest HFS v2.4.0 RC7). My question is important to know if there was some "regression" on the latest version (if you have time, please test old builds, one by one, like RC6, RC5, RC4, RC3, etc until finding the last working version). Always make a backup of your *.ini, *.vfs and *.tpl files before doing any test.

The Template file takeback.standard.tpl doesn't work on HFS 2.4 RC1 or earlier versions. So I tested from 2.4 RC2 to 2.4 RC7. The results show that the "Takeback" template works well until RC4. This problem only occurs in versions RC4 and above. What's more, in RC7 (the latest version currently), this problem occurs even when I'm using the default template, and this time you will get a page of javascript from the server.