spaCy/website/_includes/_mixins/_base.jade
2016-10-21 01:00:34 +02:00

43 lines
1.2 KiB
Plaintext

//- ----------------------------------
//- 💫 MIXINS > BASE
//- ----------------------------------
//- External Link
mixin a(url, trusted)
a(href=url target="_blank" rel=(!trusted) ? "noopener nofollow" : "")&attributes(attributes)
block
//- Sections for content pages
id - [string] id, can be headline id as it's being prefixed (optional)
block - section content (block and inline elements)
mixin section(id)
section.o-section(id=(id) ? 'section-' + id : '')&attributes(attributes)
block
//- Date
input - [string] date in the format YYYY-MM-DD
mixin date(input)
- var date = new Date(input)
- var months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]
time(datetime=JSON.parse(JSON.stringify(date)))&attributes(attributes)=months[date.getMonth()] + ' ' + date.getDate() + ', ' + date.getFullYear()
//- Grid Container
mixin grid(...style)
.o-grid.o-block(class=prefixArgs(style, "o-grid"))&attributes(attributes)
block
//- Grid Column
mixin grid-col(...style)
.o-grid__col(class=prefixArgs(style, "o-grid__col"))&attributes(attributes)
block