<commit_before><?php 
require_once __DIR__ . "/../web.php";
require_once __DIR__ . "/../core/constants.php";
require_once __DIR__ . "/../core/node.php";
require_once __DIR__ . "/../core/internal/sanitize.php";
require_once __DIR__ . "/../core/internal/emoji.php";
require_once __DIR__ . "/../core/post.php";
require_once __DIR__ . "/../core/schedule.php";
require_once __DIR__ . "/../core/internal/ichart.php";

user_StartEnd();

//template_SetTheme("embed");

// Modes //
const M_DEFAULT = 1;	// Default State //
const M_ERROR = -255;	// Other Error //

$mode = M_DEFAULT;


$args = core_ParseActionURL();
$args_count = count($args);

// Sanitize Input
foreach( $args as $arg ) {
	$arg = sanitize_Slug($arg);
	if ( empty($arg) ) {
		$mode = M_ERROR;
		break;
	}
}

if ( $mode > 0 ) {
	$args_merged = implode('/',$args);
	
	
	$paths = [ CMW_NODE_ROOT ];
	foreach( $args as $key => $slug ) {
		$id = node_GetNodeIdByParentIdAndSlug($paths[$key],$slug);
		if ( !empty($id) ) {
			$paths[] = $id;
		}
		else {
			$mode = M_ERROR;
			break;			
		}
	}
	if ( $mode > 0 ) {
		$paths_count = count($paths);
		$this_node_id = &$paths[$paths_count-1];
		
		$this_node = node_GetNodeById( $this_node_id );
		$author_node = [];
		if ( !empty($this_node['author']) && ($this_node['author'] > 0) ) {
			$author_node = node_GetNodeById( $this_node['author'] );
		}
		if ( !empty($this_node['parent']) && ($this_node['parent'] > 0) ) {
			$parent_node = node_GetNodeById( $this_node['parent'] );
		}
		
		$nodes = node_GetNodesByParentId( $this_node_id );
		$nodes_count = count($nodes);
	}
}

