Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +132 -9
index.html
CHANGED
|
@@ -363,6 +363,7 @@
|
|
| 363 |
tab-size: 4;
|
| 364 |
scrollbar-width: thin;
|
| 365 |
background-color: var(--background-color);
|
|
|
|
| 366 |
}
|
| 367 |
|
| 368 |
.code-area::-webkit-scrollbar {
|
|
@@ -838,6 +839,119 @@
|
|
| 838 |
margin: 1rem 0;
|
| 839 |
overflow-x: auto;
|
| 840 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 841 |
</style>
|
| 842 |
</head>
|
| 843 |
|
|
@@ -994,17 +1108,26 @@
|
|
| 994 |
<div class="editor-header">
|
| 995 |
<h3>Code Editor</h3>
|
| 996 |
<div class="editor-controls">
|
| 997 |
-
<button class="
|
| 998 |
-
<i class="fas fa-
|
| 999 |
-
|
| 1000 |
</button>
|
| 1001 |
-
<button class="
|
| 1002 |
-
<i class="fas fa-
|
| 1003 |
-
|
| 1004 |
</button>
|
| 1005 |
-
<
|
| 1006 |
-
<
|
| 1007 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1008 |
</button>
|
| 1009 |
</div>
|
| 1010 |
</div>
|
|
|
|
| 363 |
tab-size: 4;
|
| 364 |
scrollbar-width: thin;
|
| 365 |
background-color: var(--background-color);
|
| 366 |
+
font-family: 'Courier New', monospace;
|
| 367 |
}
|
| 368 |
|
| 369 |
.code-area::-webkit-scrollbar {
|
|
|
|
| 839 |
margin: 1rem 0;
|
| 840 |
overflow-x: auto;
|
| 841 |
}
|
| 842 |
+
|
| 843 |
+
/* Editor Controls */
|
| 844 |
+
.editor-controls {
|
| 845 |
+
display: flex;
|
| 846 |
+
gap: 0.5rem;
|
| 847 |
+
align-items: center;
|
| 848 |
+
}
|
| 849 |
+
|
| 850 |
+
.editor-btn {
|
| 851 |
+
padding: 0.5rem 1rem;
|
| 852 |
+
background-color: var(--hover-color);
|
| 853 |
+
border: none;
|
| 854 |
+
color: var(--text-color);
|
| 855 |
+
border-radius: 5px;
|
| 856 |
+
cursor: pointer;
|
| 857 |
+
font-size: 0.9rem;
|
| 858 |
+
display: flex;
|
| 859 |
+
align-items: center;
|
| 860 |
+
gap: 0.5rem;
|
| 861 |
+
transition: all 0.2s;
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
+
.editor-btn:hover {
|
| 865 |
+
background-color: var(--active-color);
|
| 866 |
+
}
|
| 867 |
+
|
| 868 |
+
.editor-btn.active {
|
| 869 |
+
background-color: var(--primary-color);
|
| 870 |
+
color: white;
|
| 871 |
+
}
|
| 872 |
+
|
| 873 |
+
.editor-btn.danger {
|
| 874 |
+
background-color: var(--error-color);
|
| 875 |
+
color: white;
|
| 876 |
+
}
|
| 877 |
+
|
| 878 |
+
.editor-btn.danger:hover {
|
| 879 |
+
background-color: #ff3333;
|
| 880 |
+
}
|
| 881 |
+
|
| 882 |
+
/* Toggle Switch */
|
| 883 |
+
.toggle-switch {
|
| 884 |
+
position: relative;
|
| 885 |
+
display: inline-block;
|
| 886 |
+
width: 50px;
|
| 887 |
+
height: 24px;
|
| 888 |
+
}
|
| 889 |
+
|
| 890 |
+
.toggle-switch input {
|
| 891 |
+
opacity: 0;
|
| 892 |
+
width: 0;
|
| 893 |
+
height: 0;
|
| 894 |
+
}
|
| 895 |
+
|
| 896 |
+
.slider {
|
| 897 |
+
position: absolute;
|
| 898 |
+
cursor: pointer;
|
| 899 |
+
top: 0;
|
| 900 |
+
left: 0;
|
| 901 |
+
right: 0;
|
| 902 |
+
bottom: 0;
|
| 903 |
+
background-color: var(--border-color);
|
| 904 |
+
transition: .4s;
|
| 905 |
+
border-radius: 24px;
|
| 906 |
+
}
|
| 907 |
+
|
| 908 |
+
.slider:before {
|
| 909 |
+
position: absolute;
|
| 910 |
+
content: "";
|
| 911 |
+
height: 16px;
|
| 912 |
+
width: 16px;
|
| 913 |
+
left: 4px;
|
| 914 |
+
bottom: 4px;
|
| 915 |
+
background-color: white;
|
| 916 |
+
transition: .4s;
|
| 917 |
+
border-radius: 50%;
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
input:checked + .slider {
|
| 921 |
+
background-color: var(--primary-color);
|
| 922 |
+
}
|
| 923 |
+
|
| 924 |
+
input:checked + .slider:before {
|
| 925 |
+
transform: translateX(26px);
|
| 926 |
+
}
|
| 927 |
+
|
| 928 |
+
/* Tooltip */
|
| 929 |
+
.tooltip {
|
| 930 |
+
position: relative;
|
| 931 |
+
display: inline-block;
|
| 932 |
+
}
|
| 933 |
+
|
| 934 |
+
.tooltip .tooltiptext {
|
| 935 |
+
visibility: hidden;
|
| 936 |
+
width: 120px;
|
| 937 |
+
background-color: #555;
|
| 938 |
+
color: #fff;
|
| 939 |
+
text-align: center;
|
| 940 |
+
border-radius: 6px;
|
| 941 |
+
padding: 5px;
|
| 942 |
+
position: absolute;
|
| 943 |
+
z-index: 1;
|
| 944 |
+
bottom: 125%;
|
| 945 |
+
left: 50%;
|
| 946 |
+
margin-left: -60px;
|
| 947 |
+
opacity: 0;
|
| 948 |
+
transition: opacity 0.3s;
|
| 949 |
+
}
|
| 950 |
+
|
| 951 |
+
.tooltip:hover .tooltiptext {
|
| 952 |
+
visibility: visible;
|
| 953 |
+
opacity: 1;
|
| 954 |
+
}
|
| 955 |
</style>
|
| 956 |
</head>
|
| 957 |
|
|
|
|
| 1108 |
<div class="editor-header">
|
| 1109 |
<h3>Code Editor</h3>
|
| 1110 |
<div class="editor-controls">
|
| 1111 |
+
<button class="editor-btn" id="copyCodeBtn" title="Copy Code">
|
| 1112 |
+
<i class="fas fa-copy"></i>
|
| 1113 |
+
<span>Copy</span>
|
| 1114 |
</button>
|
| 1115 |
+
<button class="editor-btn" id="downloadCodeBtn" title="Download Code">
|
| 1116 |
+
<i class="fas fa-download"></i>
|
| 1117 |
+
<span>Download</span>
|
| 1118 |
</button>
|
| 1119 |
+
<label class="editor-btn" title="Toggle Preview">
|
| 1120 |
+
<input type="checkbox" id="previewToggle" class="toggle-switch-input">
|
| 1121 |
+
<span class="slider"></span>
|
| 1122 |
+
<span>Preview</span>
|
| 1123 |
+
</label>
|
| 1124 |
+
<button class="editor-btn" id="formatCodeBtn" title="Format Code">
|
| 1125 |
+
<i class="fas fa-align-left"></i>
|
| 1126 |
+
<span>Format</span>
|
| 1127 |
+
</button>
|
| 1128 |
+
<button class="editor-btn" id="runCodeBtn" title="Run Code">
|
| 1129 |
+
<i class="fas fa-play"></i>
|
| 1130 |
+
<span>Run</span>
|
| 1131 |
</button>
|
| 1132 |
</div>
|
| 1133 |
</div>
|