@@ -2490,6 +2490,7 @@ <h1>Keyboard Shortcuts</h1>
24902490 text-align : center;
24912491 padding-top : 8px ;
24922492 align-items : center;
2493+ width : 100% ;
24932494}
24942495
24952496
@@ -2508,6 +2509,7 @@ <h1>Keyboard Shortcuts</h1>
25082509 color : var (--text-color );
25092510 align-items : center;
25102511 overflow-wrap : anywhere;
2512+ width : 100% ;
25112513}
25122514
25132515/* .keybindings-table tr td:not(:first-child) {
@@ -2574,6 +2576,7 @@ <h1>Keyboard Shortcuts</h1>
25742576 line-height : 1 ;
25752577 text-align : center;
25762578 font-variant-ligatures : none;
2579+ width : 100% ;
25772580}
25782581
25792582
@@ -2592,6 +2595,7 @@ <h1>Keyboard Shortcuts</h1>
25922595 color : var (--text-color );
25932596 align-items : center;
25942597 overflow-wrap : anywhere;
2598+ width : 100% ;
25952599}
25962600
25972601.inlineshortcut-table tr td kbd {
@@ -2702,17 +2706,75 @@ <h1>Keyboard Shortcuts</h1>
27022706 transform : translateX (26px );
27032707}
27042708
2705- .settings-row {
2709+ .settings-row , . settings-stack {
27062710 border-radius : 8px ;
27072711 border : var (--ui-border );
27082712 padding : 1rem ;
27092713 display : flex;
27102714 width : 100% ;
2715+ user-select : none;
2716+ }
2717+
2718+ .settings-row {
27112719 align-items : center;
27122720 justify-content : space-between;
2713- user-select : none;
27142721}
27152722
2723+ .settings-stack {
2724+ flex-flow : column;
2725+ }
2726+
2727+ .settings-stack div div .row {
2728+ display : flex;
2729+ flex-flow : row;
2730+ align-items : baseline;
2731+ }
2732+
2733+ .settings-row label , .settings-stack label {
2734+ font-size : 1.25rem ;
2735+ }
2736+
2737+ .settings-stack .label {
2738+ font-size : 1.25rem ;
2739+ font-weight : 700 ;
2740+ margin-bottom : 0.5rem ;
2741+ }
2742+
2743+ div .row input + label {
2744+ margin-left : 8px ;
2745+ }
2746+
2747+ input [type = "radio" ] {
2748+ appearance : none;
2749+ background-color : var (--ui-background );
2750+ margin : 0 ;
2751+ font : inherit;
2752+ color : var (--ui-border );
2753+ width : 1.5em ;
2754+ height : 1.5em ;
2755+ border : 2.5px solid # 555 ;
2756+ border-radius : 50% ;
2757+ translate : 0 -1.25px ;
2758+ display : grid;
2759+ place-content : center;
2760+ }
2761+
2762+ input [type = "radio" ]::before {
2763+ content : "" ;
2764+ width : 0.65em ;
2765+ height : 0.65em ;
2766+ border-radius : 50% ;
2767+ transform : scale (0 );
2768+ transition : 120ms transform ease-in-out;
2769+ box-shadow : inset 1em 1em var (--primary-color );
2770+ }
2771+
2772+ input [type = "radio" ]: checked ::before {
2773+ transform : scale (1 );
2774+ }
2775+
2776+
2777+
27162778.page__content label p {
27172779 margin : 0 ;
27182780 padding : 0 ;
@@ -2762,19 +2824,49 @@ <h1>Keyboard Shortcuts</h1>
27622824 const platform = navigator [ 'userAgentData' ] ?. platform ?? navigator . platform ;
27632825 const isApple = / ^ m a c / i. test ( platform ) || / i p h o n e | i p o d | i p a d / i. test ( navigator . userAgent ) ;
27642826
2765- const appleSwitch = document . getElementById ( 'apple' ) ;
2827+ const glyphsRadio = document . getElementById ( 'glyphs-radio' ) ;
2828+ const textRadio = document . getElementById ( 'text-radio' ) ;
2829+
2830+ // const appleSwitch = document.getElementById('apple');
2831+ // appleSwitch.addEventListener('click', (e) => {
2832+ // if (e.target.checked)
2833+ // document.body.classList.add('apple', 'glyphs');
2834+ // else
2835+ // document.body.classList.remove('apple', 'glyphs');
2836+ // });
27662837
27672838 if ( isApple ) {
2768- appleSwitch . checked = true ;
2839+ // appleSwitch.checked = true;
2840+ glyphsRadio . checked = true ;
2841+ textRadio . checked = false ;
2842+
27692843 document . body . classList . add ( 'apple' , 'glyphs' ) ;
2844+ } else {
2845+ glyphsRadio . checked = false ;
2846+ textRadio . checked = true ;
27702847 }
27712848
2772- appleSwitch . addEventListener ( 'click' , ( e ) => {
2773- if ( e . target . checked )
2774- document . body . classList . add ( 'apple' , 'glyphs' ) ;
2775- else
2776- document . body . classList . remove ( 'apple' , 'glyphs' ) ;
2849+ glyphsRadio . addEventListener ( 'change' , ( e ) => {
2850+ if ( e . target . checked ) {
2851+ document . body . classList . add ( 'apple' ) ;
2852+ document . body . classList . add ( 'glyphs' ) ;
2853+ }
2854+ else {
2855+ document . body . classList . remove ( 'apple' ) ;
2856+ document . body . classList . remove ( 'glyphs' ) ;
2857+ }
27772858 } ) ;
2859+ textRadio . addEventListener ( 'change' , ( e ) => {
2860+ if ( e . target . checked ) {
2861+ document . body . classList . remove ( 'apple' ) ;
2862+ document . body . classList . remove ( 'glyphs' ) ;
2863+ }
2864+ else {
2865+ document . body . classList . add ( 'apple' ) ;
2866+ document . body . classList . add ( 'glyphs' ) ;
2867+ }
2868+ } ) ;
2869+
27782870
27792871 function replaceGlyphs ( root ) {
27802872 // Recurse over all the children of the node
@@ -2811,14 +2903,27 @@ <h2 id="keybindings" tabindex="-1">Keybindings</h2>
28112903< div class ='read-more '> < a href ="/mathlive/guides/shortcuts/ ">
28122904Read more about definining your own < strong > keybindings</ strong > and < strong > shortcuts</ strong > .
28132905< svg class ="svg-chevron "> < use xlink:href ="#svg-chevron "> </ use > </ svg > </ a > </ div >
2814- < div class ="settings-row ">
2906+ <!-- < div class="settings-row">
28152907<label for="apple"><p><strong>Shortcuts for macOS and iOS</strong></p><p>Display shortcuts using the ⌘, ⌥, ⌃, ⇧ keys</p></label>
28162908<label class="switch">
28172909 <input id="apple" type="checkbox">
28182910 <span class="slider"></span>
28192911</label>
2912+ </div> -->
2913+ < div class ="settings-stack ">
2914+ < div class ="label "> Display shortcuts for:</ div >
2915+ < div >
2916+ < div class ="row ">
2917+ < input type ="radio " id ="glyphs-radio " name ="glyphs " value ="glyphs " checked >
2918+ < label for ="glyphs-radio "> macOS, iOS</ label >
2919+ </ div >
2920+ < div class ="row ">
2921+ < input type ="radio " id ="text-radio " name ="glyphs " value ="text ">
2922+ < label for ="text-radio "> Windows, ChromeOS, Linux</ label >
2923+ </ div >
2924+ </ div >
28202925</ div >
2821- < section id ="special-keys ">
2926+ < section id ="special-keys " class =" if-glyphs " >
28222927< div id ='special-keys-table '>
28232928 < div > < kbd > ⇧</ kbd > < span class ="label "> < kbd > Shift</ kbd > </ div >
28242929 < div > < kbd > ⌃</ kbd > < span class ="label "> < kbd > Control</ kbd > </ span > </ div >
@@ -4177,14 +4282,14 @@ <h3 id="miscelaneous" tabindex="-1">Miscelaneous</h3>
41774282
41784283
41794284
4180- < meta itemprop ="datePublished " content ="October 25 , 2023 ">
4285+ < meta itemprop ="datePublished " content ="November 06 , 2023 ">
41814286
41824287
41834288
41844289
41854290
41864291
4187- < p class ="page__date "> < svg class ="icon1quarterem "> < use role ="none " xlink:href ="/assets/icons.svg#calendar-days "/> </ svg > < strong > Updated</ strong > < time datetime ="2023-10-25 " > October 25 , 2023</ time > </ p >
4292+ < p class ="page__date "> < svg class ="icon1quarterem "> < use role ="none " xlink:href ="/assets/icons.svg#calendar-days "/> </ svg > < strong > Updated</ strong > < time datetime ="2023-11-06 " > November 06 , 2023</ time > </ p >
41884293
41894294
41904295 < p class ="page__meta-link "> < svg class ="icon1quarterem "> < use role ="none " xlink:href ="/assets/icons.svg#bug "/> </ svg > < strong > Problem? Feedback?</ strong > File a report at < a href ="https://github.com/cortex-js/cortexjs.io "> github.com/cortex-js/cortexjs.io</ a > </ p >
0 commit comments