Recent

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

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 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 :)

k1ng

  • New Member
  • *
  • Posts: 37
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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • 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

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
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: 4219
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/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018