1010 index.html / gcode.html.
1111*/
1212
13+ /* Declare both schemes and pin the root background per theme so the canvas
14+ behind the translucent topbar is deterministic (no auto-dark flash). */
15+ : root { color-scheme : light dark; }
16+ html { background : # fff ; }
17+ @media (prefers-color-scheme : dark) {
18+ html { background : # 1e1e1e ; }
19+ }
20+
1321/* ======================================================================
1422 * Asciidoctor pages (light)
1523 * ====================================================================== */
@@ -769,4 +777,182 @@ h4,h5{font-size:revert}}
769777.imageblock .text-center > .title { text-align : center; }
770778.imageblock .text-right > .title { text-align : right; }
771779.imageblock > .title { margin-top : 0.5em ;}
780+
781+ /* Pagefind search box in the topbar (present only when built with pagefind).
782+ Theming flows through pagefind's CSS variables. */
783+ .lcnc-topbar-search {
784+ margin-left : auto;
785+ margin-right : 0.75rem ;
786+ position : relative;
787+ display : flex;
788+ align-items : center;
789+ height : 100% ;
790+ font-family : "Open Sans" , "DejaVu Sans" , sans-serif;
791+ /* The bar is always dark, so the box sits on dark in both themes. Size via
792+ pagefind's scale, not an input height override (that desyncs the
793+ absolutely-positioned magnifier/clear). */
794+ --pagefind-ui-scale : 0.6 ;
795+ --pagefind-ui-background : transparent;
796+ --pagefind-ui-text : # fff ; /* input text + magnifier on the dark bar */
797+ --pagefind-ui-primary : # fff ;
798+ --pagefind-ui-border : hsla (0 , 0% , 100% , .35 );
799+ --pagefind-ui-tag : hsla (0 , 0% , 100% , .15 );
800+ --pagefind-ui-border-width : 1px ;
801+ --pagefind-ui-border-radius : 4px ;
802+ --pagefind-ui-font : "Open Sans" , "DejaVu Sans" , sans-serif;
803+ }
804+ /* Search + language switcher form one right-aligned cluster; zero the
805+ switcher's own margin-left:auto so it does not split the free space. */
806+ .lcnc-topbar-search + .lcnc-lang-switcher { margin-left : 0 ; }
807+ .lcnc-topbar-search # lcnc-search { width : 13rem ; }
808+ /* #lcnc-topbar (id) outranks pagefind-ui.css (injected after this sheet).
809+ The input is a faint white inset on the dark bar. */
810+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-input {
811+ background : hsla (0 , 0% , 100% , .1 );
812+ color : # d8d8d8 ; /* typed text: a smudge off pure white, both themes */
813+ border-color : hsla (0 , 0% , 100% , .35 );
814+ }
815+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-input : focus {
816+ background : hsla (0 , 0% , 100% , .16 );
817+ border-color : hsla (0 , 0% , 100% , .55 );
818+ /* replace the OS-accent (blue) focus ring with a neutral white halo */
819+ outline : none;
820+ box-shadow : 0 0 0 2px hsla (0 , 0% , 100% , .18 );
821+ }
822+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-input ::placeholder { color : hsla (0 , 0% , 100% , .7 ); }
823+ /* neutral selection tint (avoid the OS-accent blue) */
824+ .lcnc-topbar-search ::selection { background : hsla (0 , 0% , 100% , .25 ); color : # fff ; }
825+ /* Pagefind's clear control is a "Clear" text button; hide the word and draw a
826+ small white x (background-image SVG, font-independent). */
827+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-clear {
828+ font-size : 0 ;
829+ background : transparent;
830+ display : flex;
831+ align-items : center;
832+ }
833+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-clear ::after {
834+ content : "" ;
835+ display : block;
836+ width : 13px ;
837+ height : 13px ;
838+ opacity : 0.7 ;
839+ background-image : var (--lcnc-x-icon );
840+ background-repeat : no-repeat;
841+ background-position : center;
842+ background-size : contain;
843+ }
844+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-clear : hover ::after { opacity : 1 ; }
845+ .lcnc-topbar-search {
846+ --lcnc-x-icon : url ("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 5 L15 15 M15 5 L5 15' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E" );
847+ --lcnc-search-icon : url ("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='10' cy='10' r='7'/%3E%3Cline x1='15' y1='15' x2='20.5' y2='20.5' stroke-linecap='round'/%3E%3C/svg%3E" );
848+ }
849+ /* Pagefind masks the magnifier with -webkit-mask, which Firefox/Zen render
850+ blank. Use a plain background-image SVG instead (works in every engine);
851+ pagefind's ::before size/position are kept. */
852+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__form ::before {
853+ background-color : transparent;
854+ -webkit-mask : none;
855+ mask : none;
856+ background-image : var (--lcnc-search-icon );
857+ background-repeat : no-repeat;
858+ background-position : center;
859+ background-size : contain;
860+ opacity : 0.9 ;
861+ }
862+ /* Results drawer floats below the input. It is themed to match the page
863+ (light/dark), unlike the always-dark bar; redefining --pagefind-ui-text on
864+ the drawer recolours all result text in one shot. */
865+ .lcnc-topbar-search .pagefind-ui__drawer {
866+ position : absolute;
867+ top : 100% ;
868+ right : 0 ;
869+ width : 30rem ;
870+ max-height : 75vh ;
871+ overflow-y : auto;
872+ border-radius : 0 0 6px 6px ;
873+ padding : 0.5em 0.85em 0.85em ;
874+ z-index : 1200 ;
875+ --pagefind-ui-text : # 222 ;
876+ background : # fff ;
877+ color : # 222 ;
878+ border : 1px solid # d4d4d4 ;
879+ border-top : none;
880+ box-shadow : 0 6px 16px rgba (0 , 0 , 0 , .18 );
881+ }
882+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link ,
883+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link : link { color : # 2156a5 ; }
884+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link : visited { color : # 1d4b8f ; }
885+ .lcnc-topbar-search .pagefind-ui__result-excerpt { color : # 555 ; }
886+ .lcnc-topbar-search .pagefind-ui__message { color : # 555 ; }
887+ /* Landing pages style bare p/ul/li generically and that leaks into the drawer;
888+ re-assert result metrics at id specificity so it looks the same everywhere. */
889+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-title {
890+ font-size : 1rem ;
891+ line-height : 1.25 ;
892+ }
893+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-excerpt ,
894+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__message {
895+ font-size : 0.85rem ;
896+ line-height : 1.45 ;
897+ }
898+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__drawer ul {
899+ font-family : inherit;
900+ margin : 0 ;
901+ padding : 0 ;
902+ }
903+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__drawer li {
904+ line-height : normal;
905+ margin-top : 0 ;
906+ }
907+ /* soften pagefind's hard-yellow match highlight to a translucent wash */
908+ .lcnc-topbar-search .pagefind-ui__result mark ,
909+ .lcnc-topbar-search mark {
910+ background : hsla (48 , 100% , 50% , .30 );
911+ color : inherit;
912+ padding : 0 1px ;
913+ border-radius : 2px ;
914+ }
915+ @media (prefers-color-scheme : dark) {
916+ /* Pin the pocket to solid fill + border. A translucent pocket on the
917+ translucent bar cold-paints inconsistently dark in Firefox/Zen; solid
918+ values matching the settled look keep it backdrop-independent. The bar
919+ itself stays translucent. */
920+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-input {
921+ background : # 1f1f1f ;
922+ border-color : # 5d5d5d ;
923+ }
924+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__search-input : focus {
925+ background : # 2e2e2e ;
926+ border-color : # 8a8a8a ;
927+ }
928+ .lcnc-topbar-search .pagefind-ui__drawer {
929+ --pagefind-ui-text : # e0e0e0 ;
930+ background : # 1e1e1e ;
931+ color : # e0e0e0 ;
932+ border-color : # 444 ;
933+ box-shadow : 0 6px 16px rgba (0 , 0 , 0 , .5 );
934+ }
935+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link ,
936+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link : link { color : # 6fa8dc ; }
937+ # lcnc-topbar .lcnc-topbar-search .pagefind-ui__result-link : visited { color : # b48ead ; }
938+ .lcnc-topbar-search .pagefind-ui__result-excerpt { color : # aaa ; }
939+ .lcnc-topbar-search .pagefind-ui__message { color : # aaa ; }
940+ .lcnc-topbar-search .pagefind-ui__result mark ,
941+ .lcnc-topbar-search mark {
942+ background : hsla (48 , 90% , 55% , .25 );
943+ color : inherit;
944+ }
945+ }
946+ /* The nav links are absolutely centred and ignore the right-hand cluster's
947+ width, so the search box needs more clearance than the bare 900px the nav
948+ normally hides at. Hide the nav earlier, but only in builds that actually
949+ carry a search box (pagefind installed); :has keeps the 900px default for
950+ search-less builds. */
951+ @media (max-width : 1300px ) {
952+ .lcnc-topbar : has (.lcnc-topbar-search ) .lcnc-topbar-links { display : none; }
953+ }
954+ @media (max-width : 1100px ) { .lcnc-topbar-search # lcnc-search { width : 10rem ; } }
955+ @media (max-width : 700px ) {
956+ .lcnc-topbar-search .pagefind-ui__drawer { width : 88vw ; }
957+ }
772958
0 commit comments