<commit_before><template>
  <div>
    <header>
      <div class="content">
        <div class="title">Drunken TowerFall</div>
      </div>
      <div class="links">
        <a v-link="{name: 'new'}" v-if="user.level(levels.producer)">New Tournament</a>
        <a v-link="{name: 'facebook'}" v-if="!user.authenticated">Facebook</a>
        <a href="/api/facebook/login" v-if="user.level(levels.producer) && user.authenticated">Re-facebook</a>
      </div>
      <div class="clear"></div>
    </header>

    <div class="tournaments" :class="{ loading: !tournament }">
      <div v-for="tournament in tournaments" :tournament="tournament.id" track-by="id">
        <a v-link="{ name: 'tournament', params: { tournament: tournament.id }}">{{tournament.name}}</a>
      </div>
    </div>
  </div>
</template>

<script>
import _ from "lodash"
import Tournament from "../models/Tournament.js"
import * as levels from "../models/Level.js"

export default {
  name: 'TournamentList',

  data () {
    return {
      tournaments: [],
      user: this.$root.user,
      levels: levels,
    }
  },
  route: {
    data ({ to }) {
      return this.$http.get('/api/towerfall/tournament/').then(function (res) {
        return {
          tournaments: _.map(res.data.tournaments, Tournament.fromObject)
        }
      }, function (res) {
        console.error('error when getting tournaments', res)
        return { tournaments: [] }
      })
    }
  }
}
</script>

<style lang="scss">
.tournaments a {
  background-color: #405060;
  color: #dbdbdb;
  display: block;
  font-size: 300%;
  font-weight: bold;
  padding: 1% 3%;
  text-align: center;
  text-decoration: none;
  width: 600px;
  margin: 10px auto;
}
</style><commit_msg>Update main list CSS<commit_after><template>
  <div>
    <header>
      <div class="content">
        <div class="title">Drunken TowerFall</div>
      </div>
      <div class="links">
        <a v-link="{name: 'new'}" v-if="user.level(levels.producer)">New Tournament</a>
        <a v-link="{name: 'facebook'}" v-if="!user.authenticated">Facebook</a>
        <a href="/api/facebook/login" v-if="user.level(levels.producer) && user.authenticated">Re-facebook</a>
      </div>
      <div class="clear"></div>
    </header>

    <div class="tournaments" :class="{ loading: !tournament }">
      <div v-for="tournament in tournaments" :tournament="tournament.id" track-by="id">
        <a v-link="{ name: 'tournament', params: { tournament: tournament.id }}">{{tournament.name}}</a>
      </div>
    </div>
  </div>
</template>

<script>
import _ from "lodash"
import Tournament from "../models/Tournament.js"
import * as levels from "../models/Level.js"

export default {
  name: 'TournamentList',

  data () {
    return {
      tournaments: [],
      user: this.$root.user,
      levels: levels,
    }
  },
  route: {
    data ({ to }) {
      return this.$http.get('/api/towerfall/tournament/').then(function (res) {
        return {
          tournaments: _.map(res.data.tournaments, Tournament.fromObject)
        }
      }, function (res) {
        console.error('error when getting tournaments', res)
        return { tournaments: [] }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.tournaments a {
  background-color: #405060;
  color: #dbdbdb;
  display: block;
  font-size: 2.5em;
  font-weight: bold;
  padding: 1% 3%;
  text-align: center;
  text-decoration: none;
  width: 60%;
  margin: 0.2em auto;
}
</style>
{'fraction_non_alphanumeric': 0.1825028968713789, 'fraction_numerical': 0.00869061413673233, 'mean_word_length': 2.823920265780731, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '349150', 'n_tokens_mistral': 1242, 'n_tokens_neox': 1153, 'n_words': 247}