Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
modify: add style for checking github name status
Browse files Browse the repository at this point in the history
  • Loading branch information
sota1235 committed Oct 24, 2015
1 parent e36d783 commit af9a436
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 16 deletions.
2 changes: 1 addition & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ gulp.task('script', () => {

gulp.task('watch', () => {
gulp.watch('./resources/assets/sass/**/*.sass', ['sass']);
gulp.watch('./resources/assets/js/**/*.js');
gulp.watch('./resources/assets/js/**/*.js', ['script']);
});

gulp.task('default', ['script', 'sass']);
4 changes: 2 additions & 2 deletions resources/assets/js/index.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $(() => {
};

let checkStatus = () => {
$gitNameStatus.text('now checking your GitHub name...');
$gitNameStatus.text('Checking...');
$gitNameStatus.css('color', 'blue');
};

Expand All @@ -44,7 +44,7 @@ $(() => {
return checkJson(result);
})
.then((result) => {
showStatus(result ? 'user name is valid' : 'invalid user name', result);
showStatus(result ? 'User name OK!!' : 'invalid user name', result);
})
.catch(error => console.log(error));
});
Expand Down
33 changes: 23 additions & 10 deletions resources/assets/sass/index.sass
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,29 @@
.sa_form
display: inline-block

input[type=text]
background-color: $main_color
color: $base_color
border: none
display: block
font-size: 1.5em
font-weight: 700
padding: 0.6em 1em
margin-bottom: 0.5em
width: 100%
.field
input[type=text]
background-color: $main_color
color: $base_color
border: none
display: block
font-size: 1.5em
font-weight: 700
padding: 0.6em 1em
margin-bottom: 0.5em
width: 100%

.status
position: absolute
display: table
left: 850px
min-height: 56px
font-size: 15px
font-weight: 700

.git_status
display: table-cell
vertical-align: middle

button#register
background-color: $accent_color
Expand Down
12 changes: 9 additions & 3 deletions resources/views/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
<div>
<h1>SaborunaYo</h1>
<div class="sa_form">
<input type="text" id="github_name" placeholder="GitHub name" required>
<div class="status"><span class="git_status"></span></div>
<input type="text" id="yo_name" placeholder="Yo name" required>
<div class="field">
<div class="status">
<p class="git_status"></p>
</div>
<input type="text" id="github_name" placeholder="GitHub name" required>
</div>
<div class="field">
<input type="text" id="yo_name" placeholder="Yo name" required>
</div>
<button id="register">Register</button>
</div>
</div>
Expand Down

0 comments on commit af9a436

Please sign in to comment.