Paramita
Home
Blog
Moment
Snippet
About
代码笔记
Categories
Blog (42)
Featured Tags
alpinejs (2)
ant-design (5)
antd (1)
aspose (1)
aws (1)
cloudflare (1)
dva (2)
echo (2)
filamentphp (1)
gin (1)
git (1)
github (2)
go-mecab (1)
golang (15)
goquery (1)
grpc (1)
japanese (1)
java (1)
lambda (1)
laravel (8)
leetcode (5)
less (1)
linux (3)
livewirejs (1)
mac (1)
mysql (2)
nestjs (1)
nginx (1)
nodejs (1)
npm (1)
php (5)
popclip (1)
ppt (1)
r2 (1)
react (3)
reactjs (9)
remixicon (1)
s3 (1)
shell (2)
tailwindcss (2)
taro (3)
tarojs (1)
telescope (2)
typeorm (1)
umi (1)
umijs (3)
workers (1)
zustand (2)
免签 (1)
小程序 (4)
支付宝 (1)
Blog
42 posts
Blog
is the place to record my codinglife.
««
«
9
10
11
12
13
»
»»
Tailwind Missing
Sep 28, 2022
One minute read
Tailwindcss 动态生成类名失效 用的reactjs和JedWatson/classnames这个包做一个随时间变化颜色的功能 const [colorCls, setColorCls] = useState<string>('green-400') <span className={classNames('text-base font-extrabold', `text-${colorCls}`)}></span> <div className={classNames('p-4', `bg-${colorCls}`)}></span> 类名正常生成了,但是css没生成 ,因为tailwindcss不支持动态生成的,即使开了jit模式也不行,必须在构建的时候被扫描到才行。 只能写全类名或者定义一个临时变量保存所有可能类名了......
blog
reactjs
tailwindcss
linux less命令
Sep 28, 2022
One minute read
linux中的less命令 -G 移动到最后一页 -gg 第一页 -F 实时更新 -b 向上翻页 -空格 向下翻页 /kw 向后搜索kw ?kw 向前搜索kw 实时过滤 有时候查看nginx日志时,想查看爬虫抓取记录,可以在查看时输入&bingbot|Googlebot|Baiduspider, &后面接正则表达式,bingbot|Googlebot|Baiduspider表示过滤展示日志中行记录包含必应或者百度或者谷歌蜘蛛的记录,......
blog
linux
less
gin打包html模板和静态资源文件
Sep 18, 2022
One minute read
[GIN-debug] [WARNING] Since SetHTMLTemplate() is NOT thread-safe. It should only be called at initialization. ie. before any route is registered or the router is listening in a socket: router := gin.Default() router.SetHTMLTemplate(template) // << good place Gin和Echo有点不一样,需要在注册路由之前注册模板 注册子目录的html文件 ├── go.mod ├── go.sum ├── app.go ├── resources │ ├── css │ │ └── input.css │ ├── js │ │ └── tailwind.config.js │ └── views │ ├── detail.html │ ├── home │ │ └── home.index.html │ └── search.html func walkDir(fileSystem embed.FS, path string) { _, err := T.ParseFS(fileSystem, path+"/*.html") if err != nil { panic(fmt.Sprintf("parse error:%s", err.Error())) } entries, _ := fs.ReadDir(fileSystem, path) for _, entry := range entries { if entry.IsDir() { walkDir(fileSystem, path+"/"+entry.Name()) } } } T:=template.New("view") T.ParseFS(ResourcesFS, "resources/views/*.html") entries, _ := ResourcesFS.ReadDir("resources/views") for _, entry := range entries { if entry.IsDir() { walkDir(ResourcesFS, "resources/views/"+entry.Name()) } }......
blog
gin
golang