有没有办法用Nunjucks获取窗口大小参数?目前我正在尝试:
{% if window.screen.width < 800 %} {% include 'partials/sort.html' %} {% endif %}
据我所知,Nunjucks模板无法访问前端参数,但有什么方法可以绕过这一点吗?(根据记录,我使用nodejs编写服务器端代码)
https://stackoverflow.com/questions/51359180
相似问题