Skip to content

Bootstrap social library support #1151

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ module.exports = function (grunt) {
target: {
src: '<%%= yeoman.client %>/index.html',
ignorePath: '<%%= yeoman.client %>/',
exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/'<% if(!filters.css) { %>, /bootstrap.css/, /font-awesome.css/ <% } %>]
exclude: [/bootstrap-sass-official/, /bootstrap.js/, '/json3/', '/es5-shim/'<% if(!filters.css) { %>, /bootstrap.css/, /font-awesome.css/, /bootstrap-social.css/ <% } %>]
}
},

Expand Down
4 changes: 3 additions & 1 deletion app/templates/_bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"angular": ">=1.2.*",
"json3": "~3.3.1",
"es5-shim": "~3.0.1",<% if(filters.bootstrap) { %><% if (filters.sass) { %>
"bootstrap-sass-official": "~3.1.1",<% } %>
"bootstrap-sass-official": "~3.1.1",
"bootstrap-social": "~4.8.0",<% } %><% if (filters.less) { %>
"bootstrap-social": "~4.8.0",<% } %>
"bootstrap": "~3.1.1",<% } %>
"angular-resource": ">=1.2.*",
"angular-cookies": ">=1.2.*",
Expand Down
87 changes: 34 additions & 53 deletions app/templates/client/app/account(auth)/login/login(html).html
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,41 @@

<div class="container">
<div class="row">
<div class="col-sm-12">
<h1>Login</h1>
<p>Accounts are reset on server restart from <code>server/config/seed.js</code>. Default account is <code>[email protected]</code> / <code>test</code></p>
<p>Admin account is <code>[email protected]</code> / <code>admin</code></p>
</div>
<div class="col-sm-12">
<form class="form" name="form" ng-submit="login(form)" novalidate>

<div class="form-group">
<label>Email</label>

<input type="email" name="email" class="form-control" ng-model="user.email" required>
<div class="col-sm-offset-3 col-sm-6 col-xs-12">
<h1>Log in</h1><% if(filters.oauth) {%>
<div class="well"><% if(filters.facebookAuth) {%>
<button ng-click="loginOauth('facebook')" class="btn btn-block btn-social btn-facebook"><i class="fa fa-facebook"></i> <span>Connect with</span> Facebook</button><% } %><% if(filters.googleAuth) {%>
<button ng-click="loginOauth('google')" class="btn btn-block btn-social btn-google-plus"><i class="fa fa-google-plus"></i> <span>Connect with</span> Google+</button><% } %><% if(filters.twitterAuth) {%>
<button ng-click="loginOauth('twitter')" class="btn btn-block btn-social btn-twitter"><i class="fa fa-twitter"></i> <span>Connect with</span> Twitter</button><% } %>
</div>
<hr/><% } %>
<form name="form" ng-submit="login(form)" novalidate="">
<div class="well">
<div class="form-group">
<label for="email" class="sr-only">Email address</label>
<div class="input-group"><span class="input-group-addon">@</span>
<input type="email" placeholder="Email address" required="" autofocus="" name="email" ng-model="user.email" class="form-control"/>
</div>
</div>
<div class="form-group">
<label for="password" class="sr-only">Password</label>
<div class="input-group"><span class="input-group-addon">*</span>
<input type="password" placeholder="Password" name="password" ng-model="user.password" required="" class="form-control"/>
</div>
</div>
<div class="form-group has-error">
<p ng-show="form.email.$error.required && form.password.$error.required && submitted" class="help-block">Please enter your email and password.</p>
<p class="help-block">{{ errors.other }}</p>
</div>
<button type="submit" class="btn btn-primary btn-block">Log in</button>
</div>

<div class="form-group">
<label>Password</label>

<input type="password" name="password" class="form-control" ng-model="user.password" required>
</div>

<div class="form-group has-error">
<p class="help-block" ng-show="form.email.$error.required && form.password.$error.required && submitted">
Please enter your email and password.
</p>
<p class="help-block" ng-show="form.email.$error.email && submitted">
Please enter a valid email.
</p>

<p class="help-block">{{ errors.other }}</p>
</div>

<div>
<button class="btn btn-inverse btn-lg btn-login" type="submit">
Login
</button>
<a class="btn btn-default btn-lg btn-register" href="/signup">
Register
</a>
</div>
<% if(filters.oauth) {%>
<hr>
<div><% if(filters.facebookAuth) {%>
<a class="btn btn-facebook" href="" ng-click="loginOauth('facebook')">
<i class="fa fa-facebook"></i> Connect with Facebook
</a><% } %><% if(filters.googleAuth) {%>
<a class="btn btn-google-plus" href="" ng-click="loginOauth('google')">
<i class="fa fa-google-plus"></i> Connect with Google+
</a><% } %><% if(filters.twitterAuth) {%>
<a class="btn btn-twitter" href="" ng-click="loginOauth('twitter')">
<i class="fa fa-twitter"></i> Connect with Twitter
</a><% } %>
</div><% } %>
</form>
<hr/>
<div class="well"> <a href="/signup" class="btn btn-default btn-block">New registration</a></div>
</div>
</div>
<hr>
</div>
<div class="row">
<p>Accounts are reset on server restart from<code>server/config/seed.js</code>. Default account is<code>[email protected]</code>/<code>test</code></p>
<p>Admin account is<code>[email protected]</code>/<code>admin</code></p>
</div>
</div>
106 changes: 59 additions & 47 deletions app/templates/client/app/account(auth)/login/login(jade).jade
Original file line number Diff line number Diff line change
@@ -1,54 +1,66 @@
div(ng-include='"components/navbar/navbar.html"')
.container
.row
.col-sm-12
h1 Login
p
| Accounts are reset on server restart from
code server/config/seed.js
| . Default account is
code [email protected]
| /
code test
p
| Admin account is
code [email protected]
| /
code admin

.col-sm-12
form.form(name='form', ng-submit='login(form)', novalidate='')
.form-group
label Email
input.form-control(type='text', name='email', ng-model='user.email')
.form-group
label Password
input.form-control(type='password', name='password', ng-model='user.password')
.col-sm-offset-3.col-sm-6.col-xs-12
h1 Log in
<% if(filters.oauth) {%>
.well
<% if(filters.facebookAuth) {%>
button.btn.btn-block.btn-social.btn-facebook(ng-click='loginOauth("facebook")')
i.fa.fa-facebook
|
span Connect with
| Facebook
<% } %><% if(filters.googleAuth) {%>
button.btn.btn-block.btn-social.btn-google-plus(ng-click='loginOauth("google")')
i.fa.fa-google-plus
|
span Connect with
| Google+
<% } %><% if(filters.twitterAuth) {%>
button.btn.btn-block.btn-social.btn-twitter(ng-click='loginOauth("twitter")')
i.fa.fa-twitter
|
span Connect with
| Twitter
<% } %>
hr
<% } %>
form(name='form', ng-submit='login(form)', novalidate='')
.well
.form-group
label.sr-only(for='email') Email address
.input-group
span.input-group-addon @
input.form-control(type='email', placeholder='Email address', required='', autofocus='', name='email', ng-model='user.email')
.form-group
label.sr-only(for='password') Password
.input-group
span.input-group-addon *
input.form-control(type='password', placeholder='Password', name='password', ng-model='user.password', required='')
.form-group.has-error
p.help-block(ng-show='form.email.$error.required && form.password.$error.required && submitted')
| Please enter your email and password.
p.help-block {{ errors.other }}

.form-group.has-error
p.help-block(ng-show='form.email.$error.required && form.password.$error.required && submitted')
| Please enter your email and password.
p.help-block {{ errors.other }}
button.btn.btn-primary.btn-block(type='submit')
| Log in

