Skip to content

Commit

Permalink
upgraded to bootstrap4 beta3
Browse files Browse the repository at this point in the history
  • Loading branch information
anindya-dhruba committed Jan 8, 2018
1 parent 350057e commit 25f2e77
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 163 deletions.
14 changes: 10 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
"devDependencies": {
"axios": "^0.17",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"bootstrap-sass": "^3.3.7",
"bootstrap": "^4.0.0-beta.3",
"cross-env": "^5.1",
"jquery": "^3.2",
"laravel-mix": "^1.0",
"popper.js": "^1.12.9",
"vue": "^2.5.7",
"vue-router": "^3.0.1",
"vuejs-noty": "^0.1.2",
Expand Down
13 changes: 5 additions & 8 deletions public/css/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/js/app.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions resources/assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import axios from 'axios';

window.$ = window.jQuery = $;
window.axios = axios;
require('bootstrap-sass');
require('bootstrap');

Vue.use(VueNoty, {
progressBar: false,
layout: 'bottomRight',
theme: 'bootstrap-v3',
theme: 'bootstrap-v4',
timeout: 3000
});

Expand Down
9 changes: 7 additions & 2 deletions resources/assets/js/components/home/Home.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
<template>
<div class="container">
<div class="jumbotron">
<h1 v-once>{{siteName}}</h1>
<p>Starter Boilerplate SPA made with Laravel 5.5, JWT Auth, Vue 2, Vue-router 3, Vuex 3, Axios and love</p>
<h1 class="display-4" v-once>{{siteName}}</h1>
<p class="lead">Starter Boilerplate SPA made with Laravel 5.5, JWT Auth, Vue 2, Vue-router 3, Vuex 3, Axios and love</p>
<div class="pt-3">
<iframe src="https://ghbtns.com/github-btn.html?user=anindya-dhruba&repo=laravel-vue-spa&type=star&count=true&size=large" frameborder="0" scrolling="0" width="130px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=anindya-dhruba&repo=laravel-vue-spa&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="130px" height="30px"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=anindya-dhruba&repo=laravel-vue-spa&type=watch&count=true&size=large&v=2" frameborder="0" scrolling="0" width="130px" height="30px"></iframe>
</div>
</div>
</div>
</template>
Expand Down
15 changes: 8 additions & 7 deletions resources/assets/js/components/login/Login.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<template>
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="col-12 col-md-6 col-lg-8">
<div class="page-header">
<h1>Login</h1>
<h1 class="display-4">Login</h1>
</div>
<div class="py-4">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur corporis deserunt, dolorem eligendi esse eum illo illum inventore libero minus nam numquam officiis praesentium quas quasi repudiandae sed tempore voluptatibus?</p>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur corporis deserunt, dolorem eligendi esse eum illo illum inventore libero minus nam numquam officiis praesentium quas quasi repudiandae sed tempore voluptatibus?</p>
</div>
<div class="col-md-4">
<div class="panel panel-default">
<div class="panel-heading">Login</div>
<div class="panel-body">
<div class="col-12 col-md-6 col-lg-4">
<div class="card">
<div class="card-body">
<login-form @loginSuccess="loginSuccess"></login-form>
</div>
</div>
Expand Down
15 changes: 9 additions & 6 deletions resources/assets/js/components/login/LoginForm.vue
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
<template>
<div>
<form @submit.prevent="login">
<div class="form-group" :class="{'has-error' : error.email}">
<label class="control-label" for="email">Email</label>
<div class="form-group">
<label for="email">Email</label>
<input
type="email"
class="form-control"
:class="{'is-invalid' : error.email}"
id="email"
v-model="form.email"
autocomplete="off"
:disabled="loading"
/>
<span class="help-block" v-show="error.email">{{ error.email }}</span>
<div class="invalid-feedback" v-show="error.email">{{ error.email }}</div>
</div>
<div class="form-group" :class="{'has-error' : error.password}">
<label class="control-label" for="password">Password</label>
<div class="form-group">
<label for="password">Password</label>
<input
type="password"
class="form-control"
:class="{'is-invalid' : error.password}"
id="password"
v-model="form.password"
:disabled="loading"
/>
<span class="help-block" v-show="error.password">{{ error.password }}</span>
<div class="invalid-feedback" v-show="error.password">{{ error.password }}</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary btn-block" :disabled="loading">
Expand Down
12 changes: 5 additions & 7 deletions resources/assets/js/components/profile/Profile.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<template>
<div>
<h1 class="page-header">{{user.name}}'s Profile</h1>
<div class="panel panel-default">
<ul class="list-group">
<h3 class="mb-4">{{user.name}}'s Profile</h3>
<div class="card">
<ul class="list-group list-group-flush">
<li class="list-group-item">
Name
<br>
<h4>{{ user.name }}</h4>
<p class="lead">{{ user.name }}</p>
</li>
<li class="list-group-item">
Email
<br>
<h4>{{ user.email }}</h4>
<p class="lead">{{ user.email }}</p>
</li>
</ul>
</div>
Expand Down
14 changes: 7 additions & 7 deletions resources/assets/js/components/profile/ProfileWrapper.vue
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<template>
<div class="container">
<div class="row">
<div class="col-md-3">
<div class="list-group">
<router-link :to="{name: 'profile'}" class="list-group-item" activeClass="active" exact>
<div class="col-12 col-md-3">
<nav class="nav flex-column nav-pills mb-4">
<router-link :to="{name: 'profile'}" class="nav-link" activeClass="active" exact>
View Profile
</router-link>
<router-link :to="{name: 'profile.editProfile'}" class="list-group-item" activeClass="active" exact>
<router-link :to="{name: 'profile.editProfile'}" class="nav-link" activeClass="active" exact>
Edit Profile
</router-link>
<router-link :to="{name: 'profile.editPassword'}" class="list-group-item" activeClass="active" exact>
<router-link :to="{name: 'profile.editPassword'}" class="nav-link" activeClass="active" exact>
Edit Password
</router-link>
</div>
</nav>
</div>
<div class="col-md-9">
<div class="col-12 col-md-9">
<transition name="fade" mode="out-in">
<router-view></router-view>
</transition>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div>
<h1 class="page-header">Edit Password</h1>
<div class="panel panel-default">
<div class="panel-body">
<h3 class="mb-4">Edit Password</h3>
<div class="card">
<div class="card-body">
<edit-password-form @updateSuccess="updateSuccess"></edit-password-form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
<template>
<div>
<form @submit.prevent="updatePassword">
<div class="form-group" :class="{ 'has-error' : error.new_password}">
<label class="control-label" for="new-password">New Password</label>
<div class="form-group">
<label for="new-password">New Password</label>
<input
type="password"
class="form-control"
:class="{'is-invalid' : error.new_password}"
id="new-password"
v-model="form.new_password"
:disabled="loading"
/>
<span class="help-block" v-if="error.new_password">{{ error.new_password }}</span>
<div class="invalid-feedback" v-show="error.new_password">{{ error.new_password }}</div>
</div>
<div class="form-group" :class="{ 'has-error' : error.confirm_new_password}">
<label class="control-label" for="confirm-new-password">Confirm New Password</label>
<div class="form-group">
<label for="confirm-new-password">Confirm New Password</label>
<input
type="password"
class="form-control"
:class="{'is-invalid' : error.confirm_new_password}"
id="confirm-new-password"
v-model="form.confirm_new_password"
:disabled="loading"
/>
<span class="help-block" v-if="error.confirm_new_password">{{ error.confirm_new_password }}</span>
<div class="invalid-feedback" v-show="error.confirm_new_password">{{ error.confirm_new_password }}</div>
</div>

<div class="form-group">
<button type="submit" class="btn btn-primary" :disabled="loading">
<span v-show="loading">Updating Password</span>
<span v-show="!loading">Update Password</span>
</button>
<span class="help-block">
Update Password is disabled for demo purpose.
<br>
Please, enable it from <code>updatePassword()</code> method in EditPasswordForm.vue component
</span>
<button type="submit" class="btn btn-primary" :disabled="loading">
<span v-show="loading">Updating Password</span>
<span v-show="!loading">Update Password</span>
</button>
<div class="form-text text-muted mt-4">
Update Password is disabled for demo purpose.
<br>
Please, enable it from <code>updatePassword()</code> method in EditPasswordForm.vue component
</div>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<template>
<div>
<h1 class="page-header">Edit Profile</h1>
<div class="panel panel-default">
<div class="panel-body">
<h3 class="mb-4">Edit Profile</h3>
<div class="card">
<div class="card-body">
<edit-profile-form @updateSuccess="updateSuccess"></edit-profile-form>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<template>
<div>
<form @submit.prevent="updateProfile">
<div class="form-group" :class="{'has-error' : error.name}">
<label class="control-label" for="name">Name</label>
<div class="form-group">
<label for="name">Name</label>
<input
type="text"
class="form-control"
:class="{'is-invalid' : error.name}"
id="name"
v-model="form.name"
:disabled="loading"
/>
<span class="help-block" v-show="error.name">{{ error.name }}</span>
<div class="invalid-feedback" v-show="error.name">{{ error.name }}</div>
</div>
<div class="form-group" :class="{'has-error' : error.email}">
<label class="control-label" for="email">Email</label>
<div class="form-group">
<label for="email">Email</label>
<input
type="email"
class="form-control"
:class="{'is-invalid' : error.email}"
id="email"
v-model="form.email"
:disabled="loading"
/>
<span class="help-block" v-show="error.email">{{ error.email }}</span>
<div class="invalid-feedback" v-show="error.email">{{ error.email }}</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary" :disabled="loading">
<span v-show="loading">Updating Profile</span>
<span v-show="!loading">Update Profile</span>
</button>
<span class="help-block">
Update Profile is disabled for demo purpose.
<br>
Please, enable it from <code>updateProfile()</code> method in EditProfileForm.vue component
</span>
<button type="submit" class="btn btn-primary" :disabled="loading">
<span v-show="loading">Updating Profile</span>
<span v-show="!loading">Update Profile</span>
</button>
<div class="form-text text-muted mt-4">
Update Profile is disabled for demo purpose.
<br>
Please, enable it from <code>updateProfile()</code> method in EditProfileForm.vue component
</div>
</form>
</div>
Expand Down
3 changes: 2 additions & 1 deletion resources/assets/js/components/shared/AppFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<footer>
<hr>
<div class="container">
&copy;<span v-once>{{ siteName }}</span> <span v-once>{{ currentYear }}, developed by <strong>Anindya Dhruba</strong></span>
&copy;<span v-once>{{ siteName }}</span> <span v-once>{{ currentYear }},
developed by <a href="http://github.com/anindya-dhruba" target="_blank">Anindya Dhruba</a></span>
</div>
</footer>
</template>
Expand Down
36 changes: 16 additions & 20 deletions resources/assets/js/components/shared/TopMenu.vue
Original file line number Diff line number Diff line change
@@ -1,28 +1,24 @@
<template>
<nav class="navbar navbar-default">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark mb-4">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<router-link class="navbar-brand" :to="{name: 'index'}" v-once>{{ siteName }}</router-link>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<router-link :to="{name: 'index'}" tag="li" activeClass="active" exact>
<a>Home</a>
<router-link class="navbar-brand" :to="{name: 'index'}" v-once>{{ siteName }}</router-link>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<router-link :to="{name: 'index'}" tag="li" class="nav-item" activeClass="active" exact>
<a class="nav-link">Home</a>
</router-link>
<router-link v-show="!isLoggedIn" :to="{name: 'login'}" tag="li" activeClass="active" exact>
<a>Login</a>
<router-link v-show="!isLoggedIn" :to="{name: 'login'}" tag="li" class="nav-item" activeClass="active" exact>
<a class="nav-link">Login</a>
</router-link>
<router-link v-show="isLoggedIn" :to="{name: 'profile'}" tag="li" activeClass="active">
<a>Profile</a>
<router-link v-show="isLoggedIn" :to="{name: 'profile'}" tag="li" class="nav-item" activeClass="active">
<a class="nav-link">Profile</a>
</router-link>
<li v-show="isLoggedIn">
<a href="#" @click.prevent="logout">Logout</a>
<li class="nav-item" v-show="isLoggedIn">
<a class="nav-link" href="#" @click.prevent="logout">Logout</a>
</li>
</ul>
</div>
Expand Down
5 changes: 1 addition & 4 deletions resources/assets/js/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,4 @@ export const api = {
currentUser: apiDomain + '/user',
updateUserProfile: apiDomain + '/user/profile/update',
updateUserPassword: apiDomain + '/user/password/update'
};



};
Loading

0 comments on commit 25f2e77

Please sign in to comment.