mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
Add lightbox config
Add lightbox config.
This commit is contained in:
parent
6a7c090a68
commit
def856716a
2 changed files with 15 additions and 1 deletions
|
|
@ -61,6 +61,9 @@ rss.char = ""
|
||||||
img.thumbnail = "true"
|
img.thumbnail = "true"
|
||||||
default.thumbnail = ""
|
default.thumbnail = ""
|
||||||
|
|
||||||
|
; Lightbox inline image handling. This can slowdown your page load, especially when Disqus enabled. "on" or "off".
|
||||||
|
lightbox = "off"
|
||||||
|
|
||||||
; Set the theme here
|
; Set the theme here
|
||||||
views.root = "themes/logs"
|
views.root = "themes/logs"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1373,7 +1373,10 @@ function authorinfo($title=null, $body=null) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function head_contents($title, $description, $canonical) {
|
function head_contents($title, $description, $canonical) {
|
||||||
|
|
||||||
|
$styleImage = config('lightbox');
|
||||||
$output = '';
|
$output = '';
|
||||||
|
|
||||||
$title = '<title>' . $title . '</title>';
|
$title = '<title>' . $title . '</title>';
|
||||||
$favicon = '<link href="' . site_url() . 'favicon.ico" rel="icon" type="image/x-icon"/>';
|
$favicon = '<link href="' . site_url() . 'favicon.ico" rel="icon" type="image/x-icon"/>';
|
||||||
$charset = '<meta charset="utf-8" />';
|
$charset = '<meta charset="utf-8" />';
|
||||||
|
|
@ -1388,8 +1391,16 @@ function head_contents($title, $description, $canonical) {
|
||||||
$jquery = '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>';
|
$jquery = '<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>';
|
||||||
$lightbox = '<script src="' . site_url() . 'system/plugins/lightbox/js/lightbox-2.6.min.js"></script>';
|
$lightbox = '<script src="' . site_url() . 'system/plugins/lightbox/js/lightbox-2.6.min.js"></script>';
|
||||||
$corejs = '<script src="' . site_url() . 'system/resources/htmly.js"></script>';
|
$corejs = '<script src="' . site_url() . 'system/resources/htmly.js"></script>';
|
||||||
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $lightboxcss ."\n". $jquery ."\n". $lightbox ."\n" .$corejs ."\n";
|
|
||||||
|
if($styleImage == 'on') {
|
||||||
|
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n". $lightboxcss ."\n". $jquery ."\n". $lightbox ."\n" .$corejs ."\n";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$output .= $title ."\n". $favicon ."\n". $charset ."\n". $generator ."\n". $xua ."\n". $viewport ."\n". $description ."\n". $sitemap ."\n". $canonical ."\n". $feed ."\n";
|
||||||
|
}
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return toolbar
|
// Return toolbar
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue