sh1k4ku commited on
Commit
cbaff5a
·
verified ·
1 Parent(s): a24c4c2

Upload assignment2.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. assignment2.html +25 -19
assignment2.html CHANGED
@@ -98,21 +98,23 @@
98
  .exportbar .spacer { flex:1; }
99
  .toast { font-size:12px; color:var(--ok); }
100
 
101
- /* ===== Ant-style tabs ===== */
102
- .tabs { display:flex; gap:2px; border-bottom:1px solid var(--border);
103
- margin:16px 0 0; overflow-x:auto; position:sticky; top:0;
104
- background:var(--bg); z-index:5; padding-top:4px; }
105
  .tabs button { background:transparent; color:var(--muted); border:none;
106
- border-bottom:2px solid transparent; border-radius:0;
107
- padding:10px 18px; font-size:14px; font-weight:600; cursor:pointer;
108
- white-space:nowrap; transition:color .15s, border-color .15s; margin-bottom:-1px; }
109
- .tabs button:hover:not(:disabled) { background:transparent; color:var(--accent); }
110
- .tabs button.active { color:var(--accent); border-bottom-color:var(--accent); }
111
- .tabs button .tpt { display:inline-block; margin-left:7px; font-size:11px; font-weight:600;
112
- color:var(--muted); background:var(--panel); border-radius:10px; padding:1px 7px; }
113
- .tabs button.active .tpt { color:#11111b; background:var(--accent); }
114
- .pane { display:none; padding-top:18px; }
115
- .pane.active { display:block; animation:tabfade .22s ease; }
 
 
116
  @keyframes tabfade { from{opacity:0; transform:translateY(4px)} to{opacity:1; transform:none} }
117
  .pane h2:first-child { margin-top:0; border-top:none; padding-top:0; }
118
  /* collapsible reference function */
@@ -130,13 +132,15 @@
130
  <h1>Software Testing — Assignment 2 <span class="pts" style="font-size:13px">[15 marks total]</span></h1>
131
  <p class="muted">Answer all questions below — one tab per question. Q4 has an interactive playground. Your answers auto-save in this browser; export them as JSON at the bottom when done.</p>
132
 
 
133
  <div class="tabs" id="tabbar">
134
- <button data-tab="q1" class="active">Q1 · Decision Table<span class="tpt">3</span></button>
135
- <button data-tab="q2">Q2 · Control-Flow Graph<span class="tpt">2</span></button>
136
- <button data-tab="q3">Q3 · Loop Boundary<span class="tpt">2</span></button>
137
- <button data-tab="q4">Q4 · Fault-Based<span class="tpt">6</span></button>
138
- <button data-tab="q5">Q5 · Halstead<span class="tpt">2</span></button>
139
  </div>
 
140
 
141
  <!-- ============ Q1 ============ -->
142
  <section class="pane active" data-tab="q1">
@@ -240,6 +244,8 @@
240
  <pre id="q5code"></pre>
241
  <div id="q5opts"></div>
242
  </section>
 
 
243
  </div>
244
 
245
  <!-- ============ sticky export bar ============ -->
 
98
  .exportbar .spacer { flex:1; }
99
  .toast { font-size:12px; color:var(--ok); }
100
 
101
+ /* ===== left vertical tabs (Ant style) ===== */
102
+ .layout { display:flex; gap:20px; align-items:flex-start; margin-top:16px; }
103
+ .tabs { flex:0 0 190px; display:flex; flex-direction:column; gap:5px;
104
+ position:sticky; top:16px; }
105
  .tabs button { background:transparent; color:var(--muted); border:none;
106
+ border-left:3px solid transparent; border-radius:8px;
107
+ padding:11px 14px; font-size:14px; font-weight:600; cursor:pointer;
108
+ text-align:left; width:100%; white-space:nowrap;
109
+ transition:color .15s, background .15s, border-color .15s; }
110
+ .tabs button:hover:not(:disabled) { background:var(--panel); color:var(--text); }
111
+ .tabs button.active { color:var(--accent); background:var(--card);
112
+ border-left-color:var(--accent); border-radius:0 8px 8px 0; }
113
+ .panes { flex:1; min-width:0; }
114
+ .pane { display:none; }
115
+ .pane.active { display:block; animation:tabfade .22s ease;
116
+ background:var(--panel); border:1px solid var(--border);
117
+ border-radius:12px; padding:20px 24px; }
118
  @keyframes tabfade { from{opacity:0; transform:translateY(4px)} to{opacity:1; transform:none} }
119
  .pane h2:first-child { margin-top:0; border-top:none; padding-top:0; }
120
  /* collapsible reference function */
 
132
  <h1>Software Testing — Assignment 2 <span class="pts" style="font-size:13px">[15 marks total]</span></h1>
133
  <p class="muted">Answer all questions below — one tab per question. Q4 has an interactive playground. Your answers auto-save in this browser; export them as JSON at the bottom when done.</p>
134
 
135
+ <div class="layout">
136
  <div class="tabs" id="tabbar">
137
+ <button data-tab="q1" class="active">Q1 · Decision Table</button>
138
+ <button data-tab="q2">Q2 · Control-Flow Graph</button>
139
+ <button data-tab="q3">Q3 · Loop Boundary</button>
140
+ <button data-tab="q4">Q4 · Fault-Based</button>
141
+ <button data-tab="q5">Q5 · Halstead</button>
142
  </div>
143
+ <div class="panes">
144
 
145
  <!-- ============ Q1 ============ -->
146
  <section class="pane active" data-tab="q1">
 
244
  <pre id="q5code"></pre>
245
  <div id="q5opts"></div>
246
  </section>
247
+ </div><!-- /.panes -->
248
+ </div><!-- /.layout -->
249
  </div>
250
 
251
  <!-- ============ sticky export bar ============ -->