-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d54adf0
commit 09b5414
Showing
3 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
mixin section-intro(content) | ||
section.section.section--intro(data-chameleon='black') | ||
.wrapper | ||
.section__header | ||
if content.subhead | ||
p.section__subhead.enter.enter--bottom!= content.subhead | ||
p.section__heading.enter.enter--bottom.enter--delay-1!= content.heading | ||
|
||
.section__row | ||
each column in content.content | ||
.section__column | ||
.section__content.enter.enter--bottom.enter--delay-2 | ||
p.section__content-subhead!= column.subhead | ||
each paragraph in column.text | ||
p.section__content-text!= paragraph | ||
|
||
if content.image | ||
img.section__image.enter.enter--bottom.enter--delay-3( | ||
src=`/${relativeRoot}assets/images/work/${content.image}`, | ||
alt='' | ||
) | ||
|
||
if block | ||
block | ||
|
||
+section-intro({ | ||
subhead: 'Introduction', | ||
heading: 'Helping candidates and employers connect through a streamlined platform, all while ensuring no one is left out. ', | ||
content: [ | ||
{ | ||
subhead: 'The Problem', | ||
text: ['Employers are eager to higher a diverse workforce, but struggle to manage the daunting process to access talent that meets their needs. Underrepresented job seekers often go unnoticed or worse, get passed up based on existing market biases. '] | ||
}, | ||
{ | ||
subhead: 'The Solution', | ||
text: ['Create a network that prioritizes inclusivity and transparency by uniting job seekers with employers based on their common strengths. For employers and admins, use thoughtful automation to encourage autonomy.'] | ||
} | ||
] | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { readFileSync } from 'fs'; | ||
import { resolve } from 'path'; | ||
import { format } from 'prettier'; | ||
import { describe, expect, test } from 'vitest'; | ||
import { plugin } from './../../../src/index'; | ||
|
||
describe('Issues', () => { | ||
test('should respect printWidth for args in call token', () => { | ||
const expected: string = readFileSync( | ||
resolve(__dirname, 'formatted.pug'), | ||
'utf8', | ||
); | ||
const code: string = readFileSync( | ||
resolve(__dirname, 'unformatted.pug'), | ||
'utf8', | ||
); | ||
const actual: string = format(code, { | ||
parser: 'pug', | ||
plugins: [plugin], | ||
|
||
semi: true, | ||
trailingComma: 'es5', | ||
singleQuote: true, | ||
printWidth: 80, | ||
tabWidth: 2, | ||
endOfLine: 'auto', | ||
}); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
mixin section-intro(content) | ||
section.section.section--intro(data-chameleon='black') | ||
.wrapper | ||
.section__header | ||
if content.subhead | ||
p.section__subhead.enter.enter--bottom!= content.subhead | ||
p.section__heading.enter.enter--bottom.enter--delay-1!= content.heading | ||
|
||
.section__row | ||
each column in content.content | ||
.section__column | ||
.section__content.enter.enter--bottom.enter--delay-2 | ||
p.section__content-subhead!= column.subhead | ||
each paragraph in column.text | ||
p.section__content-text!= paragraph | ||
|
||
if content.image | ||
img.section__image.enter.enter--bottom.enter--delay-3(src=`/${relativeRoot}assets/images/work/${content.image}`, alt='') | ||
|
||
if block | ||
block | ||
|
||
+section-intro({ | ||
subhead: 'Introduction', | ||
heading: 'Helping candidates and employers connect through a streamlined platform, all while ensuring no one is left out. ', | ||
content: [ | ||
{ | ||
subhead: 'The Problem', | ||
text: ['Employers are eager to higher a diverse workforce, but struggle to manage the daunting process to access talent that meets their needs. Underrepresented job seekers often go unnoticed or worse, get passed up based on existing market biases. '] | ||
}, | ||
{ | ||
subhead: 'The Solution', | ||
text: ['Create a network that prioritizes inclusivity and transparency by uniting job seekers with employers based on their common strengths. For employers and admins, use thoughtful automation to encourage autonomy.'] | ||
} | ||
] | ||
}) |