如何将boostrap实现到自定义流星电子邮件中?
我试试这个,但是我无法达到电子邮件中的boostrap样式显示 有什么想法吗?
import {Meteor} from "meteor/meteor";
import {Accounts} from "meteor/accounts-base";
if (Meteor.isServer) {
Accounts.emailTemplates.verifyEmail.html = function(user, url) {
return '<head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script><link data-require="bootstrap@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" /><script data-require="bootstrap@3.3.6" data-semver="3.3.6" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script></head><body></body><div class="row"><div class="col-xs-6 col-xs-offset-3"><h1>Gracias por tu registro.</h1><a href="' + url + '">Verficar email</a></div></div>';
};
}
接下来,这是Accounts.emailTemplates.verifyEmail.html
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script data-require="jquery@2.2.0" data-semver="2.2.0" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<link data-require="bootstrap@3.3.6" data-semver="3.3.6" rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"/>
<script data-require="bootstrap@3.3.6" data-semver="3.3.6" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
</head>
<body></body>
<div class="row">
<div class="col-xs-6 col-xs-offset-3">
<h1>Click to confirm email.</h1>
<a href="' + url + '">link</a>
</div>
</div>
谢谢,我希望有人帮助