2017-04-11 17 views
0

親レイアウトとしてmaster.blade.phpを宣言し、homepage.blade.phpを拡張しました。しかし、ChromeとMicrosoft Edgeでは、iframeにラップされています。Laravelのテンプレート継承5.4

これはmaster.blade.php

<!DOCTYPE html> 
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 

    <title>@yield('title', 'URL Shortner with Safe Browsing')</title> 

    @section('headerScripts') 
    <!-- Bootstrap --> 
    <!-- Latest compiled and minified CSS --> 
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> 

    @show 
</head> 
<body> 
@yield('content') 

@section('footerScripts') 
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> 
<!-- Include all compiled plugins (below), or include individual files as needed --> 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> 
@show 
</body> 
</html> 

であり、これはhomepage.blade.phpです。

@extends('layouts.master') 

@section('title', 'URL Shortner with Safe Browsing | Home Page') 
@section('headerScripts') 
    @parent 
    <link rel="stylesheet" href="{{ asset('css/ie10-viewport-bug-workaround.css') }}" /> 
    <link rel="stylesheet" href="{{ asset('css/cover.css') }}" /> 
    <script src="{{ asset('js/ie-emulation-modes-warning.js') }}" /> 

@endsection 

@section('content') 
    <div class="site-wrapper"> 

     <div class="site-wrapper-inner"> 

      <div class="cover-container"> 

       <div class="masthead clearfix"> 
        <div class="inner"> 
         <h3 class="masthead-brand">Cover</h3> 
         <nav> 
          <ul class="nav masthead-nav"> 
           <li class="active"><a href="#">Home</a></li> 
           <li><a href="#">Features</a></li> 
           <li><a href="#">Contact</a></li> 
          </ul> 
         </nav> 
        </div> 
       </div> 

       <div class="inner cover"> 
        <h1 class="cover-heading">Cover your page.</h1> 
        <p class="lead">Cover is a one-page template for building simple and beautiful home pages. Download, edit the text, and add your own fullscreen background photo to make it your own.</p> 
        <p class="lead"> 
         <a href="#" class="btn btn-lg btn-default">Learn more</a> 
        </p> 
       </div> 

       <div class="mastfoot"> 
        <div class="inner"> 
         <p>Cover template for <a href="http://getbootstrap.com">Bootstrap</a>, by <a href="https://twitter.com/mdo">@mdo</a>.</p> 
        </div> 
       </div> 

      </div> 

     </div> 

    </div> 
@endsection 
@section('footerScripts') 
    @parent 

@endsection 

これはブラウザに表示される出力です。

enter image description here

デベロッパーコンソールで確認することで、私はiframeラッパーがある見ることができます。

enter image description here

そのようなことに遭遇したことはありません。助言がありますか。私はここで何か間違っているかもしれない。

enter image description here

答えて

0

限り私が見ることができる、それがlaravelとは関係ありません。プラグインやブラウザの拡張機能がその問題を引き起こしているようです。すべてのブラウザの拡張機能を無効にして、コード上のjsプラグインを削除して、コンソールでエラーを確認してください。ネットワークタブで、ロードされたjavascriptファイルを確認することができます。

0

これは間違いかもしれませんが、これはLaravelの問題ではありません。これまでChromeでiframeの問題が発生していたのですが、それはAvira Browser Safetyです。

このような問題を引き起こす可能性のあるその他の拡張機能は多数あります。 iframeのソースを見ることで、どれがどれであるかを知ることができます。 src="chrome-extension://{id-of-the-extension}"

chrome://extensionsでデベロッパーモードを有効にすると、拡張IDが表示され、リストを検索してその原因となっているものを無効にする必要があります。

Microsoft Edgeの場合も同じですが、拡張機能のセクションを見てください。

関連する問題