<commit_before>// Copyright 2014 Endless Mobile, Inc.

const Endless = imports.gi.Endless;
const EosKnowledge = imports.gi.EosKnowledge;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;

const HomePage = imports.homePage;
const Config = imports.config;

/**
 * Class: HomePageB
 *
 * This represents the home page for template B of the knowledge apps.
 * It extends <HomePage> and has a title image and list of article cards to show.
 * The list of cards only accepts 4, 6 or 8 cards.
 *
 */
const HomePageB = new Lang.Class({
    Name: 'HomePageB',
    GTypeName: 'EknHomePageB',
    Extends: HomePage.HomePage,

    _init: function (props) {
        this._card_container = new Gtk.Grid({
            column_homogeneous: true,
            row_homogeneous: true,
            hexpand: true
        });

        this.parent(props);

        this.get_style_context().add_class(EosKnowledge.STYLE_CLASS_HOME_PAGE_B);
    },

    _SEARCH_BOX_WIDTH: 350,
    pack_widgets: function (title_image, search_box) {
        title_image.vexpand = true;
        search_box.halign = Gtk.Align.CENTER;
        search_box.width_request = this._SEARCH_BOX_WIDTH;

        let card_container_frame = new Gtk.Frame();
        card_container_frame.get_style_context().add_class(EosKnowledge.STYLE_CLASS_CARD_CONTAINER);
        card_container_frame.add(this._card_container);

        this.row_homogeneous = true;
        this.attach(title_image, 0, 0, 1, 1);
        this.attach(search_box, 1, 0, 1, 1);<commit_msg>Change search box alignment<commit_after>// Copyright 2014 Endless Mobile, Inc.

const Endless = imports.gi.Endless;
const EosKnowledge = imports.gi.EosKnowledge;
const GObject = imports.gi.GObject;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;

const HomePage = imports.homePage;
const Config = imports.config;

/**
 * Class: HomePageB
 *
 * This represents the home page for template B of the knowledge apps.
 * It extends <HomePage> and has a title image and list of article cards to show.
 * The list of cards only accepts 4, 6 or 8 cards.
 *
 */
const HomePageB = new Lang.Class({
    Name: 'HomePageB',
    GTypeName: 'EknHomePageB',
    Extends: HomePage.HomePage,

    _init: function (props) {
        this._card_container = new Gtk.Grid({
            column_homogeneous: true,
            row_homogeneous: true,
            hexpand: true
        });

        this.parent(props);

        this.get_style_context().add_class(EosKnowledge.STYLE_CLASS_HOME_PAGE_B);
    },

    _SEARCH_BOX_WIDTH: 350,
    pack_widgets: function (title_image, search_box) {
        title_image.vexpand = true;
        search_box.halign = Gtk.Align.CENTER;
        search_box.valign = Gtk.Align.CENTER;
        search_box.width_request = this._SEARCH_BOX_WIDTH;

        let card_container_frame = new Gtk.Frame();
        card_container_frame.get_style_context().add_class(EosKnowledge.STYLE_CLASS_CARD_CONTAINER);
        card_container_frame.add(this._card_container);

        this.row_homogeneous = true;
        this.attach(title_image, 0, 0, 1, 1);
        this.attach(search_box, 1, 0, 1, 1);
{'fraction_non_alphanumeric': 0.09859604339502234, 'fraction_numerical': 0.01148691767708998, 'mean_word_length': 3.1141732283464565, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1269490', 'n_tokens_mistral': 1067, 'n_tokens_neox': 1002, 'n_words': 246}