<commit_before><!DOCTYPE HTML>
<html>
    <head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php
    	if(isset($model->page_title)){
    		?>
    		<title><?php echo $model->page_title; ?></title>
    		<?php
    	}
    	foreach ($this->config['resources']['css'] as $name => $url){
    		echo '<link rel="stylesheet" href="'.$url.'" integrity="'.$this->config['resources']['css-sri'][$name].'" crossorigin="anonymous" />'.PHP_EOL;
    	}
    ?>
    </head>
    <body>
	        <?php
		        require dirname(__FILE__) . '/' . $page;
		        echo PHP_EOL;
			    foreach ($this->config['resources']['js'] as $name => $url){
			    	echo '<script type="text/javascript" src="'.$url.'" integrity="'.$this->config['resources']['js-sri'][$name].'" crossorigin="anonymous"></script>'.PHP_EOL;
			    }
			    if(isset($model) && isset($this)){
			    	if($this->config['steel']['useLang']){
			    		?>
			    		<script src="/js/steel_localizer.js" type="text/javascript"></script><commit_msg>Added functionality for per-MVC script/style includes, with required SRI<commit_after><!DOCTYPE HTML>
<html>
    <head>
	    <meta charset="utf-8">
	    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php
    	if(isset($model->page_title)){
    		?>
    		<title><?php echo $model->page_title; ?></title>
    		<?php
    	}
    	foreach ($this->config['resources']['css'] as $name => $url){
    		echo '<link rel="stylesheet" href="'.$url.'" integrity="'.$this->config['resources']['css-sri'][$name].'" crossorigin="anonymous" />'.PHP_EOL;
    	}
        foreach($styles as $style){
            if(empty($style['url']) || empty($style['sri'])){
                continue;
            }
            echo '<link rel="stylesheet" href="'.$style['url'].'" integrity="'.$style['sri'].'" crossorigin="anonymous" />'.PHP_EOL;
        }
    ?>
    </head>
    <body>
	        <?php
		        require dirname(__FILE__) . '/' . $page;
		        echo PHP_EOL;
			    foreach ($this->config['resources']['js'] as $name => $url){
			    	echo '<script type="text/javascript" src="'.$url.'" integrity="'.$this->config['resources']['js-sri'][$name].'" crossorigin="anonymous"></script>'.PHP_EOL;
			    }
                            foreach ($scripts as $script){
                                if(empty($script['url']) || empty($script['sri'])){
                                    continue;
                                }
			    	echo '<script type="text/javascript" src="'.$script['url'].'" integrity="'.$script['sri'].'" crossorigin="anonymous"></script>'.PHP_EOL;
			    }
			    if(isset($model)){
			    	if($this->config['steel']['useLang']){
			    		?>
			    		<script src="/js/steel_localizer.js" type="text/javascript"></script>
{'fraction_non_alphanumeric': 0.2195288494366678, 'fraction_numerical': 0.0013656538067599864, 'mean_word_length': 2.6488169364881693, 'pattern_counts': {'":': 0, '<': 44, '<?xml version=': 0, '>': 62, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4974619', 'n_tokens_mistral': 982, 'n_tokens_neox': 924, 'n_words': 146}