Skip to content

Commit

Permalink
Create index.htm
Browse files Browse the repository at this point in the history
Add the html file for jsroot.
  • Loading branch information
ast0815 authored Nov 23, 2023
1 parent c4769d1 commit 3208fdf
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions jsroot/index.htm
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Read a ROOT file</title>
<link rel="shortcut icon" href="img/RootIcon.ico"/>
</head>
<body>
<div id="simpleGUI">
loading scripts ...
</div>
<script type="module">
//import { buildGUI } from './modules/gui.mjs';
import { buildGUI } from 'https://root.cern/js/latest/modules/gui.mjs';
buildGUI('simpleGUI');
</script>
</body>
</html>

<!--
This is JSROOT main page, which aims to display content of ROOT files.
Several URL parameters could be specified when opening page:
file - name of the file(s), which will be automatically open with page loading
json - name of JSON file(s) with ROOT object, stored by TBufferJSON::ConvertToJSON method
item - object name in the file to display
items - object names in the file to display
opt - draw option for the item
opts - draw options for the items
layout - can be 'simple', 'flex' or gridNxM where N and M are integer values
nobrowser - only file item(s) will be displayed, browser will be disabled
inject - name of JavaScript(s), automatically injected at the beginning
mathjax - use MathJax for Latex output (automatically loaded for TMathText objects)
palette - id of default color palette, 51..123 - new ROOT6 palette (default 57)
style - TStyle object itemname or JSON file name
toolbar - configure position and orientation of pad toolbar, combine 'right','vert','off'
dark - enables dark mode
Example:
https://root.cern/js/latest/?file=../files/hsimple.root&layout=grid2x2&item=[hpx;1,hpxpy;1]&opts=[,colz]
Page can be used to open files from other web servers like:
https://root.cern/js/latest/?file=https://jsroot.gsi.de/files/hsimple.root
But one should be aware about Cross-Origin Request blocking.
Read https://developer.mozilla.org/en/http_access_control for more details.
To avoid problem at all, one can copy only index.htm on the web server where data files are located.
And specify full path to the use module like:
import { buildGUI } from 'https://root.cern/js/latest/modules/gui.mjs';
If necessary, complete JSROOT can be installed on the web server.
Project repository: https://github.com/root-project/jsroot.
-->

0 comments on commit 3208fdf

Please sign in to comment.