forked from AndreasFragkop/Code-Analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
169 lines (165 loc) · 7.43 KB
/
index.html
File metadata and controls
169 lines (165 loc) · 7.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- App shell + CSS/JS hooks for the CodeAnalyzer Studio UI -->
<title>CodeAnalyzer Studio</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header>
<!-- Brand/title area -->
<h1>CodeAnalyzer Studio</h1>
<!-- One-line product explanation -->
<p class="subtitle">Paste your code and instantly identify the programming language</p>
</header>
<div class="main-content">
<!-- Left panel: list of languages the detector can recognize -->
<div class="panel">
<div class="panel-header">
<!-- Section label for the language catalog -->
<h2 class="panel-title">Detectable Languages</h2>
</div>
<!-- Icon + name list for each supported language -->
<ul class="language-list">
<li>
<img class="lang-icon" src="images/Js-Logo.png" alt="JavaScript logo">
JavaScript
</li>
<li>
<img class="lang-icon" src="images/Python-Logo.png" alt="Python logo">
Python
</li>
<li>
<img class="lang-icon" src="images/Java-Logo.png" alt="Java logo">
Java
</li>
<li>
<img class="lang-icon" src="images/ISO_C++_Logo.png" alt="C++ logo">
C++
</li>
<li>
<img class="lang-icon" src="images/C-Logo.png" alt="C logo">
C
</li>
<li>
<img class="lang-icon" src="images/C%23_Logo.png" alt="C# logo">
C#
</li>
<li>
<img class="lang-icon" src="images/Ruby_logo.png" alt="Ruby logo">
Ruby
</li>
<li>
<span class="logo-badge php-badge">
<img class="lang-icon" src="images/PHP-logo.png" alt="PHP logo">
</span>
PHP
</li>
<li>
<img class="lang-icon" src="images/Swift-Logo.png" alt="Swift logo">
Swift
</li>
<li>
<img class="lang-icon go-icon" src="images/Go-Logo.png" alt="Go logo">
Go
</li>
<li>
<img class="lang-icon" src="images/Rust-Logo.png" alt="Rust logo">
Rust
</li>
<li>
<img class="lang-icon" src="images/Typescript_logo.png" alt="TypeScript logo">
TypeScript
</li>
<li>
<img class="lang-icon" src="images/Kotlin_Logo.png" alt="Kotlin logo">
Kotlin
</li>
<li>
<span class="logo-badge sql-badge">
<img class="lang-icon" src="images/Sql_Logo.png" alt="SQL logo">
</span>
SQL
</li>
<li>
<img class="lang-icon" src="images/HTML-Logo.png" alt="HTML logo">
HTML
</li>
<li>
<span class="logo-badge css-badge">
<img class="lang-icon" src="images/CSS-Logo.png" alt="CSS logo">
</span>
CSS
</li>
<li>
<img class="lang-icon" src="images/JSON_Logo.png" alt="JSON logo">
JSON
</li>
<li>
<img class="lang-icon" src="images/JSX-Logo.png" alt="JSX logo">
JSX
</li>
</ul>
</div>
<!-- Center panel: code input editor -->
<div class="panel">
<div class="panel-header">
<!-- Section label for the code input -->
<h2 class="panel-title">Paste Your Code</h2>
</div>
<!-- Code editor wrapper with line-number gutter and textarea -->
<div class="code-input">
<!-- Line numbers are generated and synced in script.js -->
<div id="lineNumbers" class="line-numbers">1</div>
<!-- Raw code input (analyzed on demand) -->
<textarea
id="codeInput"
placeholder="Paste your code here... function example() { console.log('Hello World'); }"
></textarea>
</div>
<!-- Action buttons -->
<div class="actions">
<!-- Primary action: run language detection -->
<button class="btn-detect" onclick="detectLanguage()">
<span id="detectBtnText">Detect Language</span>
</button>
<!-- Secondary action: clear input + results -->
<button class="btn-clear" onclick="clearAll()">Clear</button>
</div>
</div>
<!-- Right panel: analysis results -->
<div class="panel">
<div class="panel-header">
<div class="panel-title-row">
<!-- Section label for results -->
<h2 class="panel-title">Results</h2>
<div class="panel-actions">
<!-- Copy report button (enabled after analysis) -->
<button class="btn-copy" id="copyResultBtn" type="button" disabled>Copy Result</button>
</div>
</div>
</div>
<div class="result-display">
<!-- Empty state shown before analysis -->
<div id="emptyState" class="empty-state">
<div class="empty-icon">📝</div>
<p>No code detected yet</p>
</div>
<!-- Filled dynamically with the analysis output -->
<div id="resultContent" class="result-content" style="display: none;"></div>
<!-- Optional filename hint banner -->
<div id="filenameHint" class="filename-hint" style="display: none;"></div>
<!-- Optional large-input performance warning -->
<div id="perfWarning" class="perf-warning" style="display: none;"></div>
</div>
</div>
</div>
</div>
<!-- App logic (detection, metrics, UI rendering) -->
<script src="script.js"></script>
</body>
</html>