div
button.btn.btn-inverse.btn-lg.btn-login(type='submit')
| Login
= ' '
a.btn.btn-default.btn-lg.btn-register(href='/signup')
| Register
<% if(filters.oauth) {%>
hr
.well
a.btn.btn-default.btn-block(href='/signup')
| New registration

div<% if(filters.facebookAuth) {%>
a.btn.btn-facebook(href='', ng-click='loginOauth("facebook")')
i.fa.fa-facebook
| Connect with Facebook
= ' '<% } %><% if(filters.googleAuth) {%>
a.btn.btn-google-plus(href='', ng-click='loginOauth("google")')
i.fa.fa-google-plus
| Connect with Google+
= ' '<% } %><% if(filters.twitterAuth) {%>
a.btn.btn-twitter(href='', ng-click='loginOauth("twitter")')
i.fa.fa-twitter
| Connect with Twitter<% } %><% } %>
hr
.row
p
| Accounts are reset on server restart from
code server/config/seed.js
| . Default account is
code [email protected]
| /
code test
p
| Admin account is
code [email protected]
| /
code admin
30 changes: 0 additions & 30 deletions app/templates/client/app/account(auth)/login/login(less).less
Original file line number Diff line number Diff line change
@@ -1,30 +0,0 @@
<% if(filters.bootstrap) { %>// Colors
// --------------------------------------------------

@btnText: #fff;
@btnTextAlt: #000;<% if (filters.oauth) { %>
<% if (filters.facebookAuth) { %>
@btnFacebookBackground: #3B5998;
@btnFacebookBackgroundHighlight: #133783;<% } if (filters.twitterAuth) { %>
@btnTwitterBackground: #2daddc;
@btnTwitterBackgroundHighlight: #0271bf;<% } if (filters.googleAuth) { %>
@btnGooglePlusBackground: #dd4b39;
@btnGooglePlusBackgroundHighlight: #c53727;<% } %>
@btnGithubBackground: #fafafa;
@btnGithubBackgroundHighlight: #ccc;

// Social buttons
// --------------------------------------------------
<% if (filters.facebookAuth) { %>
.btn-facebook {
.button-variant(@btnText; @btnFacebookBackgroundHighlight; @btnFacebookBackgroundHighlight);
}<% } if (filters.twitterAuth) { %>
.btn-twitter {
.button-variant(@btnText; @btnTwitterBackground; @btnTwitterBackgroundHighlight);
}<% } if (filters.googleAuth) { %>
.btn-google-plus {
.button-variant(@btnText; @btnGooglePlusBackground; @btnGooglePlusBackgroundHighlight);
}<% } %>
.btn-github {
.button-variant(@btnTextAlt; @btnGithubBackground; @btnGithubBackgroundHighlight);
}<% } %><% } %>
30 changes: 0 additions & 30 deletions app/templates/client/app/account(auth)/login/login(sass).scss
Original file line number Diff line number Diff line change
@@ -1,30 +0,0 @@
<% if(filters.bootstrap) { %>// Colors
// --------------------------------------------------

$btnText: #fff;
$btnTextAlt: #000;<% if (filters.oauth) { %>
<% if (filters.facebookAuth) { %>
$btnFacebookBackground: #3B5998;
$btnFacebookBackgroundHighlight: #133783;<% } if (filters.twitterAuth) { %>
$btnTwitterBackground: #2daddc;
$btnTwitterBackgroundHighlight: #0271bf;<% } if (filters.googleAuth) { %>
$btnGooglePlusBackground: #dd4b39;
$btnGooglePlusBackgroundHighlight: #c53727;<% } %>
$btnGithubBackground: #fafafa;
$btnGithubBackgroundHighlight: #ccc;

// Social buttons
// --------------------------------------------------
<% if (filters.facebookAuth) { %>
.btn-facebook {
@include button-variant($btnText, $btnFacebookBackgroundHighlight, $btnFacebookBackgroundHighlight);
}<% } if (filters.twitterAuth) { %>
.btn-twitter {
@include button-variant($btnText, $btnTwitterBackground, $btnTwitterBackgroundHighlight);
}<% } if (filters.googleAuth) { %>
.btn-google-plus {
@include button-variant($btnText, $btnGooglePlusBackground, $btnGooglePlusBackgroundHighlight);
}<% } %>
.btn-github {
@include button-variant($btnTextAlt, $btnGithubBackground, $btnGithubBackgroundHighlight);
}<% } %><% } %>
Loading