一个NAS、月服务器导航面板、简易docker管理器、Homepage、浏览器首页
首页:Sun-Panel
github:sun-panel - GitHub
安装 docker-compose配置文件 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 services: panel: image: 'docker.olinl.com.cn/hslr/sun-panel:latest' hostname: panel container_name: panel ports: - '3002:3002' volumes: - './conf:/app/conf' - '/var/run/docker.sock:/var/run/docker.sock' restart: always networks: - net networks: net: external: true name: lin-net
配置文件 如果使用mysql/redis,找到项目的[配置文件](https://doc.sun-panel.top/zh_cn/advanced/config.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [base ] http_port=3002 database_drive=mysql cache_drive=redis queue_drive=redis source_path=./uploads source_temp_path=./runtime/temp [mysql ] host=127.0.0.1 port=3306 username=root password=root db_name=sun_panel wait_timeout=100 [sqlite ] file_path=./database/database.db [redis ] address=127.0.0.1:6379 password= prefix=sun_panel: db=0
美化 添加毛玻璃效果 1 2 3 4 5 6 7 8 9 10 11 12 .item-list { backdrop-filter : blur (1px ); -webkit-backdrop-filter : blur (1px ); background : rgba (255 , 255 , 255 , 0.3 ); border-radius : 15px ; box-shadow : 0 4px 30px rgba (0 , 0 , 0 , 0.1 ); border : 1px solid rgba (255 , 255 , 255 , 0.2 ); padding : 10px ; color : white; margin : auto; }
在首页添加三张图片 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 document .addEventListener ('DOMContentLoaded' , () => { const observer = new MutationObserver ((mutationsList ) => { const parentDiv = document .querySelector ('#item-card-box' ); if (parentDiv) { observer.disconnect (); const imageLinks = [ { src : "https://t.alcy.cc/moez?t=1" , href : "#" }, { src : "https://t.alcy.cc/moez?t=2" , href : "#" }, { src : "https://t.alcy.cc/moez?t=3" , href : "#" } ]; const newDiv = document .createElement ('div' ); newDiv.classList .add ('image-container' ); imageLinks.forEach ((item, index ) => { const a = document .createElement ('a' ); a.href = item.href ; a.classList .add ('image-link' ); const img = document .createElement ('img' ); img.src = item.src ; img.alt = `Image ${index + 1 } ` ; img.classList .add ('image-item' ); a.appendChild (img); newDiv.appendChild (a); }); if (parentDiv.firstChild ) { parentDiv.insertBefore (newDiv, parentDiv.firstChild ); } else { parentDiv.appendChild (newDiv); } } }); observer.observe (document .body , { childList : true , subtree : true }); });
css
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 .image-container { display : flex; justify-content : center; align-items : center; gap : 50px ; margin : 20px 0 ; flex-wrap : wrap; } .image-link { text-decoration : none; border-radius : 28px ; overflow : hidden; box-shadow : 0 4px 8px rgba (0 , 0 , 0 , 0.2 ); transition : transform 0.3s ease; } .image-item { width : 350px ; height : 200px ; border-radius : 28px ; transition : transform 0.3s ease; } .image-link :hover .image-item { transform : scale (1.1 ) rotate (5deg ); box-shadow : 0 8px 16px rgba (0 , 0 , 0 , 0.3 ); } @media (max-width : 768px ) { .image-container { flex-direction : column; align-items : center; gap : 20px ; } .image-item { width : 100% ; max-width : 400px ; } }
添加鼠标悬停动画 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 .icon-info-box .rounded-2xl :hover { background : rgba (42 , 42 , 42 , 0.7 ) !important ; -webkit-animation : info-shake-bounce .5s alternate !important ; -moz-animation : info-shake-bounce .5s alternate !important ; -o-animation : info-shake-bounce .5s alternate !important ; animation : info-shake-bounce .5s alternate !important ; } .icon-small-box .rounded-2xl :hover { background : rgba (42 , 42 , 42 , 0.7 ) !important ; -webkit-animation : small-shake-bounce .5s alternate !important ; -moz-animation : small-shake-bounce .5s alternate !important ; -o-animation : small-shake-bounce .5s alternate !important ; animation : small-shake-bounce .5s alternate !important ; } @keyframes info-shake-bounce { 0% , 100% { transform : rotate (0 ); } 25% { transform : rotate (10deg ); } 50% { transform : rotate (-10deg ); } 75% { transform : rotate (2.5deg ); } 85% { transform : rotate (-2.5deg ); } } @keyframes small-shake-bounce { 0% , 100% { transform : rotate (0 ); } 25% { transform : rotate (15deg ); } 50% { transform : rotate (-15deg ); } 75% { transform : rotate (5deg ); } 85% { transform : rotate (5deg ); } }