편집 요약 없음 |
편집 요약 없음 |
||
| 1번째 줄: | 1번째 줄: | ||
<div class="everest-rss"> | <div class="everest-rss"> | ||
<h6 class="nav">최근바뀜</h6> | |||
<div class="Rssfeed-list" id="rssFeedList"></div> | |||
[[특수:최근바뀜|<span class="text-xs label label-info bg-evewiki-main">더 보기</span>]] | |||
</div> | </div> | ||
<html> | |||
<script> | <script> | ||
// 현재 시간을 기준으로 작성 시간을 계산하는 함수 | // 현재 시간을 기준으로 작성 시간을 계산하는 함수 | ||
| 20번째 줄: | 14번째 줄: | ||
if (timeDifference < 60) { | if (timeDifference < 60) { | ||
return timeDifference + '분 | return timeDifference + '분 전'; | ||
} else if (timeDifference < 1440) { | } else if (timeDifference < 1440) { | ||
return Math.floor(timeDifference / 60) + '시간 | return Math.floor(timeDifference / 60) + '시간 전'; | ||
} else { | } else { | ||
return Math.floor(timeDifference / 1440) + '일 | return Math.floor(timeDifference / 1440) + '일 전'; | ||
} | } | ||
} | } | ||
| 68번째 줄: | 62번째 줄: | ||
// 리스트 아이템과 앵커 엘리먼트 생성 | // 리스트 아이템과 앵커 엘리먼트 생성 | ||
var listItem = document.createElement(' | var listItem = document.createElement('div'); | ||
var anchor = document.createElement('a'); | var anchor = document.createElement('a'); | ||
anchor.setAttribute('class', ' | listItem.setAttribute('class', 'w-full'); | ||
anchor.setAttribute('class', ''); | |||
anchor.setAttribute('href', link); | anchor.setAttribute('href', link); | ||
anchor.innerHTML = title; | anchor.innerHTML = title; | ||
// 작성 시간을 표시하는 엘리먼트 생성 | // 작성 시간을 표시하는 엘리먼트 생성 | ||
var timeElement = document.createElement(' | var timeElement = document.createElement('div'); | ||
timeElement.setAttribute('class', ' | timeElement.setAttribute('class', 'inline-block w-16 opacity-50 text-xs'); | ||
timeElement.innerHTML = timeDifference; | timeElement.innerHTML = timeDifference; | ||
2023년 12월 29일 (금) 14:19 판
최근바뀜