2017-07-20 18:20:53 +00:00
< template lang = "pug" >
2017-09-15 18:59:15 +00:00
. container - fluid
. row
. col - md - 6. offset - 3
h1 { { $t ( 'frequentlyAskedQuestions' ) } }
. faq - question ( v - for = '(heading, index) in headings' )
h2 . accordion ( @ click = 'setActivePage(heading)' ) { { $t ( ` faqQuestion ${ index } ` ) } }
div ( v - if = 'pageState[heading]' , v - markdown = "$t('webFaqAnswer' + index, replacements)" )
hr
p ( v - markdown = "$t('webFaqStillNeedHelp')" )
2017-07-20 18:20:53 +00:00
< / template >
2017-08-27 22:05:37 +00:00
< style lang = 'scss' scoped >
2017-08-07 20:26:17 +00:00
. faq - question {
margin - bottom : 1 em ;
}
< / style >
2017-07-20 18:20:53 +00:00
< script >
2017-08-27 22:05:37 +00:00
// @TODO: env.EMAILS.TECH_ASSISTANCE_EMAIL
const TECH _ASSISTANCE _EMAIL = 'admin@habitica.com' ;
import markdownDirective from 'client/directives/markdown' ;
2017-07-20 18:20:53 +00:00
2017-08-27 22:05:37 +00:00
export default {
directives : {
markdown : markdownDirective ,
} ,
data ( ) {
let headings = [
'overview' ,
'set-up-tasks' ,
'sample-tasks' ,
'task-color' ,
'health' ,
'party-with-friends' ,
'pets-mounts' ,
'character-classes' ,
'blue-mana-bar' ,
'monsters-quests' ,
'gems' ,
'bugs-features' ,
'world-boss' ,
] ;
2017-08-07 20:26:17 +00:00
2017-08-27 22:05:37 +00:00
let pageState = { } ;
for ( let index in headings ) {
let heading = headings [ index ] ;
pageState [ heading ] = false ;
}
2017-08-07 20:26:17 +00:00
2017-08-27 22:05:37 +00:00
return {
pageState ,
headings ,
replacements : {
techAssistanceEmail : TECH _ASSISTANCE _EMAIL ,
wikiTechAssistanceEmail : ` mailto: ${ TECH _ASSISTANCE _EMAIL } ` ,
} ,
// @TODO webFaqStillNeedHelp: {
// linkStart: '[',
// linkEnd: '](/groups/guild/5481ccf3-5d2d-48a9-a871-70a7380cee5a)',
// },
// "webFaqStillNeedHelp": "If you have a question that isn't on this list or on the [Wiki FAQ](http://habitica.wikia.com/wiki/FAQ), come ask in the <%= linkStart %>Habitica Help guild<%= linkEnd %>! We're happy to help."
} ;
} ,
methods : {
setActivePage ( page ) {
this . pageState [ page ] = ! this . pageState [ page ] ;
2017-07-20 18:20:53 +00:00
} ,
} ,
2017-08-27 22:05:37 +00:00
} ;
2017-07-20 18:20:53 +00:00
< / script >