<commit_before>import { routing } from '../../../../src/app/routes';

(function () {
    'use strict';

    angular
        .module('dpPage')
        .component('dpCatalogusThemes', {
            templateUrl: 'modules/page/components/catalogus-themes/catalogus-themes.html',
            controller: DpCatalogusThemes,
            controllerAs: 'vm'
        });

    DpCatalogusThemes.$inject = ['CATALOGUS_THEMES_CONFIG'];

    function DpCatalogusThemes (CATALOGUS_THEMES_CONFIG) {
        const vm = this;

        vm.themes = CATALOGUS_THEMES_CONFIG.map(theme => {
            const linkTo = {
                type: routing.datasets.type,
                query: {
                    filter_theme: theme.slug
                }
            };
            return {
                ...theme,
                linkTo
            };
        });

        vm.themesPerColumn = Math.ceil(vm.themes.length / 2);
    }
})();<commit_msg>DP-6246 fix navigation to datasets from homepage<commit_after>import { routing } from '../../../../src/app/routes';

(function () {
    'use strict';

    angular
        .module('dpPage')
        .component('dpCatalogusThemes', {
            templateUrl: 'modules/page/components/catalogus-themes/catalogus-themes.html',
            controller: DpCatalogusThemes,
            controllerAs: 'vm'
        });

    DpCatalogusThemes.$inject = ['CATALOGUS_THEMES_CONFIG'];

    function DpCatalogusThemes (CATALOGUS_THEMES_CONFIG) {
        const vm = this;

        vm.themes = CATALOGUS_THEMES_CONFIG.map(theme => {
            const linkTo = {
                type: routing.datasets.type,
                meta: {
                    query: {
                        filters: btoa(JSON.stringify({groups: theme.slug})) // eslint-disable-line angular/json-functions
                    }
                }
            };
            return {
                ...theme,
                linkTo
            };
        });

        vm.themesPerColumn = Math.ceil(vm.themes.length / 2);
    }
})();
{'fraction_non_alphanumeric': 0.12487611496531219, 'fraction_numerical': 0.002973240832507433, 'mean_word_length': 1.5364321608040201, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2144695', 'n_tokens_mistral': 606, 'n_tokens_neox': 570, 'n_words': 88}