Subversion Repositories Sites.gentiana.org

Compare Revisions

Ignore whitespace Rev 7 → Rev 8

/trunk/index.php
13,6 → 13,21
*@version $Revision$ $Date$
// +------------------------------------------------------------------------------------------------------+
*/
define('MAGPIE_DIR', 'api/syndication_rss/magpierss/');
define('MAGPIE_CACHE_DIR', 'tmp/magpie_cache');
define('MAGPIE_CACHE_ON', true);
define('RSS_URL', 'http://bourianeverte.blogspot.com/atom.xml');//http://www.tela-botanica.org/actu/backend.php3
define('RSS_DESCRIPTION_LONGUEUR', 200);
require_once MAGPIE_DIR.'rss_fetch.inc';
require_once 'accueil/class.html2text.inc';
$rss = fetch_rss(RSS_URL);
function recupererImage($txt)
{
if (preg_match('/<img .*src="([^"]+)"/', $txt, $match)) {
return array('src' => $match[1], 'alt' => $match[2]);
}
return false;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
39,7 → 54,7
<div id="zone_sites">
<h1 id="titre_sites">Sites de l'association Gentiana</h1>
<ul id="liste_sites">
<li id="site_asso_gentiana"><a href="#">L'association Gentiana</a></li>
<li id="site_asso_gentiana"><a href="papyrus.php">L'association Gentiana</a></li>
<li id="site_flore_isere"><a href="#">La flore de l'Isère</a></li>
<li id="site_gestion_raisonnable"><a href="#">La gestion raisonnable</a></li>
</ul>
46,6 → 61,33
</div>
<div id="zone_actu">
<h1 id="titre_actu">Actualités &bull; Agenda</h1>
<ul id="liste_actu">
<?php foreach ($rss->items as $item) : ?>
<?php
// Si Atom nous remplissons le champ description
if (isset($item['atom_content']) && !isset($item['description'])) {
$item['description'] = $item['atom_content'];
}
// Récupération d'une image présente dans le txt
$image = recupererImage($item['description']);
if ($image) {
$item['image'] = $image;
}
// Nettoyage du html
$h2t = new html2text($item['description']);
$item['description'] = $h2t->get_text();
?>
<li class="rss_actu">
<h2 class="rss_titre"><a href="<?=$item['link']; ?>"><?=$item['title']; ?></a></h2>
<?php if ($image) : ?>
<p class="rss_image"><img class="rss_image" src="<?=$item['image']['src'];?>" alt="<?=$item['image']['alt'];?>" width="50" height="50"/></p>
<?php endif; ?>
<p class="rss_date">Publié le <?=strftime('%d.%m.%Y',strtotime($item['date'])); ?></p>
<p class="rss_description"><? echo substr($item['description'],0, RSS_DESCRIPTION_LONGUEUR).'...'; ?></p>
</li>
<?php endforeach; ?>
</ul>
</div>
<div id="zone_logos">
<h1 id="titre_logos">Les partenaires de Gentiana</h1>
/trunk/accueil/accueil_prairie.css
8,7 → 8,7
height:768px;
width:1024px;
margin:0 auto;
background:url(/gentiana/accueil/accueil_fond_88ko.jpg) top left no-repeat;}
background:url(./accueil_fond_88ko.jpg) top left no-repeat;}
#cartouche {
position:absolute;
height:374px;
18,7 → 18,7
top: 50%;
margin-left:-370px;
left: 50%;
background:url(/gentiana/accueil/cartouche.png) top left no-repeat;}
background:url(./cartouche.png) top left no-repeat;}
#logo_gentiana{
position:absolute;
top:0;
48,21 → 48,47
#site_asso_gentiana {
display: table-cell;
vertical-align:middle;
background:url(/gentiana/accueil/site_asso_gentiana.png) center left no-repeat;}
background:url(./site_asso_gentiana.png) center left no-repeat;}
#site_flore_isere {
background:url(/gentiana/accueil/site_flore_isere.png) center left no-repeat;}
background:url(./site_flore_isere.png) center left no-repeat;}
#site_gestion_raisonnable {
background:url(/gentiana/accueil/site_gestion_raisonnable.png) center left no-repeat;}
background:url(./site_gestion_raisonnable.png) center left no-repeat;}
 
#zone_actu{
position:absolute;
top:0;
right:60px;
right:35px;
width:270px;
margin:0;}
#titre_actu{
margin:0;
font-size:24px;
color:#fff;}
#liste_actu, .rss_titre, .rss_date, .rss_description{
text-align:left;
margin:0;
padding:0;}
#liste_actu{
height:315px;
overflow:auto;}
#liste_actu li{
padding:10px 0 0 0;
list-style-type:none;}
.rss_titre{
font-size:14px;}
.rss_titre a{
color:#666600;}
.rss_image {
float:left;
width:50px;
height:50px;
margin:2px;}
.rss_date {
font-size:12px;
color:#FFFF99;}
.rss_description {
font-size:8px;
color:#666600;}
 
#zone_logos{
position:absolute;
/trunk/index.html
1,21 → 1,25
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Site en développement de Gentiana</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="robots" content="noindex,nofollow" />
<meta name="author" content="Tela Botanica" />
</head>
<body>
<h1>Liste des outils installés</h1>
<ul id="liste_outils">
<li id="outil_1"><a href="phpmyadmin/">PhpMyAdmin (administration base de données)</a></li>
<li id="outil_2"><a href="mantis/">Mantis (rapport de bogues)</a></li>
<li id="outil_3"><a href="stats/">Webalyzer (vide pour l'instant)</a></li>
</ul>
</body>
<head>
<title>Site en développement de Gentiana</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="robots" content="noindex,nofollow" />
<meta name="author" content="Tela Botanica" />
</head>
<body>
<h1>Le site</h1>
<ul id="liste_pages">
<li><a href="index.php">Page d'accueil</a></li>
</ul>
<h1>Liste des outils installés</h1>
<ul id="liste_outils">
<li id="outil_1"><a href="phpmyadmin/">PhpMyAdmin (administration base de données)</a></li>
<li id="outil_2"><a href="mantis/">Mantis (rapport de bogues)</a></li>
<li id="outil_3"><a href="stats/">Webalyzer (vide pour l'instant)</a></li>
</ul>
</body>
</html>