?>
<?php template_GetHeader(); ?>
<body>
	<script>
		// Cookie Functions //
		function getCookie(name) {
			var value = "; " + document.cookie;
			var parts = value.split("; " + name + "=");
			if (parts.length == 2) 
				return parts.pop().split(";").shift();
			return parts;
		}
		function setCookie(name,value) {
			document.cookie = name + '=' + value;
		}
		function removeCookie( name ) {
			document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
		}
	</script>
	
	<style>
		/* Top Navigation Bar */
		#ldbar-outer {			
			width:100%;
			height:48px;

			/*position:fixed;*/
			left:0;
			top:0;
			z-index:1000;
			
			/* shadow */
			border-bottom:1px solid #000;/*rgba(96,96,96,0.2);*/

			/*-webkit-animation: slidein 3s;*/
			/*-moz-animation: slidein 3s;*/
			/*animation: slidein 3s;*/
		}
		@-webkit-keyframes slidein {
		    from{ top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to	{ top: 0; }
		}
		@-moz-keyframes slidein {
		    from { top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to   { top: 0; }
		}
		@keyframes slidein {
		    from { top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to   { top: 0; }
		}

		
		#ldbar-inner {
			color:#fff;
			background:/*#765*/ rgba(96,96,96,1.0);
			
			line-height:47px;
			
			position:relative;
			width:100%;
		}
		/* Padding in the main document */
		#ldbar-pad {			
			width:100%;
			height:49px; /* plus shadow */
		}

		.noselect {
		    -webkit-touch-callout: none;
		    -webkit-user-select: none;
		    -khtml-user-select: none;
		    -moz-user-select: none;
		    -ms-user-select: none;
		    user-select: none;
		}
		#ldbar img {<commit_msg>homepage tweaks. changed the font and layout, so people will leave me alone about the style<commit_after><?php 
require_once __DIR__ . "/../web.php";
require_once __DIR__ . "/../core/constants.php";
require_once __DIR__ . "/../core/node.php";
require_once __DIR__ . "/../core/internal/sanitize.php";
require_once __DIR__ . "/../core/internal/emoji.php";
require_once __DIR__ . "/../core/post.php";
require_once __DIR__ . "/../core/schedule.php";
require_once __DIR__ . "/../core/internal/ichart.php";

user_StartEnd();

//template_SetTheme("embed");

// Modes //
const M_DEFAULT = 1;	// Default State //
const M_ERROR = -255;	// Other Error //

$mode = M_DEFAULT;


$args = core_ParseActionURL();
$args_count = count($args);

// Sanitize Input
foreach( $args as $arg ) {
	$arg = sanitize_Slug($arg);
	if ( empty($arg) ) {
		$mode = M_ERROR;
		break;
	}
}

if ( $mode > 0 ) {
	$args_merged = implode('/',$args);
	
	
	$paths = [ CMW_NODE_ROOT ];
	foreach( $args as $key => $slug ) {
		$id = node_GetNodeIdByParentIdAndSlug($paths[$key],$slug);
		if ( !empty($id) ) {
			$paths[] = $id;
		}
		else {
			$mode = M_ERROR;
			break;			
		}
	}
	if ( $mode > 0 ) {
		$paths_count = count($paths);
		$this_node_id = &$paths[$paths_count-1];
		
		$this_node = node_GetNodeById( $this_node_id );
		$author_node = [];
		if ( !empty($this_node['author']) && ($this_node['author'] > 0) ) {
			$author_node = node_GetNodeById( $this_node['author'] );
		}
		if ( !empty($this_node['parent']) && ($this_node['parent'] > 0) ) {
			$parent_node = node_GetNodeById( $this_node['parent'] );
		}
		
		$nodes = node_GetNodesByParentId( $this_node_id );
		$nodes_count = count($nodes);
	}
}

?>
<?php template_GetHeader(); ?>
<body>
	<script>
		// Cookie Functions //
		function getCookie(name) {
			var value = "; " + document.cookie;
			var parts = value.split("; " + name + "=");
			if (parts.length == 2) 
				return parts.pop().split(";").shift();
			return parts;
		}
		function setCookie(name,value) {
			document.cookie = name + '=' + value;
		}
		function removeCookie( name ) {
			document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
		}
	</script>
	
	<style>
		/* Top Navigation Bar */
		#ldbar-outer {			
			width:100%;
			height:56px;

			/*position:fixed;*/
			left:0;
			top:0;
			z-index:1000;
			
			/* shadow */
			/*border-bottom:1px solid #000;/*rgba(96,96,96,0.2);*/
			box-shadow:0px -1px 8px rgba(0,0,0,0.7);

			/*-webkit-animation: slidein 3s;*/
			/*-moz-animation: slidein 3s;*/
			/*animation: slidein 3s;*/
		}
		@-webkit-keyframes slidein {
		    from{ top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to	{ top: 0; }
		}
		@-moz-keyframes slidein {
		    from { top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to   { top: 0; }
		}
		@keyframes slidein {
		    from { top: -52px; }
		    50% { top: -52px; }
		    75%	{ top: 8px; }
		    90%	{ top: -4px; }
		    to   { top: 0; }
		}

		
		#ldbar-inner {
			color:#fff;
			background:/*#765*/ rgba(64,64,64,1.0);
			
			line-height:56px;
			
			position:relative;
			width:100%;
		}
		/* Padding in the main document */
		#ldbar-pad {			
			width:100%;
			height:56px; /* plus shadow */
		}

		.noselect {
		    -webkit-touch-callout: none;
		    -webkit-user-select: none;
		    -khtml-user-select: none;
		    -moz-user-select: none;
		    -ms-user-select: none;
		    user-select: none;
		}
		#ldbar img {
{'fraction_non_alphanumeric': 0.19349164467897978, 'fraction_numerical': 0.03283494576370566, 'mean_word_length': 2.602428722280887, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 25, 'https://': 0, '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': '6110164', 'n_tokens_mistral': 3177, 'n_tokens_neox': 2669, 'n_words': 529}