theme-options.php 154 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019
  1. <?php
  2. if( class_exists( 'Sakurairo_CSF' ) ) {
  3. $prefix = 'iro_options';
  4. if ( ! function_exists( 'iro_validate_optional_url' ) ) {
  5. function iro_validate_optional_url( $value ) {
  6. if ( !empty( $value ) ) {
  7. return csf_validate_url($value);
  8. }
  9. }
  10. }
  11. Sakurairo_CSF::createOptions( $prefix, array(
  12. 'menu_title' => __('iro-Options','sakurairo_csf'),
  13. 'menu_slug' => 'iro_options',
  14. ) );
  15. Sakurairo_CSF::createSection($prefix, array(
  16. 'title' => __('Hello!','sakurairo_csf'),
  17. 'icon' => 'fa fa-podcast',
  18. 'fields' => array(
  19. array(
  20. 'type' => 'heading',
  21. 'content' => __('News+','sakurairo_csf'),
  22. ),
  23. array(
  24. 'type' => 'content',
  25. 'content' => __('<img src="https://news.maho.cc/sakurairo.php" alt="News_Plus" width="100%" height="100%" />','sakurairo_csf'),
  26. ),
  27. )
  28. ) );
  29. Sakurairo_CSF::createSection( $prefix, array(
  30. 'id' => 'preliminary',
  31. 'title' => __('Preliminary Options','sakurairo_csf'),
  32. 'icon' => 'fa fa-sliders',
  33. 'fields' => array(
  34. array(
  35. 'type' => 'submessage',
  36. 'style' => 'info',
  37. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Preliminary/">here</a> to learn how to set the options on this page','sakurairo_csf'),
  38. ),
  39. array(
  40. 'id' => 'personal_avatar',
  41. 'type' => 'upload',
  42. 'title' => __('Personal Avatar','sakurairo_csf'),
  43. 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'),
  44. 'library' => 'image',
  45. ),
  46. array(
  47. 'id' => 'text_logo_options',
  48. 'type' => 'switcher',
  49. 'title' => __('Mashiro Special Effects Text','sakurairo_csf'),
  50. 'label' => __('After turned on, the personal avatar will be replaced by the text as the home page display content','sakurairo_csf'),
  51. 'default' => false
  52. ),
  53. array(
  54. 'id' => 'text_logo',
  55. 'type' => 'fieldset',
  56. 'title' => __('Mashiro Special Effects Text Options','sakurairo_csf'),
  57. 'dependency' => array( 'text_logo_options', '==', 'true', '', 'true' ),
  58. 'fields' => array(
  59. array(
  60. 'id' => 'text',
  61. 'type' => 'text',
  62. 'title' => __('Text','sakurairo_csf'),
  63. 'desc' => __('The text content should not be too long, and the recommended length is 16 bytes.','sakurairo_csf'),
  64. ),
  65. array(
  66. 'id' => 'font',
  67. 'type' => 'text',
  68. 'title' => __('Font','sakurairo_csf'),
  69. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  70. ),
  71. array(
  72. 'id' => 'size',
  73. 'type' => 'slider',
  74. 'title' => __('Size','sakurairo_csf'),
  75. 'desc' => __('Slide to adjust, the recommended value range is 70-90','sakurairo_csf'),
  76. 'unit' => 'px',
  77. 'min' => '40',
  78. 'max' => '140',
  79. ),
  80. array(
  81. 'id' => 'color',
  82. 'type' => 'color',
  83. 'title' => __('Color','sakurairo_csf'),
  84. 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'),
  85. ),
  86. ),
  87. 'default' => array(
  88. 'text' => 'ひょうりゅ',
  89. 'size' => '80',
  90. 'color' => '#FFF',
  91. ),
  92. ),
  93. array(
  94. 'id' => 'iro_logo',
  95. 'type' => 'upload',
  96. 'title' => __('Navigation Menu Logo','sakurairo_csf'),
  97. 'desc' => __('The best size is 40px, and the nav menu text logo will not be displayed after filling in','sakurairo_csf'),
  98. 'library' => 'image',
  99. ),
  100. array(
  101. 'id' => 'favicon_link',
  102. 'type' => 'text',
  103. 'title' => __('Site Icon','sakurairo_csf'),
  104. 'desc' => __('Fill in the address, which decides the icon next to the title above the browser','sakurairo_csf'),
  105. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/favicon.ico'
  106. ),
  107. array(
  108. 'id' => 'iro_meta',
  109. 'type' => 'switcher',
  110. 'title' => __('Custom Site Keywords and Descriptions','sakurairo_csf'),
  111. 'label' => __('After turning on, you can customize the site keywords and descriptions','sakurairo_csf'),
  112. 'default' => false
  113. ),
  114. array(
  115. 'id' => 'iro_meta_keywords',
  116. 'type' => 'text',
  117. 'title' => __('Site Keywords','sakurairo_csf'),
  118. 'dependency' => array( 'iro_meta', '==', 'true', '', 'true' ),
  119. 'desc' => __('The keywords should be separated with half width comma "," and it\'s better to set within 5 keywords','sakurairo_csf'),
  120. ),
  121. array(
  122. 'id' => 'iro_meta_description',
  123. 'type' => 'text',
  124. 'title' => __('Site Descriptions','sakurairo_csf'),
  125. 'dependency' => array( 'iro_meta', '==', 'true', '', 'true' ),
  126. 'desc' => __('Use concise words to describe the site, it is recommended to write within 120 words','sakurairo_csf'),
  127. ),
  128. )
  129. ) );
  130. Sakurairo_CSF::createSection( $prefix, array(
  131. 'id' => 'global',
  132. 'title' => __('Global Options','sakurairo_csf'),
  133. 'icon' => 'fa fa-globe',
  134. ) );
  135. Sakurairo_CSF::createSection( $prefix, array(
  136. 'parent' => 'global',
  137. 'title' => __('Appearance Options','sakurairo_csf'),
  138. 'icon' => 'fa fa-tree',
  139. 'fields' => array(
  140. array(
  141. 'type' => 'submessage',
  142. 'style' => 'info',
  143. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E5%A4%96%E8%A7%82%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  144. ),
  145. array(
  146. 'type' => 'subheading',
  147. 'content' => __('Color Schemes','sakurairo_csf'),
  148. ),
  149. array(
  150. 'id' => 'theme_skin',
  151. 'type' => 'color',
  152. 'title' => __('Theme Color','sakurairo_csf'),
  153. 'desc' => __('Customize the colors','sakurairo_csf'),
  154. 'default' => '#505050'
  155. ),
  156. array(
  157. 'id' => 'theme_skin_matching',
  158. 'type' => 'color',
  159. 'title' => __('Matching Color','sakurairo_csf'),
  160. 'desc' => __('Customize the colors','sakurairo_csf'),
  161. 'default' => '#F9D938'
  162. ),
  163. array(
  164. 'type' => 'subheading',
  165. 'content' => __('Dark Mode','sakurairo_csf'),
  166. ),
  167. array(
  168. 'id' => 'theme_skin_dark',
  169. 'type' => 'color',
  170. 'title' => __('Dark Mode Theme Color','sakurairo_csf'),
  171. 'desc' => __('Customize the colors','sakurairo_csf'),
  172. 'default' => '#FCCD00'
  173. ),
  174. array(
  175. 'id' => 'theme_darkmode_auto',
  176. 'type' => 'switcher',
  177. 'title' => __('Automatically Switch to Dark Mode','sakurairo_csf'),
  178. 'label' => __('Default on','sakurairo_csf'),
  179. 'default' => true
  180. ),
  181. array(
  182. 'type' => 'content',
  183. 'content' => __(
  184. '<p><strong>Client local time:</strong>Dark mode will switch on automatically from 22:00 to 7:00</p>'
  185. .'<p><strong>Follow client settings:</strong>Follow client browser settings</p>'
  186. .'<p><strong>Always on:</strong>Always on, except being configured by the client</p>','sakurairo_csf'),
  187. 'dependency' => array( 'theme_darkmode_auto', '==', 'true', '', 'true' ),
  188. ),
  189. array(
  190. 'id' => 'theme_darkmode_strategy',
  191. 'type' => 'select',
  192. 'title' => __('Automatic Switch Strategy of Dark Mode','sakurairo_csf'),
  193. 'dependency' => array( 'theme_darkmode_auto', '==', 'true', '', 'true' ),
  194. 'options' => array(
  195. 'time' => __('Client local time','sakurairo_csf'),
  196. 'client' => __('Follow client settings','sakurairo_csf'),
  197. 'eien' => __('Always on','sakurairo_csf'),
  198. ),
  199. "default"=>"time"
  200. ),
  201. array(
  202. 'id' => 'theme_darkmode_img_bright',
  203. 'type' => 'slider',
  204. 'title' => __('Dark Mode Image Brightness','sakurairo_csf'),
  205. 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8','sakurairo_csf'),
  206. 'step' => '0.01',
  207. 'min' => '0.4',
  208. 'max' => '1',
  209. 'default' => '0.8'
  210. ),
  211. array(
  212. 'id' => 'theme_darkmode_widget_transparency',
  213. 'type' => 'slider',
  214. 'title' => __('Dark Mode Component Transparency','sakurairo_csf'),
  215. 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8','sakurairo_csf'),
  216. 'step' => '0.01',
  217. 'min' => '0.2',
  218. 'max' => '1',
  219. 'default' => '0.8'
  220. ),
  221. array(
  222. 'id' => 'theme_darkmode_background_transparency',
  223. 'type' => 'slider',
  224. 'title' => __('Dark mode Background Transparency','sakurairo_csf'),
  225. 'desc' => __('Slide to adjust, the recommended value range is 0.6-0.8. In order to ensure the best appearance, please keep the display of the frontend background image','sakurairo_csf'),
  226. 'step' => '0.01',
  227. 'min' => '0.2',
  228. 'max' => '1',
  229. 'default' => '0.8'
  230. ),
  231. array(
  232. 'type' => 'subheading',
  233. 'content' => __('Other Appearance Related','sakurairo_csf'),
  234. ),
  235. array(
  236. 'id' => 'theme_commemorate_mode',
  237. 'type' => 'switcher',
  238. 'title' => __('Commemorate Mode','sakurairo_csf'),
  239. 'label' => __('After turning on, a black and white filter will be added to the global theme','sakurairo_csf'),
  240. 'default' => false
  241. ),
  242. array(
  243. 'id' => 'load_out_svg',
  244. 'type' => 'text',
  245. 'title' => __('Occupying SVG while Loading Control Units','sakurairo_csf'),
  246. 'desc' => __('Fill in the address, which is the SVG displayed when loading control units','sakurairo_csf'),
  247. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/outload.svg'
  248. ),
  249. )
  250. ) );
  251. Sakurairo_CSF::createSection( $prefix, array(
  252. 'parent' => 'global',
  253. 'title' => __('Font Options','sakurairo_csf'),
  254. 'icon' => 'fa fa-font',
  255. 'fields' => array(
  256. array(
  257. 'type' => 'submessage',
  258. 'style' => 'info',
  259. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E5%AD%97%E4%BD%93%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  260. ),
  261. array(
  262. 'type' => 'subheading',
  263. 'content' => __('Global','sakurairo_csf'),
  264. ),
  265. array(
  266. 'id' => 'global_font_weight',
  267. 'type' => 'slider',
  268. 'title' => __('Non-Emphasis Text Weight','sakurairo_csf'),
  269. 'desc' => __('Slide to adjust, the recommended value range is 300-500','sakurairo_csf'),
  270. 'step' => '10',
  271. 'min' => '100',
  272. 'max' => '700',
  273. 'default' => '300'
  274. ),
  275. array(
  276. 'id' => 'global_font_size',
  277. 'type' => 'slider',
  278. 'title' => __('Text Font Size','sakurairo_csf'),
  279. 'desc' => __('Slide to adjust, the recommended value range is 15-18','sakurairo_csf'),
  280. 'step' => '1',
  281. 'unit' => 'px',
  282. 'min' => '10',
  283. 'max' => '20',
  284. 'default' => '15'
  285. ),
  286. array(
  287. 'type' => 'subheading',
  288. 'content' => __('External Fonts','sakurairo_csf'),
  289. ),
  290. array(
  291. 'id' => 'reference_exter_font',
  292. 'type' => 'switcher',
  293. 'title' => __('Reference External Fonts','sakurairo_csf'),
  294. 'label' => __('After turning on, you can use external fonts as the default font or other component fonts, but it may affect performance','sakurairo_csf'),
  295. 'default' => false
  296. ),
  297. array(
  298. 'id' => 'exter_font',
  299. 'type' => 'fieldset',
  300. 'title' => __('External Font Options','sakurairo_csf'),
  301. 'dependency' => array( 'reference_exter_font', '==', 'true', '', 'true' ),
  302. 'fields' => array(
  303. array(
  304. 'id' => 'font1',
  305. 'type' => 'text',
  306. 'title' => __('Font 1 Name','sakurairo_csf'),
  307. ),
  308. array(
  309. 'id' => 'link1',
  310. 'type' => 'text',
  311. 'title' => __('Font 1 Link','sakurairo_csf'),
  312. ),
  313. array(
  314. 'id' => 'font2',
  315. 'type' => 'text',
  316. 'title' => __('Font 2 Name','sakurairo_csf'),
  317. ),
  318. array(
  319. 'id' => 'link2',
  320. 'type' => 'text',
  321. 'title' => __('Font 2 Link','sakurairo_csf'),
  322. ),
  323. ),
  324. 'default' => array(
  325. 'font1' => '',
  326. 'link1' => '',
  327. 'font2' => '',
  328. 'link2' => '',
  329. ),
  330. ),
  331. array(
  332. 'id' => 'gfonts_api',
  333. 'type' => 'text',
  334. 'title' => __('Google Fonts Api Link','sakurairo_csf'),
  335. 'default' => 'cdn2.tianli0.top/fonts'
  336. ),
  337. array(
  338. 'id' => 'gfonts_add_name',
  339. 'type' => 'text',
  340. 'title' => __('Google Fonts Name','sakurairo_csf'),
  341. 'desc' => __('Please make sure that the added fonts can be referenced in Google Fonts library. Fill in the font names. The added fonts must be preceded by "|". If multiple fonts are referenced, use "|" as the separator. If the font name has spaces, use a plus sign instead. For example: | zcool + xiaowei| Ma + Shan + Zheng','sakurairo_csf'),
  342. ),
  343. )
  344. ) );
  345. Sakurairo_CSF::createSection( $prefix, array(
  346. 'parent' => 'global',
  347. 'title' => __('Navigation Menu Options','sakurairo_csf'),
  348. 'icon' => 'fa fa-map-signs',
  349. 'fields' => array(
  350. array(
  351. 'type' => 'submessage',
  352. 'style' => 'info',
  353. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E5%AF%BC%E8%88%AA%E8%8F%9C%E5%8D%95%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  354. ),
  355. array(
  356. 'id' => 'nav_menu_style',
  357. 'type' => 'image_select',
  358. 'title' => __('Nav Menu Style','sakurairo_csf'),
  359. 'options' => array(
  360. 'sakurairo' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/nav_menu_style_iro.webp',
  361. 'sakura' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/nav_menu_style_sakura.webp',
  362. ),
  363. 'default' => 'sakurairo'
  364. ),
  365. array(
  366. 'id' => 'nav_menu_radius',
  367. 'type' => 'slider',
  368. 'title' => __('Nav Menu Radius','sakurairo_csf'),
  369. 'dependency' => array( 'nav_menu_style', '==', 'sakurairo', '', 'true' ),
  370. 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'),
  371. 'unit' => 'px',
  372. 'max' => '50',
  373. 'default' => '15'
  374. ),
  375. array(
  376. 'id' => 'nav_menu_display',
  377. 'type' => 'radio',
  378. 'title' => __('Nav Menu Content Display Method','sakurairo_csf'),
  379. 'desc' => __('You can choose to unfold or fold the nav menu contents','sakurairo_csf'),
  380. 'options' => array(
  381. 'unfold' => __('Unfold','sakurairo_csf'),
  382. 'fold' => __('Fold','sakurairo_csf'),
  383. ),
  384. 'default' => 'unfold'
  385. ),
  386. array(
  387. 'id' => 'nav_menu_animation',
  388. 'type' => 'switcher',
  389. 'title' => __('Nav Menu Animation Effects','sakurairo_csf'),
  390. 'label' => __('It is on by default. If it is off, the nav menu content will be displayed directly without effects','sakurairo_csf'),
  391. 'default' => true
  392. ),
  393. array(
  394. 'id' => 'nav_menu_animation_time',
  395. 'type' => 'slider',
  396. 'title' => __('Nav Menu Animation Time','sakurairo_csf'),
  397. 'dependency' => array( 'nav_menu_animation', '==', 'true', '', 'true' ),
  398. 'desc' => __('Slide to adjust, the recommended value range is 1-2','sakurairo_csf'),
  399. 'step' => '0.01',
  400. 'unit' => 's',
  401. 'max' => '5',
  402. 'default' => '2'
  403. ),
  404. array(
  405. 'id' => 'nav_menu_font',
  406. 'type' => 'text',
  407. 'title' => __('Nav Menu Font','sakurairo_csf'),
  408. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  409. 'default' => 'Noto Serif SC'
  410. ),
  411. array(
  412. 'id' => 'nav_menu_search',
  413. 'type' => 'switcher',
  414. 'title' => __('Nav Menu Search','sakurairo_csf'),
  415. 'label' => __('It is on by default. Click to enter the search area','sakurairo_csf'),
  416. 'default' => true
  417. ),
  418. array(
  419. 'id' => 'search_area_background',
  420. 'type' => 'upload',
  421. 'title' => __('Search Area Background Image','sakurairo_csf'),
  422. 'desc' => __('Set the background image of your search area. Leave this option blank to display a white background','sakurairo_csf'),
  423. 'dependency' => array( 'nav_menu_search', '==', 'true', '', 'true' ),
  424. 'library' => 'image',
  425. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/iloli.gif'
  426. ),
  427. array(
  428. 'id' => 'nav_menu_user_avatar',
  429. 'type' => 'switcher',
  430. 'title' => __('Nav Menu User Avatar','sakurairo_csf'),
  431. 'label' => __('It is on by default. Click to enter the login interface','sakurairo_csf'),
  432. 'default' => true
  433. ),
  434. array(
  435. 'id' => 'unlisted_avatar',
  436. 'type' => 'upload',
  437. 'title' => __('Nav Menu Unlisted User Avatar','sakurairo_csf'),
  438. 'dependency' => array( 'nav_menu_user_avatar', '==', 'true', '', 'true' ),
  439. 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'),
  440. 'library' => 'image',
  441. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/basic/topavatar.png'
  442. ),
  443. array(
  444. 'id' => 'nav_menu_secondary_arrow',
  445. 'type' => 'switcher',
  446. 'title' => __('Secondary Menu Prompt Arrow','sakurairo_csf'),
  447. 'label' => __('After turning on, the menu prompt arrow will appear in the secondary menu of the navigation menu','sakurairo_csf'),
  448. 'default' => false
  449. ),
  450. array(
  451. 'id' => 'nav_menu_secondary_radius',
  452. 'type' => 'slider',
  453. 'title' => __('Secondary Menu Radius','sakurairo_csf'),
  454. 'dependency' => array( 'nav_menu_style', '==', 'sakurairo', '', 'true' ),
  455. 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'),
  456. 'unit' => 'px',
  457. 'max' => '30',
  458. 'default' => '15'
  459. ),
  460. array(
  461. 'id' => 'mashiro_logo_option',
  462. 'type' => 'switcher',
  463. 'title' => __('Mashiro Logo Style','sakurairo_csf'),
  464. 'label' => __('After turning on, the Mashiro Logo will appear and replace the navigation menu logo position','sakurairo_csf'),
  465. 'default' => false
  466. ),
  467. array(
  468. 'id' => 'mashiro_logo',
  469. 'type' => 'fieldset',
  470. 'title' => __('Nav Menu Text Logo Options','sakurairo_csf'),
  471. 'dependency' => array( 'mashiro_logo_option', '==', 'true', '', 'true' ),
  472. 'fields' => array(
  473. array(
  474. 'id' => 'text_a',
  475. 'type' => 'text',
  476. 'title' => __('Text A','sakurairo_csf'),
  477. ),
  478. array(
  479. 'id' => 'text_b',
  480. 'type' => 'text',
  481. 'title' => __('Text B','sakurairo_csf'),
  482. ),
  483. array(
  484. 'id' => 'text_c',
  485. 'type' => 'text',
  486. 'title' => __('Text C','sakurairo_csf'),
  487. ),
  488. array(
  489. 'id' => 'text_secondary',
  490. 'type' => 'text',
  491. 'title' => __('Secondary Text','sakurairo_csf'),
  492. 'dependency' => array( 'text_b', '!=', '', '', 'true' ),
  493. ),
  494. array(
  495. 'id' => 'font_name',
  496. 'type' => 'text',
  497. 'title' => __('Font Name','sakurairo_csf'),
  498. ),
  499. ),
  500. 'default' => array(
  501. 'text_a' => '',
  502. 'text_b' => '',
  503. 'text_c' => '',
  504. 'text_secondary' => '',
  505. 'font_name' => 'Noto Serif SC',
  506. ),
  507. ),
  508. )
  509. ) );
  510. Sakurairo_CSF::createSection( $prefix, array(
  511. 'parent' => 'global',
  512. 'title' => __('Widgets Panel and Frontend Related Options','sakurairo_csf'),
  513. 'icon' => 'fa fa-th-large',
  514. 'fields' => array(
  515. array(
  516. 'type' => 'submessage',
  517. 'style' => 'info',
  518. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E6%A0%B7%E5%BC%8F%E8%8F%9C%E5%8D%95%E5%92%8C%E5%89%8D%E5%8F%B0%E8%83%8C%E6%99%AF%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  519. ),
  520. array(
  521. 'type' => 'subheading',
  522. 'content' => __('Widgets Panel','sakurairo_csf'),
  523. ),
  524. array(
  525. 'id' => 'style_menu_radius',
  526. 'type' => 'slider',
  527. 'title' => __('Widgets Panel Button Radius','sakurairo_csf'),
  528. 'desc' => __('Slide to adjust, the recommended value is 10','sakurairo_csf'),
  529. 'unit' => 'px',
  530. 'max' => '50',
  531. 'default' => '10'
  532. ),
  533. array(
  534. 'id' => 'style_menu_selection_radius',
  535. 'type' => 'slider',
  536. 'title' => __('Widgets Panel Widget Radius','sakurairo_csf'),
  537. 'desc' => __('Slide to adjust, the recommended value is 10','sakurairo_csf'),
  538. 'unit' => 'px',
  539. 'max' => '30',
  540. 'default' => '10'
  541. ),
  542. array(
  543. 'id' => 'style_menu_font',
  544. 'type' => 'text',
  545. 'title' => __('Widgets Panel Font','sakurairo_csf'),
  546. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  547. 'default' => 'Noto Serif SC'
  548. ),
  549. array(
  550. 'id' => 'sakura_widget',
  551. 'type' => 'switcher',
  552. 'title' => __('Widgets Panel WP Widget Area','sakurairo_csf'),
  553. 'label' => __('When turned on, the WP Widget Area will be displayed in Widgets Panel','sakurairo_csf'),
  554. 'default' => false
  555. ),
  556. array(
  557. 'id' => 'widget_shuo',
  558. 'type' => 'switcher',
  559. 'title' => __('Widgets Panel Shuoshuo','sakurairo_csf'),
  560. 'label' => __('When turned on, the Latest Shuoshuo text will be displayed in Widgets Panel','sakurairo_csf'),
  561. 'default' => false
  562. ),
  563. array(
  564. 'id' => 'widget_daynight',
  565. 'type' => 'switcher',
  566. 'title' => __('Widgets Panel Day&Night Switching','sakurairo_csf'),
  567. 'label' => __('Enabled by default, the Day&Night Switching will be displayed in Widgets Panel','sakurairo_csf'),
  568. 'default' => true
  569. ),
  570. array(
  571. 'id' => 'widget_font',
  572. 'type' => 'switcher',
  573. 'title' => __('Widgets Panel Font Switching','sakurairo_csf'),
  574. 'label' => __('Enabled by default, the Font Switching will be displayed in Widgets Panel','sakurairo_csf'),
  575. 'default' => true
  576. ),
  577. array(
  578. 'type' => 'subheading',
  579. 'content' => __('Frontend Background','sakurairo_csf'),
  580. ),
  581. array(
  582. 'id' => 'reception_background_size',
  583. 'type' => 'select',
  584. 'options' => array(
  585. 'cover' => __('Cover','sakurairo_csf'),
  586. 'contain' => __('Contain','sakurairo_csf'),
  587. 'auto' => __('Auto','sakurairo_csf'),
  588. ),
  589. 'title' => __('Frontend Background Scaling Method','sakurairo_csf'),
  590. 'desc' => __('You can choose two ways to scale the frontend background, the default is auto-scaling','sakurairo_csf'),
  591. 'default' => 'auto'
  592. ),
  593. array(
  594. 'id' => 'reception_background_blur',
  595. 'type' => 'switcher',
  596. 'title' => __('Background Transparency Blur','sakurairo_csf'),
  597. 'label' => __('After opening Background Transparency Blur','sakurairo_csf'),
  598. 'default' => false
  599. ),
  600. array(
  601. 'id' => 'reception_background',
  602. 'type' => 'tabbed',
  603. 'title' => __('Widgets Panel Background Switching(Frontend Background)','sakurairo_csf'),
  604. 'tabs' => array(
  605. array(
  606. 'title' => __('Default','sakurairo_csf'),
  607. 'icon' => 'fa fa-television',
  608. 'fields' => array(
  609. array(
  610. 'id' => 'img1',
  611. 'type' => 'upload',
  612. 'title' => __('Image','sakurairo_csf'),
  613. ),
  614. )
  615. ),
  616. array(
  617. 'title' => __('Heart Shaped','sakurairo_csf'),
  618. 'icon' => 'fa fa-heart-o',
  619. 'fields' => array(
  620. array(
  621. 'id' => 'heart_shaped',
  622. 'type' => 'switcher',
  623. 'title' => __('Switch','sakurairo_csf'),
  624. ),
  625. array(
  626. 'id' => 'img2',
  627. 'type' => 'upload',
  628. 'title' => __('Image','sakurairo_csf'),
  629. ),
  630. )
  631. ),
  632. array(
  633. 'title' => __('Star Shaped','sakurairo_csf'),
  634. 'icon' => 'fa fa-star-o',
  635. 'fields' => array(
  636. array(
  637. 'id' => 'star_shaped',
  638. 'type' => 'switcher',
  639. 'title' => __('Switch','sakurairo_csf'),
  640. ),
  641. array(
  642. 'id' => 'img3',
  643. 'type' => 'upload',
  644. 'title' => __('Image','sakurairo_csf'),
  645. ),
  646. )
  647. ),
  648. array(
  649. 'title' => __('Square Shaped','sakurairo_csf'),
  650. 'icon' => 'fa fa-delicious',
  651. 'fields' => array(
  652. array(
  653. 'id' => 'square_shaped',
  654. 'type' => 'switcher',
  655. 'title' => __('Switch','sakurairo_csf'),
  656. ),
  657. array(
  658. 'id' => 'img4',
  659. 'type' => 'upload',
  660. 'title' => __('Image','sakurairo_csf'),
  661. ),
  662. )
  663. ),
  664. array(
  665. 'title' => __('Lemon Shaped','sakurairo_csf'),
  666. 'icon' => 'fa fa-lemon-o',
  667. 'fields' => array(
  668. array(
  669. 'id' => 'lemon_shaped',
  670. 'type' => 'switcher',
  671. 'title' => __('Switch','sakurairo_csf'),
  672. ),
  673. array(
  674. 'id' => 'img5',
  675. 'type' => 'upload',
  676. 'title' => __('Image','sakurairo_csf'),
  677. ),
  678. )
  679. ),
  680. ),
  681. 'default' => array(
  682. 'heart_shaped' => true,
  683. 'star_shaped' => true,
  684. 'square_shaped' => true,
  685. 'lemon_shaped' => true,
  686. 'img2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg1.png',
  687. 'img3' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg2.png',
  688. 'img4' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg3.png',
  689. 'img5' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/background/bg4.png',
  690. )
  691. ),
  692. array(
  693. 'id' => 'reception_background_transparency',
  694. 'type' => 'slider',
  695. 'title' => __('Background Transparency in the Frontend','sakurairo_csf'),
  696. 'desc' => __('Slide to adjust, the recommended sliding value range is 0.6-0.8','sakurairo_csf'),
  697. 'step' => '0.01',
  698. 'min' => '0.2',
  699. 'max' => '1',
  700. 'default' => '0.8'
  701. ),
  702. array(
  703. 'type' => 'subheading',
  704. 'content' => __('Frontend Font','sakurairo_csf'),
  705. ),
  706. array(
  707. 'id' => 'global_default_font',
  708. 'type' => 'text',
  709. 'title' => __('Global Default Font/Widgets Panel Font Switching A','sakurairo_csf'),
  710. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  711. ),
  712. array(
  713. 'id' => 'global_font_2',
  714. 'type' => 'text',
  715. 'title' => __('Widgets Panel Font Switching B','sakurairo_csf'),
  716. 'dependency' => array( 'widget_font', '==', 'true', '', 'true' ),
  717. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  718. ),
  719. )
  720. ) );
  721. Sakurairo_CSF::createSection( $prefix, array(
  722. 'parent' => 'global',
  723. 'title' => __('Footer Options','sakurairo_csf'),
  724. 'icon' => 'fa fa-caret-square-o-down',
  725. 'fields' => array(
  726. array(
  727. 'type' => 'submessage',
  728. 'style' => 'info',
  729. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E9%A1%B5%E5%B0%BE%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  730. ),
  731. array(
  732. 'id' => 'aplayer_server',
  733. 'type' => 'select',
  734. 'title' => __('Footer Online Music Player','sakurairo_csf'),
  735. 'desc' => __('A button will appear at the bottom left corner of the footer after turning on, click it and the footer online player will be displayed','sakurairo_csf'),
  736. 'options' => array(
  737. 'off' => __('Off','sakurairo_csf'),
  738. 'netease' => __('Netease Cloud Music','sakurairo_csf'),
  739. 'kugou' => __('Kugou Music(may not be available)','sakurairo_csf'),
  740. 'baidu' => __('Baidu Music(not available on servers overseas)','sakurairo_csf'),
  741. 'tencent' => __('QQ Music(may not be available)','sakurairo_csf'),
  742. ),
  743. 'default' => 'off'
  744. ),
  745. array(
  746. 'id' => 'aplayer_server_proxy',
  747. 'type' => 'text',
  748. 'title' => __('Footer Online Music Player Proxy','sakurairo_csf'),
  749. 'dependency' => array( 'aplayer_server', '!=', 'off', '', 'true' ),
  750. 'desc' => __('Ex. http://127.0.0.1:8080. Reference: https://curl.se/libcurl/c/CURLOPT_PROXY.html','sakurairo_csf'),
  751. 'default' => ''
  752. ),
  753. array(
  754. 'id' => 'aplayer_playlistid',
  755. 'type' => 'text',
  756. 'title' => __('Footer Online Music Player Songlist ID','sakurairo_csf'),
  757. 'dependency' => array( 'aplayer_server', '!=', 'off', '', 'true' ),
  758. 'desc' => __('Fill in the song ID, e.g. https://music.163.com/#/playlist?id=5380675133 SongID:5380675133','sakurairo_csf'),
  759. 'default' => '5380675133'
  760. ),
  761. array(
  762. 'id' => 'aplayer_order',
  763. 'type' => 'select',
  764. 'title' => __('Footer Online Music Player Mode','sakurairo_csf'),
  765. 'dependency' => array( 'aplayer_server', '!=', 'off', '', 'true' ),
  766. 'desc' => __('Select music player mode','sakurairo_csf'),
  767. 'options' => array(
  768. 'list' => __('List','sakurairo_csf'),
  769. 'random' => __('Random','sakurairo_csf'),
  770. ),
  771. 'default' => 'list'
  772. ),
  773. array(
  774. 'id' => 'aplayer_preload',
  775. 'type' => 'select',
  776. 'title' => __('Footer Online Music Player Preload','sakurairo_csf'),
  777. 'dependency' => array( 'aplayer_server', '!=', 'off', '', 'true' ),
  778. 'desc' => __('Whether to preload songs','sakurairo_csf'),
  779. 'options' => array(
  780. 'none' => __('Off','sakurairo_csf'),
  781. 'metadata' => __('Preload Metadata','sakurairo_csf'),
  782. 'auto' => __('Auto','sakurairo_csf'),
  783. ),
  784. 'default' => 'auto'
  785. ),
  786. array(
  787. 'id' => 'aplayer_volume',
  788. 'type' => 'slider',
  789. 'title' => __('Default Volume of Footer Online Music Player','sakurairo_csf'),
  790. 'dependency' => array( 'aplayer_server', '!=', 'off', '', 'true' ),
  791. 'desc' => __('Slide to adjust, the recommended sliding value range is 0.4-0.6','sakurairo_csf'),
  792. 'step' => '0.01',
  793. 'max' => '1',
  794. 'default' => '0.5'
  795. ),
  796. array(
  797. 'id' => 'aplayer_cookie',
  798. 'type' => 'textarea',
  799. 'title' => __('Netease Cloud Music Cookies','sakurairo_csf'),
  800. 'dependency' => array( 'aplayer_server', '==', 'netease', '', 'true' ),
  801. 'desc' => __('If you want to play VIP music on Netease Cloud Music Platform, please fill in your account cookies in this option.','sakurairo_csf'),
  802. ),
  803. array(
  804. 'id' => 'footer_sakura',
  805. 'type' => 'switcher',
  806. 'title' => __('Footer Sakura Icon','sakurairo_csf'),
  807. 'label' => __('Enabled by default, sakura icon will appear on the footer','sakurairo_csf'),
  808. 'default' => true
  809. ),
  810. array(
  811. 'id' => 'footer_info',
  812. 'type' => 'textarea',
  813. 'title' => __('Footer Info','sakurairo_csf'),
  814. 'desc' => __('Footer description text, supports HTML code','sakurairo_csf'),
  815. 'default' => 'Copyright &copy; by FUUKEI All Rights Reserved.'
  816. ),
  817. array(
  818. 'id' => 'footer_text_font',
  819. 'type' => 'text',
  820. 'title' => __('Footer Text Font','sakurairo_csf'),
  821. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  822. 'default' => 'Noto Serif SC'
  823. ),
  824. array(
  825. 'id' => 'footer_load_occupancy',
  826. 'type' => 'switcher',
  827. 'title' => __('Footer Load Occupancy Query','sakurairo_csf'),
  828. 'label' => __('Load occupancy information will appear at the end of the page after turning it on. Not recommended in production environment.','sakurairo_csf'),
  829. 'default' => false
  830. ),
  831. array(
  832. 'id' => 'footer_upyun',
  833. 'type' => 'switcher',
  834. 'title' => __('Footer Upyun League Logo','sakurairo_csf'),
  835. 'label' => __('Upyun Logo will appear at the end of the page after turning it on','sakurairo_csf'),
  836. 'default' => false
  837. ),
  838. array(
  839. 'id'=>'footer_addition',
  840. 'type' => 'code_editor',
  841. 'sanitize' => false,
  842. 'title' => __('Footer Addition','sakurairo_csf'),
  843. 'desc' => __('Add HTML code at the end of the page. Useful for adding customize JavaScript.','sakurairo_csf'),
  844. ),
  845. array(
  846. 'type' => 'subheading',
  847. 'content' => __('Hitokoto','sakurairo_csf'),
  848. ),
  849. array(
  850. 'id' => 'footer_yiyan',
  851. 'type' => 'switcher',
  852. 'title' => __('Footer Hitokoto','sakurairo_csf'),
  853. 'label' => __('Hitokoto will appear at the end of the page after turning it on','sakurairo_csf'),
  854. 'default' => false
  855. ),
  856. array(
  857. 'type' => 'content',
  858. 'dependency' => array( 'footer_yiyan', '==', 'true', '', 'true' ),
  859. 'content' => __('<h4>Hitokoto API Setup Instructions</h4>'
  860. .' <p>Fill in as the example:<code> ["https://api.nmxc.ltd/yiyan/", "https://v1.hitokoto.cn/"]</code>, where the first API will be used first and the next ones will be the backup. </p>'
  861. .' <p><strong>Official API:</strong> See the <a href="https://developer.hitokoto.cn/sentence/"> documentation</a> for how to use it, and the parameter "return code" should not be anything except JSON. <a href="https://v1.hitokoto.cn/">https://v1.hitokoto.cn/</a></p>'
  862. .' <p><strong>Maho API:</strong> An reverse proxy mirror of the official API. <a href="https://api.nmxc.ltd/yiyan/">https://api.nmxc.ltd/yiyan/</a></p>','sakurairo_csf'),
  863. ),
  864. array(
  865. 'id' => 'yiyan_api',
  866. 'type' => 'textarea',
  867. 'title' => __('Hitokoto API address','sakurairo_csf'),
  868. 'dependency' => array( 'footer_yiyan', '==', 'true', '', 'true' ),
  869. 'desc' => __('Fill in the address in JavaScript array format','sakurairo_csf'),
  870. 'default' => '["https://v1.hitokoto.cn/","https://api.nmxc.ltd/yiyan/"]'
  871. ),
  872. )
  873. ) );
  874. Sakurairo_CSF::createSection( $prefix, array(
  875. 'parent' => 'global',
  876. 'title' => __('Cursor Options','sakurairo_csf'),
  877. 'icon' => 'fa fa-i-cursor',
  878. 'fields' => array(
  879. array(
  880. 'type' => 'submessage',
  881. 'style' => 'info',
  882. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E5%85%89%E6%A0%87%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  883. ),
  884. array(
  885. 'id' => 'cursor_nor',
  886. 'type' => 'text',
  887. 'title' => __('Standard Cursor Style','sakurairo_csf'),
  888. 'desc' => __('Apply to global, fill in ".cur" mouse file link','sakurairo_csf'),
  889. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/normal.cur'
  890. ),
  891. array(
  892. 'id' => 'cursor_no',
  893. 'type' => 'text',
  894. 'title' => __('Selected Cursor Style','sakurairo_csf'),
  895. 'desc' => __('Apply to multiple styles, fill in ".cur" file link','sakurairo_csf'),
  896. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/No_Disponible.cur'
  897. ),
  898. array(
  899. 'id' => 'cursor_ayu',
  900. 'type' => 'text',
  901. 'title' => __('Selected Control Unit Cursor Style','sakurairo_csf'),
  902. 'desc' => __('Apply to selected control unit, fill in ".cur" file link','sakurairo_csf'),
  903. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/ayuda.cur'
  904. ),
  905. array(
  906. 'id' => 'cursor_text',
  907. 'type' => 'text',
  908. 'title' => __('Selected Text Cursor Style','sakurairo_csf'),
  909. 'desc' => __('Apply to selected text, fill in ".cur" file link','sakurairo_csf'),
  910. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/texto.cur'
  911. ),
  912. array(
  913. 'id' => 'cursor_work',
  914. 'type' => 'text',
  915. 'title' => __('Work Status Cursor Style','sakurairo_csf'),
  916. 'desc' => __('Apply to load control unit, fill in ".cur" file link','sakurairo_csf'),
  917. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/cursor/work.cur'
  918. ),
  919. )
  920. ) );
  921. Sakurairo_CSF::createSection( $prefix, array(
  922. 'parent' => 'global',
  923. 'title' => __('Additional Options','sakurairo_csf'),
  924. 'icon' => 'fa fa-gift',
  925. 'fields' => array(
  926. array(
  927. 'type' => 'submessage',
  928. 'style' => 'info',
  929. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Global/#%E9%A2%9D%E5%A4%96%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  930. ),
  931. array(
  932. 'type' => 'subheading',
  933. 'content' => __('Effects&Animations','sakurairo_csf'),
  934. ),
  935. array(
  936. 'id' => 'preload_animation',
  937. 'type' => 'switcher',
  938. 'title' => __('Preload Animation','sakurairo_csf'),
  939. 'label' => __('Preload animation before new pages load; To enable this option, ensure your page resources can load properly.' ,'sakurairo_csf'),
  940. 'default' => false
  941. ),
  942. array(
  943. 'id' => 'preload_animation_color1',
  944. 'type' => 'color',
  945. 'title' => __('Preload Animation Color A','sakurairo_csf'),
  946. 'dependency' => array( 'preload_animation', '==', 'true', '', 'true' ),
  947. 'desc' => __('Customize the colors','sakurairo_csf'),
  948. 'default' => '#ffea99'
  949. ),
  950. array(
  951. 'id' => 'preload_animation_color2',
  952. 'type' => 'color',
  953. 'title' => __('Preload Animation Color B','sakurairo_csf'),
  954. 'dependency' => array( 'preload_animation', '==', 'true', '', 'true' ),
  955. 'desc' => __('Customize the colors','sakurairo_csf'),
  956. 'default' => '#FCCD00'
  957. ),
  958. array(
  959. 'id' => 'preload_blur',
  960. 'title' => __('Preload Animation Blur Transition Effect','sakurairo_csf'),
  961. 'dependency' => array( 'preload_animation', '==', 'true', '', 'true' ),
  962. 'desc' => __('Blur transition duration in milliseconds ms, off when set to 0.' ,'sakurairo_csf'),
  963. 'default' => '0',
  964. 'type' => 'slider',
  965. 'step' => '10',
  966. 'max' => '10000',
  967. ),
  968. array(
  969. 'id' => 'sakura_falling_effects',
  970. 'type' => 'select',
  971. 'title' => __('Sakura Falling Effects','sakurairo_csf'),
  972. 'options' => array(
  973. 'off' => __('Off','sakurairo_csf'),
  974. 'native' => __('Native Quantity','sakurairo_csf'),
  975. 'quarter' => __('Quarter Quantity','sakurairo_csf'),
  976. 'half' => __('Half Quantity','sakurairo_csf'),
  977. 'less' => __('Less Quantity','sakurairo_csf'),
  978. ),
  979. 'default' => 'off'
  980. ),
  981. array(
  982. 'id' => 'particles_effects',
  983. 'type' => 'switcher',
  984. 'title' => __('Particles Effects','sakurairo_csf'),
  985. 'dependency' => array( 'sakura_falling_effects', '==', 'off', '', 'true' ),
  986. 'label' => __('Particles effects will appear in the global background. Please open the Cover-and-Frontend-Background-Integration Options to get the best experience','sakurairo_csf'),
  987. 'default' => false
  988. ),
  989. array(
  990. 'id'=> 'particles_json',
  991. 'type' => 'code_editor',
  992. 'sanitize' => false,
  993. 'title' => __('Particles JSON','sakurairo_csf'),
  994. 'dependency' => array( 'particles_effects', '==', 'true', '', 'true' ),
  995. 'desc' => __('You can go to the <a href="https://vincentgarreau.com/particles.js/">Project Address</a> to generate your unique Particles Effects','sakurairo_csf'),
  996. 'default' => '
  997. {
  998. "particles": {
  999. "number": {
  1000. "value": 200,
  1001. "density": {
  1002. "enable": true,
  1003. "value_area": 800
  1004. }
  1005. },
  1006. "color": {
  1007. "value": "#fff"
  1008. },
  1009. "shape": {
  1010. "type": "circle",
  1011. "stroke": {
  1012. "width": 0,
  1013. "color": "#000000"
  1014. },
  1015. "polygon": {
  1016. "nb_sides": 5
  1017. },
  1018. "image": {
  1019. "src": "img/github.svg",
  1020. "width": 100,
  1021. "height": 100
  1022. }
  1023. },
  1024. "opacity": {
  1025. "value": 0.5,
  1026. "random": true,
  1027. "anim": {
  1028. "enable": false,
  1029. "speed": 1,
  1030. "opacity_min": 0.1,
  1031. "sync": false
  1032. }
  1033. },
  1034. "size": {
  1035. "value": 10,
  1036. "random": true,
  1037. "anim": {
  1038. "enable": false,
  1039. "speed": 40,
  1040. "size_min": 0.1,
  1041. "sync": false
  1042. }
  1043. },
  1044. "line_linked": {
  1045. "enable": false,
  1046. "distance": 500,
  1047. "color": "#ffffff",
  1048. "opacity": 0.4,
  1049. "width": 2
  1050. },
  1051. "move": {
  1052. "enable": true,
  1053. "speed": 2,
  1054. "direction": "bottom",
  1055. "random": false,
  1056. "straight": false,
  1057. "out_mode": "out",
  1058. "bounce": false,
  1059. "attract": {
  1060. "enable": false,
  1061. "rotateX": 600,
  1062. "rotateY": 1200
  1063. }
  1064. }
  1065. },
  1066. "interactivity": {
  1067. "detect_on": "canvas",
  1068. "events": {
  1069. "onhover": {
  1070. "enable": true,
  1071. "mode": "bubble"
  1072. },
  1073. "onclick": {
  1074. "enable": true,
  1075. "mode": "repulse"
  1076. },
  1077. "resize": true
  1078. },
  1079. "modes": {
  1080. "grab": {
  1081. "distance": 400,
  1082. "line_linked": {
  1083. "opacity": 0.5
  1084. }
  1085. },
  1086. "bubble": {
  1087. "distance": 400,
  1088. "size": 4,
  1089. "duration": 0.3,
  1090. "opacity": 1,
  1091. "speed": 3
  1092. },
  1093. "repulse": {
  1094. "distance": 200,
  1095. "duration": 0.4
  1096. },
  1097. "push": {
  1098. "particles_nb": 4
  1099. },
  1100. "remove": {
  1101. "particles_nb": 2
  1102. }
  1103. }
  1104. },
  1105. "retina_detect": true
  1106. }'
  1107. ),
  1108. array(
  1109. 'id' => 'note_effects',
  1110. 'type' => 'switcher',
  1111. 'title' => __('Note Touch Effects','sakurairo_csf'),
  1112. 'label' => __('After turning on, there will be a note sound alert when the back to top button and Mashiro style logo touch','sakurairo_csf'),
  1113. 'default' => false
  1114. ),
  1115. array(
  1116. 'type' => 'subheading',
  1117. 'content' => __('Feature','sakurairo_csf'),
  1118. ),
  1119. array(
  1120. 'id' => 'poi_pjax',
  1121. 'type' => 'switcher',
  1122. 'title' => __('PJAX Partial Refresh','sakurairo_csf'),
  1123. 'label' => __('Enabled by default, clicking to a new page will not require reloading','sakurairo_csf'),
  1124. 'default' => true
  1125. ),
  1126. array(
  1127. 'id' => 'nprogress_on',
  1128. 'type' => 'switcher',
  1129. 'title' => __('NProgress Loading Progress Bar','sakurairo_csf'),
  1130. 'label' => __('Enabled by default, when loading page there will be a progress bar alert','sakurairo_csf'),
  1131. 'default' => true
  1132. ),
  1133. array(
  1134. 'id' => 'smoothscroll_option',
  1135. 'type' => 'switcher',
  1136. 'title' => __('Global Smooth Scroll','sakurairo_csf'),
  1137. 'label' => __('Enabled by default, page scrolling will be smoother','sakurairo_csf'),
  1138. 'default' => true
  1139. ),
  1140. array(
  1141. 'id' => 'captcha_select',
  1142. 'type' => 'select',
  1143. 'title' => __('Captcha Selection','sakurairo_csf'),
  1144. 'options' => array(
  1145. 'off' => __('Off','sakurairo_csf'),
  1146. 'iro_captcha' => __('Theme Built in Captcha','sakurairo_csf'),
  1147. 'vaptcha' => __('Vaptcha','sakurairo_csf')
  1148. ),
  1149. 'default' => 'off',
  1150. ),
  1151. array(
  1152. 'id' => 'vaptcha_vid',
  1153. 'type' => 'text',
  1154. 'title' => __('Vaptcha VID','sakurairo_csf'),
  1155. 'dependency' => array( 'captcha_select', '==', 'vaptcha', '', 'true' ),
  1156. 'desc' => __('Fill in your Vaptcha VID','sakurairo_csf'),
  1157. ),
  1158. array(
  1159. 'id' => 'vaptcha_key',
  1160. 'type' => 'text',
  1161. 'title' => __('Vaptcha KEY','sakurairo_csf'),
  1162. 'dependency' => array( 'captcha_select', '==', 'vaptcha', '', 'true' ),
  1163. 'desc' => __('Fill in your Vaptcha KEY','sakurairo_csf'),
  1164. ),
  1165. array(
  1166. 'id' => 'vaptcha_scene',
  1167. 'type' => 'select',
  1168. 'title' => __('Vaptcha Scene','sakurairo_csf'),
  1169. 'dependency' => array( 'captcha_select', '==', 'vaptcha', '', 'true' ),
  1170. 'options' => array(
  1171. '1' => __(1,'sakurairo_csf'),
  1172. '2' => __(2,'sakurairo_csf'),
  1173. '3' => __(3,'sakurairo_csf'),
  1174. '4' => __(4,'sakurairo_csf'),
  1175. '5' => __(5,'sakurairo_csf'),
  1176. '6' => __(6,'sakurairo_csf'),
  1177. ),
  1178. 'default' => 1,
  1179. ),
  1180. array(
  1181. 'id' => 'pagenav_style',
  1182. 'type' => 'radio',
  1183. 'title' => __('Pagination Mode','sakurairo_csf'),
  1184. 'options' => array(
  1185. 'ajax' => __('Ajax Load','sakurairo_csf'),
  1186. 'np' => __('Page Up/Down','sakurairo_csf'),
  1187. ),
  1188. 'default' => 'ajax'
  1189. ),
  1190. array(
  1191. 'id' => 'page_auto_load',
  1192. 'type' => 'select',
  1193. 'title' => __('Next Page Auto Load','sakurairo_csf'),
  1194. 'dependency' => array( 'pagenav_style', '==', 'ajax', '', 'true' ),
  1195. 'options' => array(
  1196. '233' => __('do not autoload','sakurairo_csf'),
  1197. '0' => __('0 Sec','sakurairo_csf'),
  1198. '1' => __('1 Sec','sakurairo_csf'),
  1199. '2' => __('2 Sec','sakurairo_csf'),
  1200. '3' => __('3 Sec','sakurairo_csf'),
  1201. '4' => __('4 Sec','sakurairo_csf'),
  1202. '5' => __('5 Sec','sakurairo_csf'),
  1203. '6' => __('6 Sec','sakurairo_csf'),
  1204. '7' => __('7 Sec','sakurairo_csf'),
  1205. '8' => __('8 Sec','sakurairo_csf'),
  1206. '9' => __('9 Sec','sakurairo_csf'),
  1207. '10' => __('10 Sec','sakurairo_csf'),
  1208. ),
  1209. 'default' => '233'
  1210. ),
  1211. array(
  1212. 'id' => 'load_nextpage_svg',
  1213. 'type' => 'text',
  1214. 'title' => __('Placeholder SVG when loading the next page','sakurairo_csf'),
  1215. 'desc' => __('Fill in the address, this is the SVG that will be displayed as a placeholder when the next page is loading','sakurairo_csf'),
  1216. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/ball.svg'
  1217. ),
  1218. )
  1219. ) );
  1220. Sakurairo_CSF::createSection( $prefix, array(
  1221. 'id' => 'homepage',
  1222. 'title' => __('HomePage Options','sakurairo_csf'),
  1223. 'icon' => 'fa fa-home',
  1224. ) );
  1225. Sakurairo_CSF::createSection( $prefix, array(
  1226. 'parent' => 'homepage',
  1227. 'title' => __('Cover Options','sakurairo_csf'),
  1228. 'icon' => 'fa fa-laptop',
  1229. 'fields' => array(
  1230. array(
  1231. 'type' => 'submessage',
  1232. 'style' => 'info',
  1233. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Homepage/#%E5%B0%81%E9%9D%A2%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  1234. ),
  1235. array(
  1236. 'id' => 'cover_switch',
  1237. 'type' => 'switcher',
  1238. 'title' => __('Cover Switch','sakurairo_csf'),
  1239. 'label' => __('On by default, if off, all options below will be disabled','sakurairo_csf'),
  1240. 'default' => true
  1241. ),
  1242. array(
  1243. 'id' => 'cover_full_screen',
  1244. 'type' => 'switcher',
  1245. 'title' => __('Cover Full Screen','sakurairo_csf'),
  1246. 'label' => __('Default on','sakurairo_csf'),
  1247. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1248. 'default' => true
  1249. ),
  1250. array(
  1251. 'id' => 'cover_half_screen_curve',
  1252. 'type' => 'switcher',
  1253. 'title' => __('Cover Arc Occlusion (Below)','sakurairo_csf'),
  1254. 'label' => __('An arc occlusion will appear below the cover when turned on','sakurairo_csf'),
  1255. 'dependency' => array(
  1256. array( 'cover_switch', '==', 'true', '', 'true' ),
  1257. array( 'cover_full_screen', '==', 'false' ),
  1258. ),
  1259. 'default' => false
  1260. ),
  1261. array(
  1262. 'id' => 'cover_radius',
  1263. 'type' => 'slider',
  1264. 'title' => __('Cover Radius','sakurairo_csf'),
  1265. 'desc' => __('Slide to adjust, the recommended value range is 15-20','sakurairo_csf'),
  1266. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1267. 'unit' => 'px',
  1268. 'max' => '60',
  1269. 'default' => '15'
  1270. ),
  1271. array(
  1272. 'id' => 'cover_animation',
  1273. 'type' => 'switcher',
  1274. 'title' => __('Cover Animation','sakurairo_csf'),
  1275. 'label' => __('On by default, if off, the cover will be displayed directly','sakurairo_csf'),
  1276. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1277. 'default' => true
  1278. ),
  1279. array(
  1280. 'id' => 'cover_animation_time',
  1281. 'type' => 'slider',
  1282. 'title' => __('Cover Animation Time','sakurairo_csf'),
  1283. 'desc' => __('Slide to adjust, the recommended value range is 1-2','sakurairo_csf'),
  1284. 'dependency' => array(
  1285. array( 'cover_switch', '==', 'true', '', 'true' ),
  1286. array( 'cover_animation', '==', 'true' ),
  1287. ),
  1288. 'step' => '0.01',
  1289. 'unit' => 's',
  1290. 'max' => '5',
  1291. 'default' => '2'
  1292. ),
  1293. array(
  1294. 'id' => 'infor_bar',
  1295. 'type' => 'switcher',
  1296. 'title' => __('Cover Info Bar','sakurairo_csf'),
  1297. 'label' => __('Enabled by default, show avatar, Mashiro effects text, signature bar, shuoshuo bar, social area','sakurairo_csf'),
  1298. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1299. 'default' => true
  1300. ),
  1301. array(
  1302. 'id' => 'infor_bar_style',
  1303. 'type' => 'image_select',
  1304. 'title' => __('Cover Info Bar Style','sakurairo_csf'),
  1305. 'options' => array(
  1306. 'v1' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/infor_bar_style_v1.webp',
  1307. 'v2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/infor_bar_style_v2.webp',
  1308. ),
  1309. 'dependency' => array(
  1310. array( 'cover_switch', '==', 'true', '', 'true' ),
  1311. array( 'infor_bar', '==', 'true' ),
  1312. ),
  1313. 'default' => 'v1'
  1314. ),
  1315. array(
  1316. 'id' => 'infor_bar_bgcolor',
  1317. 'type' => 'color',
  1318. 'title' => __('Cover Info Bar Background Color','sakurairo_csf'),
  1319. 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'),
  1320. 'dependency' => array(
  1321. array( 'cover_switch', '==', 'true', '', 'true' ),
  1322. array( 'infor_bar', '==', 'true' ),
  1323. ),
  1324. 'default' => 'rgba(255,255,255,0.6)'
  1325. ),
  1326. array(
  1327. 'id' => 'avatar_radius',
  1328. 'type' => 'slider',
  1329. 'title' => __('Cover Info Bar Avatar Radius','sakurairo_csf'),
  1330. 'desc' => __('Slide to adjust, the recommended value is 100','sakurairo_csf'),
  1331. 'dependency' => array(
  1332. array( 'cover_switch', '==', 'true', '', 'true' ),
  1333. array( 'infor_bar', '==', 'true' ),
  1334. ),
  1335. 'unit' => 'px',
  1336. 'default' => '100'
  1337. ),
  1338. array(
  1339. 'id' => 'signature_radius',
  1340. 'type' => 'slider',
  1341. 'title' => __('Cover Info Bar Rounded','sakurairo_csf'),
  1342. 'desc' => __('Slide to adjust, the recommended value range 10-20','sakurairo_csf'),
  1343. 'dependency' => array(
  1344. array( 'cover_switch', '==', 'true', '', 'true' ),
  1345. array( 'infor_bar', '==', 'true' ),
  1346. ),
  1347. 'unit' => 'px',
  1348. 'max' => '50',
  1349. 'default' => '15'
  1350. ),
  1351. array(
  1352. 'id' => 'signature_text',
  1353. 'type' => 'text',
  1354. 'title' => __('Cover Signature Field Text','sakurairo_csf'),
  1355. 'desc' => __('A self-descriptive quote','sakurairo_csf'),
  1356. 'dependency' => array(
  1357. array( 'cover_switch', '==', 'true', '', 'true' ),
  1358. array( 'infor_bar', '==', 'true' ),
  1359. ),
  1360. 'default' => '届ける言葉を今は育ててる'
  1361. ),
  1362. array(
  1363. 'id' => 'signature_font',
  1364. 'type' => 'text',
  1365. 'title' => __('Cover Signature Field Text Font','sakurairo_csf'),
  1366. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  1367. 'dependency' => array(
  1368. array( 'cover_switch', '==', 'true', '', 'true' ),
  1369. array( 'infor_bar', '==', 'true' ),
  1370. ),
  1371. 'default' => 'Noto Serif SC'
  1372. ),
  1373. array(
  1374. 'id' => 'signature_font_size',
  1375. 'type' => 'slider',
  1376. 'title' => __('Cover Signature Field Text Font Size','sakurairo_csf'),
  1377. 'desc' => __('Slide to adjust, the recommended value range is 15-18','sakurairo_csf'),
  1378. 'dependency' => array(
  1379. array( 'cover_switch', '==', 'true', '', 'true' ),
  1380. array( 'infor_bar', '==', 'true' ),
  1381. ),
  1382. 'unit' => 'px',
  1383. 'min' => '5',
  1384. 'max' => '20',
  1385. 'default' => '16'
  1386. ),
  1387. array(
  1388. 'id' => 'signature_typing',
  1389. 'type' => 'switcher',
  1390. 'title' => __('Cover Signature Bar Typing Effects','sakurairo_csf'),
  1391. 'label' => __('When turned on, the signature bar text will have an additional paragraph of text and will be rendered with typing effects','sakurairo_csf'),
  1392. 'dependency' => array(
  1393. array( 'cover_switch', '==', 'true', '', 'true' ),
  1394. array( 'infor_bar', '==', 'true' ),
  1395. ),
  1396. 'default' => false
  1397. ),
  1398. array(
  1399. 'id' => 'signature_typing_marks',
  1400. 'type' => 'switcher',
  1401. 'title' => __('Cover Signature Field Typing Effects Double Quotes','sakurairo_csf'),
  1402. 'dependency' => array(
  1403. array( 'cover_switch', '==', 'true', '', 'true' ),
  1404. array( 'infor_bar', '==', 'true' ),
  1405. array( 'signature_typing', '==', 'true' ),
  1406. ),
  1407. 'label' => __('Typing effects will be appended with double quotes when turned on','sakurairo_csf'),
  1408. 'default' => false
  1409. ),
  1410. array(
  1411. 'id' => 'signature_typing_placeholder',
  1412. 'type' => 'text',
  1413. 'title' => __('Cover Signature Field Typing Effects Placeholder','sakurairo_csf'),
  1414. 'dependency' => array(
  1415. array( 'cover_switch', '==', 'true', '', 'true' ),
  1416. array( 'infor_bar', '==', 'true' ),
  1417. array( 'signature_typing', '==', 'true' ),
  1418. ),
  1419. 'default' => '疯狂造句中......'
  1420. ),
  1421. array(
  1422. 'id' => 'signature_typing_json',
  1423. 'type' => 'code_editor',
  1424. 'sanitize' => false,
  1425. 'title' => __('Typed.js initial option','sakurairo_csf'),
  1426. 'dependency' => array(
  1427. array( 'cover_switch', '==', 'true', '', 'true' ),
  1428. array( 'infor_bar', '==', 'true' ),
  1429. array( 'signature_typing', '==', 'true' ),
  1430. ),
  1431. 'default' => '{"strings":["给时光以生命,给岁月以文明"],"typeSpeed":140,"backSpeed":50,"loop":false,"showCursor":true}'
  1432. ),
  1433. array(
  1434. 'id' => 'random_graphs_options',
  1435. 'type' => 'select',
  1436. 'title' => __('Cover Random Image Options','sakurairo_csf'),
  1437. 'options' => array(
  1438. 'external_api' => __('External API','sakurairo_csf'),
  1439. 'webp_optimization' => __('Webp optimized','sakurairo_csf'),
  1440. 'local' => __('Local','sakurairo_csf'),
  1441. ),
  1442. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1443. 'default' => 'external_api'
  1444. ),
  1445. array(
  1446. 'id' => 'random_graphs_mts',
  1447. 'type' => 'switcher',
  1448. 'title' => __('Cover Random Image Multi-terminal Separation','sakurairo_csf'),
  1449. 'label' => __('Enabled by default, desktop and mobile devices will use separate random image addresses','sakurairo_csf'),
  1450. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1451. 'default' => true
  1452. ),
  1453. array(
  1454. 'id' => 'random_graphs_link',
  1455. 'type' => 'text',
  1456. 'title' => __('Webp Optimization/External API Desktop Side Random Graphics Address','sakurairo_csf'),
  1457. 'desc' => __('Fill in an URL','sakurairo_csf'),
  1458. 'dependency' => array(
  1459. array( 'cover_switch', '==', 'true', '', 'true' ),
  1460. array( 'random_graphs_options', '!=', 'local', '', 'true' ),
  1461. ),
  1462. 'default' => 'https://api.maho.cc/random-img/pc.php',
  1463. 'sanitize' => false,
  1464. 'validate' => 'csf_validate_url',
  1465. ),
  1466. array(
  1467. 'id' => 'random_graphs_link_mobile',
  1468. 'type' => 'text',
  1469. 'title' => __('External API Mobile Devices Random Image Address','sakurairo_csf'),
  1470. 'dependency' => array(
  1471. array( 'random_graphs_mts', '==', 'true' ),
  1472. array( 'cover_switch', '==', 'true', '', 'true' ),
  1473. array( 'random_graphs_options', '!=', 'local', '', 'true' ),
  1474. ),
  1475. 'desc' => __('Fill in an URL','sakurairo_csf'),
  1476. 'default' => 'https://api.maho.cc/random-img/mobile.php',
  1477. 'sanitize' => false,
  1478. 'validate' => 'csf_validate_url',
  1479. ),
  1480. array(
  1481. 'id' => 'cache_cover',
  1482. 'type' => 'switcher',
  1483. 'title' => __('Cover Random Background Image Cache','sakurairo_csf'),
  1484. 'label' => __('Enabled by default, this feature will cache a cover image locally, which can improve the loading speed of the first cover after entering the homepage. Note: This feature needs the cover APIs that accept cross-domain requests.' ,'sakurairo_csf'),
  1485. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1486. 'default' => true
  1487. ),
  1488. array(
  1489. 'id' => 'site_bg_as_cover',
  1490. 'type' => 'switcher',
  1491. 'title' => __('Cover and Frontend Background Integration','sakurairo_csf'),
  1492. 'label' => __('When enabled, the background of the cover will be set to transparent, while the frontend background will use the cover\'s random image API','sakurairo_csf'),
  1493. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1494. 'default' => false
  1495. ),
  1496. array(
  1497. 'id' => 'random_graphs_filter',
  1498. 'type' => 'select',
  1499. 'title' => __('Cover Random Images Filter','sakurairo_csf'),
  1500. 'options' => array(
  1501. 'filter-nothing' => __('No filter','sakurairo_csf'),
  1502. 'filter-undertint' => __('Light filter','sakurairo_csf'),
  1503. 'filter-dim' => __('Dimmed filter','sakurairo_csf'),
  1504. 'filter-grid' => __('Grid filter','sakurairo_csf'),
  1505. 'filter-dot' => __('Dot filter','sakurairo_csf'),
  1506. ),
  1507. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1508. 'default' => 'filter-nothing'
  1509. ),
  1510. array(
  1511. 'id' => 'wave_effects',
  1512. 'type' => 'switcher',
  1513. 'title' => __('Cover Wave Effects','sakurairo_csf'),
  1514. 'label' => __('Wave effect will appear at the bottom of the cover of the home page after turning on, and it will be forced off in the dark mode','sakurairo_csf'),
  1515. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1516. 'default' => false
  1517. ),
  1518. array(
  1519. 'id' => 'drop_down_arrow',
  1520. 'type' => 'switcher',
  1521. 'title' => __('Cover Dropdown Arrow','sakurairo_csf'),
  1522. 'label' => __('Enabled by default, show a dropdown arrow at bottom of home cover','sakurairo_csf'),
  1523. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1524. 'default' => true
  1525. ),
  1526. array(
  1527. 'id' => 'drop_down_arrow_mobile',
  1528. 'type' => 'switcher',
  1529. 'title' => __('Cover Dropdown Arrow Display on Mobile Devices','sakurairo_csf'),
  1530. 'dependency' => array(
  1531. array( 'drop_down_arrow', '==', 'true' ),
  1532. array( 'cover_switch', '==', 'true', '', 'true' ),
  1533. ),
  1534. 'label' => __('Drop down arrow will appear at the bottom of the mobile devices\' home cover after turning it on','sakurairo_csf'),
  1535. 'default' => false
  1536. ),
  1537. array(
  1538. 'id' => 'drop_down_arrow_color',
  1539. 'type' => 'color',
  1540. 'title' => __('Cover Dropdown Arrow Color','sakurairo_csf'),
  1541. 'dependency' => array(
  1542. array( 'drop_down_arrow', '==', 'true' ),
  1543. array( 'cover_switch', '==', 'true', '', 'true' ),
  1544. ),
  1545. 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'),
  1546. 'default' => 'rgba(255,255,255,0.8)'
  1547. ),
  1548. array(
  1549. 'id' => 'drop_down_arrow_dark_color',
  1550. 'type' => 'color',
  1551. 'title' => __('Cover Dropdown Arrow Color (Dark Mode)','sakurairo_csf'),
  1552. 'dependency' => array(
  1553. array( 'drop_down_arrow', '==', 'true' ),
  1554. array( 'cover_switch', '==', 'true', '', 'true' ),
  1555. ),
  1556. 'desc' => __('Customize the colors, dark colors are recommended','sakurairo_csf'),
  1557. 'default' => 'rgba(51,51,51,0.8)'
  1558. ),
  1559. array(
  1560. 'id' => 'cover_video',
  1561. 'type' => 'switcher',
  1562. 'title' => __('Cover Video','sakurairo_csf'),
  1563. 'label' => __('Use a video instead of the images as the cover','sakurairo_csf'),
  1564. 'dependency' => array( 'cover_switch', '==', 'true', '', 'true' ),
  1565. 'default' => false
  1566. ),
  1567. array(
  1568. 'id' => 'cover_video_loop',
  1569. 'type' => 'switcher',
  1570. 'title' => __('Cover Video Loop','sakurairo_csf'),
  1571. 'dependency' => array(
  1572. array( 'cover_video', '==', 'true' ),
  1573. array( 'cover_switch', '==', 'true', '', 'true' ),
  1574. ),
  1575. 'label' => __('Video will loop automatically when enabled.','sakurairo_csf'),
  1576. 'default' => false
  1577. ),
  1578. array(
  1579. 'id' => 'cover_video_live',
  1580. 'type' => 'switcher',
  1581. 'title' => __('Cover Video Auto Resume','sakurairo_csf'),
  1582. 'dependency' => array(
  1583. array( 'cover_video', '==', 'true' ),
  1584. array( 'cover_switch', '==', 'true', '', 'true' ),
  1585. ),
  1586. 'label' => __('Cover Video will resume automatically when coming back to homepage while Pjax enabled.','sakurairo_csf'),
  1587. 'default' => false
  1588. ),
  1589. array(
  1590. 'id' => 'cover_video_link',
  1591. 'type' => 'text',
  1592. 'title' => __('Cover Video URL Base Path','sakurairo_csf'),
  1593. 'dependency' => array(
  1594. array( 'cover_video', '==', 'true' ),
  1595. array( 'cover_switch', '==', 'true', '', 'true' ),
  1596. ),
  1597. 'validate' => 'iro_validate_optional_url',
  1598. 'desc' => __("Fill in the base path your video located at. For example: https://localhost. Your site's URL is used as default. Please pay attention to the protocol name of the URL.",'sakurairo_csf'),
  1599. ),
  1600. array(
  1601. 'id' => 'cover_video_title',
  1602. 'type' => 'text',
  1603. 'title' => __('Cover Video File Name','sakurairo_csf'),
  1604. 'dependency' => array(
  1605. array( 'cover_video', '==', 'true' ),
  1606. array( 'cover_switch', '==', 'true', '', 'true' ),
  1607. ),
  1608. 'desc' => __('For example: abc.mp4. Multiple videos should be separated by English commas like "abc.mp4,efg.mp4," Random play is on by default.','sakurairo_csf'),
  1609. ),
  1610. )
  1611. ) );
  1612. Sakurairo_CSF::createSection( $prefix, array(
  1613. 'parent' => 'homepage',
  1614. 'title' => __('Cover Social Area Options','sakurairo_csf'),
  1615. 'icon' => 'fa fa-share-square-o',
  1616. 'fields' => array(
  1617. array(
  1618. 'type' => 'submessage',
  1619. 'style' => 'info',
  1620. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Homepage/#%E5%B0%81%E9%9D%A2%E7%A4%BE%E4%BA%A4%E5%8C%BA%E5%9F%9F%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  1621. ),
  1622. array(
  1623. 'type' => 'subheading',
  1624. 'content' => __('Related Options','sakurairo_csf'),
  1625. ),
  1626. array(
  1627. 'id' => 'social_area',
  1628. 'type' => 'switcher',
  1629. 'title' => __('Cover Social Area','sakurairo_csf'),
  1630. 'label' => __('Enabled by default, show cover random image toggle button and social network icons','sakurairo_csf'),
  1631. 'default' => true
  1632. ),
  1633. array(
  1634. 'id' => 'social_display_icon',
  1635. 'type' => 'image_select',
  1636. 'title' => __('Social Icon','sakurairo_csf'),
  1637. 'desc' => __('Select your favorite icon pack. Icon pack references are detailed in the "About Theme" section','sakurairo_csf'),
  1638. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1639. 'options' => array(
  1640. 'display_icon/fluent_design' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_fd.gif',
  1641. 'display_icon/muh2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_h2.gif',
  1642. 'display_icon/flat_colorful' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_fc.gif',
  1643. 'display_icon/sakura' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sa.gif',
  1644. 'display_icon/macaronblue' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mb.webp',
  1645. 'display_icon/macarongreen' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mg.webp',
  1646. 'display_icon/macaronpurple' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_mp.webp',
  1647. 'display_icon/pink' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sp.webp',
  1648. 'display_icon/orange' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_so.webp',
  1649. 'display_icon/sangosyu' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_sg.webp',
  1650. 'display_icon/sora' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_ts.webp',
  1651. 'display_icon/nae' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/display_icon_nn.webp',
  1652. ),
  1653. 'default' => 'display_icon/fluent_design'
  1654. ),
  1655. array(
  1656. 'id' => 'social_area_radius',
  1657. 'type' => 'slider',
  1658. 'title' => __('Cover Social Area Rounded Corners','sakurairo_csf'),
  1659. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1660. 'desc' => __('Slide to adjust, the recommended value range is 10-20','sakurairo_csf'),
  1661. 'unit' => 'px',
  1662. 'max' => '30',
  1663. 'default' => '15'
  1664. ),
  1665. array(
  1666. 'id' => 'cover_random_graphs_switch',
  1667. 'type' => 'switcher',
  1668. 'title' => __('Switch Button of Random Images','sakurairo_csf'),
  1669. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1670. 'label' => __('Enabled by default, show cover random image toggle button','sakurairo_csf'),
  1671. 'default' => true
  1672. ),
  1673. array(
  1674. 'type' => 'subheading',
  1675. 'content' => __('Social Network','sakurairo_csf'),
  1676. ),
  1677. array(
  1678. 'id' => 'wechat',
  1679. 'type' => 'upload',
  1680. 'title' => __('Wechat','sakurairo_csf'),
  1681. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1682. 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'),
  1683. 'library' => 'image',
  1684. ),
  1685. array(
  1686. 'id' => 'qq',
  1687. 'type' => 'text',
  1688. 'title' => __('QQ','sakurairo_csf'),
  1689. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1690. 'desc' => __('Please note the format of filling out the form, e.g. tencent://message/?uin=123456','sakurairo_csf'),
  1691. ),
  1692. array(
  1693. 'id' => 'bili',
  1694. 'type' => 'text',
  1695. 'title' => __('Bilibili','sakurairo_csf'),
  1696. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1697. 'desc' => __('add URL','sakurairo_csf'),
  1698. ),
  1699. array(
  1700. 'id' => 'wangyiyun',
  1701. 'type' => 'text',
  1702. 'title' => __('NetEase Music','sakurairo_csf'),
  1703. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1704. 'desc' => __('add URL','sakurairo_csf'),
  1705. ),
  1706. array(
  1707. 'id' => 'sina',
  1708. 'type' => 'text',
  1709. 'title' => __('Weibo','sakurairo_csf'),
  1710. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1711. 'desc' => __('add URL','sakurairo_csf'),
  1712. ),
  1713. array(
  1714. 'id' => 'github',
  1715. 'type' => 'text',
  1716. 'title' => __('Github','sakurairo_csf'),
  1717. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1718. 'desc' => __('add URL','sakurairo_csf'),
  1719. ),
  1720. array(
  1721. 'id' => 'telegram',
  1722. 'type' => 'text',
  1723. 'title' => __('Telegram','sakurairo_csf'),
  1724. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1725. 'desc' => __('add URL','sakurairo_csf'),
  1726. ),
  1727. array(
  1728. 'id' => 'steam',
  1729. 'type' => 'text',
  1730. 'title' => __('Steam','sakurairo_csf'),
  1731. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1732. 'desc' => __('add URL','sakurairo_csf'),
  1733. ),
  1734. array(
  1735. 'id' => 'zhihu',
  1736. 'type' => 'text',
  1737. 'title' => __('ZhiHu','sakurairo_csf'),
  1738. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1739. 'desc' => __('add URL','sakurairo_csf'),
  1740. ),
  1741. array(
  1742. 'id' => 'qzone',
  1743. 'type' => 'text',
  1744. 'title' => __('QZone','sakurairo_csf'),
  1745. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1746. 'desc' => __('add URL','sakurairo_csf'),
  1747. ),
  1748. array(
  1749. 'id' => 'lofter',
  1750. 'type' => 'text',
  1751. 'title' => __('Lofter','sakurairo_csf'),
  1752. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1753. 'desc' => __('add URL','sakurairo_csf'),
  1754. ),
  1755. array(
  1756. 'id' => 'youku',
  1757. 'type' => 'text',
  1758. 'title' => __('Youku','sakurairo_csf'),
  1759. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1760. 'desc' => __('add URL','sakurairo_csf'),
  1761. ),
  1762. array(
  1763. 'id' => 'linkedin',
  1764. 'type' => 'text',
  1765. 'title' => __('Linkedin','sakurairo_csf'),
  1766. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1767. 'desc' => __('add URL','sakurairo_csf'),
  1768. ),
  1769. array(
  1770. 'id' => 'twitter',
  1771. 'type' => 'text',
  1772. 'title' => __('Twitter','sakurairo_csf'),
  1773. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1774. 'desc' => __('add URL','sakurairo_csf'),
  1775. ),
  1776. array(
  1777. 'id' => 'facebook',
  1778. 'type' => 'text',
  1779. 'title' => __('Facebook','sakurairo_csf'),
  1780. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1781. 'desc' => __('add URL','sakurairo_csf'),
  1782. ),
  1783. array(
  1784. 'id' => 'csdn',
  1785. 'type' => 'text',
  1786. 'title' => __('CSDN','sakurairo_csf'),
  1787. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1788. 'desc' => __('add URL','sakurairo_csf'),
  1789. ),
  1790. array(
  1791. 'id' => 'jianshu',
  1792. 'type' => 'text',
  1793. 'title' => __('JianShu','sakurairo_csf'),
  1794. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1795. 'desc' => __('add URL','sakurairo_csf'),
  1796. ),
  1797. array(
  1798. 'id' => 'socialdiy1',
  1799. 'type' => 'text',
  1800. 'title' => __('Customized Social Network Ⅰ','sakurairo_csf'),
  1801. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1802. 'desc' => __('add URL','sakurairo_csf'),
  1803. ),
  1804. array(
  1805. 'id' => 'socialdiy1_title',
  1806. 'type' => 'text',
  1807. 'title' => __('Customized Social Network Ⅰ Title','sakurairo_csf'),
  1808. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1809. "default" => "DIY1"
  1810. ),
  1811. array(
  1812. 'id' => 'socialdiyp1',
  1813. 'type' => 'upload',
  1814. 'title' => __('Customized Social Network Ⅰ icon','sakurairo_csf'),
  1815. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1816. 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'),
  1817. 'library' => 'image',
  1818. ),
  1819. array(
  1820. 'id' => 'socialdiy2',
  1821. 'type' => 'text',
  1822. 'title' => __('Customized Social Network Ⅱ','sakurairo_csf'),
  1823. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1824. 'desc' => __('add URL','sakurairo_csf'),
  1825. ),
  1826. array(
  1827. 'id' => 'socialdiy2_title',
  1828. 'type' => 'text',
  1829. 'title' => __('Customized Social Network Ⅱ Title','sakurairo_csf'),
  1830. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1831. "default" => "DIY2"
  1832. ),
  1833. array(
  1834. 'id' => 'socialdiyp2',
  1835. 'type' => 'upload',
  1836. 'title' => __('Customized Social Network Ⅱ icon','sakurairo_csf'),
  1837. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1838. 'desc' => __('The best length-width ratio of is 1:1','sakurairo_csf'),
  1839. 'library' => 'image',
  1840. ),
  1841. array(
  1842. 'id' => 'email_name',
  1843. 'type' => 'text',
  1844. 'title' => __('Email Username','sakurairo_csf'),
  1845. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1846. 'desc' => __('name@domain.com fo name, the full address can be known only when there is a js runtime in the frontend, you can fill in with confidence','sakurairo_csf'),
  1847. ),
  1848. array(
  1849. 'id' => 'email_domain',
  1850. 'type' => 'text',
  1851. 'title' => __('Email Domain','sakurairo_csf'),
  1852. 'dependency' => array( 'social_area', '==', 'true', '', 'true' ),
  1853. 'desc' => __('name@domain.com fo domain.com','sakurairo_csf'),
  1854. ),
  1855. )
  1856. ) );
  1857. Sakurairo_CSF::createSection( $prefix, array(
  1858. 'parent' => 'homepage',
  1859. 'title' => __('Bulletin Board and Area Title Options','sakurairo_csf'),
  1860. 'icon' => 'fa fa-bullhorn',
  1861. 'fields' => array(
  1862. array(
  1863. 'type' => 'submessage',
  1864. 'style' => 'info',
  1865. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Homepage/#%E5%85%AC%E5%91%8A%E6%A0%8F%E5%92%8C%E5%8C%BA%E5%9F%9F%E6%A0%87%E9%A2%98%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  1866. ),
  1867. array(
  1868. 'type' => 'subheading',
  1869. 'content' => __('Bulletin Board','sakurairo_csf'),
  1870. ),
  1871. array(
  1872. 'id' => 'bulletin_board',
  1873. 'type' => 'switcher',
  1874. 'title' => __('Bulletin Board','sakurairo_csf'),
  1875. 'label' => __('When enabled the bulletin board will be displayed below the front cover','sakurairo_csf'),
  1876. 'default' => false
  1877. ),
  1878. array(
  1879. 'id' => 'bulletin_board_style',
  1880. 'type' => 'radio',
  1881. 'title' => __('Bulletin Board Style','sakurairo_csf'),
  1882. 'dependency' => array( 'bulletin_board', '==', 'true', '', 'true' ),
  1883. 'options' => array(
  1884. 'picture' => __('Picture Background','sakurairo_csf'),
  1885. 'pure' => __('Color Background','sakurairo_csf'),
  1886. ),
  1887. 'default' => 'picture'
  1888. ),
  1889. array(
  1890. 'id' => 'bulletin_board_icon',
  1891. 'type' => 'switcher',
  1892. 'title' => __('Bulletin Board "Notice" Icon','sakurairo_csf'),
  1893. 'dependency' => array( 'bulletin_board', '==', 'true', '', 'true' ),
  1894. 'label' => __('The "Notice" icon will be displayed on the left side of the announcement bar','sakurairo_csf'),
  1895. 'default' => true
  1896. ),
  1897. array(
  1898. 'id' => 'bulletin_board_bg',
  1899. 'type' => 'upload',
  1900. 'title' => __('Bulletin Board Background','sakurairo_csf'),
  1901. 'dependency' => array(
  1902. array( 'bulletin_board', '==', 'true', '', 'true' ),
  1903. array( 'bulletin_board_style', '==', 'picture' ),
  1904. ),
  1905. 'desc' => __('Best width 820px, best height 67px','sakurairo_csf'),
  1906. 'library' => 'image',
  1907. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/announcement_bg.webp'
  1908. ),
  1909. array(
  1910. 'id' => 'bulletin_board_border_color',
  1911. 'type' => 'color',
  1912. 'title' => __('Bulletin Board Border Color','sakurairo_csf'),
  1913. 'dependency' => array(
  1914. array( 'bulletin_board', '==', 'true', '', 'true' ),
  1915. array( 'bulletin_board_style', '==', 'pure' ),
  1916. ),
  1917. 'desc' => __('Customize the colors, it is recommended to use a light color that corresponds with the theme color','sakurairo_csf'),
  1918. 'default' => '#E6E6E6'
  1919. ),
  1920. array(
  1921. 'id' => 'bulletin_text',
  1922. 'type' => 'text',
  1923. 'title' => __('Bulletin Board Text','sakurairo_csf'),
  1924. 'dependency' => array( 'bulletin_board', '==', 'true', '', 'true' ),
  1925. 'desc' => __('Fill in the announcement text, the text beyond 142 bytes will be hidden','sakurairo_csf'),
  1926. ),
  1927. array(
  1928. 'id' => 'bulletin_board_text_align',
  1929. 'type' => 'image_select',
  1930. 'title' => __('Bulletin Board Alignment','sakurairo_csf'),
  1931. 'dependency' => array( 'bulletin_board', '==', 'true', '', 'true' ),
  1932. 'options' => array(
  1933. 'left' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/announce_text_left.webp',
  1934. 'right' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/announce_text_right.webp',
  1935. 'center' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/announce_text_center.webp',
  1936. ),
  1937. 'default' => 'left'
  1938. ),
  1939. array(
  1940. 'id' => 'bulletin_text_color',
  1941. 'type' => 'color',
  1942. 'title' => __('Bulletin Board Text Color','sakurairo_csf'),
  1943. 'dependency' => array( 'bulletin_board', '==', 'true', '', 'true' ),
  1944. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  1945. 'default' => '#999'
  1946. ),
  1947. array(
  1948. 'type' => 'subheading',
  1949. 'content' => __('Area Title','sakurairo_csf'),
  1950. ),
  1951. array(
  1952. 'id' => 'exhibition_area_icon',
  1953. 'type' => 'text',
  1954. 'title' => __('Display Area Icon','sakurairo_csf'),
  1955. 'desc' => __('Default is "fa-solid fa-laptop", You can check the <a href="https://fontawesome.com/search?o=r&m=free">FontAwesome Website</a> to see the icons that can be filled in' ,'sakurairo_csf'),
  1956. 'default' => 'fa-solid fa-laptop'
  1957. ),
  1958. array(
  1959. 'id' => 'exhibition_area_title',
  1960. 'type' => 'text',
  1961. 'title' => __('Display Area Title','sakurairo_csf'),
  1962. 'desc' => __('Default is "Display", you can change it to anything else, but of course it CANNOT be used as an ad! Not allowed!!!' ,'sakurairo_csf'),
  1963. 'default' => 'Display'
  1964. ),
  1965. array(
  1966. 'id' => 'post_area_icon',
  1967. 'type' => 'text',
  1968. 'title' => __('Post Area Icon','sakurairo_csf'),
  1969. 'desc' => __('Default is "fa-regular fa-bookmark", You can check the <a href="https://fontawesome.com/search?o=r&m=free">FontAwesome Website</a> to see the icons that can be filled in' ,'sakurairo_csf'),
  1970. 'default' => 'fa-regular fa-bookmark'
  1971. ),
  1972. array(
  1973. 'id' => 'post_area_title',
  1974. 'type' => 'text',
  1975. 'title' => __('Post Area Title','sakurairo_csf'),
  1976. 'desc' => __('Default is "Article", you can change it to anything else, but of course it CANNOT be used as an ad! Not allowed!!!' ,'sakurairo_csf'),
  1977. 'default' => 'Article'
  1978. ),
  1979. array(
  1980. 'id' => 'area_title_font',
  1981. 'type' => 'text',
  1982. 'title' => __('Area Title Font','sakurairo_csf'),
  1983. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  1984. 'default' => 'Noto Serif SC'
  1985. ),
  1986. array(
  1987. 'id' => 'area_title_text_align',
  1988. 'type' => 'image_select',
  1989. 'title' => __('Area Title Alignment','sakurairo_csf'),
  1990. 'options' => array(
  1991. 'left' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/area_title_text_left.webp',
  1992. 'right' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/area_title_text_right.webp',
  1993. 'center' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/area_title_text_center.webp',
  1994. ),
  1995. 'default' => 'left'
  1996. ),
  1997. )
  1998. ) );
  1999. Sakurairo_CSF::createSection( $prefix, array(
  2000. 'parent' => 'homepage',
  2001. 'title' => __('Display Area Options','sakurairo_csf'),
  2002. 'icon' => 'fa fa-bookmark',
  2003. 'fields' => array(
  2004. array(
  2005. 'type' => 'submessage',
  2006. 'style' => 'info',
  2007. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Homepage/#%E5%B1%95%E7%A4%BA%E5%8C%BA%E5%9F%9F%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2008. ),
  2009. array(
  2010. 'id' => 'exhibition_area',
  2011. 'type' => 'switcher',
  2012. 'title' => __('Display Area','sakurairo_csf'),
  2013. 'label' => __('Enabled by default, display area is above article area','sakurairo_csf'),
  2014. 'default' => true
  2015. ),
  2016. array(
  2017. 'id' => 'exhibition_area_matching_color',
  2018. 'type' => 'color',
  2019. 'title' => __('Display Area Matching Color','sakurairo_csf'),
  2020. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2021. 'dependency' => array( 'exhibition_area', '==', 'true', '', 'true' ),
  2022. 'default' => '#a0daa9'
  2023. ),
  2024. array(
  2025. 'id' => 'exhibition_area_style',
  2026. 'type' => 'image_select',
  2027. 'title' => __('Display Area Style','sakurairo_csf'),
  2028. 'dependency' => array( 'exhibition_area', '==', 'true', '', 'true' ),
  2029. 'options' => array(
  2030. 'left_and_right' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/exhibition_area_style_lr.webp',
  2031. 'bottom_to_top' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/exhibition_area_style_ud.webp',
  2032. ),
  2033. 'default' => 'left_and_right'
  2034. ),
  2035. array(
  2036. 'id' => 'exhibition_area_compat',
  2037. 'type' => 'switcher',
  2038. 'title' => __('Display Area Compatibility Mode','sakurairo_csf'),
  2039. 'dependency' => array(
  2040. array( 'exhibition_area_style', '==', 'left_and_right', '', 'true' ),
  2041. array( 'exhibition_area', '==', 'true' ),
  2042. ),
  2043. 'label' => __('Enabled by default, this option avoids the problem of misaligned display areas','sakurairo_csf'),
  2044. 'default' => true
  2045. ),
  2046. array(
  2047. 'id' => 'exhibition_background_color',
  2048. 'type' => 'color',
  2049. 'title' => __('Display Area Background Color','sakurairo_csf'),
  2050. 'dependency' => array(
  2051. array( 'exhibition_area_style', '==', 'left_and_right', '', 'true' ),
  2052. array( 'exhibition_area', '==', 'true' ),
  2053. ),
  2054. 'desc' => __('Customize the colors, light colors are recommended','sakurairo_csf'),
  2055. 'default' => 'rgba(255,255,255,0.4)'
  2056. ),
  2057. array(
  2058. 'id' => 'exhibition_radius',
  2059. 'type' => 'slider',
  2060. 'title' => __('Display Area Rounded Corners','sakurairo_csf'),
  2061. 'dependency' => array(
  2062. array( 'exhibition_area_style', '==', 'left_and_right', '', 'true' ),
  2063. array( 'exhibition_area_compat', '==', 'true' ),
  2064. array( 'exhibition_area', '==', 'true' ),
  2065. ),
  2066. 'desc' => __('Slide to adjust, the recommended value is 15','sakurairo_csf'),
  2067. 'unit' => 'px',
  2068. 'default' => '15'
  2069. ),
  2070. array(
  2071. 'id' => 'exhibition',
  2072. 'type' => 'tabbed',
  2073. 'title' => __('Display Area Options','sakurairo_csf'),
  2074. 'dependency' => array( 'exhibition_area', '==', 'true', '', 'true' ),
  2075. 'tabs' => array(
  2076. array(
  2077. 'title' => __('First Display Area','sakurairo_csf'),
  2078. 'fields' => array(
  2079. array(
  2080. 'id' => 'img1',
  2081. 'type' => 'upload',
  2082. 'title' => __('image','sakurairo_csf'),
  2083. 'desc' => __('best width 260px, best height 160px','sakurairo_csf'),
  2084. ),
  2085. array(
  2086. 'id' => 'title1',
  2087. 'type' => 'text',
  2088. 'title' => __('title','sakurairo_csf'),
  2089. ),
  2090. array(
  2091. 'id' => 'description1',
  2092. 'type' => 'text',
  2093. 'title' => __('description','sakurairo_csf'),
  2094. ),
  2095. array(
  2096. 'id' => 'link1',
  2097. 'type' => 'text',
  2098. 'title' => __('add URL','sakurairo_csf'),
  2099. ),
  2100. )
  2101. ),
  2102. array(
  2103. 'title' => __('Second Display Area','sakurairo_csf'),
  2104. 'fields' => array(
  2105. array(
  2106. 'id' => 'img2',
  2107. 'type' => 'upload',
  2108. 'title' => __('image','sakurairo_csf'),
  2109. 'desc' => __('best width 260px, best height 160px','sakurairo_csf'),
  2110. ),
  2111. array(
  2112. 'id' => 'title2',
  2113. 'type' => 'text',
  2114. 'title' => __('title','sakurairo_csf'),
  2115. ),
  2116. array(
  2117. 'id' => 'description2',
  2118. 'type' => 'text',
  2119. 'title' => __('description','sakurairo_csf'),
  2120. ),
  2121. array(
  2122. 'id' => 'link2',
  2123. 'type' => 'text',
  2124. 'title' => __('add URL','sakurairo_csf'),
  2125. ),
  2126. )
  2127. ),
  2128. array(
  2129. 'title' => __('Third Display Area','sakurairo_csf'),
  2130. 'fields' => array(
  2131. array(
  2132. 'id' => 'img3',
  2133. 'type' => 'upload',
  2134. 'title' => __('image','sakurairo_csf'),
  2135. 'desc' => __('best width 260px, best height 160px','sakurairo_csf'),
  2136. ),
  2137. array(
  2138. 'id' => 'title3',
  2139. 'type' => 'text',
  2140. 'title' => __('title','sakurairo_csf'),
  2141. ),
  2142. array(
  2143. 'id' => 'description3',
  2144. 'type' => 'text',
  2145. 'title' => __('description','sakurairo_csf'),
  2146. ),
  2147. array(
  2148. 'id' => 'link3',
  2149. 'type' => 'text',
  2150. 'title' => __('add URL','sakurairo_csf'),
  2151. ),
  2152. )
  2153. ),
  2154. ),
  2155. 'default' => array(
  2156. 'link1' => '',
  2157. 'link2' => '',
  2158. 'link3' => '',
  2159. 'img1' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/exhibition1.webp',
  2160. 'img2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/exhibition2.webp',
  2161. 'img3' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/exhibition3.webp',
  2162. 'title1' => 'アンコール',
  2163. 'title2' => 'ハルジオン',
  2164. 'title3' => 'かいぶつ',
  2165. 'description1' => 'ここは夜のない世界',
  2166. 'description2' => '過ぎてゆく時間の中',
  2167. 'description3' => '素晴らしき世界に今日も乾杯',
  2168. )
  2169. ),
  2170. )
  2171. ) );
  2172. Sakurairo_CSF::createSection( $prefix, array(
  2173. 'parent' => 'homepage',
  2174. 'title' => __('Article Area Options','sakurairo_csf'),
  2175. 'icon' => 'fa fa-book',
  2176. 'fields' => array(
  2177. array(
  2178. 'type' => 'submessage',
  2179. 'style' => 'info',
  2180. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Homepage/#%E6%96%87%E7%AB%A0%E5%8C%BA%E5%9F%9F%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2181. ),
  2182. array(
  2183. 'id' => 'post_list_style',
  2184. 'type' => 'image_select',
  2185. 'title' => __('Article Area Display Style','sakurairo_csf'),
  2186. 'options' => array(
  2187. 'imageflow' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_sakura_left.webp',
  2188. 'akinastyle' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_akina.webp',
  2189. ),
  2190. 'default' => 'imageflow'
  2191. ),
  2192. array(
  2193. 'id' => 'post_list_matching_color',
  2194. 'type' => 'color',
  2195. 'title' => __('Article Area Matching Color','sakurairo_csf'),
  2196. 'dependency' => array( 'post_list_style', '==', 'imageflow', '', 'true' ),
  2197. 'desc' => __('Customize the colors, This option only supports filling in hexadecimal colors, suggest the same as the matching color','sakurairo_csf'),
  2198. 'default' => '#FCCD00'
  2199. ),
  2200. array(
  2201. 'id' => 'post_border_shadow_color',
  2202. 'type' => 'color',
  2203. 'title' => __('Article Area Border Shadow Color','sakurairo_csf'),
  2204. 'dependency' => array( 'post_list_style', '==', 'imageflow', '', 'true' ),
  2205. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2206. 'default' => '#e8e8e8'
  2207. ),
  2208. array(
  2209. 'id' => 'post_list_akina_type',
  2210. 'type' => 'image_select',
  2211. 'title' => __('Article Area Featured Image Display Shapes','sakurairo_csf'),
  2212. 'dependency' => array( 'post_list_style', '==', 'akinastyle', '', 'true' ),
  2213. 'desc' => __('You can choose a circular or a rectangular display of the featured image','sakurairo_csf'),
  2214. 'options' => array(
  2215. 'round' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_akina.webp',
  2216. 'square' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_akina2.webp',
  2217. ),
  2218. 'default' => 'round'
  2219. ),
  2220. array(
  2221. 'id' => 'post_list_image_align',
  2222. 'type' => 'image_select',
  2223. 'title' => __('Article Area Featured Image Alignment','sakurairo_csf'),
  2224. 'dependency' => array( 'post_list_style', '==', 'imageflow', '', 'true' ),
  2225. 'desc' => __('You can choose different directions to display the featured images','sakurairo_csf'),
  2226. 'options' => array(
  2227. 'alternate' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_sakura1.webp',
  2228. 'left' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_sakura2.webp',
  2229. 'right' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/post_list_style_sakura3.webp',
  2230. ),
  2231. 'default' => 'alternate'
  2232. ),
  2233. array(
  2234. 'id' => 'post_cover_options',
  2235. 'type' => 'radio',
  2236. 'title' => __('Article Area Featured Image Options','sakurairo_csf'),
  2237. 'options' => array(
  2238. 'type_1' => __('Cover Random Image','sakurairo_csf'),
  2239. 'type_2' => __('External API Random Image','sakurairo_csf'),
  2240. ),
  2241. 'default' => 'type_1'
  2242. ),
  2243. array(
  2244. 'id' => 'post_cover',
  2245. 'type' => 'text',
  2246. 'title' => __('Article Area Featured Image External API Random Image Address','sakurairo_csf'),
  2247. 'dependency' => array( 'post_cover_options', '==', 'type_2', '', 'true' ),
  2248. 'desc' => __('add URL','sakurairo_csf'),
  2249. 'sanitize' => false,
  2250. 'validate' => 'iro_validate_optional_url',
  2251. ),
  2252. array(
  2253. 'id' => 'post_title_font_size',
  2254. 'type' => 'slider',
  2255. 'title' => __('Article Area Title Font Size','sakurairo_csf'),
  2256. 'desc' => __('Slide to adjust, the recommended value range is 16-20','sakurairo_csf'),
  2257. 'dependency' => array( 'post_list_style', '==', 'imageflow', '', 'true' ),
  2258. 'unit' => 'px',
  2259. 'step' => '1',
  2260. 'min' => '10',
  2261. 'max' => '30',
  2262. 'default' => '18'
  2263. ),
  2264. array(
  2265. 'id' => 'post_date_font_size',
  2266. 'type' => 'slider',
  2267. 'title' => __('Article Area Time Display Area Font Size','sakurairo_csf'),
  2268. 'dependency' => array( 'post_list_style', '==', 'imageflow', '', 'true' ),
  2269. 'desc' => __('Slide to adjust, the recommended values range is 10-14','sakurairo_csf'),
  2270. 'unit' => 'px',
  2271. 'step' => '1',
  2272. 'min' => '6',
  2273. 'max' => '20',
  2274. 'default' => '12'
  2275. ),
  2276. array(
  2277. 'id' => 'is_author_meta_show',
  2278. 'type' => 'switcher',
  2279. 'title' => __('Article Area Author Info','sakurairo_csf'),
  2280. 'label' => __('When turned on, author information will be added to the article metadata section.' ,'sakurairo_csf'),
  2281. 'default' => false
  2282. ),
  2283. )
  2284. ) );
  2285. Sakurairo_CSF::createSection( $prefix, array(
  2286. 'id' => 'page',
  2287. 'title' => __('Page Options','sakurairo_csf'),
  2288. 'icon' => 'fa fa-file-text',
  2289. ) );
  2290. Sakurairo_CSF::createSection( $prefix, array(
  2291. 'parent' => 'page',
  2292. 'title' => __('Common Options','sakurairo_csf'),
  2293. 'icon' => 'fa fa-compass',
  2294. 'fields' => array(
  2295. array(
  2296. 'type' => 'submessage',
  2297. 'style' => 'info',
  2298. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Pages/#%E7%BB%BC%E5%90%88%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2299. ),
  2300. array(
  2301. 'id' => 'page_style',
  2302. 'type' => 'image_select',
  2303. 'title' => __('Page Style','sakurairo_csf'),
  2304. 'options' => array(
  2305. 'sakurairo' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/page_style_iro.webp',
  2306. 'sakura' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/page_style_sakura.webp',
  2307. ),
  2308. 'default' => 'sakurairo'
  2309. ),
  2310. array(
  2311. 'id' => 'entry_content_style',
  2312. 'type' => 'radio',
  2313. 'title' => __('Page Layout Style','sakurairo_csf'),
  2314. 'options' => array(
  2315. 'sakurairo' => __('Default Style','sakurairo_csf'),
  2316. 'github' => __('Github Style','sakurairo_csf'),
  2317. ),
  2318. 'default' => 'sakurairo'
  2319. ),
  2320. array(
  2321. 'id' => 'patternimg',
  2322. 'type' => 'switcher',
  2323. 'title' => __('Page Decoration Image','sakurairo_csf'),
  2324. 'label' => __('Enabled by default, show on article pages, standalone pages and category pages','sakurairo_csf'),
  2325. 'default' => true
  2326. ),
  2327. array(
  2328. 'id' => 'page_title_animation',
  2329. 'type' => 'switcher',
  2330. 'title' => __('Page Title Animation','sakurairo_csf'),
  2331. 'label' => __('Page title will have float-in animation when turned on','sakurairo_csf'),
  2332. 'default' => true
  2333. ),
  2334. array(
  2335. 'id' => 'page_title_animation_time',
  2336. 'type' => 'slider',
  2337. 'title' => __('Page Title Animation Time','sakurairo_csf'),
  2338. 'dependency' => array( 'page_title_animation', '==', 'true', '', 'true' ),
  2339. 'desc' => __('Slide to adjust, recommended value range is 1-2','sakurairo_csf'),
  2340. 'step' => '0.01',
  2341. 'unit' => 's',
  2342. 'max' => '5',
  2343. 'default' => '2'
  2344. ),
  2345. array(
  2346. 'id' => 'clipboard_copyright',
  2347. 'type' => 'switcher',
  2348. 'title' => __('Page Clipboard Copyright Notice','sakurairo_csf'),
  2349. 'label' => __('Enabled by default, users will have copyright notice text when copying text content over 30 bytes','sakurairo_csf'),
  2350. 'default' => true
  2351. ),
  2352. array(
  2353. 'id' => 'page_lazyload',
  2354. 'type' => 'switcher',
  2355. 'title' => __('Page LazyLoad','sakurairo_csf'),
  2356. 'label' => __('LazyLoad effect for page images, WordPress block editor already comes with similar effect, not recommended to turn on','sakurairo_csf'),
  2357. 'default' => false
  2358. ),
  2359. array(
  2360. 'id' => 'page_lazyload_spinner',
  2361. 'type' => 'text',
  2362. 'title' => __('Page LazyLoad Placeholder SVG','sakurairo_csf'),
  2363. 'dependency' => array( 'page_lazyload', '==', 'true', '', 'true' ),
  2364. 'desc' => __('Fill in the address, this is the placeholder image that will be displayed when the page LazyLoad is being loaded','sakurairo_csf'),
  2365. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/inload.svg'
  2366. ),
  2367. array(
  2368. 'id' => 'load_in_svg',
  2369. 'type' => 'text',
  2370. 'title' => __('Page Image Placeholder SVG','sakurairo_csf'),
  2371. 'desc' => __('Fill address, this is the SVG that will be displayed as a placeholder when the page image is being loaded','sakurairo_csf'),
  2372. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/load_svg/inload.svg'
  2373. ),
  2374. )
  2375. ) );
  2376. Sakurairo_CSF::createSection( $prefix, array(
  2377. 'parent' => 'page',
  2378. 'title' => __('Article Page Options','sakurairo_csf'),
  2379. 'icon' => 'fa fa-archive',
  2380. 'fields' => array(
  2381. array(
  2382. 'type' => 'submessage',
  2383. 'style' => 'info',
  2384. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Pages/#%E6%96%87%E7%AB%A0%E9%A1%B5%E9%9D%A2%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2385. ),
  2386. array(
  2387. 'id' => 'article_title_font_size',
  2388. 'type' => 'slider',
  2389. 'title' => __('Article Page Title Font Size','sakurairo_csf'),
  2390. 'desc' => __('Slide to adjust, recommended value range is 28-36. This option is only available for article pages that have a featured image set','sakurairo_csf'),
  2391. 'unit' => 'px',
  2392. 'min' => '16',
  2393. 'max' => '48',
  2394. 'default' => '32'
  2395. ),
  2396. array(
  2397. 'id' => 'article_title_line',
  2398. 'type' => 'switcher',
  2399. 'title' => __('Article Page Title Underline Animation','sakurairo_csf'),
  2400. 'label' => __('Article title will have underline animation when this is enabled and article has a featured image set','sakurairo_csf'),
  2401. 'default' => false
  2402. ),
  2403. array(
  2404. 'id' => 'article_auto_toc',
  2405. 'type' => 'switcher',
  2406. 'title' => __('Article Page Auto Show Menu','sakurairo_csf'),
  2407. 'label' => __('Enabled by default, the article page will automatically show the menu. PHP extension "DOM" is required for this feature.','sakurairo_csf'),
  2408. 'default' => true
  2409. ),
  2410. array(
  2411. 'id' => 'inline_code_background_color',
  2412. 'type' => 'color',
  2413. 'title' => __('Inline Code Background Color','sakurairo_csf'),
  2414. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2415. 'default' => '#F2F1F1'
  2416. ),
  2417. array(
  2418. 'id' => 'inline_code_background_color_in_dark_mode',
  2419. 'type' => 'color',
  2420. 'title' => __('Inline Code Background Color In Dark Mode','sakurairo_csf'),
  2421. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color,this color is only displayed in dark mode','sakurairo_csf'),
  2422. 'default' => '#505050'
  2423. ),
  2424. array(
  2425. 'type' => 'subheading',
  2426. 'content' => __('Article Expansion Area','sakurairo_csf'),
  2427. ),
  2428. array(
  2429. 'id' => 'article_function',
  2430. 'type' => 'switcher',
  2431. 'title' => __('Article Page Function Bar','sakurairo_csf'),
  2432. 'label' => __('Enabled by default, will be displayed on the article page with the features enabled below','sakurairo_csf'),
  2433. 'default' => true
  2434. ),
  2435. array(
  2436. 'id' => 'article_lincenses',
  2437. 'type' => 'switcher',
  2438. 'title' => __('Article Lincenses','sakurairo_csf'),
  2439. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2440. 'label' => __('Enabled by default, Article lincenses will appear on the function bar','sakurairo_csf'),
  2441. 'default' => true
  2442. ),
  2443. array(
  2444. 'id' => 'alipay_code',
  2445. 'type' => 'upload',
  2446. 'title' => __('Article Page Appreciation Function (Alipay QR Code)','sakurairo_csf'),
  2447. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2448. 'desc' => __('Upload Alipay Receipt QR Code Image','sakurairo_csf'),
  2449. 'library' => 'image',
  2450. ),
  2451. array(
  2452. 'id' => 'wechat_code',
  2453. 'type' => 'upload',
  2454. 'title' => __('Article Page Appreciation Function (Wechat QR Code)','sakurairo_csf'),
  2455. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2456. 'desc' => __('Upload WeChat Receipt QR Code Image','sakurairo_csf'),
  2457. 'library' => 'image',
  2458. ),
  2459. array(
  2460. 'id' => 'author_profile_avatar',
  2461. 'type' => 'switcher',
  2462. 'title' => __('Article Page Author Avatar','sakurairo_csf'),
  2463. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2464. 'label' => __('Enabled by default, Author avatar will appear on the function bar','sakurairo_csf'),
  2465. 'default' => true
  2466. ),
  2467. array(
  2468. 'id' => 'author_profile_name',
  2469. 'type' => 'switcher',
  2470. 'title' => __('Article Page Author Name','sakurairo_csf'),
  2471. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2472. 'label' => __('Author name will appear on the function bar when enabled','sakurairo_csf'),
  2473. 'default' => false
  2474. ),
  2475. array(
  2476. 'id' => 'author_profile_quote',
  2477. 'type' => 'switcher',
  2478. 'title' => __('Article Page Author Signature','sakurairo_csf'),
  2479. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2480. 'label' => __('Enabled by default, Author signature will appear on the function bar','sakurairo_csf'),
  2481. 'default' => true
  2482. ),
  2483. array(
  2484. 'id' => 'author_profile_quote_text',
  2485. 'type' => 'text',
  2486. 'title' => __('Article Page Author Info Signature Text','sakurairo_csf'),
  2487. 'dependency' => array(
  2488. array( 'article_function', '==', 'true', '', 'true' ),
  2489. array( 'author_profile_quote', '==', 'true' ),
  2490. ),
  2491. 'desc' => __('A self-descriptive quote','sakurairo_csf'),
  2492. 'default' => '届ける言葉を今は育ててる'
  2493. ),
  2494. array(
  2495. 'id' => 'article_modified_time',
  2496. 'type' => 'switcher',
  2497. 'title' => __('Article Last Update Time','sakurairo_csf'),
  2498. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2499. 'label' => __('Article last update time will appear on the function bar when enabled','sakurairo_csf'),
  2500. 'default' => false
  2501. ),
  2502. array(
  2503. 'id' => 'article_tag',
  2504. 'type' => 'switcher',
  2505. 'title' => __('Article Tag','sakurairo_csf'),
  2506. 'dependency' => array( 'article_function', '==', 'true', '', 'true' ),
  2507. 'label' => __('Enabled by default, Article tag will appear on the function bar','sakurairo_csf'),
  2508. 'default' => true
  2509. ),
  2510. array(
  2511. 'id' => 'article_nextpre',
  2512. 'type' => 'switcher',
  2513. 'title' => __('Article Page Prev/Next Article Switcher','sakurairo_csf'),
  2514. 'label' => __('Enabled by default, the previous and next article switch will appear on the article pages','sakurairo_csf'),
  2515. 'default' => true
  2516. ),
  2517. )
  2518. ) );
  2519. Sakurairo_CSF::createSection( $prefix, array(
  2520. 'parent' => 'page',
  2521. 'title' => __('Template Page Options','sakurairo_csf'),
  2522. 'icon' => 'fa fa-window-maximize',
  2523. 'fields' => array(
  2524. array(
  2525. 'type' => 'submessage',
  2526. 'style' => 'info',
  2527. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Pages/#%E6%A8%A1%E6%9D%BF%E9%A1%B5%E9%9D%A2%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2528. ),
  2529. array(
  2530. 'type' => 'subheading',
  2531. 'content' => __('Public Settings','sakurairo_csf'),
  2532. ),
  2533. array(
  2534. 'id' => 'page_temp_title_font_size',
  2535. 'type' => 'slider',
  2536. 'title' => __('Template Page Title Font Size','sakurairo_csf'),
  2537. 'desc' => __('Slide to adjust, recommended value range is 36-48. This option is only available for template pages with featured images already set','sakurairo_csf'),
  2538. 'unit' => 'px',
  2539. 'min' => '20',
  2540. 'max' => '64',
  2541. 'default' => '40'
  2542. ),
  2543. array(
  2544. 'type' => 'subheading',
  2545. 'content' => __('ShuoShuo Template Settings','sakurairo_csf'),
  2546. ),
  2547. array(
  2548. 'id' => 'shuoshuo_background_color1',
  2549. 'type' => 'color',
  2550. 'title' => __('Ideas Template Background ColorⅠ','sakurairo_csf'),
  2551. 'desc' => __('Customize the colors','sakurairo_csf'),
  2552. 'default' => 'rgba(255,224,102,0.2)'
  2553. ),
  2554. array(
  2555. 'id' => 'shuoshuo_background_color2',
  2556. 'type' => 'color',
  2557. 'title' => __('Ideas Template Background Color II','sakurairo_csf'),
  2558. 'desc' => __('Customize the colors','sakurairo_csf'),
  2559. 'default' => 'rgba(255,204,0,0.2)'
  2560. ),
  2561. array(
  2562. 'id' => 'shuoshuo_arrow',
  2563. 'type' => 'switcher',
  2564. 'title' => __('Ideas Template Tip Arrow','sakurairo_csf'),
  2565. 'label' => __('After turning on the alert arrow will appear on the left side of the comment','sakurairo_csf'),
  2566. 'default' => false
  2567. ),
  2568. array(
  2569. 'id' => 'shuoshuo_font',
  2570. 'type' => 'text',
  2571. 'title' => __('Ideas Template Font','sakurairo_csf'),
  2572. 'desc' => __('Fill in the font name. For example: Noto Serif SC','sakurairo_csf'),
  2573. 'default' => 'Noto Serif SC'
  2574. ),
  2575. array(
  2576. 'id' => 'shuoshuo_per_page',
  2577. 'type' => 'text',
  2578. 'title' => __('Number Of ShuoShuo','sakurairo_csf'),
  2579. 'desc' => __('Enter a positive integer or "-1" to control the number of ShuoShuo displayed on each page. Enter "-1" to display all messages.','sakurairo_csf'),
  2580. 'default' => '5'
  2581. ),
  2582. array(
  2583. 'type' => 'subheading',
  2584. 'content' => __('Bangumi Template Settings','sakurairo_csf'),
  2585. ),
  2586. array(
  2587. 'id' => 'bangumi_source',
  2588. 'type' => 'image_select',
  2589. 'title' => __('Bangumi Template Source', 'sakurairo_csf'),
  2590. 'options' => array(
  2591. 'bilibili' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/bangumi_tep_bili.webp',
  2592. 'myanimelist' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/bangumi_tep_mal.webp',
  2593. ),
  2594. 'default' => 'bilibili'
  2595. ),
  2596. array(
  2597. 'id' => 'my_anime_list_username',
  2598. 'type' => 'text',
  2599. 'title' => __('My Anime List Username','sakurairo_csf'),
  2600. 'dependency' => array( 'bangumi_source', '==', 'myanimelist', '', 'true' ),
  2601. 'desc' => __('Username on https://myanimelist.net/','sakurairo_csf'),
  2602. 'default' => ''
  2603. ),
  2604. array(
  2605. 'id' => 'my_anime_list_sort',
  2606. 'type' => 'radio',
  2607. 'title' => __('My Anime List Sort','sakurairo_csf'),
  2608. 'dependency' => array( 'bangumi_source', '==', 'myanimelist', '', 'true' ),
  2609. 'options' => array(
  2610. '1' => __('Status and Last Updated', 'sakurairo_csf'),
  2611. '2' => __('Last Updated', 'sakurairo_csf'),
  2612. '3' => __('Status', 'sakurairo_csf'),
  2613. ),
  2614. 'default' => '1'
  2615. ),
  2616. array(
  2617. 'id' => 'bilibili_id',
  2618. 'type' => 'text',
  2619. 'title' => __('Bilibili Account UID','sakurairo_csf'),
  2620. 'desc' => __('Fill in your account ID, e.g. https://space.bilibili.com/13972644/, just the number part "13972644"','sakurairo_csf'),
  2621. 'dependency' => array( 'bangumi_source', '==', 'bilibili', '', 'true' ),
  2622. 'default' => '13972644'
  2623. ),
  2624. array(
  2625. 'id' => 'bilibili_cookie',
  2626. 'type' => 'text',
  2627. 'title' => __('Bilibili Account Cookies','sakurairo_csf'),
  2628. 'desc' => __('Fill in your account cookies, F12 to open your browser web panel, go to your bilibili homepage to get cookies. If left empty, it will not show the progress of catching up bangumis','sakurairo_csf'),
  2629. 'dependency' => array( 'bangumi_source', '==', 'bilibili', '', 'true' ),
  2630. 'default' => 'LIVE_BUVID='
  2631. ),
  2632. array(
  2633. 'type' => 'subheading',
  2634. 'content' => __('Friend Link Template Settings','sakurairo_csf'),
  2635. ),
  2636. array(
  2637. 'id' => 'friend_link_align',
  2638. 'type' => 'image_select',
  2639. 'title' => __('Friend Link Template Unit Alignment','sakurairo_csf'),
  2640. 'options' => array(
  2641. 'left' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/friend_link_left.webp',
  2642. 'right' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/friend_link_right.webp',
  2643. 'center' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/friend_link_center.webp',
  2644. ),
  2645. 'default' => 'left'
  2646. ),
  2647. array(
  2648. 'id' => 'friend_link_title_matching_color',
  2649. 'type' => 'color',
  2650. 'title' => __('Friend Link Template Unit Matching Color','sakurairo_csf'),
  2651. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2652. 'default' => '#ac354b'
  2653. ),
  2654. array(
  2655. 'id' => 'friend_link_shadow_color',
  2656. 'type' => 'color',
  2657. 'title' => __('Friend Link Template Unit Border Shadow Color','sakurairo_csf'),
  2658. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2659. 'default' => '#e8e8e8'
  2660. ),
  2661. array(
  2662. 'id' => 'friend_link_sorting_mode',
  2663. 'type' => 'select',
  2664. 'title' => __('Friend Link Sorting Mode','sakurairo_csf'),
  2665. 'desc' => __('Select the friend link sorting mode, "Name" is used by Default.','sakurairo_csf'),
  2666. 'options' => array(
  2667. 'name' => __('Name','sakurairo_csf'),
  2668. 'rating' => __('Rating','sakurairo_csf'),
  2669. 'updated' => __('Updated','sakurairo_csf'),
  2670. 'rand' => __('Rand','sakurairo_csf'),
  2671. ),
  2672. 'default' => 'name'
  2673. ),
  2674. array(
  2675. 'id' => 'friend_link_order',
  2676. 'type' => 'select',
  2677. 'title' => __('Ascending OR Descending','sakurairo_csf'),
  2678. 'desc' => __('Order friend link in ascending or descending.','sakurairo_csf'),
  2679. 'dependency' => array( 'friend_link_sorting_mode', '!=', 'rand', '', 'true' ),
  2680. 'options' => array(
  2681. 'ASC' => __('Ascending','sakurairo_csf'),
  2682. 'DESC' => __('Descending','sakurairo_csf'),
  2683. ),
  2684. 'default' => 'ASC'
  2685. ),
  2686. array(
  2687. 'type' => 'subheading',
  2688. 'content' => __('Login Template Settings','sakurairo_csf'),
  2689. ),
  2690. array(
  2691. 'id' => 'ex_register_open',
  2692. 'type' => 'switcher',
  2693. 'title' => __('Login Template Registration Function','sakurairo_csf'),
  2694. 'label' => __('Login template will allow registration when enabled','sakurairo_csf'),
  2695. 'default' => false
  2696. ),
  2697. )
  2698. ) );
  2699. Sakurairo_CSF::createSection( $prefix, array(
  2700. 'parent' => 'page',
  2701. 'title' => __('Comment-related Options','sakurairo_csf'),
  2702. 'icon' => 'fa fa-comments-o',
  2703. 'fields' => array(
  2704. array(
  2705. 'type' => 'submessage',
  2706. 'style' => 'info',
  2707. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Pages/#%E8%AF%84%E8%AE%BA%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2708. ),
  2709. array(
  2710. 'type' => 'subheading',
  2711. 'content' => __('Comment Area Style','sakurairo_csf'),
  2712. ),
  2713. array(
  2714. 'id' => 'comment_area',
  2715. 'type' => 'radio',
  2716. 'title' => __('Page Comment Area Display','sakurairo_csf'),
  2717. 'desc' => __('You can choose to expand or shirink the content of the comment area','sakurairo_csf'),
  2718. 'options' => array(
  2719. 'unfold' => __('Expand','sakurairo_csf'),
  2720. 'fold' => __('Shrink','sakurairo_csf'),
  2721. ),
  2722. 'default' => 'unfold'
  2723. ),
  2724. array(
  2725. 'id' => 'comment_area_matching_color',
  2726. 'type' => 'color',
  2727. 'title' => __('Page Comment Area Matching Color','sakurairo_csf'),
  2728. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2729. 'default' => '#6667ab'
  2730. ),
  2731. array(
  2732. 'id' => 'comment_area_shadow_color',
  2733. 'type' => 'color',
  2734. 'title' => __('Page Comment Area Shadow Color','sakurairo_csf'),
  2735. 'desc' => __('Customize the colors, suggest using a corresponding color with the background color','sakurairo_csf'),
  2736. 'default' => '#e8e8e8'
  2737. ),
  2738. array(
  2739. 'id' => 'comment_area_image',
  2740. 'type' => 'upload',
  2741. 'title' => __('Page Comment Area Bottom Right Background Image','sakurairo_csf'),
  2742. 'desc' => __('If this option is blank, there will be no image, no best recommendation here','sakurairo_csf'),
  2743. 'library' => 'image',
  2744. ),
  2745. array(
  2746. 'type' => 'subheading',
  2747. 'content' => __('Comment Area Function','sakurairo_csf'),
  2748. ),
  2749. array(
  2750. 'id' => 'smilies_list',
  2751. 'type' => 'button_set',
  2752. 'title' => __('Comment Area Emoticon','sakurairo_csf'),
  2753. 'desc' => __('Select the emoticons to be displayed in the comment area input box. Uncheck all to turn off the comment input box emoticon function.','sakurairo_csf'),
  2754. 'multiple' => true,
  2755. 'options' => array(
  2756. 'bilibili' => __('BiliBili Emoticon Pack','sakurairo_csf'),
  2757. 'tieba' => __('Baidu Tieba Emoticon Pack','sakurairo_csf'),
  2758. 'yanwenzi' => __('Emoji','sakurairo_csf'),
  2759. 'custom' => __('Customized Emoticon Pack','sakurairo_csf'),
  2760. ),
  2761. 'default' => array( 'bilibili', 'tieba', 'yanwenzi' )
  2762. ),
  2763. array(
  2764. 'id' => 'smilies_name',
  2765. 'type' => 'text',
  2766. 'title' => __('Customized Emoticon Column Name','sakurairo_csf'),
  2767. 'desc' => __('It is recommended to enter less than 4 Chinese characters in length to avoid causing compatibility issues on mobile terminals.','sakurairo_csf'),
  2768. 'dependency' => array( 'smilies_list', 'any', 'custom', '', 'true' ),
  2769. 'default' => 'custom'
  2770. ),
  2771. array(
  2772. 'id' => 'smilies_dir',
  2773. 'type' => 'text',
  2774. 'title' => __('Path To Custom Expression','sakurairo_csf'),
  2775. 'desc' => __('Click <a href="./admin.php?update_custom_smilies=true" target="_blank">here</a> updating emoticon list. Specific usage reference: <a href="https://docs.fuukei.org/Sakurairo/Pages/#%E8%AF%84%E8%AE%BA%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE" target="_blank">Comment related settings</a>','sakurairo_csf'),
  2776. 'dependency' => array( 'smilies_list', 'any', 'custom', '', 'true' ),
  2777. ),
  2778. array(
  2779. 'id' => 'smilies_proxy',
  2780. 'type' => 'text',
  2781. 'title' => __('Custom Emoticon Proxy Address','sakurairo_csf'),
  2782. 'desc' => __('Fill in the CDN address of the emoticon image. If left blank, the CDN proxy function will not be enabled.','sakurairo_csf'),
  2783. 'dependency' => array(
  2784. array('smilies_list', 'any', 'custom', '', 'true' ),
  2785. array('smilies_dir', '!=', '', '', 'true'),
  2786. ),
  2787. ),
  2788. array(
  2789. 'id' => 'comment_useragent',
  2790. 'type' => 'switcher',
  2791. 'title' => __('Page Comment Area UA Info','sakurairo_csf'),
  2792. 'label' => __('When enabled, the page comment area will display the user’s browser, operating system information','sakurairo_csf'),
  2793. 'default' => false
  2794. ),
  2795. array(
  2796. 'id' => 'comment_location',
  2797. 'type' => 'switcher',
  2798. 'title' => __('Page Comment Area Location Information','sakurairo_csf'),
  2799. 'label' => __('When enabled, the page comment area will show the user’s location information','sakurairo_csf'),
  2800. 'default' => false
  2801. ),
  2802. array(
  2803. 'id' => 'comment_private_message',
  2804. 'type' => 'switcher',
  2805. 'title' => __('Private Comment Function','sakurairo_csf'),
  2806. 'label' => __('When enabled, users are allowed to set their comments to be invisible to others','sakurairo_csf'),
  2807. 'default' => false
  2808. ),
  2809. array(
  2810. 'id' => 'not_robot',
  2811. 'type' => 'switcher',
  2812. 'title' => __('Page Comment Area Bot Verification','sakurairo_csf'),
  2813. 'label' => __('After turning on user comments need to be verified before posting','sakurairo_csf'),
  2814. 'default' => false
  2815. ),
  2816. array(
  2817. 'id' => 'qq_avatar_link',
  2818. 'type' => 'select',
  2819. 'title' => __('QQ Avatar Link Encryption','sakurairo_csf'),
  2820. 'options' => array(
  2821. 'off' => __('Off','sakurairo_csf'),
  2822. 'type_1' => __('Redirect (low security)','sakurairo_csf'),
  2823. 'type_2' => __('Get avatar data in the backend (medium security)','sakurairo_csf'),
  2824. 'type_3' => __('Parse avatar interface in the backend (high security, slow)','sakurairo_csf'),
  2825. ),
  2826. 'default' => 'off'
  2827. ),
  2828. array(
  2829. 'id' => 'img_upload_api',
  2830. 'type' => 'select',
  2831. 'title' => __('Page Comment Area Upload Image Interface','sakurairo_csf'),
  2832. 'options' => array(
  2833. 'off' => __('Off','sakurairo_csf'),
  2834. 'imgur' => 'Imgur (https://imgur.com)',
  2835. 'smms' => 'SM.MS (https://sm.ms)',
  2836. 'chevereto' => 'Chevereto (https://chevereto.com)',
  2837. 'lsky' => 'Lsky Pro (https://www.lsky.pro)',
  2838. ),
  2839. 'default' => 'off'
  2840. ),
  2841. array(
  2842. 'id' => 'imgur_client_id',
  2843. 'type' => 'text',
  2844. 'title' => __('Imgur Client ID','sakurairo_csf'),
  2845. 'dependency' => array( 'img_upload_api', '==', 'imgur', '', 'true' ),
  2846. 'desc' => __('Fill in Client ID here, to register please visit https://api.imgur.com/oauth2/addclient','sakurairo_csf'),
  2847. ),
  2848. array(
  2849. 'id' => 'imgur_upload_image_proxy',
  2850. 'type' => 'text',
  2851. 'title' => __('Imgur Upload Proxy','sakurairo_csf'),
  2852. 'dependency' => array( 'img_upload_api', '==', 'imgur', '', 'true' ),
  2853. 'desc' => __('The proxy used by the backend when uploading images to Imgur. You can refer to the tutorial: https://2heng.xin/2018/06/06/javascript-upload-images-with-imgur-api/','sakurairo_csf'),
  2854. 'default' => 'https://api.imgur.com/3/image/'
  2855. ),
  2856. array(
  2857. 'id' => 'smms_client_id',
  2858. 'type' => 'text',
  2859. 'title' => __('SM.MS Secret Token','sakurairo_csf'),
  2860. 'dependency' => array( 'img_upload_api', '==', 'smms', '', 'true' ),
  2861. 'desc' => __('Fill in your Key here, to get it please visit https://sm.ms/home/apitoken','sakurairo_csf'),
  2862. ),
  2863. array(
  2864. 'id' => 'chevereto_api_key',
  2865. 'type' => 'text',
  2866. 'title' => __('Chevereto API v1 Key','sakurairo_csf'),
  2867. 'dependency' => array( 'img_upload_api', '==', 'chevereto', '', 'true' ),
  2868. 'desc' => __('Fill in the Key here, to get please visit your Chevereto home page address/dashboard/settings/api','sakurairo_csf'),
  2869. ),
  2870. array(
  2871. 'id' => 'cheverto_url',
  2872. 'type' => 'text',
  2873. 'title' => __('Chevereto Address','sakurairo_csf'),
  2874. 'dependency' => array( 'img_upload_api', '==', 'chevereto', '', 'true' ),
  2875. 'desc' => __('Your Chevereto home page address. Please note that there is no "/" at the end, e.g. https://your.cherverto.com','sakurairo_csf'),
  2876. ),
  2877. array(
  2878. 'id' => 'lsky_api_key',
  2879. 'type' => 'text',
  2880. 'title' => __('Lsky Pro v1 Token','sakurairo_csf'),
  2881. 'dependency' => array( 'img_upload_api', '==', 'lsky', '', 'true' ),
  2882. 'desc' => __('Fill in the Token here, Please note that there is no "Bearer " at first, to get please visit your Lsky Pro home page address/api','sakurairo_csf'),
  2883. ),
  2884. array(
  2885. 'id' => 'lsky_url',
  2886. 'type' => 'text',
  2887. 'title' => __('Lsky Pro Address','sakurairo_csf'),
  2888. 'dependency' => array( 'img_upload_api', '==', 'lsky', '', 'true' ),
  2889. 'desc' => __('Your Lsky Pro home page address. Please note that there is no "/" at the end, e.g. https://your.lskypro.com','sakurairo_csf'),
  2890. ),
  2891. array(
  2892. 'id' => 'comment_image_proxy',
  2893. 'type' => 'text',
  2894. 'title' => __('Comment Image Proxy','sakurairo_csf'),
  2895. 'desc' => __('Proxy for the image displayed on the frontend','sakurairo_csf'),
  2896. 'dependency' => array( 'img_upload_api', '!=', 'off', '', 'true' ),
  2897. 'default' => 'https://images.weserv.nl/?url='
  2898. ),
  2899. array(
  2900. 'type' => 'subheading',
  2901. 'content' => __('Comment Email Notification','sakurairo_csf'),
  2902. ),
  2903. array(
  2904. 'id' => 'mail_img',
  2905. 'type' => 'upload',
  2906. 'title' => __('Mail Template Featured Image','sakurairo_csf'),
  2907. 'desc' => __('Set the background image of your reply email','sakurairo_csf'),
  2908. 'library' => 'image',
  2909. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/mail_head.webp'
  2910. ),
  2911. array(
  2912. 'id' => 'mail_user_name',
  2913. 'type' => 'text',
  2914. 'title' => __('Mail Template Sending Address Prefix','sakurairo_csf'),
  2915. 'desc' => __('Used to send system mail. The sender address will be displayed in the user\'s mailbox, don\'t use Non-English Characters. The default system mail address is bibi@your domain','sakurairo_csf'),
  2916. 'default' => 'bibi'
  2917. ),
  2918. array(
  2919. 'id' => 'mail_notify',
  2920. 'type' => 'switcher',
  2921. 'title' => __('User Mail Reply Notification','sakurairo_csf'),
  2922. 'label' => __('By default WordPress will use email notifications to notify users when their comments receive a reply. After turning it on users are allowed to set whether to use email notifications when their comments receive a reply','sakurairo_csf'),
  2923. 'default' => false
  2924. ),
  2925. array(
  2926. 'id' => 'admin_notify',
  2927. 'type' => 'switcher',
  2928. 'title' => __('Admin Email Reply Notification','sakurairo_csf'),
  2929. 'label' => __('Use email notifications when admin comments receive a reply after turning it on','sakurairo_csf'),
  2930. 'default' => false
  2931. ),
  2932. )
  2933. ) );
  2934. Sakurairo_CSF::createSection( $prefix, array(
  2935. 'id' => 'others',
  2936. 'title' => __('Other Options','sakurairo_csf'),
  2937. 'icon' => 'fa fa-coffee',
  2938. ) );
  2939. Sakurairo_CSF::createSection( $prefix, array(
  2940. 'parent' => 'others',
  2941. 'title' => __('Login Screen and Dashboard Related Options','sakurairo_csf'),
  2942. 'icon' => 'fa fa-sign-in',
  2943. 'fields' => array(
  2944. array(
  2945. 'type' => 'submessage',
  2946. 'style' => 'info',
  2947. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Others/#%E7%99%BB%E5%BD%95%E7%95%8C%E9%9D%A2%E5%92%8C%E4%BB%AA%E8%A1%A8%E7%9B%98%E7%9B%B8%E5%85%B3%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  2948. ),
  2949. array(
  2950. 'type' => 'subheading',
  2951. 'content' => __('Login Screen','sakurairo_csf'),
  2952. ),
  2953. array(
  2954. 'id' => 'custom_login_switch',
  2955. 'type' => 'switcher',
  2956. 'title' => __('Custom Login Screen','sakurairo_csf'),
  2957. 'label' => __('Default on, custom login screen will replace the default login screen','sakurairo_csf'),
  2958. 'default' => true
  2959. ),
  2960. array(
  2961. 'id' => 'login_background',
  2962. 'type' => 'upload',
  2963. 'title' => __('Login Screen Background Image','sakurairo_csf'),
  2964. 'desc' => __('Set your login screen background image, leave this option blank to show the default','sakurairo_csf'),
  2965. 'dependency' => array( 'custom_login_switch', '==', 'true', '', 'true' ),
  2966. 'library' => 'image',
  2967. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/login_background.webp'
  2968. ),
  2969. array(
  2970. 'id' => 'login_blur',
  2971. 'type' => 'switcher',
  2972. 'title' => __('Login Screen Background Blur','sakurairo_csf'),
  2973. 'label' => __('Login screen background image will be blurred when enabled','sakurairo_csf'),
  2974. 'dependency' => array( 'custom_login_switch', '==', 'true', '', 'true' ),
  2975. 'default' => false
  2976. ),
  2977. array(
  2978. 'id' => 'login_logo_img',
  2979. 'type' => 'upload',
  2980. 'title' => __('Login Screen Logo','sakurairo_csf'),
  2981. 'desc' => __('Set your login screen Logo','sakurairo_csf'),
  2982. 'dependency' => array( 'custom_login_switch', '==', 'true', '', 'true' ),
  2983. 'library' => 'image',
  2984. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/login_logo.webp'
  2985. ),
  2986. array(
  2987. 'id' => 'login_urlskip',
  2988. 'type' => 'switcher',
  2989. 'title' => __('Jump after login','sakurairo_csf'),
  2990. 'label' => __('Jump to backend for admins and home for users after turning on.','sakurairo_csf'),
  2991. 'default' => false
  2992. ),
  2993. array(
  2994. 'id' => 'login_language_opt',
  2995. 'type' => 'switcher',
  2996. 'title' => __('Login Screen Language Option','sakurairo_csf'),
  2997. 'label' => __('Login screen language option will be display when enabled','sakurairo_csf'),
  2998. 'default' => false
  2999. ),
  3000. array(
  3001. 'type' => 'subheading',
  3002. 'content' => __('Dashboard','sakurairo_csf'),
  3003. ),
  3004. array(
  3005. 'id' => 'admin_background',
  3006. 'type' => 'upload',
  3007. 'title' => __('Dashboard Background Image','sakurairo_csf'),
  3008. 'desc' => __('Set your dashboard background image, leave this option blank to show white background','sakurairo_csf'),
  3009. 'library' => 'image',
  3010. 'default' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/series/admin_background.webp'
  3011. ),
  3012. array(
  3013. 'id' => 'admin_left_style',
  3014. 'type' => 'image_select',
  3015. 'title' => __('Dashboard Options Menu Style','sakurairo_csf'),
  3016. 'options' => array(
  3017. 'v1' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/admin_left_style_v1.webp',
  3018. 'v2' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/admin_left_style_v2.webp',
  3019. ),
  3020. 'default' => 'v1'
  3021. ),
  3022. array(
  3023. 'id' => 'admin_first_class_color',
  3024. 'type' => 'color',
  3025. 'title' => __('Dashboard Primary Menu Color','sakurairo_csf'),
  3026. 'desc' => __('Customize the colors','sakurairo_csf'),
  3027. 'default' => '#272151'
  3028. ),
  3029. array(
  3030. 'id' => 'admin_second_class_color',
  3031. 'type' => 'color',
  3032. 'title' => __('Dashboard Secondary Menu Color','sakurairo_csf'),
  3033. 'desc' => __('Customize the colors','sakurairo_csf'),
  3034. 'default' => '#36307f'
  3035. ),
  3036. array(
  3037. 'id' => 'admin_emphasize_color',
  3038. 'type' => 'color',
  3039. 'title' => __('Dashboard Emphasis Color','sakurairo_csf'),
  3040. 'desc' => __('Customize the colors','sakurairo_csf'),
  3041. 'default' => '#7b2a52'
  3042. ),
  3043. array(
  3044. 'id' => 'admin_button_color',
  3045. 'type' => 'color',
  3046. 'title' => __('Dashboard Button Color','sakurairo_csf'),
  3047. 'desc' => __('Customize the colors','sakurairo_csf'),
  3048. 'default' => '#7a003d'
  3049. ),
  3050. array(
  3051. 'id' => 'admin_text_color',
  3052. 'type' => 'color',
  3053. 'title' => __('Dashboard Text Color','sakurairo_csf'),
  3054. 'desc' => __('Customize the colors','sakurairo_csf'),
  3055. 'default' => '#FFFFFF'
  3056. ),
  3057. )
  3058. ) );
  3059. Sakurairo_CSF::createSection( $prefix, array(
  3060. 'parent' => 'others',
  3061. 'title' => __('ChatGPT Options','sakurairo_csf'),
  3062. 'icon' => 'fa fa-lightbulb',
  3063. 'fields' => array(
  3064. array(
  3065. 'type' => 'submessage',
  3066. 'style' => 'info',
  3067. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Others/#ChatGPT%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  3068. ),
  3069. array(
  3070. 'id' => 'composer_load',
  3071. 'type' => 'switcher',
  3072. 'title' => __('ChatGPT Function','sakurairo_csf'),
  3073. 'label' => __('After turning on ChatGPT Function will be available','sakurairo_csf'),
  3074. 'default' => false
  3075. ),
  3076. array(
  3077. 'id' => 'chatgpt_base_url',
  3078. 'type' => 'text',
  3079. 'title' => __('ChatGPT Base URL','sakurairo_csf'),
  3080. 'desc' => __('Fill in the ChatGPT Base URL, The default is http://sxy.gay/','sakurairo_csf'),
  3081. 'dependency' => array( 'composer_load', '==', 'true', '', 'true' ),
  3082. 'default' => 'http://sxy.gay/'
  3083. ),
  3084. array(
  3085. 'id' => 'chatgpt_access_token',
  3086. 'type' => 'text',
  3087. 'title' => __('ChatGPT API keys','sakurairo_csf'),
  3088. 'desc' => __('Fill in Your ChatGPT API keys, You can go to <a href="https://platform.openai.com/account/api-keys">OpenAI Website</a> to get your API Keys','sakurairo_csf'),
  3089. 'dependency' => array( 'composer_load', '==', 'true', '', 'true' ),
  3090. ),
  3091. array(
  3092. 'id' => 'chatgpt_article_summarize',
  3093. 'type' => 'switcher',
  3094. 'title' => __('ChatGPT Article Summarize','sakurairo_csf'),
  3095. 'label' => __('After turning on ChatGPT will automatically generate article abstracts','sakurairo_csf'),
  3096. 'dependency' => array( 'composer_load', '==', 'true', '', 'true' ),
  3097. 'default' => false
  3098. ),
  3099. array(
  3100. 'type' => 'content',
  3101. 'content'=> __('Each update of your post will trigger a request to generate a summary. Due to current API limitations, if your article exceeds 4097 Token, the system will only send the unexceeded portion to generate a summary','sakurairo_csf'),
  3102. 'dependency' => array(
  3103. array( 'composer_load', '==', 'true'),
  3104. array( 'chatgpt_article_summarize', '==', 'true', '', 'true' ),
  3105. ),
  3106. ),
  3107. array(
  3108. 'id' => 'chatgpt_exclude_ids',
  3109. 'type' => 'text',
  3110. 'title' => __('Article IDs that do not Require ChatGPT Summarize','sakurairo_csf'),
  3111. 'desc' => __('Enter the article IDs that do not need to generate ChatGPT Summarize, and split multiple article IDs with ","','sakurairo_csf'),
  3112. 'dependency' => array(
  3113. array( 'composer_load', '==', 'true'),
  3114. array( 'chatgpt_article_summarize', '==', 'true', '', 'true' ),
  3115. ),
  3116. 'default' => ''
  3117. ),
  3118. array(
  3119. 'id' => 'chatgpt_init_prompt',
  3120. 'type' => 'textarea',
  3121. 'title' => __('ChatGPT Article Summarize Init Prompt','sakurairo_csf'),
  3122. 'dependency' => array(
  3123. array( 'composer_load', '==', 'true'),
  3124. array( 'chatgpt_article_summarize', '==', 'true', '', 'true' ),
  3125. ),
  3126. 'desc' => __('Fill in the Init Prompt, Please make changes if you know how to configure it correctly. Init Prompt will be passed to ChatGPT as "system" role','sakurairo_csf'),
  3127. 'default' => '
  3128. "You are a excerpt generator. " .
  3129. "You can summarize articles given their title and full text. " .
  3130. "You should use the same language as the article for your excerpt. " .
  3131. "You do not need to write in third person."'
  3132. ),
  3133. array(
  3134. 'id' => 'chatgpt_ask_prompt',
  3135. 'type' => 'text',
  3136. 'title' => __('ChatGPT Article Summarize Ask Prompt','sakurairo_csf'),
  3137. 'dependency' => array(
  3138. array( 'composer_load', '==', 'true'),
  3139. array( 'chatgpt_article_summarize', '==', 'true', '', 'true' ),
  3140. ),
  3141. 'desc' => __('Fill in the Ask Prompt, Use preset value when option is empty, Please make changes if you know how to configure it correctly','sakurairo_csf'),
  3142. ),
  3143. )
  3144. ) );
  3145. Sakurairo_CSF::createSection( $prefix, array(
  3146. 'parent' => 'others',
  3147. 'title' => __('Low Use Options','sakurairo_csf'),
  3148. 'icon' => 'fa fa-low-vision',
  3149. 'fields' => array(
  3150. array(
  3151. 'type' => 'submessage',
  3152. 'style' => 'info',
  3153. 'content' => __('You can click <a href="https://docs.fuukei.org/Sakurairo/Others/#%E4%BD%8E%E4%BD%BF%E7%94%A8%E8%AE%BE%E7%BD%AE">here</a> to learn how to set the options on this page','sakurairo_csf'),
  3154. ),
  3155. array(
  3156. 'id' => 'statistics_api',
  3157. 'type' => 'radio',
  3158. 'title' => __('Statistics API','sakurairo_csf'),
  3159. 'desc' => __('You can choose WP-Statistics plugin statistics or theme built-in statistics to display','sakurairo_csf'),
  3160. 'options' => array(
  3161. 'theme_build_in' => __('Theme Built in Statistics','sakurairo_csf'),
  3162. 'wp_statistics' => __('WP-Statistics Plugin Statistics','sakurairo_csf'),
  3163. ),
  3164. 'default' => 'theme_build_in'
  3165. ),
  3166. array(
  3167. 'id' => 'statistics_format',
  3168. 'type' => 'select',
  3169. 'title' => __('Statistics display format','sakurairo_csf'),
  3170. 'desc' => __('You can choose from four different data display formats','sakurairo_csf'),
  3171. 'options' => array(
  3172. 'type_1' => __('23333 Visits','sakurairo_csf'),
  3173. 'type_2' => __('23,333 Visits','sakurairo_csf'),
  3174. 'type_3' => __('23 333 Visits','sakurairo_csf'),
  3175. 'type_4' => __('23K Visits','sakurairo_csf'),
  3176. ),
  3177. 'default' => 'type_1'
  3178. ),
  3179. array(
  3180. 'id' => 'live_search',
  3181. 'type' => 'switcher',
  3182. 'title' => __('Live Search','sakurairo_csf'),
  3183. 'label' => __('After turning on the live search in the frontend, call Rest API to update the cache once an hour. You can set the cache time manually in api.php','sakurairo_csf'),
  3184. 'default' => false
  3185. ),
  3186. array(
  3187. 'id' => 'live_search_comment',
  3188. 'type' => 'switcher',
  3189. 'title' => __('Live Search Comment Support','sakurairo_csf'),
  3190. 'dependency' => array( 'live_search', '==', 'true', '', 'true' ),
  3191. 'label' => __('Enable to search for comments in live search (not recommended if site has too many comments)','sakurairo_csf'),
  3192. 'default' => false
  3193. ),
  3194. array(
  3195. 'id' => 'google_analytics_id',
  3196. 'type' => 'text',
  3197. 'title' => __('Google Analytics Id','sakurairo_csf'),
  3198. 'label' => __('If you already have a plugin to handle it, please keep here empty.','sakurairo_csf'),
  3199. ),
  3200. array(
  3201. 'id' => 'site_custom_style',
  3202. 'type' => 'textarea',
  3203. 'title' => __('Custom CSS Styles','sakurairo_csf'),
  3204. 'desc' => __('Fill in the CSS code without writing style tag','sakurairo_csf'),
  3205. ),
  3206. array(
  3207. 'id'=>'site_header_insert',
  3208. 'type' => 'code_editor',
  3209. 'sanitize' => false,
  3210. 'title' => __('Code inserted in the header','sakurairo_csf'),
  3211. 'desc' => __('Insert HTML code right before </head>.','sakurairo_csf'),
  3212. ),
  3213. array(
  3214. 'id' => 'time_zone_fix',
  3215. 'type' => 'slider',
  3216. 'title' => __('Timezone Fix','sakurairo_csf'),
  3217. 'desc' => __('Slide to adjust. If the comment has a time difference problem, adjust it here, fill in an integer. Calculation method: actual time = time of display error - the integer you entered (in hours)','sakurairo_csf'),
  3218. 'step' => '1',
  3219. 'max' => '24',
  3220. 'default' => '0'
  3221. ),
  3222. array(
  3223. 'id' => 'gravatar_proxy',
  3224. 'type' => 'select',
  3225. 'title' => __('Gravatar Service Proxy','sakurairo_csf'),
  3226. 'desc' => __('You can select multiple proxy as the Gravatar Service Proxy. By default, Tianli is used as the Gravatar Service Proxy.','sakurairo_csf'),
  3227. 'options' => array(
  3228. 'weavatar.com/avatar' => __('Weavatar Service','sakurairo_csf'),
  3229. 'cravatar.cn/avatar' => __('Cravatar Service','sakurairo_csf'),
  3230. 'sdn.geekzu.org/avatar' => __('Geekzu','sakurairo_csf'),
  3231. 'gravatar.loli.net/avatar' => __('Loli Net','sakurairo_csf'),
  3232. 'gravatar.com/avatar' => __('Official','sakurairo_csf'),
  3233. 'custom_proxy_address_of_gravatar' => __('Custom Proxy Address','sakurairo_csf'),
  3234. ),
  3235. 'default' => 'weavatar.com/avatar'
  3236. ),
  3237. array(
  3238. 'id' => 'custom_proxy_address_of_gravatar',
  3239. 'type' => 'text',
  3240. 'title' => __('Custom Proxy Address','sakurairo_csf'),
  3241. 'desc' => __('Enter your Gravatar proxy address without starting with "http(s)://" and ending with "/". Example: gravatar.com/avatar.','sakurairo_csf'),
  3242. 'dependency' => array( 'gravatar_proxy', '==', 'custom_proxy_address_of_gravatar', '', 'true' ),
  3243. 'default' => 'gravatar.com/avatar'
  3244. ),
  3245. array(
  3246. 'type' => 'subheading',
  3247. 'content' => __('Lightbox','sakurairo_csf'),
  3248. ),
  3249. array(
  3250. 'id' => 'baguetteBox',
  3251. 'type' => 'switcher',
  3252. 'title' => __('BaguetteBox Lightbox Effect','sakurairo_csf'),
  3253. 'label' => __('BaguetteBox will be used as the image lightbox effect when turned on','sakurairo_csf'),
  3254. 'dependency' => array(
  3255. array( 'fancybox', '==', 'false', '', 'true' ),
  3256. array( 'lightgallery', '==', 'false' ),
  3257. ),
  3258. 'default' => false
  3259. ),
  3260. array(
  3261. 'id' => 'fancybox',
  3262. 'type' => 'switcher',
  3263. 'title' => __('FancyBox Lightbox Effect','sakurairo_csf'),
  3264. 'label' => __('FancyBox will be used as an image lightbox effect after turning on, additional JQ libraries will be loaded','sakurairo_csf'),
  3265. 'dependency' => array(
  3266. array( 'baguetteBox', '==', 'false', '', 'true' ),
  3267. array( 'lightgallery', '==', 'false' ),
  3268. ),
  3269. 'default' => false
  3270. ),
  3271. array(
  3272. 'id' => 'lightgallery',
  3273. 'type' => 'switcher',
  3274. 'title' => __('LightGallery Lightbox Effect','sakurairo_csf'),
  3275. 'label' => __('LightGallery will be used as an image lightbox effect after turning on.','sakurairo_csf'),
  3276. 'dependency' => array(
  3277. array( 'fancybox', '==', 'false', '', 'true' ),
  3278. array( 'baguetteBox', '==', 'false' ),
  3279. ),
  3280. 'default' => false
  3281. ),
  3282. array(
  3283. 'type' => 'content',
  3284. 'content'=>__('<strong>Attension: Please read <a href="https://github.com/sachinchoolur/lightGallery#license">License Instruction</a> before use.</strong>'
  3285. .'<br/><strong><a href="https://www.lightgalleryjs.com/demos/thumbnails/">Demos</a></strong> | <strong><a href="https://www.lightgalleryjs.com/docs/settings/">Reference</a></strong> | <strong><a href="https://fastly.jsdelivr.net/npm/lightgallery@latest/plugins/">Plugin List</a></strong> '
  3286. .'<br/> Please write settings in JavaScript. An example has been provided as default setting.'
  3287. .'<br/> It should be captiable for Most User using WordPress Guttenberg Editor.'
  3288. .'<br/>Submit new discussion on Github for assistance. https://github.com/mirai-mamori/Sakurairo/discussions','sakurairo_csf') ,
  3289. 'dependency' => array( 'lightgallery', '==', 'true', '', 'true' ),
  3290. ),
  3291. array(
  3292. 'type' => 'submessage',
  3293. 'style' => 'warning',
  3294. 'content'=>__('Start from Sakurairo v2.4.0, plugins names in LightGallery option follow the form cite in official document (eg. lgHash instead of "hash")','sakurairo_csf') ,
  3295. 'dependency' => array( 'lightgallery', '==', 'true', '', 'true' ),
  3296. ),
  3297. array(
  3298. 'id' => 'lightgallery_option',
  3299. 'type' => 'code_editor',
  3300. 'sanitize' => false,
  3301. 'title' => __('LightGallery Lightbox Effect Options','sakurairo_csf'),
  3302. 'dependency' => array( 'lightgallery', '==', 'true', '', 'true' ),
  3303. 'default' => '{
  3304. "plugins":["lgHash","lgZoom"],
  3305. "supportLegacyBrowser":false,
  3306. "selector":"figure > img"
  3307. }'
  3308. ),
  3309. array(
  3310. 'type' => 'subheading',
  3311. 'content' => __('Code Highlighting','sakurairo_csf'),
  3312. ),
  3313. array(
  3314. 'type' => 'content',
  3315. 'content' => __('<p><strong>Highlight.js:</strong> Default. Automatic language recognition. </p>'
  3316. .' <p><strong>Prism.js:</strong> Requires a language to be specified, see <a href="https://prismjs.com/#basic-usage">basic usage</a> and <a href="https://prismjs.com/ plugins/file-highlight/">How to code highlight dynamically loaded files</a>. </p>'
  3317. .' <p><strong>Custom:</strong> For cases where another configuration is available. </p>','sakurairo_csf'),
  3318. ),
  3319. array(
  3320. 'id' => 'code_highlight_method',
  3321. 'type' => 'select',
  3322. 'title' => __('Code Highlight Method','sakurairo_csf'),
  3323. 'options' => array(
  3324. 'hljs' => 'highlight.js',
  3325. 'prism' => 'Prism.js',
  3326. 'custom' => __('Custom Program','sakurairo_csf'),
  3327. ),
  3328. "default" => "hljs"
  3329. ),
  3330. array(
  3331. 'id' => 'code_highlight_prism_line_number_all',
  3332. 'type' => 'switcher',
  3333. 'title' => __('Prism.js: Add Line Number Display for All Code Blocks','sakurairo_csf'),
  3334. 'dependency' => array(
  3335. array( 'code_highlight_method', '==', 'prism', '', 'true' ),
  3336. ),
  3337. 'desc' => __('See the <a href="https://prismjs.com/plugins/line-numbers/">plugin description documentation</a>','sakurairo_csf'),
  3338. ),
  3339. array(
  3340. 'id' => 'code_highlight_prism_autoload_path',
  3341. 'type' => 'text',
  3342. 'title' => __('Prism.js: Autoload Address','sakurairo_csf'),
  3343. 'dependency' => array(
  3344. array( 'code_highlight_method', '==', 'prism', '', 'true' ),
  3345. ),
  3346. 'desc' => __('Leave blank to use default values','sakurairo_csf'),
  3347. 'default'=>'https://fastly.jsdelivr.net/npm/prismjs@1.23.0/'
  3348. ),
  3349. array(
  3350. 'id' => 'code_highlight_prism_theme_light',
  3351. 'type' => 'text',
  3352. 'title' => __('Prism.js: Code Highlight Theme','sakurairo_csf'),
  3353. 'desc' => __('Relative to autoload address. Leave blank to use default values','sakurairo_csf'),
  3354. 'dependency' => array(
  3355. array( 'code_highlight_method', '==', 'prism', '', 'true' ),
  3356. ),
  3357. 'default' => 'themes/prism.min.css'
  3358. ),
  3359. array(
  3360. 'id' => 'code_highlight_prism_theme_dark',
  3361. 'type' => 'text',
  3362. 'title' => __('Prism.js: Code Highlight Theme (Dark Mode)','sakurairo_csf'),
  3363. 'desc' => __('Relative to autoload address. Leave blank to use default values','sakurairo_csf'),
  3364. 'dependency' => array(
  3365. array( 'code_highlight_method', '==', 'prism', '', 'true' ),
  3366. ),
  3367. 'default' => 'themes/prism-tomorrow.min.css'
  3368. ),
  3369. array(
  3370. 'type' => 'submessage',
  3371. 'style' => 'danger',
  3372. 'content' => __('The following Options are not recommended to be modified blindly, please use them under the guidance of others','sakurairo_csf'),
  3373. ),
  3374. array(
  3375. 'id' => 'image_cdn',
  3376. 'type' => 'text',
  3377. 'title' => __('Image CDN','sakurairo_csf'),
  3378. 'desc' => __('Note: fill in the format https://your CDN domain/. This means that images with original path http://your.domain/wp-content/uploads/2018/05/xx.png will be loaded from http://your CDN domain/2018/05/xx.png','sakurairo_csf'),
  3379. 'default' => ''
  3380. ),
  3381. array(
  3382. 'id' => 'classify_display',
  3383. 'type' => 'text',
  3384. 'title' => __('Articles Categories (Do not display)','sakurairo_csf'),
  3385. 'desc' => __('Fill in category ID, seperate in English" , " when more than one','sakurairo_csf'),
  3386. ),
  3387. array(
  3388. 'id' => 'image_category',
  3389. 'type' => 'text',
  3390. 'title' => __('Image Display Category','sakurairo_csf'),
  3391. 'desc' => __('Fill in category ID, seperate in English" , " when more than one','sakurairo_csf'),
  3392. ),
  3393. array(
  3394. 'id' => 'exlogin_url',
  3395. 'type' => 'text',
  3396. 'title' => __('Specify Login Address','sakurairo_csf'),
  3397. 'desc' => __('Force not to use the WordPress login page address to login, fill in the new login page address, such as: http://www.xxx.com/login. Note that before filling in the new page you can test the normal opening, so as not to cause the inability to enter the background, etc.','sakurairo_csf'),
  3398. ),
  3399. array(
  3400. 'id' => 'exregister_url',
  3401. 'type' => 'text',
  3402. 'title' => __('Specify Registration Address','sakurairo_csf'),
  3403. 'desc' => __('This address is used as the registration entry on the login page, if you specify a login address, it is recommended to fill in','sakurairo_csf'),
  3404. ),
  3405. array(
  3406. 'id' => 'cookie_version',
  3407. 'type' => 'text',
  3408. 'title' => __('Version Control','sakurairo_csf'),
  3409. 'desc' => __('Used to update front-end cookies and browser cache, can use any string','sakurairo_csf'),
  3410. ),
  3411. )
  3412. ) );
  3413. Sakurairo_CSF::createSection($prefix, array(
  3414. 'title' => __('Backup&Recovery','sakurairo_csf'),
  3415. 'icon' => 'fa fa-shield',
  3416. 'description' => __('Backup or Recovery your theme options','sakurairo_csf'),
  3417. 'fields' => array(
  3418. array(
  3419. 'type' => 'backup',
  3420. ),
  3421. )
  3422. ) );
  3423. Sakurairo_CSF::createSection($prefix, array(
  3424. 'title' => __('About Theme','sakurairo_csf'),
  3425. 'icon' => 'fa fa-paperclip',
  3426. 'fields' => array(
  3427. array(
  3428. 'type' => 'subheading',
  3429. 'content' => __('Version Info','sakurairo_csf'),
  3430. ),
  3431. array(
  3432. 'type' => 'content',
  3433. 'content' => __('<img src="https://s.nmxc.ltd/sakurairo_vision/@2.6/series/headlogo.webp" alt="Theme Information" />','sakurairo_csf'),
  3434. ),
  3435. array(
  3436. 'type' => 'submessage',
  3437. 'style' => 'normal',
  3438. 'content' => sprintf(__('Theme Sakurairo Version %s | Internal Version %s | <a href="https://github.com/mirai-mamori/Sakurairo">Project Address</a>','sakurairo_csf'), IRO_VERSION, INT_VERSION),
  3439. ),
  3440. array(
  3441. 'type' => 'subheading',
  3442. 'content' => __('Update Related','sakurairo_csf'),
  3443. ),
  3444. array(
  3445. 'id' => 'iro_update_source',
  3446. 'type' => 'image_select',
  3447. 'title' => __('Theme Update Source','sakurairo_csf'),
  3448. 'options' => array(
  3449. 'github' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/update_source_github.webp',
  3450. 'upyun' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/update_source_upyun.webp',
  3451. 'official_building' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/update_source_iro.webp',
  3452. ),
  3453. 'desc' => __('If you are using a server set up in mainland China, please use the Upyun source or the official theme source as your theme update source','sakurairo_csf'),
  3454. 'default' => 'github'
  3455. ),
  3456. array(
  3457. 'id' => 'channel_validate_value',
  3458. 'type' => 'text',
  3459. 'title' => __('Theme Update Test Channel Disclaimer','sakurairo_csf'),
  3460. 'dependency' => array(
  3461. array( 'core_library_basepath', '==', 'true', '', 'true' ),
  3462. array( 'shared_library_basepath', '==', 'true' ),
  3463. array( 'iro_update_source', '==', 'official_building' ),
  3464. ),
  3465. 'desc' => __('Please copy the text in quotes after <strong>ensure that you have carefully understood the risks associated with participating in the test and are willing to assume all consequences at your own risk</strong> (including but not limited to possible data loss) into the options text box <strong> "I agree and am willing to bear all unexpected consequences"</strong>','sakurairo_csf'),
  3466. ),
  3467. array(
  3468. 'id' => 'iro_update_channel',
  3469. 'type' => 'radio',
  3470. 'title' => __('Theme Update Channel','sakurairo_csf'),
  3471. 'dependency' => array(
  3472. array( 'channel_validate_value', '==', 'I agree and am willing to bear all unexpected consequences' ),
  3473. array( 'core_library_basepath', '==', 'true', '', 'true' ),
  3474. array( 'shared_library_basepath', '==', 'true' ),
  3475. array( 'iro_update_source', '==', 'official_building' ),
  3476. ),
  3477. 'desc' => __('You can toggle the update channel here to participate in the testing of the new version','sakurairo_csf'),
  3478. 'options' => array(
  3479. 'stable' => __('Stable Channel','sakurairo_csf'),
  3480. 'beta' => __('Beta Channel','sakurairo_csf'),
  3481. 'preview' => __('Preview Channel','sakurairo_csf'),
  3482. ),
  3483. 'default' => 'stable'
  3484. ),
  3485. array(
  3486. 'type' => 'subheading',
  3487. 'content' => __('Resource Control','sakurairo_csf'),
  3488. ),
  3489. array(
  3490. 'id' => 'core_library_basepath',
  3491. 'type' => 'switcher',
  3492. 'title' => __('Provide Critical Frontend Resource locally','sakurairo_csf'),
  3493. 'label' => __('Enabeld by default. Critical resources are those resources whose loading performance will have a significant impact on the user experience.','sakurairo_csf'),
  3494. 'default' => true
  3495. ),
  3496. array(
  3497. 'id' => 'shared_library_basepath',
  3498. 'type' => 'switcher',
  3499. 'title' => __('Provide Other Frontend Resource locally','sakurairo_csf'),
  3500. 'label' => __('Less important frontend resource in the theme\'s folder.','sakurairo_csf'),
  3501. 'default' => false
  3502. ),
  3503. array(
  3504. 'id' => 'external_vendor_lib',
  3505. 'type' => 'switcher',
  3506. 'title' => __('Provide 3rd-party library from public CDN','sakurairo_csf'),
  3507. 'label' => __('When disabled, 3rd-party dependencies, which have been built to bundles along with themes\'s entry script, will be loaded from the exact same origin with Critical Frontend Resource. ','sakurairo_csf'),
  3508. 'default' => false
  3509. ),
  3510. array(
  3511. 'id' => 'lib_cdn_path',
  3512. 'type' => 'image_select',
  3513. 'title' => __('Public CDN Basepath','sakurairo_csf'),
  3514. 'dependency' => array( 'external_vendor_lib', '==', 'true', '', 'true' ),
  3515. 'options' => array(
  3516. 'https://s.nmxc.ltd/sakurairo/@' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/update_source_upyun.webp',
  3517. 'https://fastly.jsdelivr.net/gh/mirai-mamori/Sakurairo@' => 'https://s.nmxc.ltd/sakurairo_vision/@2.6/options/update_source_jsd.webp',
  3518. ),
  3519. 'default' => 'https://s.nmxc.ltd/sakurairo/@'
  3520. ),
  3521. array(
  3522. 'id' => 'vision_resource_basepath',
  3523. 'type' => 'text',
  3524. 'title' => __('Vision Resource Basepath','sakurairo_csf'),
  3525. 'desc' => __('This link directory structure needs to be consistent with the <a href="https://github.com/Fuukei/Sakurairo_Vision">Sakurairo Vision</a> repositories officially provided by fuukei, otherwise some resources 404 may appear. The image source officially provided by <a href="https://www.upyun.com/">Upyun</a> is adopted by default.','sakurairo_csf'),
  3526. 'default' => "https://s.nmxc.ltd/sakurairo_vision/@2.6/"
  3527. ),
  3528. array(
  3529. 'type' => 'subheading',
  3530. 'content' => __('Theme Sponsors','sakurairo_csf'),
  3531. ),
  3532. array(
  3533. 'type' => 'content',
  3534. 'content' => __('<img src="https://news.maho.cc/sponsors.php" alt="sponsors" width="65%" height="65%" />','sakurairo_csf'),
  3535. ),
  3536. array(
  3537. 'type' => 'subheading',
  3538. 'content' => __('Theme Contributors','sakurairo_csf'),
  3539. ),
  3540. array(
  3541. 'type' => 'content',
  3542. 'content' => __('<img src="https://opencollective.com/fuukei/contributors.svg" alt="Theme Contributors" width="100%" height="100%" />','sakurairo_csf'),
  3543. ),
  3544. array(
  3545. 'type' => 'subheading',
  3546. 'content' => __('Privacy information','sakurairo_csf'),
  3547. ),
  3548. array(
  3549. 'type' => 'content',
  3550. 'content' => __('<p>The theme respects your privacy</p>
  3551. <p>However, when you use a service provider pre-populated by the theme to provide relevant services in mainland China, the service provider may collect data about your visitors and compile statistics</p>
  3552. <p>You can reduce the amount of information sent to third parties by localising the theme-related resources, which are pre-configured with options for you to modify</p>','sakurairo_csf'),
  3553. ),
  3554. array(
  3555. 'id' => 'send_theme_version',
  3556. 'type' => 'switcher',
  3557. 'title' => __('Send Theme Version to Fuukei','sakurairo_csf'),
  3558. 'label' => __('The theme will only send time and version information to Fuukei officials and the data will be cleaned regularly and used only to count version updates.','sakurairo_csf'),
  3559. 'default' => false
  3560. ),
  3561. array(
  3562. 'type' => 'subheading',
  3563. 'content' => __('Reference Information','sakurairo_csf'),
  3564. ),
  3565. array(
  3566. 'type' => 'content',
  3567. 'content' => __('<p>Fluent Design Icon Referenced by Paradox <a href="https://wwi.lanzous.com/ikyq5kgx0wb">Fluent Icon Pack</a></p>
  3568. <p>MUH2 Design Icon Referenced by 缄默 <a href="https://www.coolapk.com/apk/com.muh2.icon">MUH2 Icon Pack</a></p>
  3569. <p>Mashiro Style Logo References the Original Theme Author Mashiro, As Provided and Referenced by Hyacm</p>','sakurairo_csf'),
  3570. ),
  3571. array(
  3572. 'type' => 'subheading',
  3573. 'content' => __('Dependency Information','sakurairo_csf'),
  3574. ),
  3575. array(
  3576. 'type' => 'content',
  3577. 'content' => __('<p>Options Framework Relies on the Codestar Open Source <a href="https://github.com/Codestar/codestar-framework">Codestar Framework</a> Project</p>
  3578. <p>Update Function Relies on YahnisElsts Open Source <a href="https://github.com/YahnisElsts/plugin-update-checker">Plugin Update Checker</a> Project</p>
  3579. <p>ChatGPT-related Capabilities Relies on HaoZi-Team Open Source <a href="https://github.com/HaoZi-Team/ChatGPT-PHP">ChatGPT PHP</a> Project</p>','sakurairo_csf'),
  3580. ),
  3581. array(
  3582. 'type' => 'content',
  3583. 'content' => __('<img src="https://img.shields.io/github/v/release/mirai-mamori/Sakurairo.svg?style=flat-square" alt="Theme latest version" style="border-radius: 3px;" /> <img src="https://img.shields.io/github/release-date/mirai-mamori/Sakurairo?style=flat-square" alt="Theme latest version release date" style="border-radius: 3px;" /> <img src="https://data.jsdelivr.com/v1/package/gh/mirai-mamori/Sakurairo/badge" alt="Theme CDN resource access" style="border-radius: 3px;" />','sakurairo_csf'),
  3584. ),
  3585. )
  3586. ) );
  3587. }