<commit_before><?php

class page_index extends Page {
	function init(){
		parent::init();

		if($this->api->edit_mode){
			if($this->api->edit_template){
				// Remove div tag arrounf page template and to remove top-page class of the div to avoid repetation
				$this->template->loadTemplateFromString('<?$Content?>');
				$this->api->template->set('edit_template','true');
				// $this->js()->_load('edit_template');
			}
			$this->api->add('editingToolbar/View_FrontToolBar',null,'editor');
		}
		
		if(!$this->api->edit_template)
			$this->setModel($this->api->current_page);
			
	}
	function setModel($page_model){
		$this->api->template->trySet('page_title',$page_model['title']);
		$this->api->template->trySet('keywords',$page_model['keywords']);
		$this->api->template->trySet('description',$page_model['description']);
		$this->api->template->trySet('style',$page_model->ref('template_id')->get('body_attributes').'; '.$page_model['body_attributes']);

		try{
			$this->api->exec_plugins('content-fetched',$page_model);
			$this->template->setHTML('Content',$page_model['content']);
			$this->api->exec_plugins('webpage-page-loaded',$page_model);
		}catch(Exception_StopInit $e){

		}
		parent::setModel($page_model);
	}


	function render(){

		$this->api->template->appendHTML('js_include','<script src="templates/js/jquery.sharrre.js"></script>'."\n");

		if($this->api->getConfig('css_mode')=='less'){
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan.less" rel="stylesheet/less" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/default/js/less.min.js"></script>'."\n");
		}else{
			// Moved to FrontEnd
			// $this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan.css" rel="stylesheet" />'."\n");
		}

		if($this->api->edit_mode){
			/**
			 * Main Live Editor JavaScript File handling All Editor based working
			 */
			$this->js()->_load('epan_live_edit');

			// Add Div to stop being accessed before fully loaded
			// $this->api->template->appendHTML('Content','<div id="overlay-dark"><H3 id="overlay-dark-message">Wait, Loading ...</h3> </div>');
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan_live.css" rel="stylesheet" />'."\n");
			// $this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/jquery.jscrollpane.css" rel="stylesheet" />'."\n");
			// $this->api->template->appendHTML('js_include','<script src="templates/js/jquery.jscrollpane.min.js"></script>'."\n");

			// SHORTCUTS
			$this->api->template->appendHTML('js_include','<script src="templates/js/shortcut.js"></script>'."\n");

			// POPLINE EDITING
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/popline/css/normalize.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/font-awesome/css/font-awesome.min.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/popline/themes/default.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/js/popline/build/jquery.popline.min.js"></script>'."\n");

			// Google font selector
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/fontselect.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/js/jquery.fontselect.js"></script>'."\n");			

			$this->api->template->appendHTML('js_include','<link type="text/css" href="elfinder/css/elfinder.min.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<link type="text/css" href="elfinder/css/theme.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="elfinder/js/elfinder.min.js"></script>'."\n");			
	
		}

		$theme_css = 'epans/'.$this->api->current_website['name'].'/theme.css';
		if(file_exists(getcwd().DS.$theme_css)){
			$this->api->template->appendHTML('js_include','<link id="xepan-theme-css-link" type="text/css" href="'.$theme_css.'" rel="stylesheet" />'."\n");
		}

		$user_css = 'epans/'.$this->api->current_website['name'].'/mystyles.css';
		if(file_exists(getcwd().DS.$user_css)){
			$this->api->template->appendHTML('js_include','<link id="xepan-mystyles-css-link" type="text/css" href="'.$user_css.'" rel="stylesheet" />'."\n");
		}

		parent::render();
	
	}
}
<commit_msg>font awsome seperated<commit_after><?php

