@@ -23,16 +23,62 @@ <h3 class="text-lg font-black text-black">Context editor</h3>
2323 < div class ="w-full h-full bg-gray-900 translate-y-1 translate-x-1 absolute inset-0 z-0 "> </ div >
2424 < div id ="workspace-monaco-editor "
2525 class ="relative z-10 border-2 border-black bg-white h-full "
26- style ="min-height: 350px ; "> </ div >
26+ style ="min-height: 320px ; "> </ div >
2727 </ div >
2828
29- <!-- Install in one click bar -->
30- < div id ="auto-share-panel " class ="flex gap-2 items-center justify-center py-2 border-t-2 border-gray-200 ">
31- < label class ="text-sm font-bold text-black "> Install in one click</ label >
32- < input id ="share-link-input " type ="text " readonly class ="px-3 py-1 bg-white border-2 border-black text-black font-mono text-xs shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] focus:outline-none " style ="width: 320px; cursor: text; " value ="Waiting for first save... ">
33- < button id ="copy-share-link " class ="px-3 py-1 bg-cyan-400 border-2 border-black text-black font-bold shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] hover:shadow-[3px_3px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[-1px] hover:translate-y-[-1px] active:shadow-[1px_1px_0px_0px_rgba(0,0,0,1)] active:translate-x-[1px] active:translate-y-[1px] transition-all text-sm disabled:opacity-50 disabled:cursor-not-allowed " disabled >
34- Copy
35- </ button >
29+ <!-- Install in one click card with tabs -->
30+ < div class ="flex justify-center ">
31+ < div class ="relative inline-block ">
32+ <!-- Tabs for the card -->
33+ < div class ="flex gap-0 ">
34+ < button id ="share-tab-install " class ="share-tab-button active px-3 py-1 bg-pink-400 border-2 border-black border-b-0 text-black font-bold text-xs shadow-[2px_0px_0px_0px_rgba(0,0,0,1)] relative z-10 ">
35+ macOS/Linux
36+ </ button >
37+ < button id ="share-tab-other " class ="share-tab-button px-3 py-1 bg-gray-100 border-2 border-gray-400 border-b-0 text-gray-500 font-medium text-xs shadow-[1px_0px_0px_0px_rgba(0,0,0,0.3)] relative z-5 " disabled >
38+ Windows (soon)
39+ </ button >
40+ </ div >
41+
42+ <!-- Card content -->
43+ < div id ="auto-share-panel " class ="bg-pink-400 border-2 border-black shadow-[3px_3px_0px_0px_rgba(0,0,0,1)] p-3 relative z-0 " style ="margin-top: -2px; ">
44+ < div class ="flex gap-2 items-center ">
45+ < input id ="share-link-input " type ="text " readonly class ="px-3 py-1 bg-white border-2 border-black text-black font-mono text-xs shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] focus:outline-none " style ="min-width: 450px; cursor: text; " value ="Waiting for first save... ">
46+ < button id ="copy-share-link " class ="px-3 py-1 bg-cyan-400 border-2 border-black text-black font-bold shadow-[2px_2px_0px_0px_rgba(0,0,0,1)] hover:shadow-[3px_3px_0px_0px_rgba(0,0,0,1)] hover:translate-x-[-1px] hover:translate-y-[-1px] active:shadow-[1px_1px_0px_0px_rgba(0,0,0,1)] active:translate-x-[1px] active:translate-y-[1px] transition-all text-xs disabled:opacity-50 disabled:cursor-not-allowed " disabled >
47+ Copy
48+ </ button >
49+ </ div >
50+ </ div >
51+ </ div >
3652 </ div >
3753 </ div >
38- </ div >
54+ </ div >
55+
56+ <!-- Tab switching for share panel -->
57+ < script >
58+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
59+ const shareTabs = document . querySelectorAll ( '.share-tab-button' ) ;
60+
61+ shareTabs . forEach ( tab => {
62+ tab . addEventListener ( 'click' , function ( ) {
63+ // Skip if tab is disabled
64+ if ( this . disabled ) return ;
65+
66+ // Remove active state from all tabs
67+ shareTabs . forEach ( t => {
68+ if ( ! t . disabled ) {
69+ t . classList . remove ( 'active' , 'bg-pink-400' , 'border-black' , 'text-black' , 'font-bold' , 'z-10' ) ;
70+ t . classList . add ( 'bg-gray-100' , 'border-gray-400' , 'text-gray-700' , 'font-medium' , 'z-5' ) ;
71+ t . classList . remove ( 'shadow-[2px_0px_0px_0px_rgba(0,0,0,1)]' ) ;
72+ t . classList . add ( 'shadow-[1px_0px_0px_0px_rgba(0,0,0,0.3)]' ) ;
73+ }
74+ } ) ;
75+
76+ // Add active state to clicked tab
77+ this . classList . add ( 'active' , 'bg-pink-400' , 'border-black' , 'text-black' , 'font-bold' , 'z-10' ) ;
78+ this . classList . remove ( 'bg-gray-100' , 'border-gray-400' , 'text-gray-700' , 'font-medium' , 'z-5' ) ;
79+ this . classList . remove ( 'shadow-[1px_0px_0px_0px_rgba(0,0,0,0.3)]' ) ;
80+ this . classList . add ( 'shadow-[2px_0px_0px_0px_rgba(0,0,0,1)]' ) ;
81+ } ) ;
82+ } ) ;
83+ } ) ;
84+ </ script >
0 commit comments