Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否可以增加一个留言板功能, 例如不同的用户可以留言需要增加哪些资源 #7940

Closed
4 tasks
verydemo opened this issue Feb 5, 2025 · 7 comments
Labels
enhancement New feature or request

Comments

@verydemo
Copy link

verydemo commented Feb 5, 2025

Please make sure of the following things

  • I have read the documentation.
  • I'm sure there are no duplicate issues or discussions.
  • I'm sure this feature is not implemented.
  • I'm sure it's a reasonable and popular requirement.

Description of the feature / 需求描述

留言板功能, 增加一个留言板页面, 让不同用户可以留言需要增加某些资源

例如
zhangsan; 上传一部天龙八部

Suggested solution / 实现思路

No response

Additional context / 附件

No response

@verydemo verydemo added the enhancement New feature or request label Feb 5, 2025
@verydemo verydemo changed the title 是否可以增加一个留言板功能, 例如不同的用户可以留言需要在云盘增加哪些资源 是否可以增加一个留言板功能, 例如不同的用户可以留言需要增加哪些资源 Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

@verydemo
Copy link
Author

verydemo commented Feb 5, 2025

@xhofe up

@pongfcnkl
Copy link

自定义头部可以加代码

@ZZ0YY
Copy link

ZZ0YY commented Feb 5, 2025

一个样板 你还得弄个后端

<!-- 留言板HTML部分 -->
<div id="comment-board">
    <h2>留言板</h2>
    <textarea id="comment-input" placeholder="请输入您的留言..."></textarea>
    <button onclick="addComment()">提交留言</button>
    <div id="comments"></div>
</div>

<script>
    // 留言板JavaScript部分
    function addComment() {
        const commentInput = document.getElementById('comment-input');
        const commentsDiv = document.getElementById('comments');
        
        if (commentInput.value.trim() !== '') {
            const commentElement = document.createElement('div');
            commentElement.textContent = commentInput.value;
            commentsDiv.appendChild(commentElement);
            commentInput.value = ''; // 清空输入框
        }
    }
</script>

@anwen-anyi
Copy link
Contributor

anwen-anyi commented Feb 6, 2025

自己在 readme接入 Valine、Waline、Twikoo、Artalk 都能实现

@verydemo
Copy link
Author

verydemo commented Feb 7, 2025

@anwen-anyi

Image

@verydemo
Copy link
Author

verydemo commented Feb 7, 2025

header

<!--Alist V3建议添加的,已经默认添加了,如果你的没有建议加上-->
<script src="https://polyfill.alicdn.com/v3/polyfill.min.js?features=String.prototype.replaceAll"></script>


<!--评论系统使用的js-->
<script src='https://unpkg.com/valine/dist/Valine.min.js'></script>


<style>
/* 去除通知栏 右上角 X */
.notify-render .hope-close-button{
	display: none;
}
        
/*底部CSS,.App .table这三个一起的*/
dibu {
    border-top: 0px;
    position: absolute;
    bottom: 0;
    width: 100%;
    margin: 0px;
    padding: 0px;
}
.App {
    min-height: 50vh;
}
.table {
    margin: auto;
}


/*去掉底部*/
.footer {
    display: none !important;
}

/*全局字体*/
*{font-family:LXGW WenKai}
*{font-weight:bold}
body {font-family: LXGW WenKai;}

/*以下为评论系统专用*/
/*适配大小契合度*/
.newValine{
width: min(96%, 940px);
flex-direction: column;
 row-gap: var(--hope-space-2);
 border-radius: var(--hope-radii-xl);
 padding: var(--hope-space-2);
 box-shadow: var(--hope-shadows-lg);
}



/*渐变背景CSS*/
#canvas-basic {
	position: fixed;
	display: block;
	width: 100%;
	height: 100%;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: -999;
}

</style>

body

<!--延迟加载-->
<!--如果要写自定义内容建议都加到这个延迟加载的范围内-->
<div id="customize" style="display: none;">
    <div>
		
		<!--评论模块还有下面的script也是-->
		<center>
			<div class="newValine" id="vcomments"></div>
		</center>
		<script>
			new Valine({
				visitor: true,
				el: '#vcomments',
				avatar: 'wavatar',
				appId: 'xx',
				appKey: 'xx',
				placeholder: "有什么问题欢迎评论区留言~么么哒"
			}) 
		</script>

        <br />
        <center class="dibu">
            <div style="font-size: 13px; font-weight: bold;">
                <!--后台入口-->
                <span class="nav-item">
                    <a class="nav-link" href="/@manage" target="_blank">
                        <i class="fa-solid fa-folder-gear" style="color:#409EFF;" aria-hidden="true">
                        </i>
                        管理
                    </a>
                </span>
				<br />
            </div>
        
</center>
        <br />
        <br />
    </div>

<!--延迟加载范围到这里结束-->
</div>
<!--延迟加载配套使用JS-->
<script>
    let interval = setInterval(() => {
        if (document.querySelector(".footer")) {
            document.querySelector("#customize").style.display = "";
            clearInterval(interval);
        }
    }, 200);
</script>


@verydemo verydemo closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants