Html Meteor:如何设置用户帐户的样式

Html Meteor:如何设置用户帐户的样式,html,css,twitter-bootstrap,meteor,user-accounts,Html,Css,Twitter Bootstrap,Meteor,User Accounts,我用它来处理用户帐户-包括useraccounts:bootstrap。我的资产直接来自回购协议 我的问题: 我不明白为什么要放我自己的HTML/CSS My config.js: // Options AccountsTemplates.configure({ defaultLayout: 'emptyLayout', showForgotPasswordLink: true, overrideLoginErrors: true, enablePasswordC

我用它来处理用户帐户-包括
useraccounts:bootstrap
。我的资产直接来自回购协议

我的问题: 我不明白为什么要放我自己的HTML/CSS

My config.js:

// Options
AccountsTemplates.configure({
    defaultLayout: 'emptyLayout',
    showForgotPasswordLink: true,
    overrideLoginErrors: true,
    enablePasswordChange: true,

    showLabels: false,
    showPlaceholders: true,

    negativeValidation: true,
    positiveValidation: true,
    negativeFeedback: true,
    positiveFeedback: true,
});

AccountsTemplates.addFields([
    {
        _id: 'firstName',
        type: 'text',
        placeholder: "First Name",
        required: true,
        re: /^[^\d]{2,}$/i,
        errStr: "Please enter your first name.",
    },
    {
        _id: 'surName',
        type: 'text',
        placeholder: "Sur Name",
        required: true,
        re: /^[^\d]{2,}$/i,
        errStr: "Please enter your first name.",
    },
    {
        _id: 'institution',
        type: 'text',
        placeholder: "Institution/Company",
        required: true,
        re: /^[^\d]{2,}$/i,
        errStr: "Please enter the institution or company you work for.",
    },
    {
        _id: 'position',
        type: 'text',
        placeholder: "Position",
        required: true,
        re: /^[^\d]{2,}$/i,
        errStr: "Please enter the your position in the institution/company.",
    },
]);
我在文档中读到,您应该用自己的模板替换原始模板,这就是我使用
template.myAtForm.replaces(“atForm”)所做的和以下模板:

<template name="myAtForm">
  {{#unless hide}}
    <div class="at-form">
      {{#if showTitle}}
        {{> atTitle}}
      {{/if}}
      {{#if showError}}
        {{> atError}}
      {{/if}}
      {{#if showResult}}
        {{> atResult}}
      {{/if}}
      {{#if showOauthServices}}
        {{> atOauth}}
      {{/if}}
      {{#if showServicesSeparator}}
        {{> atSep}}
      {{/if}}
      {{#if showPwdForm}}
        {{> atPwdForm}}
      {{/if}}
      {{#if showTermsLink}}
        {{> atTermsLink}}
      {{/if}}
      {{#if showSignInLink}}
        {{> atSigninLink}}
      {{/if}}
      {{#if showSignUpLink}}
        {{> atSignupLink}}
      {{/if}}
    </div> <!-- end main div -->
  {{/unless}}
</template>

{{{#除非隐藏}
{{#如果显示标题}
{{>atTitle}
{{/if}
{{{#如果淋浴}
{{>atError}
{{/if}
{{#如果显示结果}
{{>atResult}
{{/if}
{{#如果showOauthServices}
{{>atOauth}
{{/if}
{{#如果ShowServicesParator}
{{>atSep}
{{/if}
{{{#如果显示PWDForm}
{{>atPwdForm}
{{/if}
{{{如果showTermsLink}
{{>atTermsLink}
{{/if}
{{{#如果showSignInLink}
{{>atSigninLink}
{{/if}
{{{#如果显示}
{{>atSignupLink}
{{/if}
{{/除非}
这是给定的线框:

例如,我必须在哪里添加引导类,以便在一行中有两个输入字段(但不是在WF中看到的每一行)?或者,我如何设计自己的上传按钮(据我所知,甚至没有
类型:file

带有
useraccounts:unstyled
包的事件,我不知道把HTML/CSS放在哪里

非常感谢您的帮助

回答:最好自己编写模板

我确信
useraccounts
做得很好。但它的目标是更简单的UI。我想大多数应用程序都对它感到满意

但是,您可以使用CSS设置所有字段的样式。字段模板(\u id field)中添加了一些类。查看生成的html和
useraccounts:unstyled
包的来源。然后您就可以清楚地了解它的渲染算法是如何工作的


但正如您在原始帖子中提到的,例如,没有文件字段。这意味着您必须自行添加模板,并管理文件上载逻辑/验证。

构建模板,然后手动调用
Accounts.createUser
Accounts.loginWith
。。(不需要useraccounts:@webdeb:我考虑过了,但是useraccounts已经做得很好了,可以处理很多其他的事情。如果我能以某种方式添加html/css…好吧。非常感谢。:)所以我应该只编写自己的UI,但仍然使用
useraccounts
,对吗?编写自己的UI并使用Meteor Accounts API进行处理