<template>
  <div id="Chapter1_1" class="content-wrap">
    <div style="margin: 30px 0px 50px; width: 20%">
      <router-link to="/MyPlan.page">
        <div class="logo mb25"><img src="../../../../resources/img/logo2.png" alt=""></div>
      </router-link>
    </div>
    <div class="title-box mb25 flex align-center mt40">
      <span class="title mr40">1. Hello WORLD</span>
      <span class="subtitle">my name is dd</span>
    </div>
    <div class="flex justify-between align-center">
      <div class="pre-btn" @click="goToPage('Chapter1_3')"><img src="../../../../resources/img/left.png" alt=""></div>
      <div class="content title-box">
        <p class="title mt25 title-bg">STEP 2 - 단어로 공부하는 영어</p>
        <div class="flex align-center mb30">
          <p class="subtitle2 mr20"></p>
          <!-- <button><img src="../../../../resources/img/btn10_s.png" alt="">
          </button> -->
        </div>

        <div class="flex justify-center">
          <div class="vocaGroup">
            <div class="grid-container">
              <div v-for="(item, index) in word" :key="index" class="grid-item">
                <article class="flex align-center">
                  <div class="imgGroup mr30">
                    <img :src="item.pic" :alt="item.eng" />
                  </div>
                  <div class="flex align-start">
                    <button class="listen-btn mr30" tabindex="0" aria-label="음성 재생">
                      <img :src="item.sound" :alt="'Sound for ' + item.eng" />
                    </button>
                    <div>
                      <h3>{{ item.eng }}</h3>
                      <div class="flex align-center mt10">
                        <p class="yellow-box">명</p>
                        <span class="title1">{{ item.kor }}</span>
                      </div>
                    </div>
                  </div>
                </article>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="next-btn" @click="goToPage('Chapter2_3')"><img src="../../../../resources/img/right.png" alt=""></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      word: [
        {
          eng: "apple",
          kor: "사과",
          pic: require("../../../../resources/img/img40_s.png").default,
          sound: require("../../../../resources/img/btn10_s.png").default
        },
        {
          eng: "cloud",
          kor: "구름",
          pic: require("../../../../resources/img/img42_31s.png").default,
          sound: require("../../../../resources/img/btn10_s.png").default
        },
        {
          eng: "log",
          kor: "통나무",
          pic: require("../../../../resources/img/31img40_s.png").default,
          sound: require("../../../../resources/img/btn10_s.png").default
        },
        {
          eng: "guitar",
          kor: "기타",
          pic: require("../../../../resources/img/img41_s.png").default,
          sound: require("../../../../resources/img/btn10_s.png").default
        }
      ]
    }
  },
  methods: {
    goToPage(page) {
      this.$router.push({ name: page });
    }
  },
  watch: {

  },
  computed: {

  },
  components: {
  },
  mounted() {

  }
}
</script>
<style scoped>
.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
</style>