Joe3部分样式展示 2023-08-14 2024-01-02 杂七杂八 Halo / Thymeleaf / Halo-theme-joe3 以下内容均使用Vditor编辑器编辑(强烈推荐),想要实现以下样式如何非Vditor编辑器请配合Tool-Bench使用。 居中标题 <joe-mtitle title="牛鞭牛鞭"></joe-mtitle> 行内代码 halo-theme-joe2.0 halo-theme-joe2.0 代 8853 | 8
Halo-theme-stack 2023-02-17 2024-06-07 杂七杂八 Halo / LInux / Thymeleaf / Halo-theme-stack / docker / Nginx halo-theme-stack 是一款 Halo2.0 的博客主题。移植于 Hugo hugo-theme-stack主题中 L1nSn0w 的魔改 6078 | 4
JS获取分页信息实现异步加载,配合IntersectionObserver API实现自动加载 2023-08-28 2023-12-31 学习笔记 JS / 获取分页内容 / 异步加载 / IntersectionObserver API / Halo-theme-joe3 / Thymeleaf 前言 有的时候,我们会遇到网页中,一切内容只有在分页中才有,但是又需要在当前页面中展示。例如获取分页文章信息实现首页的无限加载效果。 现在就以获取分页文章为例,直接上代码 loadMoreArticles() { if (!ThemeConfig.enable_index_list_ajax){ 557 | 0
thymeleaf前端定义数组并随机调用方法,可用于随机颜色等 2023-08-13 2023-08-13 学习笔记 Thymeleaf / 前端 / Halo thymeleaf中在写样式的时候有时候需要自己定义一些数组,例如定义一个颜色的数组然后随机时候,这个时候该如何实现呢? 下面其中一个方法 th:with="colorArray=${#strings.arraySplit('#F8D800 ,#0396FF ,#EA5455 ,#7367F0 ,# 519 | 0
Thymeleaf教程(10分钟入门) 2023-06-26 2023-06-26 学习笔记 Halo / 前端 / Thymeleaf Thymeleaf 是一款用于渲染 XML/XHTML/HTML5 内容的模板引擎。它与 JSP,Velocity,FreeMaker 等模板引擎类似,也可以轻易地与 Spring MVC 等 Web 框架集成。与其它模板引擎相比,Thymeleaf 最大的特点是,即使不启动 Web 应用,也可以直 1160 | 0
thymeleaf:字符串Strings常见的使用方法 2023-01-21 2023-01-21 学习笔记 Thymeleaf 判断是不是为空:null: <span th:if="${name} != null">不为空</span> <span th:if="${name1} == null">为空</span> 判断是不是为空字符串: “” <span th:if="${#strings.isEmpty(name1)} 453 | 0
Halo2.0应用下载类主题theme-macwen 2023-01-13 2023-07-23 杂七杂八 前端 / Halo / Thymeleaf halo-theme-macwen halo2.0应用下载类主题 Git:https://github.com/jiewenhuang/halo-theme-macwen 预览:pomac.cc 说明 < 3990 | 7
Thymeleaf 模板引擎中的工具对象 2022-12-26 2022-12-26 学习笔记 前端 / Halo-theme-stack / Thymeleaf 一些Thymeleaf 模板引擎中的工具对象和使用 一些常用的 #strings 方法: #strings.isEmpty(value):判断指定的字符串是否为空。 #strings.isNumber(value):判断指定的字符串是否是数字。 #strings.isEmpty(value):判断 299 | 2
Thymeleaf+Ajax实现异步加载表格数据并分页实现 2022-12-22 2022-12-23 学习笔记 Halo / Thymeleaf 由于thymeleaf获取的数据是从后台页面跳转时得到的,如果想更新域中数据必须再次请求页面,首先异步刷新思路如下: 一:将要刷新的组件给上id,也可以通过在目标组件上标注th:fragment="xxx", 目的在于能够获取到要刷新的这个组件。 二:通过ajax发送请求到后台,在跳转回页面时跳转 524 | 1
关于thymeleaf模板引擎中th:if的使用 2022-12-22 2023-01-09 学习笔记 Thymeleaf th:if 条件判断 很多时候只有在满⾜某个条件时,才将⼀个模板⽚段显示在结果中,否则不进行显示。比如只有当用户有订单时,才为它显示订单链接,否则不显示。th:if 属性用于满足这个需求 <body> <!--if属性结果为 true,模板会进行显示--> <p th:if="true">th: 305 | 0