function getRandomIndex(arr) {
return Math.floor(Math.random() * arr.length);
}
const sentences = [
"一扇古蒲扇,拂过时光尘。",
"拿起蒲扇轻抚,恍若梦中闻。",
"扇海云波舞,风起乌衣门。",
"几折扇如瀑,清风入梦魂。",
"蒲扇轻拂陌上尘,画船渡江水悠然。",
"曲笔烟波起,蒲扇渡情天。",
"游子长安忆,扇春花落前。",
"扇动云烟散疑扬,古风盛世尽臣常。",
"追随蒲扇行江水,风华歌舞醉红尘。",
"俗世纷纷我扇婆,沉醉楚辞学蒲扇。",
"烘日蒲扇定流年,清风如瀑洗尘烟。",
"扇风举袂送情话,婉约宛如扇子开。",
"脱尘入静,蒲扇轻开。",
"雨中蒲扇寻芳信,风起梳云染墨痕。",
"白扇翩翩舞夜风,清歌脉脉动神魂。",
"古风曲笔蒲扇新,淡然写意闲情浓。",
"纤纤蒲叶嬉春风,轻舞云烟响琴弦。",
"对着翠幕独望山,蒲扇掩映故山酣。",
"扇开诗意纷纷落,蒲扇轻拢映觞杯。",
"蒲扇扬华逐烟雾,神韵飘然似云游。",
"扇风起,缥缈间,蒲扇古韵漫天飞。",
"袖间蒲扇斗柔媚,书香盈袖拂花影。",
"蒲扇纷颤添楚意,丹青佳作唯一支。",
"夕阳映照蒲扇影,飘逸如诗古人才。",
"扇舞花明雪满天,轻挥蒲扇舞红尘。",
];
function generateArticle() {
let article = "";
let title = sentences[getRandomIndex(sentences)];
article = "let remainingLength = getRandomIndex([500, 600, 700, 800]);
remainingLength -= title.length;
while (remainingLength > 0) {
let paragraphLength = Math.min(getRandomIndex([100, 150, 200, 250]), remainingLength);
let paragraph = "这是一段示例文字,用于占位。";
article = "" paragraph "";
remainingLength -= paragraph.length;
}
document.getElementById('article').innerHTML = article;
}
generateArticle();