<commit_before><template>

  <!-- class unused, used as identifier when debugging from DOM -->
  <div class="app-body" :style="contentStyle">
    <k-linear-loader
      v-if="loading"
      class="toolbar-loader"
      :style="{ top: isMobile ? '56px' : '64px' }"
      type="indeterminate"
      :delay="false"
    />
    <template v-else>
      <error-box v-if="error" />
      <slot></slot>
    </template>
  </div>

</template>


<script>

  import kLinearLoader from 'kolibri.coreVue.components.kLinearLoader';
  import responsiveWindow from 'kolibri.coreVue.mixins.responsiveWindow';
  import errorBox from './error-box';

  export default {
    name: 'appBody',
    components: {
      errorBox,
      kLinearLoader,
    },
    mixins: [responsiveWindow],
    props: {
      // reserve space at the top for appbar
      topGap: {
        type: Number,
        required: true,
        default: 0,
      },
      // reserve space at the bottom for floating widgets
      bottomGap: {
        type: Number,
        required: false,
        default: 0,
      },
    },
    computed: {
      isMobile() {
        return this.windowSize.breakpoint < 2;
      },
      padding() {
        return this.isMobile ? 16 : 32;
      },
      contentStyle() {
        return {
          top: `${this.topGap}px`,
          bottom: `${this.bottomGap}px`,
          padding: `${this.padding}px`,
        };
      },
    },
    vuex: {
      getters: {
        loading: state => state.core.loading,
        error: state => state.core.error,
        documentTitle: state => state.core.title,
      },
    },
  };

</script>


<style lang="stylus" scoped>

  .app-body
    left: 0
    right: 0
    position: absolute
    overflow-x: hidden

  .toolbar-loader
    position: fixed
    right: 0
    left: 0

</style><commit_msg>add a max-width to content<commit_after><template>

  <!-- class unused, used as identifier when debugging from DOM -->
  <div class="app-body" :style="contentStyle">
    <k-linear-loader
      v-if="loading"
      class="toolbar-loader"
      :style="{ top: isMobile ? '56px' : '64px' }"
      type="indeterminate"
      :delay="false"
    />
    <template v-else>
      <error-box v-if="error" />
      <slot></slot>
    </template>
  </div>

</template>


<script>

  import kLinearLoader from 'kolibri.coreVue.components.kLinearLoader';
  import responsiveWindow from 'kolibri.coreVue.mixins.responsiveWindow';
  import errorBox from './error-box';

  export default {
    name: 'appBody',
    components: {
      errorBox,
      kLinearLoader,
    },
    mixins: [responsiveWindow],
    props: {
      // reserve space at the top for appbar
      topGap: {
        type: Number,
        required: true,
        default: 0,
      },
      // reserve space at the bottom for floating widgets
      bottomGap: {
        type: Number,
        required: false,
        default: 0,
      },
    },
    computed: {
      isMobile() {
        return this.windowSize.breakpoint < 2;
      },
      padding() {
        return this.isMobile ? 16 : 32;
      },
      contentStyle() {
        return {
          top: `${this.topGap}px`,
          bottom: `${this.bottomGap}px`,
          padding: `${this.padding}px`,
        };
      },
    },
    vuex: {
      getters: {
        loading: state => state.core.loading,
        error: state => state.core.error,
        documentTitle: state => state.core.title,
      },
    },
  };

</script>


<style lang="stylus" scoped>

  .app-body
    left: 0
    right: 0
    position: absolute
    overflow-x: hidden
    max-width: 1000px
    margin: auto

  .toolbar-loader
    position: fixed
    right: 0
    left: 0

</style>
{'fraction_non_alphanumeric': 0.1365614798694233, 'fraction_numerical': 0.009249183895538629, 'mean_word_length': 1.9725141471301535, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 39, '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': '6975413', 'n_tokens_mistral': 1201, 'n_tokens_neox': 1162, 'n_words': 273}