FAQ placeholder
parent
5dbc99343a
commit
299a2f4c08
|
@ -126,7 +126,8 @@ module.exports = {
|
|||
'about',
|
||||
'contact',
|
||||
'what-is-cryptpad',
|
||||
'features'
|
||||
'features',
|
||||
'faq'
|
||||
],
|
||||
|
||||
/* Limits, Donations, Subscriptions and Contact
|
||||
|
|
|
@ -373,6 +373,42 @@ define([
|
|||
]);
|
||||
};
|
||||
|
||||
Pages['/faq.html'] = function () {
|
||||
var categories = [];
|
||||
var faq = Msg.faq;
|
||||
Object.keys(faq).forEach(function (c) {
|
||||
var questions = [];
|
||||
Object.keys(faq[c]).forEach(function (q) {
|
||||
var item = faq[c][q];
|
||||
if (typeof item !== "object") { return; }
|
||||
var answer = h('p.cp-faq-questions-a');
|
||||
var question = h('p.cp-faq-questions-q');
|
||||
$(question).click(function () {
|
||||
if ($(answer).is(':visible')) {
|
||||
return void $(answer).slideUp();
|
||||
}
|
||||
$(answer).slideDown();
|
||||
});
|
||||
questions.push(h('div.cp-faq-questions-items', [
|
||||
setHTML(question, item.q),
|
||||
setHTML(answer, item.a)
|
||||
]));
|
||||
});
|
||||
categories.push(h('div.cp-faq-category', [
|
||||
h('h3', faq[c].title),
|
||||
h('div.cp-faq-category-questions', questions)
|
||||
]));
|
||||
});
|
||||
return h('div#cp-main', [
|
||||
infopageTopbar(),
|
||||
h('div.container.cp-container', [
|
||||
h('center', h('h1', Msg.faq_title)),
|
||||
h('div.cp-faq-container', categories)
|
||||
]),
|
||||
infopageFooter()
|
||||
]);
|
||||
};
|
||||
|
||||
Pages['/terms.html'] = function () {
|
||||
return h('div#cp-main', [
|
||||
infopageTopbar(),
|
||||
|
|
|
@ -10,6 +10,7 @@ body.cp-page-what-is-cryptpad { @import "./pages/page-what-is-cryptpad.less"; }
|
|||
body.cp-page-about { @import "./pages/page-about.less"; }
|
||||
body.cp-page-privacy { @import "./pages/page-privacy.less"; }
|
||||
body.cp-page-features { @import "./pages/page-features.less"; }
|
||||
body.cp-page-faq { @import "./pages/page-faq.less"; }
|
||||
body.cp-page-terms { @import "./pages/page-terms.less"; }
|
||||
|
||||
// Set the HTML style for the apps which shouldn't have a body scrollbar
|
||||
|
|
|
@ -759,6 +759,30 @@ define(function () {
|
|||
out.features_f_storage_anon = "Pads deleted after 3 months";
|
||||
out.features_f_storage_registered = "Free: 50MB<br>Premium: 5GB/20GB/50GB";
|
||||
|
||||
// faq.html
|
||||
|
||||
out.faq_link = "FAQ";
|
||||
out.faq_title = "Frequently Asked Questions";
|
||||
out.faq = {};
|
||||
out.faq.cat1 = {
|
||||
title: 'Category 1',
|
||||
q1: {
|
||||
q: 'What is a pad?',
|
||||
a: 'A realtime collaborative document...'
|
||||
},
|
||||
q2: {
|
||||
q: 'Question 2?',
|
||||
a: '42'
|
||||
}
|
||||
};
|
||||
out.faq.cat2 = {
|
||||
title: 'Category 2',
|
||||
q1: {
|
||||
q: 'A new question?',
|
||||
a: 'The answer'
|
||||
}
|
||||
};
|
||||
|
||||
// terms.html
|
||||
|
||||
out.tos_title = "CryptPad Terms of Service";
|
||||
|
|
Loading…
Reference in New Issue