gocms

command module
v0.0.0-...-2f0833a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

README

GoCMS

基于 AdminLTEGorillaGorm 实现的内容管理系统

获取安装

执如下命令,就能够在你的 $GOPATH/bin 目录下发现 gocms

go get -v github.com/dragonflylee/gocms

目录结构

├── handler Web业务逻辑
├── model 数据操作层
├── static 前端静态资源
├── util 工具函数
├── views 模板页面
├── main.go 路由入口
└── nodes.json 节点初始化数据

前端框架

  1. 表单校验

使用 jQeury Validate 校验表单,支持使用 data-rule 标签配置规则,示例如下

<form method="post">
    <input name="username" type="text" data-rule="{'messages':{'required':'登录名称不能为空'}}" required>
    <input name="password" type="password" id="register_password" placeholder="请输入新密码" data-rule="{'regexPasswd':true}" required>
    <input name="rpasswd" type="password" data-rule="{'equalTo':'#register_password','messages':{'equalTo':'两次输入的密码不一致'}}" placeholder="请再次输入新密码" required>
    <button type="submit">保存</button>
</form>

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL