이브위키:연습장/대문: 두 판 사이의 차이

편집 요약 없음
편집 요약 없음
1번째 줄: 1번째 줄:
<html>
 
<div class="everest-rss">
<div class="everest-rss">
    <div class="Rssfeed-header">
<h6 class="nav">최근바뀜</h6>
        <div class="nav">자유게시판</div>
<div class="Rssfeed-list" id="rssFeedList"></div>
    </div>
[[특수:최근바뀜|<span class="text-xs label label-info bg-evewiki-main">더 보기</span>]]
    <div class="Rssfeed-content">
        <ul class="Rssfeed-list" id="rssFeedList"></ul>
    </div>
    <div class="Rssfeed-footer">
        <a href="https://evewiki.kr/everest/free" title="이브레스트 자유게시판"><span class="label label-info">더 보기</span></a>
    </div>
</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('li');
                         var listItem = document.createElement('div');
                         var anchor = document.createElement('a');
                         var anchor = document.createElement('a');
                         anchor.setAttribute('class', 'Rssfeed-item');
                        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('span');
                         var timeElement = document.createElement('div');
                         timeElement.setAttribute('class', 'time-difference');
                         timeElement.setAttribute('class', 'inline-block w-16 opacity-50 text-xs');
                         timeElement.innerHTML = timeDifference;
                         timeElement.innerHTML = timeDifference;



2023년 12월 29일 (금) 14:19 판

더 보기