Coder Social home page Coder Social logo

juejin-card's Introduction

JUEJIN Card

项目功能

  • 支持解析不同用户的掘金链接
  • 支持将卡片导出为图片
  • 支持跟随鼠标的卡片动态效果
  • 支持深色模式切换

项目特点

  • 通过:hover:active伪类选择器实现点击按钮的动态放大效果
  • 通过:root与CSS Variable实现了简单的深色模式切换
  • 用到了linear-gradient background-clip等CSS特性
  • Vue3 Composition API 数据驱动 管理卡片状态与事件监听
  • Less预处理器 使用到了Less的嵌套语法与Mixin功能
  • 布局方面使用了Flex布局

开发中遇到的问题

请求掘金的用户信息接口会遇到跨域问题

  • 在本地开发时可以通过Vite提供的Proxy功能
    • NodeJS发送请求是不受跨域限制的
    • 所有/api的请求都会被代理服务器转发至配置好的target
  • 部署至Vercel后的跨域问题
    • 可以通过根目录下vercel.json配置规则
    • Vercel项目内所有/api请求会被转发到/api/proxy
    • /api/proxy访问到的是我们在proxy.js中自定义的代理服务器
    • 通过此代理服务器可以处理跨域请求

相关技术

Vite Vue3 ArcoDesign Less

juejin-card's People

Contributors

ziuchen avatar

Stargazers

 avatar  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.