Skip to content

wujiyu305/Lucky_Draw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

一个简单的抽奖网页

演示:https://lucky.18g.cool

  1. 支持中文和 English,自动根据浏览器语言识别,也可手动切换。
  2. 支持红、绿、蓝三种主题色,默认绿色。
  3. 支持输入名单或导入 txt 名单,过个名字之间使用逗号或换行间隔。
  4. 支持设置抽奖人数。
  5. 支持使用键盘空格键开始和停止抽奖。
  6. 根据窗口大小和中奖人数量自动调整显示大小。支持用户自定义中奖人显示缩放系数,范围 0.50 - 1.50,叠加在系统自动缩放系数上。
  7. 默认滚动刷新速度 150 ms,抽奖人数小于 10 的时候 150 * 0.9,小于 5 的时候 150 * 0.7,小于 3 的时候 150 * 0.6。支持用户自定义滚动刷新速度系数,范围 0.50 - 1.50,叠加在默认速度上。
  8. 可以导出中奖人名单,并将已中奖人从奖池移除,以进行多轮轮抽奖。默认通过 txt 导出中奖名单,可禁用。支持导出中奖界面截图,默认为关闭。
  9. 支持 URL 参数:
    • lang: 语言参数,支持 zh 和 en
    • color: 主题色,支持 red,green 和 blue
    • scale: 显示缩放系数,范围 0.50 - 1.50
    • speed: 刷新速度系数,范围 0.50 - 1.50
    • txt: 是否导出 txt,n 为否
    • png: 是否截图,y 为是
    • https://lucky.18g.cool?lang=zh&color=red&scale=1.2&speed=0.8&txt=n&png=y 代表设置语言为中文,主题为红色,显示缩放系数 1.2,刷新速度系数 0.8,不导出 txt,导出截图。


A Simple Lucky Draw Webpage

Demo: https://lucky.18g.cool

  1. Support Chinese and English, auto detect browser language, manually switch supported.
  2. Support red, green and blue three color thmese, default is green.
  3. Able to set candicates by impoting txt or just typing, seperate multiple candidate with comma and/or new line.
  4. Able to set number of winners.
  5. Support start and stop using keyboard Space key.
  6. Able to auto adjust display size of winners acooding to the number of winners and the size of brower window. Allow user to customize scale factor between 0.50 - 1.50, this, scale factor would be based on default scale factor.
  7. The default refresh time is 150 ms if more than 10 winners, 150 ms * 0.9 if less than 10, 150 ms * 0.7 if less than 5, 150 ms * 0.6 if less than 3. Allow user to customize speed factor between 0.50 - 1.50, speed factor would be based on defult time.
  8. Able to export winner list, and remove winners from pool for multiple rounds support. export list to a txt file by default, txt export could be disabled, able to export as screenshot, screenshot is disabled by default.
  9. Suppot URL parameters:
    • lang: Language, support en and zh
    • color: Color Theme, support red, green, blue
    • scale: Scale factor, range 0.50 - 1.50
    • speed: Speed factor, range 0.50 - 1.50
    • txt: Whether export txt, n for No
    • png: Whether export screenshot, y for Yes
    • https://lucky.18g.cool?lang=en&color=red&scale=1.2&speed=0.8&txt=n&png=y means set language to English, color theme to red, scale factor to 1.2, speed factor to 0.8, disable txt export, enable screenshot export.