index.blade.php 926 B

123456789101112131415161718192021222324252627282930313233343536
  1. @extends('portfolio.layout')
  2. @section('content')
  3. <div class="container">
  4. <div class="row justify-content-center mt-5 pt-5">
  5. <div class="col-12 col-md-6 text-center">
  6. <p class="mb-3">
  7. <span class="logo-mark px-3"><span class="text-gradient-primary">portfolio</span></span>
  8. </p>
  9. <div class="spinner-border mt-5" role="status">
  10. <span class="sr-only">Loading...</span>
  11. </div>
  12. </div>
  13. </div>
  14. </div>
  15. @endsection
  16. @push('scripts')
  17. <script type="text/javascript">
  18. @auth
  19. axios.get('/api/v1/accounts/verify_credentials')
  20. .then(res => {
  21. if(res.data.locked == false) {
  22. window.location.href = 'https://{{ config('portfolio.domain') }}{{ config('portfolio.path') }}/' + res.data.username
  23. } else {
  24. window.location.href = "{{ config('app.url') }}";
  25. }
  26. })
  27. @else
  28. window.location.href = "{{ config('app.url') }}";
  29. @endauth
  30. </script>
  31. @endpush