class page_index extends Page {
	function init(){
		parent::init();

		if($this->api->edit_mode){
			if($this->api->edit_template){
				// Remove div tag arrounf page template and to remove top-page class of the div to avoid repetation
				$this->template->loadTemplateFromString('<?$Content?>');
				$this->api->template->set('edit_template','true');
				// $this->js()->_load('edit_template');
			}
			$this->api->add('editingToolbar/View_FrontToolBar',null,'editor');
		}
		
		if(!$this->api->edit_template)
			$this->setModel($this->api->current_page);
			
	}
	function setModel($page_model){
		$this->api->template->trySet('page_title',$page_model['title']);
		$this->api->template->trySet('keywords',$page_model['keywords']);
		$this->api->template->trySet('description',$page_model['description']);
		$this->api->template->trySet('style',$page_model->ref('template_id')->get('body_attributes').'; '.$page_model['body_attributes']);

		try{
			$this->api->exec_plugins('content-fetched',$page_model);
			$this->template->setHTML('Content',$page_model['content']);
			$this->api->exec_plugins('webpage-page-loaded',$page_model);
		}catch(Exception_StopInit $e){

		}
		parent::setModel($page_model);
	}


	function render(){

		$this->api->template->appendHTML('js_include','<script src="templates/js/jquery.sharrre.js"></script>'."\n");

		if($this->api->getConfig('css_mode')=='less'){
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan.less" rel="stylesheet/less" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/default/js/less.min.js"></script>'."\n");
		}else{
			// Moved to FrontEnd
			// $this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan.css" rel="stylesheet" />'."\n");
		}

		if($this->api->edit_mode){
			/**
			 * Main Live Editor JavaScript File handling All Editor based working
			 */
			$this->js()->_load('epan_live_edit');

			// Add Div to stop being accessed before fully loaded
			// $this->api->template->appendHTML('Content','<div id="overlay-dark"><H3 id="overlay-dark-message">Wait, Loading ...</h3> </div>');
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/css/epan_live.css" rel="stylesheet" />'."\n");
			// $this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/jquery.jscrollpane.css" rel="stylesheet" />'."\n");
			// $this->api->template->appendHTML('js_include','<script src="templates/js/jquery.jscrollpane.min.js"></script>'."\n");

			// SHORTCUTS
			$this->api->template->appendHTML('js_include','<script src="templates/js/shortcut.js"></script>'."\n");

			// POPLINE EDITING
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/popline/css/normalize.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/popline/themes/default.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/js/popline/build/jquery.popline.min.js"></script>'."\n");

			// Font Awsome
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/default/font-awesome/css/font-awesome.min.css" rel="stylesheet" />'."\n");
			// Google font selector
			$this->api->template->appendHTML('js_include','<link type="text/css" href="templates/js/fontselect.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="templates/js/jquery.fontselect.js"></script>'."\n");			

			$this->api->template->appendHTML('js_include','<link type="text/css" href="elfinder/css/elfinder.min.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<link type="text/css" href="elfinder/css/theme.css" rel="stylesheet" />'."\n");
			$this->api->template->appendHTML('js_include','<script src="elfinder/js/elfinder.min.js"></script>'."\n");			
	
		}

		$theme_css = 'epans/'.$this->api->current_website['name'].'/theme.css';
		if(file_exists(getcwd().DS.$theme_css)){
			$this->api->template->appendHTML('js_include','<link id="xepan-theme-css-link" type="text/css" href="'.$theme_css.'" rel="stylesheet" />'."\n");
		}

		$user_css = 'epans/'.$this->api->current_website['name'].'/mystyles.css';
		if(file_exists(getcwd().DS.$user_css)){
			$this->api->template->appendHTML('js_include','<link id="xepan-mystyles-css-link" type="text/css" href="'.$user_css.'" rel="stylesheet" />'."\n");
		}

		parent::render();
	
	}
}

{'fraction_non_alphanumeric': 0.24133448873483535, 'fraction_numerical': 0.0004332755632582322, 'mean_word_length': 5.293796864349011, 'pattern_counts': {'":': 0, '<': 67, '<?xml version=': 0, '>': 281, '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': '6046395', 'n_tokens_mistral': 3415, 'n_tokens_neox': 3098, 'n_words': 344}