press.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <template>
  2. <main>
  3. <TopVisual :className="className" :title="title" :navigation="navigation" />
  4. <section class="title--section">
  5. <div class="sub--container type2">
  6. <div class="title--wrap">
  7. <h2 class="title">그린웨일글로벌의 <br />
  8. <strong>새로운 소식들을 전해드립니다.</strong></h2>
  9. </div>
  10. <div class="sns--wrap">
  11. <h3>SNS</h3>
  12. <div class="sns--list">
  13. <NuxtLink class="sns" to="/">
  14. <div class="img--wrap" style="background-image: url('/img/img--sns1.png')"></div>
  15. <div class="txt--wrap">
  16. <h4>그린웨일글로벌, 녹색인프라 수출펀드 첫 투자기업 선정. 그린웨일글로벌</h4>
  17. <span>바로가기<i class="ico"></i></span>
  18. </div>
  19. </NuxtLink>
  20. <NuxtLink class="sns" to="/">
  21. <div class="img--wrap" style="background-image: url('/img/img--sns2.png')"></div>
  22. <div class="txt--wrap">
  23. <h4>그린웨일글로벌, 녹색인프라 수출펀드 첫 투자기업 선정. 그린웨일글로벌</h4>
  24. <span>바로가기<i class="ico"></i></span>
  25. </div>
  26. </NuxtLink>
  27. <NuxtLink class="sns" to="/">
  28. <div class="img--wrap" style="background-image: url('/img/img--sns3.png')"></div>
  29. <div class="txt--wrap">
  30. <h4>그린웨일글로벌, 녹색인프라 수출펀드 첫 투자기업 선정. 그린웨일글로벌</h4>
  31. <span>바로가기<i class="ico"></i></span>
  32. </div>
  33. </NuxtLink>
  34. <NuxtLink class="sns" to="/">
  35. <div class="img--wrap" style="background-image: url('/img/img--sns4.png')"></div>
  36. <div class="txt--wrap">
  37. <h4>그린웨일글로벌, 녹색인프라 수출펀드 첫 투자기업 선정. 그린웨일글로벌</h4>
  38. <span>바로가기<i class="ico"></i></span>
  39. </div>
  40. </NuxtLink>
  41. </div>
  42. </div>
  43. <div class="news--wrap">
  44. <h3>기사</h3>
  45. <div class="news--list">
  46. <NuxtLink
  47. v-for="news in paginatedNews"
  48. :key="news.id"
  49. :to="news.link"
  50. class="news"
  51. >
  52. <div class="news--title--wrap">
  53. <h4>{{ news.title }}</h4>
  54. <span>{{ news.date }}</span>
  55. </div>
  56. <div class="news--thumb--wrap">
  57. <img :src="news.image" alt="">
  58. </div>
  59. </NuxtLink>
  60. </div>
  61. <div class="pagination--wrap">
  62. <UButton
  63. @click="prevPage"
  64. class="prev--btn"
  65. :disabled="currentPage === 1"
  66. ></UButton>
  67. <div class="numbs">
  68. <UButton
  69. v-for="page in totalPages"
  70. :key="page"
  71. @click="goToPage(page)"
  72. :class="{ 'active': currentPage === page }"
  73. >
  74. {{ page }}
  75. </UButton>
  76. </div>
  77. <UButton
  78. @click="nextPage"
  79. class="next--btn"
  80. :disabled="currentPage === totalPages"
  81. ></UButton>
  82. </div>
  83. </div>
  84. </div>
  85. </section>
  86. </main>
  87. </template>
  88. <script setup>
  89. import TopVisual from '~/components/topVisual.vue'
  90. const className = ref("media")
  91. const title = ref("Media")
  92. const navigation = ref([
  93. { name: "Media",
  94. link: "/media/press" ,
  95. gnbList : [
  96. { name: "환경뉴스", link: "/media/news" },
  97. { name: "보도자료", link: "/media/press" },
  98. ]
  99. },
  100. { name: "보도자료", link: "/media/press" }
  101. ])
  102. // 뉴스 데이터 배열 생성
  103. const newsData = ref([
  104. { id: 1, title: "그린플라스틱연합, ESG친환경대전서 '자원순환 탄소중립 GPA 컨퍼런스' 개최", date: "2025.07.11", image: "/img/img--news.png", link: "/" },
  105. { id: 2, title: "친환경 플라스틱 기술 개발 동향", date: "2025.07.10", image: "/img/img--cycle--center.png", link: "/" },
  106. { id: 3, title: "탄소중립 실현을 위한 플라스틱 재활용 기술", date: "2025.07.09", image: "/img/img--cycle--center.png", link: "/" },
  107. { id: 4, title: "바이오플라스틱 시장 전망과 기술 동향", date: "2025.07.08", image: "/img/img--cycle--center.png", link: "/" },
  108. { id: 5, title: "플라스틱 감축을 위한 정부 정책 변화", date: "2025.07.07", image: "/img/img--cycle--center.png", link: "/" },
  109. { id: 6, title: "순환경제와 플라스틱 재활용 산업", date: "2025.07.06", image: "/img/img--cycle--center.png", link: "/" },
  110. { id: 7, title: "해양 플라스틱 오염 해결을 위한 혁신 기술", date: "2025.07.05", image: "/img/img--cycle--center.png", link: "/" },
  111. { id: 8, title: "친환경 포장재 개발 현황", date: "2025.07.04", image: "/img/img--cycle--center.png", link: "/" },
  112. { id: 9, title: "플라스틱 대체재 소재 연구 동향", date: "2025.07.03", image: "/img/img--cycle--center.png", link: "/" },
  113. { id: 10, title: "ESG 경영과 플라스틱 감축 전략", date: "2025.07.02", image: "/img/img--cycle--center.png", link: "/" },
  114. { id: 11, title: "글로벌 플라스틱 규제 동향", date: "2025.07.01", image: "/img/img--cycle--center.png", link: "/" },
  115. { id: 12, title: "생분해성 플라스틱 상용화 전망", date: "2025.06.30", image: "/img/img--cycle--center.png", link: "/" },
  116. { id: 13, title: "플라스틱 없는 일주일 캠페인", date: "2025.06.29", image: "/img/img--cycle--center.png", link: "/" },
  117. { id: 14, title: "재활용 플라스틱 품질 향상 기술", date: "2025.06.28", image: "/img/img--cycle--center.png", link: "/" },
  118. { id: 15, title: "플라스틱 순환경제 구축 방안", date: "2025.06.27", image: "/img/img--cycle--center.png", link: "/" },
  119. { id: 16, title: "친환경 소재 개발 투자 확대", date: "2025.06.26", image: "/img/img--cycle--center.png", link: "/" },
  120. { id: 17, title: "마이크로플라스틱 저감 기술", date: "2025.06.25", image: "/img/img--cycle--center.png", link: "/" },
  121. { id: 18, title: "플라스틱 재활용률 제고 방안", date: "2025.06.24", image: "/img/img--cycle--center.png", link: "/" },
  122. { id: 19, title: "바이오매스 기반 플라스틱 개발", date: "2025.06.23", image: "/img/img--cycle--center.png", link: "/" },
  123. { id: 20, title: "환경친화적 플라스틱 산업 전망", date: "2025.06.22", image: "/img/img--cycle--center.png", link: "/" },
  124. { id: 21, title: "플라스틱 폐기물 감축 정책", date: "2025.06.21", image: "/img/img--cycle--center.png", link: "/" },
  125. { id: 22, title: "지속가능한 포장재 솔루션", date: "2025.06.20", image: "/img/img--cycle--center.png", link: "/" },
  126. { id: 23, title: "플라스틱 리사이클링 혁신 기술", date: "2025.06.19", image: "/img/img--cycle--center.png", link: "/" },
  127. { id: 24, title: "친환경 플라스틱 인증 시스템", date: "2025.06.18", image: "/img/img--cycle--center.png", link: "/" },
  128. { id: 25, title: "탄소 발자국 감축을 위한 플라스틱 대안", date: "2025.06.17", image: "/img/img--cycle--center.png", link: "/" }
  129. ])
  130. // 페이지네이션 로직
  131. const currentPage = ref(1)
  132. const itemsPerPage = 10
  133. const totalPages = computed(() => Math.ceil(newsData.value.length / itemsPerPage))
  134. const paginatedNews = computed(() => {
  135. const start = (currentPage.value - 1) * itemsPerPage
  136. const end = start + itemsPerPage
  137. return newsData.value.slice(start, end)
  138. })
  139. const goToPage = (page) => {
  140. if (page >= 1 && page <= totalPages.value) {
  141. currentPage.value = page
  142. }
  143. }
  144. const nextPage = () => {
  145. if (currentPage.value < totalPages.value) {
  146. currentPage.value++
  147. }
  148. }
  149. const prevPage = () => {
  150. if (currentPage.value > 1) {
  151. currentPage.value--
  152. }
  153. }
  154. </script>