cm107's picture
Added an iFrame Resizer script to each html page.
364e42c
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>My Flask Space</title>
<link rel="stylesheet" href="../static/css/main.css" />
</head>
<body>
<div class="card">
<h1>Welcome to your static Space!</h1>
<p>
You can modify this app directly by editing <i>index.html</i> in the
Files and versions tab.
</p>
<p>
Also don't forget to check the
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
</p>
</div>
<h1>Test Page</h1>
<button id="btn1" class="test_button">Click Me</button>
<div id="btn1_text" class="test_button_text_empty"></div>
<br>
<button id="btn2" class="test_button">Click Me Too!</button>
<div id="btn2_text" class="test_button_text_empty"></div>
<h1>mypkg</h1>
<div id="pkg_version">
<p style="display:inline-block">Version</p>: {{ mypkg_version }}
</div>
Feel free to install this package using:
<br>
<code class="language-bash">
pip install -e git+https://huggingface.co/spaces/cm107/test_flask_space.git#egg=mypkg
</code>
<h1>Navigation</h1>
<ul>
<li>
<a href="about">About</a>
</li>
<li>
User Examples:
<ul>
<li>
<a href="/user/Bob">Bob</a>
</li>
<li>
<a href="/user/Jerry">Jerry</a>
</li>
<li>
<a href="/user/Tom">Tom</a>
</li>
</ul>
</li>
<li>
Evaluate Examples:
<ul>
<li>
<a href="/evaluate/1+1">1+1</a>
</li>
<li>
<a href="/evaluate/(3**2 + 4**2)**0.5">(3**2 + 4**2)**0.5</a>
</li>
<li>
<a href="/evaluate/sum([1,2,3,4,5,6,7,8,9])">sum([1,2,3,4,5,6,7,8,9])</a>
</li>
</ul>
</li>
<li>
<a href="/show/shapes">Draw some shapes using python's cv2 and display in html page.</a>
</li>
<li>
<a href="/debug/scrolling">Debug the page scrollbar.</a>
</li>
</ul>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.2/iframeResizer.contentWindow.min.js"></script>
<script type="text/javascript" src="../static/js/test_page.js"></script>
</body>
</html>