mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-12 13:34:29 +01:00
Nuweb drop
Signed-off-by: root <root@tdm-cloud.(none)>
This commit is contained in:
parent
ee9a720f67
commit
a7b55553ad
62 changed files with 1772 additions and 608 deletions
49
inc/nuweb/mdlio.nuxsh.sh
Executable file
49
inc/nuweb/mdlio.nuxsh.sh
Executable file
|
|
@ -0,0 +1,49 @@
|
|||
@syntax nuweb/html
|
||||
@prefix h nuweb.html
|
||||
@prefix hd nuweb.html.dynamic
|
||||
nux.use nuweb/html
|
||||
|
||||
function mdlio.css() {
|
||||
e.link stylesheet "https://fonts.googleapis.com/css?family=Roboto:regular,bold,italic,thin,light,bolditalic,black,medium&lang=en"
|
||||
e.link stylesheet "https://fonts.googleapis.com/icon?family=Material+Icons"
|
||||
e.link stylesheet "https://code.getmdl.io/1.3.0/material.${1}-${2}.min.css"
|
||||
|
||||
}
|
||||
|
||||
function e.mdlio.header++() {
|
||||
+e header .mdl-layout__header .mdl-color--primary
|
||||
+e div .mdl-layout__header-row
|
||||
e span .mdl-layout-title $1
|
||||
e div .mdl-layout-spacer
|
||||
}
|
||||
|
||||
@namespace nuweb.mdlio.tag {
|
||||
|
||||
function :textfield id type label {
|
||||
h:div .mdl-textfield.mdl-js-textfield.mdl-textfield--floating-label {
|
||||
hd:input .mdl-textfield__input @type "$type" @id "$id" "$@"
|
||||
h:label .mdl-textfield__label @for $id {
|
||||
echo $label
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function :submit name {
|
||||
hd:input @type submit .mdl-button.mdl-js-button.mdl-button--raised.mdl-button--accent @value "$name" "$@"
|
||||
}
|
||||
|
||||
function :nav-link href {
|
||||
h:a .mdl-navigation__link @href "$href" {
|
||||
echo "$@"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
e.alias mdlio.layout "div" ".mdl-layout .mdl-js-layout"
|
||||
e.alias mdlio.main "main" ".mdl-layout__content"
|
||||
e.alias mdlio.card "div" ".mdl-card.mdl-shadow--2dp"
|
||||
|
||||
function .mdl_cell() {
|
||||
echo mdl-cell mdl-cell--"$1"-col mdl-cell--"$2"-col-tablet mdl-cell--"$2"-col-phone
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue