Page 1 of 1

HeaderSection/EndHeaderSection

Posted: Mon Aug 04, 2025 1:48 pm
by Stefan
What can I do with this? Can anyone gib an example?

Re: HeaderSection/EndHeaderSection

Posted: Mon Aug 04, 2025 2:43 pm
by useful
viewtopic.php?p=11203#p11203
<!DOCTYPE html>
<html>
<head>
!!! --- !!! <<<----|
</head>
<body>
<p> ... HTML5</p>
</body>
</html>

Re: HeaderSection/EndHeaderSection

Posted: Mon Aug 04, 2025 2:53 pm
by Peter
Is your <F1> key broken? ;)

Code: Select all

#myWindow = 0
#myContainer = 0

HeaderSection

<script src="https://cdn.jsdelivr.net/npm/uplot@1.6.32/dist/uPlot.iife.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/uplot@1.6.32/dist/uPlot.min.css" rel="stylesheet">

EndHeaderSection

Procedure DrawChart()
  
  Protected myContainerGadgetID = GadgetID(#myContainer)
  Protected myContainerWidth = GadgetWidth(#myContainer)
  Protected myContainerHeight = GadgetHeight(#myContainer)
  
  EnableJS

    // Example-Data: X = Time, Y = Values
    const data = [
      [1546300800, 1546387200, 1546473600, 1546560000], // X-Axis Unix-Timestamps
      [20,            30,         25,         35]       // Y-Axis Values
    ];

    const options = {
      width: v_mycontainerwidth,
      height: v_mycontainerheight,
      series: [ {}, { label: "Value", stroke: "blue" } ],
      axes: [ {}, { label: "Value" } ],
    };

    const chart = new uPlot(options, data, v_mycontainergadgetid.div);

  DisableJS
  
EndProcedure

OpenWindow(#myWindow, #PB_Ignore, #PB_Ignore, 1000, 500, "uPlot-Example", #PB_Window_ScreenCentered)
ContainerGadget(#myContainer, 10, 10, WindowWidth(#myWindow) - 20, WindowHeight(#myWindow) - 20, #PB_Container_Single) : CloseGadgetList()
DrawChart()

Re: HeaderSection/EndHeaderSection

Posted: Tue Aug 05, 2025 2:16 pm
by Stefan
I don't have to understand it either :D
Thank you :)

Re: HeaderSection/EndHeaderSection

Posted: Tue Aug 05, 2025 2:52 pm
by Peter
SB-Help" wrote:HeaderSection

Introduction

SpiderBasic allows to easily customize the <header></header> section of the app HTML file. It can be useful when needed to add additional meta tags or to include css or javascript files directly in the HTML.
Commands


Syntax
HeaderSection
Description
Open the header section. All the code put into the HeaderSection will be directly added at the end of the <header></header> section. If a tag already exists in the HTML header, it won't be replaced. EndHeaderSection needs to be called to close the header section. It can have several HeaderSection in the program.
Example

HeaderSection
<meta name="description" content="Customizd description">
<script type="text/javascript" src="https://cdn.babylonjs.com/babylon.js"></script>
EndHeaderSection

Syntax
EndHeaderSection
Description
Close the current header section previously opened with HeaderSection.
How can we help you?

Re: HeaderSection/EndHeaderSection

Posted: Tue Aug 05, 2025 3:11 pm
by Stefan
I don't quite understand the point yet.
Can I change the design with it, or can I perhaps disable the browser from using the cache? That would be great.

Re: HeaderSection/EndHeaderSection

Posted: Tue Aug 05, 2025 4:08 pm
by Peter
Stefan wrote: Tue Aug 05, 2025 3:11 pm[...] or can I perhaps disable the browser from using the cache?
untested:

Code: Select all

HeaderSection

<meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />

EndHeaderSection

Re: HeaderSection/EndHeaderSection

Posted: Wed Aug 06, 2025 5:55 am
by Stefan
At least Spider doesn't get stuck :D
I'll give it a try, thanks :)