調整HTML區塊預設CSS樣式

This commit is contained in:
Eric Li
2025-06-24 12:58:30 +08:00
parent 0f8de889f7
commit 15e69ac7fe
5 changed files with 34 additions and 12 deletions

View File

@ -7,6 +7,8 @@
// Bootstrap // Bootstrap
@import 'bootstrap/scss/bootstrap'; @import 'bootstrap/scss/bootstrap';
body { body {
background-color: #88BBE5; background-color: #88BBE5;
} }
@ -552,3 +554,23 @@ body {
max-width: 956px; max-width: 956px;
} }
} }
.main-area .reset-container,
.main-area .reset-container * {
all: revert;
all: revert-layer;
}
/* 可選:恢復 div 的塊級特性 */
.main-area .reset-container {
display: block;
}
.main-area .reset-container > * {
font-size: 1.4em;
}
.anchor-point {
text-decoration: none;
color: unset;
}

View File

@ -34,11 +34,11 @@
@endphp @endphp
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8 main-area"> <div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2> <h2><a id="{{ $row->id }}" href="#{{ $row->id }}" class="anchor-point">{{ $row->title }}</a></h2>
<h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5> <h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto"> <img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div> <div class="reset-container">
{!! $row->body !!} {!! $row->body !!}
</div> </div>
</div> </div>

View File

@ -35,11 +35,11 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8 main-area"> <div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2> <h2><a id="{{ $row->id }}" href="#{{ $row->id }}" class="anchor-point">{{ $row->title }}</a></h2>
<h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5> <h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto"> <img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div> <div class="reset-container">
{!! $row->body !!} {!! $row->body !!}
</div> </div>
</div> </div>

View File

@ -35,11 +35,11 @@
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8 main-area"> <div class="col-md-8 main-area">
<h5>#{{ $row->newsCatalog->name }}</h5> <h5>#{{ $row->newsCatalog->name }}</h5>
<h2>{{ $row->title }}</h2> <h2><a id="{{ $row->id }}" href="#{{ $row->id }}" class="anchor-point">{{ $row->title }}</a></h2>
<h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5> <h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto"> <img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div> <div class="reset-container">
{!! $row->body !!} {!! $row->body !!}
</div> </div>
</div> </div>

View File

@ -34,11 +34,11 @@
@endphp @endphp
<div class="row justify-content-center"> <div class="row justify-content-center">
<div class="col-md-8 main-area"> <div class="col-md-8 main-area">
<h2>{{ $row->title }}</h2> <h2><a id="{{ $row->id }}" href="#{{ $row->id }}" class="anchor-point">{{ $row->title }}</a></h2>
<h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5> <h5>發佈時間 <time>{{ date('Y-m-d H:i', strtotime($row->post_at)) }}</time></h5>
<img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto"> <img src="{{ $img_src }}" alt="{{ $img_memo }}" width="100%" height="auto">
<p>&nbsp;</p>
<div> <div class="reset-container">
{!! $row->body !!} {!! $row->body !!}
</div> </div>
</div> </div>