prime prove
This commit is contained in:
parent
d45c236bcc
commit
67fb947be2
3 changed files with 107 additions and 0 deletions
41
maps.html
Normal file
41
maps.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Quick Start - Leaflet</title>
|
||||
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico" />
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
|
||||
<script src="https://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
|
||||
<div id="mapid" style="width: 600px; height: 400px;"></div>
|
||||
<script>
|
||||
|
||||
var mymap = L.map('mapid').setView([44.4936714,11.3430347], 13);
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpandmbXliNDBjZWd2M2x6bDk3c2ZtOTkifQ._QA7i5Mpkd_m30IGElHziw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
id: 'mapbox.streets'
|
||||
}).addTo(mymap);
|
||||
var marker = L.marker([44.5038497,11.3139989]).addTo(mymap);
|
||||
marker.bindPopup("<b>Ospedale Maggiore</b><br>Zucchelli barbone").openPopup();
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
20
server.py
Normal file
20
server.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
from bottle import route, run,template
|
||||
|
||||
@route('/')
|
||||
@route('/myapp')
|
||||
@route('/myapp/')
|
||||
def myApp():
|
||||
return '<b style="color:green">Hello Sandeep .Bottle Framework demonstration route.</b>'
|
||||
|
||||
|
||||
@route('/myapp/<name>')
|
||||
def myName(name):
|
||||
return template('<b style="color:green">Hello <b style="color:red"> {{name}}</b>. Bottle Framework demonstration route with template string.', name=name)
|
||||
|
||||
|
||||
@route('/myapp/favourite/')
|
||||
@route('/myapp/favourite/<item>')
|
||||
def favourite(item):
|
||||
return template('favourite_template', item=item)
|
||||
|
||||
run(host='localhost', port=9093)
|
46
view/favourite_template.tpl
Normal file
46
view/favourite_template.tpl
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
Tutorialsavvy.com : Bottle framework template demo
|
||||
</title>
|
||||
<style>
|
||||
.searchkeyword{
|
||||
color:blue;
|
||||
}
|
||||
.fruit{
|
||||
color:green;
|
||||
}
|
||||
.flower{
|
||||
color:orange;
|
||||
}
|
||||
.else-style{
|
||||
color:grey;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h3>Your Favourite <span class='searchkeyword'>{{item}}</span> are :</h3>
|
||||
|
||||
%if 'fruit'== item:
|
||||
<ul class="fruit">
|
||||
<li>Orange</li>
|
||||
<li>Apple</li>
|
||||
<li>Mango</li>
|
||||
<li>Water Melon</li>
|
||||
<li>Grapes</li>
|
||||
</ul>
|
||||
%elif 'flower' == item:
|
||||
<ul class="flower">
|
||||
<li>Rose</li>
|
||||
<li>Jasmine</li>
|
||||
<li>Lotus</li>
|
||||
<li>Tulip</li>
|
||||
<li>Lily</li>
|
||||
</ul>
|
||||
%else :
|
||||
<h3 class="else-style">No Fruit or Flower catagory is Selected</h3>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue