particles.js 그누보드5 로그인 배경화면 적용
관련링크
본문
현재 제 배경화면 입니다.
위사진은 제가 변경하고싶은 js입니다.
.
.
js 움짤? 파티클 배경화면을 제배경에 집어넣고 싶은데 상세한 설명이 없어서 질문 부탁드려 봅니다.
어찌 해야 제 로그인 배경화면에 js를 집어넣어 링크처럼 출력이 될까요? 궁금합니다.
답변 2
bbs/login.php
<?php
include_once('./_common.php');
if( function_exists('social_check_login_before') ){
$social_login_html = social_check_login_before();
}
$g5['title'] = '로그인';
include_once('./_head.sub.php');
$url = strip_tags($_GET['url']);
// url 체크
check_url_host($url);
// 이미 로그인 중이라면
if ($is_member) {
if ($url)
goto_url($url);
else
goto_url(G5_URL);
}
$login_url = login_url($url);
$login_action_url = G5_HTTPS_BBS_URL."/login_check.php";
// 로그인 스킨이 없는 경우 관리자 페이지 접속이 안되는 것을 막기 위하여 기본 스킨으로 대체
$login_file = $member_skin_path.'/login.skin.php';
if (!file_exists($login_file))
$member_skin_path = G5_SKIN_PATH.'/member/basic';
include_once($member_skin_path.'/login.skin.php');
run_event('member_login_tail', $login_url, $login_action_url, $member_skin_path, $url);
include_once('./_tail.sub.php');
?>
<style>
.count-particles{background: #000022;position: absolute;left:calc(50% - 180px);}
.js-count-particles{font-size: 1.1em;}
.count-particles{border-radius: 0 0 3px 3px;}
#particles-js{width: 100%;height: 100%;background-color: #b61924;background-image: url('');background-size: cover;background-position: 50% 50%;background-repeat: no-repeat;}
</style>
<div id="particles-js"></div>
<script src="<?php echo G5_JS_URL;?>/particles.js"></script>
<script src="<?php echo G5_JS_URL;?>/app.js"></script>
<script>
var count_particles, stats, update;
stats = new Stats;
stats.setMode(0);
stats.domElement.style.position = 'absolute';
stats.domElement.style.left = '0px';
stats.domElement.style.top = '0px';
document.body.appendChild(stats.domElement);
count_particles = document.querySelector('.js-count-particles');
update = function() {
stats.begin();
stats.end();
if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) {
count_particles.innerText = window.pJSDom[0].pJS.particles.array.length;
}
requestAnimationFrame(update);
};
requestAnimationFrame(update);
</script>
/js에 particles.js, app.js 복사하세요.
!-->id=praticles-js 관련 div 그대로 넣으시고 background-image 는 지우시면 동작하지 싶은데요?
답변을 작성하시기 전에 로그인 해주세요.