Comments (4)
我想设计一个博客文章只显示简介 或者部分。后面遮盖,然后需要继续阅读按钮 如果点击继续阅读按钮现实后请先登录或者注册 这个怎么实现啊。
from blogin.
自己思考一下。
from blogin.
好吧 能否提示参考代码吗
from blogin.
有两种实现方式
- 在前端隐藏博客内容,可以将显示博客内容的div盒子高度设置为固定,然后关闭overflow-y,当用户点击继续阅读的时候,可以先判断是否登录,如果登录了,则显示没有登录则跳转到登录页面,不过这种方式懂前端的人很容易破解;
- 在后端做限制,当用户未登录的时候,只返回一部分内容,但是由于博客内容是保存的HTML文本,因此需要考虑到截取的时破坏HTML标签的问题;
from blogin.
Related Issues (20)
- 我打算开发一个活动栏目。 HOT 2
- 请问如何部署到服务器? HOT 3
- 其它操作系统 HOT 20
- jinja2.exceptions.TemplateNotFound: main/index.html HOT 16
- 部署到AWS ec2 ubuntu 上出现了问题
- blueprint/front/blog.py", line 404, in load_one return jsonify({'one': one.content}) AttributeError: 'NoneType' object has no attribute 'content'
- 相应文件缺失? HOT 1
- 请问怎么解决configparser.NoSectionError: No section: 'baidu' HOT 2
- 大佬,请问这是什么原因啊 HOT 8
- 个人博客云端部署问题 HOT 2
- AttributeError: 'Babel' object has no attribute 'localeselector' HOT 6
- 进首页显示404 HOT 13
- 请问FileNotFoundError: [Errno 2] No such file or directory: 'E:\\_Study_Record\\git_files\\m_blog/history/e29c91a7c65dfdd2b5bff4294f4a5138.txt'怎么解决啊 HOT 2
- 博客地址无法访问了 HOT 6
- 后台 博客编辑栏 操作按钮无法点击 HOT 10
- avatar文件路径的问题 HOT 1
- 初始化数据库命令失败 HOT 13
- 依赖的文件缺失 HOT 3
- 作者您好,请问python用的是哪个版本的 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blogin.