Skip to content

Commit

Permalink
Merge pull request #10 from sabas/lugmap.it
Browse files Browse the repository at this point in the history
Aggiunto parametro css in do_head
  • Loading branch information
madbob committed Oct 9, 2014
2 parents 3e43b4b + ce977e5 commit 8f60803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}

require_once ('varie.php');
do_head ('Homepage', array ('http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js', 'js/mappa.js'));
do_head ('Homepage', array ('http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js', 'js/mappa.js'),array('http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css'));

$transformed = false;

Expand Down
16 changes: 7 additions & 9 deletions varie.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/***************************************************************************************************************/

function do_head ($title = null, $javascript = array ()) {
function do_head ($title = null, $javascript = array (), $stylesheet = array ()) {
global $main_url;

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
Expand All @@ -43,17 +43,15 @@ function do_head ($title = null, $javascript = array ()) {

<title>Mappa dei Linux Users Groups Italiani<?php if ($title != null) echo ": $title"; ?></title>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<?php foreach ($javascript as $js): ?>
<script type="text/javascript" src="<?php echo $js; ?>"></script>
<?php foreach ($stylesheet as $css): ?>
<link rel="stylesheet" href="<?php echo $css; ?>" />
<?php endforeach; ?>

<link rel="stylesheet" href="assets/css/main.css" />

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<?php foreach ($javascript as $js): ?>
<script type="text/javascript" src="<?php echo $js; ?>"></script>
<?php endforeach; ?>
</head>

<body>
Expand Down

0 comments on commit 8f60803

Please sign in to comment.