Commit 6b95bc52 authored by escalope's avatar escalope

Initial commit

parents
<?php
/**
*
* BoloTweet 2.0
*
* @author Alvaro Ortego <alvorteg@ucm.es>
*
*/
if (!defined('STATUSNET')) {
exit(1);
}
class LogoPlugin extends Plugin {
function onInitializePlugin() {
// A chance to initialize a plugin in a complete environment
}
function onCleanupPlugin() {
// A chance to cleanup a plugin at the end of a program
}
function onStartLoginGroupNav($action) {
// Creamos la URL del logo.
$path = $this->path('css/logo.png');
// Agregamos el logo al Nav.
$action->elementStart('li', array('id' => 'liLogoPlugin'));
$action->element('img', array('id' => 'logoNav', 'class' => 'logo photo', 'alt' => 'Bolotweet 2.0', 'src' => $path));
$action->elementEnd('li');
return true;
}
function onStartDefaultLocalNav($action) {
// Creamos las URL's de destino, y del logo.
if (common_logged_in()) {
$cur = common_current_user();
$url = common_local_url('all', array('nickname' => $cur->nickname));
} else {
$url = common_local_url('public');
}
$path = $this->path('css/logo.png');
// Agregamos el logo al Nav.
$action->out->elementStart('li', array('id' => 'liLogoPlugin'));
$action->out->elementStart('address', array('class' => 'vcard'));
$action->out->elementStart('a', array('class' => 'url home bookmark', 'href' => $url));
$action->out->element('img', array('id' => 'logoNav', 'class' => 'logo photo', 'alt' => 'Bolotweet 2.0', 'src' => $path));
$action->out->elementEnd('a');
$action->out->elementEnd('address');
$action->out->elementEnd('li');
return true;
}
function onEndShowStyles($action) {
$action->cssLink($this->path('css/logo.css'));
return true;
}
function onPluginVersion(&$versions) {
$versions[] = array('name' => 'LogoPlugin',
'version' => 1.0,
'author' => 'Alvaro Ortego',
'rawdescription' =>
_m('A plugin to put a Logo in Default Nav'));
return true;
}
}
/**
*
* BoloTweet 2.0
*
* @author Alvaro Ortego <alvorteg@ucm.es>
*
*/
#logoNav {
margin-left: 8px;
padding: 5px;
border-radius: 10px;
box-shadow: 2px 2px 5px rgb(66, 66, 66);
border: 0px solid rgb(220, 220, 220);
margin-bottom: 30px;
}
#nav_local_default .vcard a:hover {
background: none;
}
@media only screen and (max-width: 768px) {
/* For mobile phones: */
[id*="logoNav"] {
display: none;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment