<commit_before><div class="subnav ng-scope themes-manager">
    <h3 class="page-nav-title" translate>Theme Manager</h3>
    <div class="button-stack right-stack">
        <form
            action="#"
            method="post"
            enctype="multipart/form-data"
            ng-if="!vm.hasReachedThemesLimit() && !vm.isSolo()">
            <label class="navbtn navbtn-info" for="uploadAThemeFile">
                <i class="svg-icon-add inverse"></i> <span class="title" translate>New Theme</span>
            </label>
            <input
                type="file" 
                name="uploadAThemeFile" 
                id="uploadAThemeFile" 
                onchange="angular.element(this).controller().uploadThemeFile(this)">
        </form>

        <button
            ng-if="vm.hasReachedThemesLimit()"
            class="navbtn navbtn-info"
            ng-click="vm.showUpgradeModal()">
            <i class="svg-icon-add inverse"></i> <span class="title" translate>New Theme</span>
        </button>
    </div>
</div>

<section class="main-section themelist">
    <div class="loading-indicator" ng-show="vm.loading"><span translate>loading</span></div>
    <div class="list-container">
        <div 
            ng-if="!vm.isSolo()"
            class="alert alert-info alert--margin-left" 
            role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><i class="icon-close-small"></i></button>Customize your themes to the specific needs of your organisation. All you need is someone in your team with frontend development skills and a download of the classic theme as a good starting point to create your own. You find all required code and some info on Github: <a href="https://github.com/liveblog/liveblog/blob/e7945a48fcd19c1a959d8e83706114f13864871c/CUSTOM-THEME.MD" target="_blank">https://github.com/liveblog/liveblog/blob/e7945a48fcd19c1a959d8e83706114f13864871c/CUSTOM-THEME.MD</a>
        </div>
        <!-- LIST VIEW -->
        <script type="text/ng-template" id="themeTree">
            <ul>
                <li ng-init="theme=vm.getTheme(themeName)">
                    <div class="theme card" ng-class="{'default': vm.isDefaultTheme(theme)}">
                        <figure class="media" ng-click="theme.screenshot_url && vm.openThemePreview(theme)" ng-class="{'no-screenshot': !theme.screenshot_url}">
                            <div if-background-image="{{theme.screenshot_url}}"></div>
                            <div ng-if="theme.screenshot_url" class="overlay big-icon-search"></div>
                        </figure>
                        <div class="content">
                            <h3>{{ ::theme.label }}</h3>
                            <dl>
                                <dt>{{ ::'Version' | translate }}:</dt>
                                <dd>{{ ::theme.version }}</dd>
                                <dt>{{ ::'Author' | translate }}:</dt>
                                <dd>
                                    <div ng-if="theme.author.email && !theme.author.url">
                                        <a href="mailto:{{theme.author.email}}?subject={{theme.label}}" target="_blank">{{ ::theme.author.name }}</a>
                                    </div>
                                    <div ng-if="theme.author.url">
                                        <a href="{{theme.author.url}}" ng-show="theme.author.email">{{ ::theme.author.name }}</a>
                                    </div>
                                    <div ng-if="!theme.author.email && !theme.author.url">
                                        {{ ::theme.author.name }}
                                    </div>
                                </dd>
                                <dt ng-if="vm.isSolo()">{{ ::'Sources' | translate }}:</dt>
                                <dd ng-if="vm.isSolo()">
                                    <div ng-if="!theme.repository.url">unavailable</div>
                                    <a href="{{::theme.repository.url | githubUrlFromGit}}/archive/master.zip"
                                       ng-if="theme.repository.url"
                                       target="_blank"> <i class="icon-download"></i></a>
                                    <a href="{{::theme.repository.url | githubUrlFromGit}}"
                                       ng-if="theme.repository.url"
                                       target="_blank">({{ ::theme.repository.url | githubUrlFromGit }})</a>
                                </dd>
                                <dt>{{ ::'No. of blogs using theme' | translate }}:</dt>
                                <dd>
                                    <a ng-click="vm.openThemeBlogsModal(theme)" ng-if="theme.blogs_count > 0">
                                        <span translate translate-n="::theme.blogs_count" translate-plural="<span data-name='noOfBlogs'>{{::theme.blogs_count}}</span> blogs">
                                        <span data-name='noOfBlogs'>1 blog</span></span>
                                    </a>
                                    <span ng-if="theme.blogs_count === 0"><span data-name='noOfBlogs'>0</span> <span translate>blogs</span></span>
                                </dd>
                                <dt>{{ ::'Copyright' | translate }}:</dt>
                                <dd>{{ ::theme.license }}</dd>
                            </dl>
                        </div>
                        <div class="side">
                            <div ng-style="{'visibility': (vm.isDefaultTheme(theme) && 'hidden') || 'visible'}">
                                <button ng-disabled="vm.hasChildren(theme)" ng-click="vm.removeTheme(theme)" class="btn btn-default pull-right" type="button" translate>Remove</button>
                                <button ng-if="!theme.abstract" ng-click="vm.makeDefault(theme)" class="btn btn-info pull-right" type="button" translate>Make default</button>
                            </div>
                            <button ng-click="vm.openThemeSettings(theme)" class="btn btn-default pull-right" type="button" translate>Settings</button>
                            <button
                                ng-if="!vm.isSolo()"
                                ng-click="vm.download(theme)"
                                class="btn btn-info pull-right"
                                type="button"
                                translate>Download</button>
                        </div>
                        <div class="default-theme" ng-show="vm.isDefaultTheme(theme)"></div>
                    </div>
                    <ng-include ng-repeat="(themeName, themeChildren) in themeChildren | orderBy:'-themeName'" src="'themeTree'"></ng-include>
                </li>
            </ul>
        </script>
        <ng-include ng-repeat="(themeName, themeChildren) in vm.themesHierachy | orderBy:'-themeName'" src="'themeTree'"></ng-include>
    </div>
</section>
<div sd-modal="" data-model="vm.themeBlogsModal" class="theme-blogs-modal" macro-team="">
    <div class="modal-header" ng-class="{'modal-header-blogs': !vm.selectedBlog}">
        <button class="close" ng-click="vm.closeThemeBlogsModal()"><i class="icon-close-small"></i></button>
        <div ng-hide="vm.selectedBlog">
            <h3 translate>List of blogs using theme</h3>
            <h2>{{vm.selectedTheme.label}}</h2>
        </div>
    </div>
    <div class="modal-body">
        <div  ng-hide="vm.selectedBlog">
            <ul class="theme-blogs">
                <li ng-repeat="blog in vm.selectedTheme.blogs" ng-click="vm.switchBlogPreview(blog)">
                    {{ blog.title }}
                    <a ng-href="{{ blog.iframe_url }}" target="_blank"><i class="icon-share"></i></a>
                </li>
            </ul>
        </div>
        <div ng-show="vm.selectedBlog">
            <iframe width="100%" height="715" ng-if="vm.selectedBlog.iframe_url" ng-src="{{ vm.selectedBlog.iframe_url }}" frameborder="0" allowfullscreen></iframe>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" translate ng-click="vm.closeThemeBlogsModal()">Cancel</button>
    </div>
</div>

<div sd-modal="" data-model="vm.themePreviewModal" class="theme-preview-modal" macro-team="">
    <div class="modal-header">
        <button class="close" ng-click="vm.themePreviewModal = false">⨯</button>
    </div>
    <div class="modal-body">
        <img ng-src="{{vm.themePreviewModalTheme.screenshot_url}}"
            full-height
            full-height-use-max-height="true"
            full-height-offset-bottom="50"/>
    </div>
</div>

<div sd-modal="" data-model="vm.upgradeModal">
    <div class="modal-header">
        <button class="close" ng-click="vm.closeUpgradeModal()">
            <i class="icon-close-small"></i>
        </button>
        <h3>Sorry</h3>
    </div>
    <div class="modal-body">
      <p>You have reached the maximum number of themes on your Live Blog plan. You can either:</p>
      <ul>
        <li>1. Remove an existing theme or</li>
        <li>2. Subscribe to a bigger plan.</li>
      </ul>
      <br/>
      <p>To remove a theme from your Live Blog instance, click on the burger menu on the top left and open the Theme Manager. You can now delete a theme by clicking on the “Remove” button.</p>
      <p>Want to upgrade to a plan more suitable to your needs? Email us at <a href="{{vm.mailto}}"><EMAIL></a> and tell us when and how we can best contact you to take your order.</p>
    </div>
</div>


<theme-settings-modal theme="vm.themeSettingsModalTheme" ng-if="vm.themeSettingsModalTheme"></theme-settings-modal>
<commit_msg>Fixed wrong if statement<commit_after><div class="subnav ng-scope themes-manager">
    <h3 class="page-nav-title" translate>Theme Manager</h3>
    <div class="button-stack right-stack">
        <form
            action="#"
            method="post"
            enctype="multipart/form-data"
            ng-if="!vm.hasReachedThemesLimit() && !vm.isSolo()">
            <label class="navbtn navbtn-info" for="uploadAThemeFile">
                <i class="svg-icon-add inverse"></i> <span class="title" translate>New Theme</span>
            </label>
            <input
                type="file" 
                name="uploadAThemeFile" 
                id="uploadAThemeFile" 
                onchange="angular.element(this).controller().uploadThemeFile(this)">
        </form>

        <button
            ng-if="vm.hasReachedThemesLimit()"
            class="navbtn navbtn-info"
            ng-click="vm.showUpgradeModal()">
            <i class="svg-icon-add inverse"></i> <span class="title" translate>New Theme</span>
        </button>
    </div>
</div>

<section class="main-section themelist">
    <div class="loading-indicator" ng-show="vm.loading"><span translate>loading</span></div>
    <div class="list-container">
        <div 
            ng-if="!vm.isSolo()"
            class="alert alert-info alert--margin-left" 
            role="alert">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><i class="icon-close-small"></i></button>Customize your themes to the specific needs of your organisation. All you need is someone in your team with frontend development skills and a download of the classic theme as a good starting point to create your own. You find all required code and some info on Github: <a href="https://github.com/liveblog/liveblog/blob/e7945a48fcd19c1a959d8e83706114f13864871c/CUSTOM-THEME.MD" target="_blank">https://github.com/liveblog/liveblog/blob/e7945a48fcd19c1a959d8e83706114f13864871c/CUSTOM-THEME.MD</a>
        </div>
        <!-- LIST VIEW -->
        <script type="text/ng-template" id="themeTree">
            <ul>
                <li ng-init="theme=vm.getTheme(themeName)">
                    <div class="theme card" ng-class="{'default': vm.isDefaultTheme(theme)}">
                        <figure class="media" ng-click="theme.screenshot_url && vm.openThemePreview(theme)" ng-class="{'no-screenshot': !theme.screenshot_url}">
                            <div if-background-image="{{theme.screenshot_url}}"></div>
                            <div ng-if="theme.screenshot_url" class="overlay big-icon-search"></div>
                        </figure>
                        <div class="content">
                            <h3>{{ ::theme.label }}</h3>
                            <dl>
                                <dt>{{ ::'Version' | translate }}:</dt>
                                <dd>{{ ::theme.version }}</dd>
                                <dt>{{ ::'Author' | translate }}:</dt>
                                <dd>
                                    <div ng-if="theme.author.email && !theme.author.url">
                                        <a href="mailto:{{theme.author.email}}?subject={{theme.label}}" target="_blank">{{ ::theme.author.name }}</a>
                                    </div>
                                    <div ng-if="theme.author.url">
                                        <a href="{{theme.author.url}}" ng-show="theme.author.email">{{ ::theme.author.name }}</a>
                                    </div>
                                    <div ng-if="!theme.author.email && !theme.author.url">
                                        {{ ::theme.author.name }}
                                    </div>
                                </dd>
                                <dt ng-if="!vm.isSolo()">{{ ::'Sources' | translate }}:</dt>
                                <dd ng-if="!vm.isSolo()">
                                    <div ng-if="!theme.repository.url">unavailable</div>
                                    <a href="{{::theme.repository.url | githubUrlFromGit}}/archive/master.zip"
                                       ng-if="theme.repository.url"
                                       target="_blank"> <i class="icon-download"></i></a>
                                    <a href="{{::theme.repository.url | githubUrlFromGit}}"
                                       ng-if="theme.repository.url"
                                       target="_blank">({{ ::theme.repository.url | githubUrlFromGit }})</a>
                                </dd>
                                <dt>{{ ::'No. of blogs using theme' | translate }}:</dt>
                                <dd>
                                    <a ng-click="vm.openThemeBlogsModal(theme)" ng-if="theme.blogs_count > 0">
                                        <span translate translate-n="::theme.blogs_count" translate-plural="<span data-name='noOfBlogs'>{{::theme.blogs_count}}</span> blogs">
                                        <span data-name='noOfBlogs'>1 blog</span></span>
                                    </a>
                                    <span ng-if="theme.blogs_count === 0"><span data-name='noOfBlogs'>0</span> <span translate>blogs</span></span>
                                </dd>
                                <dt>{{ ::'Copyright' | translate }}:</dt>
                                <dd>{{ ::theme.license }}</dd>
                            </dl>
                        </div>
                        <div class="side">
                            <div ng-style="{'visibility': (vm.isDefaultTheme(theme) && 'hidden') || 'visible'}">
                                <button ng-disabled="vm.hasChildren(theme)" ng-click="vm.removeTheme(theme)" class="btn btn-default pull-right" type="button" translate>Remove</button>
                                <button ng-if="!theme.abstract" ng-click="vm.makeDefault(theme)" class="btn btn-info pull-right" type="button" translate>Make default</button>
                            </div>
                            <button ng-click="vm.openThemeSettings(theme)" class="btn btn-default pull-right" type="button" translate>Settings</button>
                            <button
                                ng-if="!vm.isSolo()"
                                ng-click="vm.download(theme)"
                                class="btn btn-info pull-right"
                                type="button"
                                translate>Download</button>
                        </div>
                        <div class="default-theme" ng-show="vm.isDefaultTheme(theme)"></div>
                    </div>
                    <ng-include ng-repeat="(themeName, themeChildren) in themeChildren | orderBy:'-themeName'" src="'themeTree'"></ng-include>
                </li>
            </ul>
        </script>
        <ng-include ng-repeat="(themeName, themeChildren) in vm.themesHierachy | orderBy:'-themeName'" src="'themeTree'"></ng-include>
    </div>
</section>
<div sd-modal="" data-model="vm.themeBlogsModal" class="theme-blogs-modal" macro-team="">
    <div class="modal-header" ng-class="{'modal-header-blogs': !vm.selectedBlog}">
        <button class="close" ng-click="vm.closeThemeBlogsModal()"><i class="icon-close-small"></i></button>
        <div ng-hide="vm.selectedBlog">
            <h3 translate>List of blogs using theme</h3>
            <h2>{{vm.selectedTheme.label}}</h2>
        </div>
    </div>
    <div class="modal-body">
        <div  ng-hide="vm.selectedBlog">
            <ul class="theme-blogs">
                <li ng-repeat="blog in vm.selectedTheme.blogs" ng-click="vm.switchBlogPreview(blog)">
                    {{ blog.title }}
                    <a ng-href="{{ blog.iframe_url }}" target="_blank"><i class="icon-share"></i></a>
                </li>
            </ul>
        </div>
        <div ng-show="vm.selectedBlog">
            <iframe width="100%" height="715" ng-if="vm.selectedBlog.iframe_url" ng-src="{{ vm.selectedBlog.iframe_url }}" frameborder="0" allowfullscreen></iframe>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" translate ng-click="vm.closeThemeBlogsModal()">Cancel</button>
    </div>
</div>

<div sd-modal="" data-model="vm.themePreviewModal" class="theme-preview-modal" macro-team="">
    <div class="modal-header">
        <button class="close" ng-click="vm.themePreviewModal = false">⨯</button>
    </div>
    <div class="modal-body">
        <img ng-src="{{vm.themePreviewModalTheme.screenshot_url}}"
            full-height
            full-height-use-max-height="true"
            full-height-offset-bottom="50"/>
    </div>
</div>

<div sd-modal="" data-model="vm.upgradeModal">
    <div class="modal-header">
        <button class="close" ng-click="vm.closeUpgradeModal()">
            <i class="icon-close-small"></i>
        </button>
        <h3>Sorry</h3>
    </div>
    <div class="modal-body">
      <p>You have reached the maximum number of themes on your Live Blog plan. You can either:</p>
      <ul>
        <li>1. Remove an existing theme or</li>
        <li>2. Subscribe to a bigger plan.</li>
      </ul>
      <br/>
      <p>To remove a theme from your Live Blog instance, click on the burger menu on the top left and open the Theme Manager. You can now delete a theme by clicking on the “Remove” button.</p>
      <p>Want to upgrade to a plan more suitable to your needs? Email us at <a href="{{vm.mailto}}"><EMAIL></a> and tell us when and how we can best contact you to take your order.</p>
    </div>
</div>


<theme-settings-modal theme="vm.themeSettingsModalTheme" ng-if="vm.themeSettingsModalTheme"></theme-settings-modal>

{'fraction_non_alphanumeric': 0.15454778375608505, 'fraction_numerical': 0.008506277222649244, 'mean_word_length': 1.6675779114270093, 'pattern_counts': {'":': 2, '<': 405, '<?xml version=': 0, '>': 407, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 68, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6339426', 'n_tokens_mistral': 5578, 'n_tokens_neox': 5233, 'n_words': 1045}