From b3f5a6e514691027f95b7c84543b66eca8b18701 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Sat, 25 Jul 2020 14:42:59 +0200 Subject: CSS: Better placement of character page options Alternative to f52286befd10dcc9ca9d282762de087f78b4c4c5 --- data/style.css | 7 +++++-- lib/VNWeb/Chars/Page.pm | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/data/style.css b/data/style.css index 1327e33b..497211ae 100644 --- a/data/style.css +++ b/data/style.css @@ -100,7 +100,7 @@ div.warning h2, div.notice h2 { font-size: 13px; font-weight: bold; margin: 0; } /* general text formatting */ ul, ol { margin-left: 35px; } -p.itemmsg { float: right; color: $standout$; font-style: italic; margin: 0!important; padding-bottom: 10px } +p.itemmsg { float: right; color: $standout$; font-style: italic; margin: 0!important } .grayedout { color: $grayedout$ } b.grayedout { font-weight: normal } i.grayedout { font-style: normal } @@ -286,7 +286,7 @@ div.mainbox-overflow-hack { overflow: hidden; width: 100%; box-sizing: border-bo .mainbox table p { margin: 0; } .mainbox h2 { font-weight: bold; font-size: 16px; margin: 10px 0 0 5px; } a.addnew, p.addnew { float: right; margin: 0 } -a.mainopts, p.mainopts { clear: right; float: right; margin: 0 } +a.mainopts, p.mainopts { float: right; margin: 0 } p.mainopts a, p.mainopts label { margin: 0 5px } .mainbox.threelayout { border-collapse: separate; border-spacing: 10px; margin: 10px -10px -20px -10px; min-width: 100%; } @@ -624,6 +624,9 @@ div.producerbrowse { padding-bottom: 10px } /***** Char page (also used on VN page) *****/ +p.chardetailopts { margin: -10px auto 7px auto; width: 800px; text-align: right } +p.chardetailopts a { margin: 0 5px } +p.chardetailopts a:last-child { margin: 0 0 0 5px } div.chardetails { margin: 0 auto; width: 800px; } div.charimg { float: left; width: 250px; margin: 0 10px; text-align: center } div.charimg p { text-align: center; padding: 0px; margin: 0; } diff --git a/lib/VNWeb/Chars/Page.pm b/lib/VNWeb/Chars/Page.pm index 7270d61b..41396c13 100644 --- a/lib/VNWeb/Chars/Page.pm +++ b/lib/VNWeb/Chars/Page.pm @@ -258,7 +258,9 @@ TUWF::get qr{/$RE{crev}} => sub { _rev_ $c if tuwf->capture('rev'); div_ class => 'mainbox', sub { itemmsg_ c => $c; - p_ class => 'mainopts', sub { + h1_ sub { txt_ $c->{name}; debug_ $c }; + h2_ class => 'alttitle', $c->{original} if length $c->{original}; + p_ class => 'chardetailopts', sub { if($max_spoil) { a_ mkclass(checked => $view->{spoilers} == 0), href => '?view='.viewset(spoilers=>0, traits_sexual => $view->{traits_sexual}), 'Hide spoilers'; a_ mkclass(checked => $view->{spoilers} == 1), href => '?view='.viewset(spoilers=>1, traits_sexual => $view->{traits_sexual}), 'Show minor spoilers'; @@ -267,8 +269,6 @@ TUWF::get qr{/$RE{crev}} => sub { b_ class => 'grayedout', ' | ' if $has_sex && $max_spoil; a_ mkclass(checked => $view->{traits_sexual}), href => '?view='.viewset(spoilers => $view->{spoilers}, traits_sexual=>!$view->{traits_sexual}), 'Show sexual traits' if $has_sex; }; - h1_ sub { txt_ $c->{name}; debug_ $c }; - h2_ class => 'alttitle', $c->{original} if length $c->{original}; chartable_ $c; }; -- cgit v1.2.3