<commit_before><?php
/*
##########################
### Lonely PHP Gallery ###
##########################
## Default Design Module #
##########################
This file is part of the the Lonely Gallery.

### Version ###

1.1.0 dev
date: 2014-07-05

### License & Requirements & More ###

Copyright (c) 2014 Marius 'Teelevision' Neugebauer.
See LICENSE.txt, README.txt
and https://github.com/Teelevision/lonely

### Description ###

This is the default design.
It provides a black CSS theme and image size adjustment via JavaScript
to fit images into the screen if they exceed the height.
*/

namespace LonelyGallery\DefaultDesign;
use \LonelyGallery\Lonely as Lonely;

class Module extends \LonelyGallery\Design {
	
	/* returns settings for default design */
	public function afterConstruct() {
		Lonely::model()->footer .= "<script type=\"text/javascript\">
var img = document.querySelectorAll('.file img.preview');
for (var i = 0; i < img.length; ++i) {
	adjustImageHeight(img[i]);
	img[i].addEventListener('load', function(image){
		return function(){
			adjustImageHeight(image);
		};
	}(img[i]));
}
</script>";
	}
	
	/* returns an array with config-relative web paths to ResourceFile instances */
	public function resources() {
		return array(
			'lonely.css' => new CSSFile(),
			'lonely.js' => new JSFile(),
		);
	}
}

class CSSFile extends \LonelyGallery\CSSFile {
	
	public function whenModified() {
		return filemtime(__FILE__);
	}
	
	public function getContent() {
		return <<<'CSS'
body {
    margin: 0;
	background-color: #111;
	color: #fff;
	font-family: Arial,Helvetica,sans-serif;
	font-size: 14px;
}
body > *:not(#content), #content > *:not(.file), .file > *:not(.preview-box) {
	margin-left: 8px;
	margin-right: 8px;
}
#content > .album {
	margin-right: 0;
}
#content > .album > *:not(.albums):not(.files) {
	margin-right: 8px;
}
a {
	color: #f20;
	text-decoration: none;
}
a:hover {
	color: #fff;
}
h1 {
	font-size: 26px;
}
h1 a {
	color: #fff;
}
#content > .album > .links, #content > .file > .links {
	margin: 0;
	padding: 0;
	position: absolute;
	top: 8px;
	right: 0;
}
#content > .album > .links > li, #content > .file > .links > li {
	display: inline;
}
#content > .album > .links > li:after, #content > .file > .links > li:after {
	content: " | ";
}
#content > .album > .links > li:first-child:before, #content > .file > .links > li:first-child:before {
	content: "[ ";
}
#content > .album > .links > li:last-child:after, #content > .file > .links > li:last-child:after {<commit_msg>added space between image previews<commit_after><?php
/*
##########################
### Lonely PHP Gallery ###
##########################
## Default Design Module #
##########################
This file is part of the the Lonely Gallery.

### Version ###

1.1.0 dev
date: 2014-07-05

### License & Requirements & More ###

Copyright (c) 2014 Marius 'Teelevision' Neugebauer.
See LICENSE.txt, README.txt
and https://github.com/Teelevision/lonely

### Description ###

This is the default design.
It provides a black CSS theme and image size adjustment via JavaScript
to fit images into the screen if they exceed the height.
*/

namespace LonelyGallery\DefaultDesign;
use \LonelyGallery\Lonely as Lonely;

class Module extends \LonelyGallery\Design {
	
	/* returns settings for default design */
	public function afterConstruct() {
		Lonely::model()->footer .= "<script type=\"text/javascript\">
var img = document.querySelectorAll('.file img.preview');
for (var i = 0; i < img.length; ++i) {
	adjustImageHeight(img[i]);
	img[i].addEventListener('load', function(image){
		return function(){
			adjustImageHeight(image);
		};
	}(img[i]));
}
</script>";
	}
	
	/* returns an array with config-relative web paths to ResourceFile instances */
	public function resources() {
		return array(
			'lonely.css' => new CSSFile(),
			'lonely.js' => new JSFile(),
		);
	}
}

class CSSFile extends \LonelyGallery\CSSFile {
	
	public function whenModified() {
		return filemtime(__FILE__);
	}
	
	public function getContent() {
		return <<<'CSS'
body {
    margin: 0;
	background-color: #111;
	color: #fff;
	font-family: Arial,Helvetica,sans-serif;
	font-size: 14px;
}
body > *:not(#content), #content > *:not(.file), .file > *:not(.preview-box) {
	margin-left: 8px;
	margin-right: 8px;
}
#content > .album {
	margin-right: 0;
}
#content > .album > *:not(.albums):not(.files) {
	margin-right: 8px;
}
a {
	color: #f20;
	text-decoration: none;
}
a:hover {
	color: #fff;
}
h1 {
	font-size: 26px;
}
h1 a {
	color: #fff;
}
.file {
	padding-bottom: 50px;
}
#content > .album > .links, #content > .file > .links {
	margin: 0;
	padding: 0;
	position: absolute;
	top: 8px;
	right: 0;
}
#content > .album > .links > li, #content > .file > .links > li {
	display: inline;
}
#content > .album > .links > li:after, #content > .file > .links > li:after {
	content: " | ";
}
#content > .album > .links > li:first-child:before, #content > .file > .links > li:first-child:before {
	content: "[ ";
}
#content > .album > .links > li:last-child:after, #content > .file > .links > li:last-child:after {
{'fraction_non_alphanumeric': 0.1912460567823344, 'fraction_numerical': 0.014589905362776025, 'mean_word_length': 3.998029556650246, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 81, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5426472', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1748, 'n_words': 479}