Recent

Author Topic: Update lazarus-ide.org home page  (Read 657 times)

trev

  • Sr. Member
  • ****
  • Posts: 259
  • Former Delphi 7 and Delphi 10.2 User
Update lazarus-ide.org home page
« on: July 20, 2019, 02:22:27 am »
Existing home page footer:

Code: XML  [Select]
  1. <div class="footer">
  2.                 <p class="foot_left small">&copy; 1993-2017 Lazarus and Free Pascal Team</p>
  3.                 <div class="foot_right">
  4.  

Suggest instead:

Code: XML  [Select]
  1. <div class="footer">
  2.  
  3. <script type="text/javascript">
  4.   <!--
  5.        var today = new Date()
  6.         document.write("<p class='foot_left small'>&copy; 1993-");
  7.  
  8.        if( today.getYear() > 1900 )
  9.           document.write(today.getYear());
  10.        else
  11.          document.write(today.getYear() + 1900);
  12.  
  13.        document.write(" Lazarus and Free Pascal Team</p>");
  14.    //-->
  15. </script>
  16.  
  17. <div class="foot_right">
  18.  

If Javascript isn't acceptable, then just change the year from 2017 to 2019 :)
o Lazarus v2.1.0 r61775, FPC v3.3.1 r42640, macOS 10.14.6 (with sup update), Xcode 10.3
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

k1ng

  • New Member
  • *
  • Posts: 36
Re: Update lazarus-ide.org home page
« Reply #1 on: July 20, 2019, 04:15:45 am »
Quote
Copyright Free Pascal team 1993-2018.
Something similar should be applied for https://www.freepascal.org/ as well.

lucamar

  • Hero Member
  • *****
  • Posts: 2147
Re: Update lazarus-ide.org home page
« Reply #2 on: July 20, 2019, 06:34:04 am »
Irrelevan, nitpicking and off-topic but ... this being 2019, why are you still using document.write? Shouldn't you be changing the innerHTML of an internal SPAN or something like that? :D
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.4/2.0.6  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7636
Re: Update lazarus-ide.org home page
« Reply #3 on: July 20, 2019, 09:46:47 am »
Quote
Copyright Free Pascal team 1993-2018.
Something similar should be applied for https://www.freepascal.org/ as well.

There isn't a release in 2019 yet. But I updated it anyway:-) Will be visible tomorrow

lucamar

  • Hero Member
  • *****
  • Posts: 2147
Re: Update lazarus-ide.org home page
« Reply #4 on: July 20, 2019, 11:19:22 am »
There isn't a release in 2019 yet. But I updated it anyway:-) Will be visible tomorrow

Ah ... I may be wrong but, isn't that notice for the website? Then it should reflect the date the website was last modified (e.g. when some news get added). Nothing (or little :)) to do with project releases.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.4/2.0.6  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5800
    • wiki
Re: Update lazarus-ide.org home page
« Reply #5 on: July 20, 2019, 12:33:11 pm »
Irrelevan, nitpicking and off-topic but ... this being 2019, why are you still using document.write? Shouldn't you be changing the innerHTML of an internal SPAN or something like that? :D
Well, if it is done client side, shouldn'n the source be pascal? And the js be generated by Pas2Js?

Anyway done it server side. It may take a while till it gets uploaded. Worst case, it goes online with the next release.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7636
Re: Update lazarus-ide.org home page
« Reply #6 on: July 20, 2019, 12:38:11 pm »
There isn't a release in 2019 yet. But I updated it anyway:-) Will be visible tomorrow

Ah ... I may be wrong but, isn't that notice for the website?

No you are not wrong, but basically it is equivalent, since releases are usually when the site is updated :-*

lucamar

  • Hero Member
  • *****
  • Posts: 2147
Re: Update lazarus-ide.org home page
« Reply #7 on: July 20, 2019, 01:07:02 pm »
Irrelevan, nitpicking and off-topic but ... this being 2019, why are you still using document.write? Shouldn't you be changing the innerHTML of an internal SPAN or something like that? :D
Well, if it is done client side, shouldn'n the source be pascal? And the js be generated by Pas2Js?

Anyway done it server side. It may take a while till it gets uploaded. Worst case, it goes online with the next release.

The coment was about te OP addition, which is embedded in the webpage. So JS all the way :)

The thing is document.write() has been ... hmmm .. deprecated? not recommended? frowned upon? from quite a lot of time now (as in "since ten or more years ago").

The "new" way of doing it is something like:
Code: HTML5  [Select]
  1. <p class='foot_left small'>&copy; 1993-<span id="lmyear">2018</span> Lazarus and Free Pascal Team</p>
  2. <script tpye="text/javascript">
  3.   with (document) {
  4.     lmd = new Date(lastModified);
  5.     getElementById("lmyear").innerHTML = lmd.getFullYear();
  6.   }</script>

But I'm not a JS expert (just a dabbler, in fact) so I may well be wrong. And as I said off-topic, both for the thread and the forum. :-[

ETA: And I just noticed that code may not be appropriate for a copr. notice. I use it to add a "Last modified on " to static pages but the copr. should be fixed and the same for all pages. :(
« Last Edit: July 20, 2019, 01:15:38 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.4/2.0.6  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.