1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Legacy sync

Signed-off-by: Tony Tkacik <tonydamage@gmail.com>
This commit is contained in:
Tony Tkáčik 2020-03-05 12:20:11 +01:00
parent 851914ff75
commit 4c4bb238a0
13 changed files with 1026 additions and 7 deletions

46
inc/nuweb/mdlio.nuxsh.sh Normal file
View file

@ -0,0 +1,46 @@
@syntax nuweb/html
@prefix h nuweb.html
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 {
h:input .mdl-textfield__input @type "$type" @id "$id" "$@"
h:label .mdl-textfield__label @for "$id" "$label"
}
}
function :submit name {
h: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
}