| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
- <c:set var="defaultDeptImage" value="/main/ffkj-portal/news-red/hero-building.jpg"/>
- <!doctype html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="keywords" content="${website.seoKeywords}">
- <meta name="description" content="${website.seoDescription}">
- <title>${website.seoTitle}</title>
- <link rel="stylesheet" href="/main/ffkj-portal/dept-red.css?v=20261019-footer-1">
- </head>
- <body class="screen-red-theme dept-red-page">
- <%@ include file="dept-red-header.jsp"%>
- <main id="home" class="dept-home-main">
- <section class="section dept-hero-notice-section">
- <div class="dept-hero-notice-grid">
- <div class="dept-hero-carousel" data-dept-hero-carousel>
- <div class="dept-hero-slides">
- <c:forEach items="${deptHeroNmv.articleList}" var="item" varStatus="vs">
- <a class="dept-hero-slide${vs.first ? ' is-active' : ''}" data-dept-hero-slide="${vs.index}" href="${item.url}" target="${item.target}" aria-hidden="${vs.first ? 'false' : 'true'}">
- <img src="${empty item.thumbnail ? defaultDeptImage : item.thumbnail}" alt="${item.title}">
- <span><strong>${item.title}</strong></span>
- </a>
- </c:forEach>
- <c:if test="${empty deptHeroNmv.articleList}">
- <a class="dept-hero-slide is-active" href="/"><img src="${defaultDeptImage}" alt="${website.name}"><span><strong>${website.name}</strong></span></a>
- </c:if>
- </div>
- <c:if test="${fn:length(deptHeroNmv.articleList) > 1}">
- <button class="dept-hero-arrow prev" type="button" aria-label="上一张">‹</button>
- <button class="dept-hero-arrow next" type="button" aria-label="下一张">›</button>
- <div class="dept-hero-dots">
- <c:forEach items="${deptHeroNmv.articleList}" var="item" varStatus="vs"><button type="button" class="${vs.first ? 'is-active' : ''}" data-dept-hero-dot="${vs.index}" aria-label="切换到第 ${vs.count} 张"></button></c:forEach>
- </div>
- </c:if>
- </div>
- <div class="dept-notice-panel">
- <div class="section-title dept-notice-title">
- <h2>${empty deptNoticeNmv.navigationMap.name ? '公告' : deptNoticeNmv.navigationMap.name}</h2>
- <em>${empty deptNoticeNmv.navigationMap.nameAssistant ? 'NOTICES' : deptNoticeNmv.navigationMap.nameAssistant}</em>
- <c:if test="${not empty deptNoticeNmv.navigationMap.href}"><a class="more" href="${deptNoticeNmv.navigationMap.href}" target="${deptNoticeNmv.navigationMap.target}">更多 →</a></c:if>
- </div>
- <ul class="plain-list dept-notice-list">
- <c:forEach items="${deptNoticeNmv.articleList}" var="item">
- <li><a href="${item.url}" target="${item.target}">${item.title}<time>${fn:substring(item.release_time, 5, 10)}</time></a></li>
- </c:forEach>
- </ul>
- <c:if test="${empty deptNoticeNmv.articleList}"><div class="empty-line">暂无公告</div></c:if>
- </div>
- </div>
- </section>
- <c:forEach items="${deptHomeSections}" var="section" varStatus="sectionVs">
- <c:set var="sectionNav" value="${section.navigationMap}"/>
- <c:if test="${sectionNav.idcard eq 'FFKJ_DEPT_HOME_MAJOR'}">
- <section class="section dept-major-showcase-section">
- <div class="dept-two-module-grid">
- <article class="dept-side-module dept-major-panel">
- <div class="section-title">
- <h2>${empty deptMajorNmv.navigationMap.name ? '专业建设' : deptMajorNmv.navigationMap.name}</h2>
- <em>${empty deptMajorNmv.navigationMap.nameAssistant ? 'MAJORS' : deptMajorNmv.navigationMap.nameAssistant}</em>
- <c:if test="${not empty deptMajorNmv.navigationMap.href}"><a class="more" href="${deptMajorNmv.navigationMap.href}" target="${deptMajorNmv.navigationMap.target}">更多 →</a></c:if>
- </div>
- <ul class="plain-list dept-side-list">
- <c:forEach items="${deptMajorNmv.articleList}" var="item">
- <li><a href="${item.url}" target="${item.target}">${item.title}<time>${fn:substring(item.release_time, 0, 10)}</time></a></li>
- </c:forEach>
- </ul>
- <c:if test="${empty deptMajorNmv.articleList}"><div class="empty-line">暂无内容</div></c:if>
- </article>
- <article class="dept-side-module dept-showcase-panel">
- <div class="section-title">
- <h2>${empty deptShowcaseNmv.navigationMap.name ? '学院风采' : deptShowcaseNmv.navigationMap.name}</h2>
- <em>${empty deptShowcaseNmv.navigationMap.nameAssistant ? 'CAMPUS LIFE' : deptShowcaseNmv.navigationMap.nameAssistant}</em>
- <c:if test="${not empty deptShowcaseNmv.navigationMap.href}"><a class="more" href="${deptShowcaseNmv.navigationMap.href}" target="${deptShowcaseNmv.navigationMap.target}">更多 →</a></c:if>
- </div>
- <div class="dept-card-grid dept-showcase-grid">
- <c:forEach items="${deptShowcaseNmv.articleList}" var="item">
- <a class="dept-card dept-showcase-card" href="${item.url}" target="${item.target}">
- <c:if test="${not empty item.thumbnail}"><img src="${item.thumbnail}" alt="${item.title}"></c:if>
- <span><strong>${item.title}</strong></span>
- </a>
- </c:forEach>
- </div>
- <c:if test="${empty deptShowcaseNmv.articleList}"><div class="empty-line">暂无内容</div></c:if>
- </article>
- </div>
- </section>
- </c:if>
- <c:if test="${sectionNav.idcard ne 'FFKJ_DEPT_HOME_HERO' and sectionNav.idcard ne 'FFKJ_DEPT_HOME_NOTICE' and sectionNav.idcard ne 'FFKJ_DEPT_HOME_NEWS' and sectionNav.idcard ne 'FFKJ_DEPT_HOME_MAJOR' and sectionNav.idcard ne 'FFKJ_DEPT_HOME_SHOWCASE'}">
- <section class="section dept-home-section dept-section-${sectionNav.idcard}" id="section-${sectionVs.index}">
- <div class="section-title">
- <h2>${sectionNav.name}</h2>
- <em>${empty sectionNav.nameAssistant ? 'DEPARTMENT' : sectionNav.nameAssistant}</em>
- <c:if test="${not empty sectionNav.href}"><a class="more" href="${sectionNav.href}" target="${sectionNav.target}">更多 →</a></c:if>
- </div>
- <c:choose>
- <c:when test="${sectionNav.idcard eq 'FFKJ_DEPT_HOME_VIDEO' or sectionNav.wnlscode eq 10050}">
- <div class="media-grid dept-media-grid">
- <c:forEach items="${section.articleList}" var="item">
- <a class="media-card dept-media-card" href="${item.url}" target="${item.target}">
- <img src="${empty item.thumbnail ? defaultDeptImage : item.thumbnail}" alt="${item.title}">
- <div class="meta"><small class="is-video">视频</small><h3>${item.title}</h3><time>${fn:substring(item.release_time, 0, 10)}</time></div>
- </a>
- </c:forEach>
- </div>
- </c:when>
- <c:when test="${sectionNav.idcard eq 'FFKJ_DEPT_HOME_AWARDS' or sectionNav.idcard eq 'FFKJ_DEPT_HOME_SHOWCASE' or sectionNav.wnlscode eq 10010}">
- <div class="dept-card-grid">
- <c:forEach items="${section.articleList}" var="item">
- <a class="dept-card" href="${item.url}" target="${item.target}">
- <c:if test="${not empty item.thumbnail}"><img src="${item.thumbnail}" alt="${item.title}"></c:if>
- <span><strong>${item.title}</strong><time>${fn:substring(item.release_time, 0, 10)}</time></span>
- </a>
- </c:forEach>
- </div>
- </c:when>
- <c:otherwise>
- <ul class="plain-list dept-news-list">
- <c:forEach items="${section.articleList}" var="item">
- <li><a href="${item.url}" target="${item.target}">${item.title}<time>${fn:substring(item.release_time, 0, 10)}</time></a></li>
- </c:forEach>
- </ul>
- </c:otherwise>
- </c:choose>
- <c:if test="${empty section.articleList}"><div class="empty-line">暂无内容</div></c:if>
- </section>
- </c:if>
- </c:forEach>
- </main>
- <%@ include file="dept-red-footer.jsp"%>
- <script>
- (function () {
- var root = document.querySelector('[data-dept-hero-carousel]');
- if (!root) return;
- var slides = Array.prototype.slice.call(root.querySelectorAll('[data-dept-hero-slide]'));
- var dots = Array.prototype.slice.call(root.querySelectorAll('[data-dept-hero-dot]'));
- var current = 0;
- var timer = null;
- if (slides.length < 2) return;
- function activate(index) {
- current = (index + slides.length) % slides.length;
- slides.forEach(function (slide, i) {
- slide.classList.toggle('is-active', i === current);
- slide.setAttribute('aria-hidden', i === current ? 'false' : 'true');
- });
- dots.forEach(function (dot, i) { dot.classList.toggle('is-active', i === current); });
- }
- function stop() { if (timer) { window.clearInterval(timer); timer = null; } }
- function start() { stop(); timer = window.setInterval(function () { activate(current + 1); }, 5200); }
- root.querySelector('.dept-hero-arrow.prev').addEventListener('click', function () { activate(current - 1); start(); });
- root.querySelector('.dept-hero-arrow.next').addEventListener('click', function () { activate(current + 1); start(); });
- dots.forEach(function (dot) {
- dot.addEventListener('click', function () { activate(Number(dot.getAttribute('data-dept-hero-dot'))); start(); });
- });
- root.addEventListener('mouseenter', stop);
- root.addEventListener('mouseleave', start);
- activate(0);
- start();
- })();
- </script>
- </body>
- </html>
|