Make the <h1> heading dependent on the page content
Continuation
This commit is contained in:
parent
c1ccab16e6
commit
5d6d08e98a
7 changed files with 27 additions and 15 deletions
app
Models/Pages
templates
public/style/ForkBB
|
@ -105,7 +105,10 @@ abstract class Admin extends Page
|
|||
}
|
||||
|
||||
$crumbs[] = [$this->c->Router->link('Admin'), 'Admin title'];
|
||||
$result = parent::crumbs(...$crumbs);
|
||||
|
||||
return parent::crumbs(...$crumbs);
|
||||
$this->adminHeader = \end($result)[1];
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -205,7 +205,10 @@ abstract class AbstractPM extends Page
|
|||
}
|
||||
|
||||
$crumbs[] = [$this->c->Router->link('PM'), 'PM'];
|
||||
$result = parent::crumbs(...$crumbs);
|
||||
|
||||
return parent::crumbs(...$crumbs);
|
||||
$this->pmHeader = \end($result)[1];
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
@extends ('layouts/main')
|
||||
<section id="fork-ban" class="f-main">
|
||||
<h2>{!! __('Info') !!}</h2>
|
||||
<div class="f-mheader">
|
||||
<h1 id="fork-h1">{!! __('Info') !!}</h1>
|
||||
</div>
|
||||
<div id="fork-ban" class="f-main">
|
||||
@if ($p->bannedIp)
|
||||
<p>{!! __('Your IP is blocked') !!}</p>
|
||||
@else
|
||||
|
@ -14,4 +16,4 @@
|
|||
<p><b>{{ $p->ban['message'] }}</b></p>
|
||||
@endif
|
||||
<p>{!! __(['Ban message contact %s', $p->adminEmail]) !!}</p>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
@include ('layouts/crumbs')
|
||||
@extends ('layouts/main')
|
||||
<div class="f-mheader">
|
||||
<h1 id="fork-h1">{!! __($p->adminHeader) !!}</h1>
|
||||
</div>
|
||||
<div class="f-nav-links f-nav-admin{{ $p->mainSuffix or '' }}-links">
|
||||
@yield ('crumbs')
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
@include ('layouts/crumbs')
|
||||
@extends ('layouts/main')
|
||||
<div class="f-mheader">
|
||||
<h1 id="fork-h1">{!! __($p->pmHeader) !!}</h1>
|
||||
</div>
|
||||
<div class="f-nav-links f-nav-pm-links">
|
||||
@yield ('crumbs')
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
@include ('layouts/crumbs')
|
||||
@extends ('layouts/main')
|
||||
<div class="f-mheader">
|
||||
<h1 id="fork-h1">{!! __($p->formTitle) !!}</h1>
|
||||
</div>
|
||||
<div class="f-nav-links">
|
||||
@yield ('crumbs')
|
||||
</div>
|
||||
@if ($form = $p->form)
|
||||
<section id="fork-modform" class="f-main">
|
||||
<h2>{!! __($p->formTitle) !!}</h2>
|
||||
<div id="fork-modform" class="f-main">
|
||||
<div class="f-fdiv">
|
||||
@include ('layouts/form')
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
@ -234,7 +234,8 @@ body,
|
|||
}
|
||||
|
||||
#fork #fork-h1 {
|
||||
font-size: 1.5rem;
|
||||
font-size: 1.75rem;
|
||||
font-size: clamp(1.25rem, 5vw, 1.75rem);
|
||||
font-style: italic;
|
||||
line-height: 1.1;
|
||||
overflow: hidden;
|
||||
|
@ -249,12 +250,6 @@ body,
|
|||
background-color: #E0C8B3; /*#DABCA0; #D3B58D;*/
|
||||
}
|
||||
|
||||
@media screen and (min-width: 34.0625rem) {
|
||||
#fork #fork-h1 {
|
||||
font-size: 1.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
#fork section > h2,
|
||||
#fork aside > h2 {
|
||||
display: none;
|
||||
|
@ -605,6 +600,7 @@ body,
|
|||
width: calc(100% - 4rem);
|
||||
padding: 0.625rem;
|
||||
font-size: 2rem;
|
||||
font-size: clamp(1.5rem, 5vw, 2rem);
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
|
|
Loading…
Add table
Reference in a new issue