View Single Post
Old 03-09-2021, 01:35 PM   #5622
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,042
Karma: 4604637
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2021-03-09
- Fix show_timestamps option in adapter_fictionlive
- Add include_dice_rolls option

Code:
## SV/SB sites include a dice roller that can attach dice roll results
## to a post.  These are outside the actual post text.  Setting
## include_dice_rolls:true will include a text version of those rolls
## in the FFF chapter that should be usable for all ebook readers.
## Setting include_dice_rolls:svg will keep the inline <svg> images of
## the rolls. It is the user's responsibility to also add
## add_to_keep_html_attrs and add_to_output_css settings to make them
## appear correctly.  (include_dice_rolls:svg did *not* work in most
## ebook readers I tested with, even with appropriate attributes and
## css.)
## NOTE: SV requires login (always_login:true) to see dice rolls.
#include_dice_rolls:false
QQ dice rolls are included in the post test already, however, they can be better styled with:
Code:
[forum.questionablequesting.com]
add_to_output_css:
 .roll { display: flex; flex-wrap: wrap; }
 .cube { display: flex; margin-left: 5px; }
If you want to try include_dice_rolls:svg, these are the settings I was using:
Code:
[base_xenforo2forum]
add_to_keep_html_attrs:,style,xmlns,height,width,d,x,y,transform,text-anchor,cx,cy,r

[forums.sufficientvelocity.com]
add_to_output_css:
 /********* public:diceRoller_dice.less ********/
 .dice_container{margin:10px;padding:10px;width:800px;max-width:90%%}
 .dice_controls .button--icon--delete{float:right}
 .diceRoller_dice_svg{font-size:0.8em;font-family:Verdana,Geneva,sans-serif}
 .diceRoller_dice_svg .top_face path{fill:#fff}
 .diceRoller_dice_svg .top_face #roll{fill:#d8dfe5;stroke:#c9d2da;stroke-width:1;stroke-opacity:0.5}
 .diceRoller_dice_svg .back_face path{fill:#ccdbe7}
 .diceRoller_dice_svg .back_face .pip{fill:#abb9c5;stroke:#9cacbb;stroke-width:1;stroke-opacity:0.5}
 .diceRoller_dice_svg .front_face path{fill:#dde7ef}
 .diceRoller_dice_svg .front_face .pip{fill:#bac5d0;stroke:#abb9c5;stroke-width:1;stroke-opacity:0.5}

[forums.spacebattles.com]
add_to_output_css:
 /********* public:diceRoller_dice.less ********/
 .dice_container{margin:10px;padding:10px;width:800px;max-width:90%%}
 .dice_controls .button--icon--delete{float:right}
 .diceRoller_dice_svg{font-size:0.8em;font-family:Verdana,Geneva,sans-serif}
 .diceRoller_dice_svg .top_face path{fill:#5273a9}
 .diceRoller_dice_svg .top_face #roll{fill:#fff;stroke:#fff;stroke-width:1;stroke-opacity:0.5}
 .diceRoller_dice_svg .back_face path{fill:#395076}
 .diceRoller_dice_svg .back_face .pip{fill:#fff;stroke:#fff;stroke-width:1;stroke-opacity:0.5}
 .diceRoller_dice_svg .front_face path{fill:#415c87}
 .diceRoller_dice_svg .front_face .pip{fill:#fff;stroke:#fff;stroke-width:1;stroke-opacity:0.5}
You can use one set of CSS for both SV & SB, but because they will appear a little different due to differences in the SVG code.

My experience was that keeping the inline <svg> did not work correctly in Kindle, FBReader on Android or DropBox on iPad. It did work in Calibre's reader and iPad iBook.
JimmXinu is offline   Reply With Quote