<commit_before>use horrorshow::prelude::*;
use scripts::Script;

pub struct MainPageHtml {
    pub html_string: String,
}

impl MainPageHtml {
    pub fn new(scripts: Vec<Box<Script>>) -> MainPageHtml {
        MainPageHtml {
            html_string: html! {
                : raw!("<!DOCTYPE html>");
                html {
                    head {
                        title { : "Runnable scripts"}
                    }
                    body {
                        h1(id="main_header") {
                            : "Runnable Scripts"
                        }
                        h2(id="scripts_header") {
                            : "Scripts"
                        }
                        ul(id="normal_scripts_list") {
                            @ for script in scripts {
                                li {
                                    : raw!(format!("<a href=\"/scr/{}\">{}</a>", script.get_name(), script.get_name()))
                                }
                            }
                        }
                    }
                }
            }.into_string().unwrap()
        }
    }
}<commit_msg>Make generated mainpage a little more mobile-friendly<commit_after>use horrorshow::prelude::*;
use scripts::Script;

pub struct MainPageHtml {
    pub html_string: String,
}

impl MainPageHtml {
    pub fn new(scripts: Vec<Box<Script>>) -> MainPageHtml {
        MainPageHtml {
            html_string: html! {
                : raw!("<!DOCTYPE html>");
                html {
                    head {
                        meta(name="viewport", content="width=device-width, initial-scale=1.0"){}
                        title { : "Runnable scripts"}
                    }
                    body(style="display: table") {
                        h1(id="main_header", style="display: table") {
                            : "Runnable Scripts"
                        }
                        h2(id="scripts_header", style="display: table") {
                            : "Scripts"
                        }
                        ul(id="normal_scripts_list", style="display: table") {
                            @ for script in scripts {
                                li {
                                    : raw!(format!("<a href=\"/scr/{}\">{}</a>", script.get_name(), script.get_name()))
                                }
                            }
                        }
                    }
                }
            }.into_string().unwrap()
        }
    }
}
{'fraction_non_alphanumeric': 0.11521824616594574, 'fraction_numerical': 0.0023594180102241447, 'mean_word_length': 0.8970917225950783, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6783215', 'n_tokens_mistral': 632, 'n_tokens_neox': 585, 'n_words': 104}