Giter Site home page Giter Site logo

luogu-stats-card's Introduction

注意:为了不滥用洛谷服务器流量,本项目利用 vercel 的边缘缓存功能缓存了 12 小时数据,即同一个用户卡片 24 小时内最多只会向洛谷服务器请求 2 次数据,并且只有在用户访问卡片时才会请求数据。

简介

stars forks visitor last commit top language

luogu-stats-card是一个动态生成洛谷用户练习数据卡片的工具,可以展示自己的做题情况。可以用于个人主页、博客、github等可以插入图片的地方。

TODO

  • 修复获取数据错误和用户设置数据不可见的bug
  • 增加黑暗模式
  • 增加咕值卡片(此功能需要cookie,因此必须部署到自己的服务(免费的)中)

效果预览

wangao的练习情况

如何使用

  1. 仅使用图片,直接复制以下内容到任意 markdown 编辑器中,并将?id=后面的数字更改为自己的 id 即可(id是洛谷个人主页地址的一串数字)。

    ![wangao的练习情况](https://luogu.vercel.app/api?id=313209)
  2. 使用图片链接,复制以下内容,第二个小括号内的地址是点击该图片跳转的地址,建议设置为洛谷个人主页。

    [![wangao的练习情况](https://luogu.vercel.app/api?id=313209)](https://github.com/wao3/luogu-stats-card)

自定义选项

使用卡片时,支持设定自定义效果选项,可以组合使用。

  1. 隐藏标题,只需在链接最后带上&hide_title=true即可,例如:

    ![wangao的练习情况](https://luogu.vercel.app/api?id=313209&hide_title=true)

    效果:

    wangao的练习情况

  2. 黑暗模式,只需在链接最后带上&dark_mode=true即可,例如:

    ![wangao的练习情况](https://luogu.vercel.app/api?id=313209&dark_mode=true)

    效果:

    wangao的练习情况

  3. 自定义宽度,默认500,限制宽度在500到1920之间,只需在链接最后带上&card_width=需要的宽度即可,例如:

    ![wangao的练习情况](https://luogu.vercel.app/api?id=313209&card_width=750)

    效果:

    wangao的练习情况

自行部署

如果想要自行试验或者二次开发可以自行部署到自己的 vercel 服务器,登录 vercel 后,点击下方按钮即可部署。

Deploy to Vercel

如何参与贡献

提供bug反馈或建议

使用 issue 反馈bug时,尽可能详细描述 bug 及其复现步骤

贡献代码的步骤

  1. fork项目到自己的repo
  2. 把fork过去的项目也就是你的项目clone到你的本地
  3. 修改代码
  4. commit后push到自己的库
  5. 在Github首页可以看到一个 pull request 按钮,点击它,填写一些说明信息,然后提交即可。
  6. 等待作者合并

其他

如果对你有所帮助的话,希望能在右上角点一个 star (★ ω ★)

LICENSE

MIT License

luogu-stats-card's People

Contributors

insouciant21 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.