laravel-learn-bbs/resources/views/topics/show.blade.php

60 lines
2.2 KiB
PHP
Raw Normal View History

2018-01-01 04:00:45 +00:00
@extends('layouts.app')
2018-01-01 12:18:33 +00:00
@section('title', $topic->title)
@section('description', $topic->excerpt)
2018-01-01 04:00:45 +00:00
@section('content')
2018-01-01 12:18:33 +00:00
<div class="row">
2018-01-01 04:00:45 +00:00
2018-01-01 12:18:33 +00:00
<div class="col-lg-3 col-md-3 hidden-sm hidden-xs author-info">
2018-01-01 04:00:45 +00:00
<div class="panel panel-default">
<div class="panel-body">
2018-01-01 12:18:33 +00:00
<div class="text-center">
作者:{{ $topic->user->name }}
</div>
<hr>
<div class="media">
<div align="center">
<a href="{{ route('users.show', $topic->user->id) }}">
<img class="thumbnail img-responsive" src="{{ $topic->user->header }}" width="300px"
height="300px">
</a>
2018-01-01 04:00:45 +00:00
</div>
</div>
2018-01-01 12:18:33 +00:00
</div>
</div>
</div>
2018-01-01 04:00:45 +00:00
2018-01-01 12:18:33 +00:00
<div class="col-lg-9 col-md-9 col-sm-12 col-xs-12 topic-content">
<div class="panel panel-default">
<div class="panel-body">
<h1 class="text-center">
2018-01-01 04:00:45 +00:00
{{ $topic->title }}
2018-01-01 12:18:33 +00:00
</h1>
<div class="article-meta text-center">
{{ $topic->created_at->diffForHumans() }}
<span class="glyphicon glyphicon-comment" aria-hidden="true"></span>
2018-01-01 04:00:45 +00:00
{{ $topic->reply_count }}
2018-01-01 12:18:33 +00:00
</div>
<div class="topic-body">
{!! $topic->body !!}
</div>
<div class="operate">
<hr>
<a href="{{ route('topics.edit', $topic->id) }}" class="btn btn-default btn-xs" role="button">
<i class="glyphicon glyphicon-edit"></i> 编辑
</a>
<a href="#" class="btn btn-default btn-xs" role="button">
<i class="glyphicon glyphicon-trash"></i> 删除
</a>
</div>
2018-01-01 04:00:45 +00:00
</div>
</div>
</div>
</div>
@endsection