rename test.html to index.html, add UTF-8 meta tag to index.html

This commit is contained in:
louisnw
2024-06-08 11:15:24 +01:00
parent 3e2210ca02
commit 3267267350
3 changed files with 5 additions and 4 deletions

View File

@ -17,7 +17,7 @@ from .util import (
)
current_dir = os.path.dirname(os.path.abspath(__file__))
INDEX = os.path.join(current_dir, 'js', 'test.html')
INDEX = os.path.join(current_dir, 'js', 'index.html')
class Window:

View File

@ -5,6 +5,7 @@
<link rel="stylesheet" href="styles.css">
<script src="./lightweight-charts.js"></script>
<meta name="viewport" content ="width=device-width, initial-scale=1">
<meta charset="UTF-8">
<style>
body {
margin: 0;

View File

@ -117,11 +117,11 @@ class StaticLWC(abstract.AbstractChart):
def __init__(self, width=None, height=None, inner_width=1, inner_height=1,
scale_candles_only: bool = False, toolbox=False, autosize=True):
with open(abstract.INDEX.replace("test.html", 'styles.css'), 'r') as f:
with open(abstract.INDEX.replace("index.html", 'styles.css'), 'r') as f:
css = f.read()
with open(abstract.INDEX.replace("test.html", 'bundle.js'), 'r') as f:
with open(abstract.INDEX.replace("index.html", 'bundle.js'), 'r') as f:
js = f.read()
with open(abstract.INDEX.replace("test.html", 'lightweight-charts.js'), 'r') as f:
with open(abstract.INDEX.replace("index.html", 'lightweight-charts.js'), 'r') as f:
lwc = f.read()
with open(abstract.INDEX, 'r') as f: