Skip to content

Commit 4bd8357

Browse files
author
aryan
committed
add some ui styling for iit madras page
1 parent 757fcc5 commit 4bd8357

File tree

5 files changed

+322
-3
lines changed

5 files changed

+322
-3
lines changed

content/_index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,14 @@ width: normal
3535

3636
<div class="hx-mt-6"></div>
3737

38+
{{< cards cols="3">}}
39+
{{< card link="/" title="Image Card" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="Internet Image" >}}
40+
{{< card link="/" title="Local Image" image="/images/code-2.jpg" subtitle="Raw image under static directory." >}}
41+
{{< card link="/" title="Local Image" image="/images/orange.jpg" subtitle="Image under assets directory, processed by Hugo." method="Resize" options="600x q80 webp" >}}
42+
{{< /cards >}}
43+
44+
<div class="hx-mb-6"></div>
45+
3846
{{< hextra/feature-grid >}}
3947
{{< hextra/feature-card
4048
title="Computaional Thinking"
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
---
2+
title: Mathematics Graded Assignment
3+
categories:
4+
- graded assignment
5+
image: /images/tree.jpg
6+
excludeSearch: false
7+
width: wide
8+
---
9+
10+
## 1. Multiple Choice Questions (MSQ)
11+
12+
**Question 1:**
13+
Which of the following are irrational numbers?
14+
15+
(a) $3^{1/3}$
16+
17+
(b) $(\sqrt{8}+\sqrt{2})(\sqrt{12}-\sqrt{3})$
18+
19+
(c) $\frac{\sqrt{18}-3}{\sqrt{2}-1}$
20+
21+
(d) $\frac{\sqrt{8}+\sqrt{2}}{\sqrt{8}-\sqrt{2}}$
22+
23+
**Solution:**
24+
25+
(a) $3^{1/3}$ is irrational as it cannot be written as a fraction $p/q$ with $p, q \in \mathbb{Z}, q \neq 0$.
26+
27+
(b) $(\sqrt{8}+\sqrt{2})(\sqrt{12}-\sqrt{3}) = (2\sqrt{2}+\sqrt{2})(2\sqrt{3}-\sqrt{3}) = 3\sqrt{2} \cdot \sqrt{3} = 3\sqrt{6}$, which is irrational.
28+
29+
(c) $\frac{\sqrt{18}-3}{\sqrt{2}-1} = \frac{3\sqrt{2}-3}{\sqrt{2}-1} = \frac{3(\sqrt{2}-1)}{\sqrt{2}-1} = 3$ (rational).
30+
31+
(d) $\frac{\sqrt{8}+\sqrt{2}}{\sqrt{8}-\sqrt{2}} = \frac{3\sqrt{2}}{\sqrt{2}} = 3$ (rational).
32+
33+
**Answer:** (a), (b)
34+
35+
---
36+
37+
## 2. Examples and Additional Solutions
38+
39+
**Example (QL):**
40+
Consider a table of materials and their dielectric constants:
41+
42+
43+
| Material | Dielectric constant |
44+
| :-- | :-- |
45+
| Air | 1 |
46+
| Vacuum | 2 |
47+
| Paper | 3 |
48+
| Glass | 8 |
49+
| Nerve | 7 |
50+
| Membrane | 7 |
51+
| Silicon | 13 |
52+
53+
**Solution:**
54+
Each material maps to a unique dielectric constant, so the function is bijective.
55+
56+
---
57+
58+
**Example (Q3):**
59+
Given:
60+
$A = \{x \in \mathbb{N} \mid x \bmod 2 = 0 \text{ and } 1 \leq x \leq 10\} = \{2,4,6,8,10\}$
61+
$B = \{x \in \mathbb{N} \mid x \bmod 5 = 0 \text{ and } 6 \leq x \leq 25\} = \{10,15,20,25\}$
62+
$C = \{x \in \mathbb{N} \mid x \bmod 7 = 0 \text{ and } 7 \leq x \leq 29\} = \{7,14,21,28\}$
63+
64+
Find $A \setminus (B \cup C)$, $B \setminus (A \cup C)$, $C \setminus (B \cup A)$.
65+
66+
**Solution:**
67+
$A \setminus (B \cup C) = \{2,4,6,8\}$
68+
$B \setminus (A \cup C) = \{15,20,25\}$
69+
$C \setminus (B \cup A) = \{7,14,21,28\}$ (note: likely a typo in the original for "2δ", should be "28")
70+
71+
Thus,
72+
$A \setminus (B \cup C) \cup B \setminus (A \cup C) \cup C \setminus (B \cup A) = \{2,4,6,8,15,20,25,7,14,21,28\}$
73+
**Cardinality:** 11
74+
75+
---
76+
77+
**Example (Q4):**
78+
Total number of people = 180
79+
Number who watched Dabang $N(D) = 95$
80+
Number who watched Avatar and RRR $N(A \cup R) = 40$
81+
Number who watched Dabang and RRR $N(D \cup R) = 55$
82+
Let $x$ be the number who watched all three movies.
83+
84+
**Solution:**
85+
86+
$$
87+
(x-10) + (10+x) + (5+x) + (55-x) + (50-x) + x + (40-x) = 180
88+
$$
89+
90+
$$
91+
x + 150 = 180 \implies x = 30
92+
$$
93+
94+
Number who watched only RRR and Avatar = $40 - x = 10$
95+
96+
---
97+
98+
## 3. Numerical Answer Type (NAT)
99+
100+
**Question 5:**
101+
Suppose $f: D \longrightarrow \mathbb{R}$ is a function defined by $f(x) = \frac{\sqrt{x^2-9}}{x+3}$, where $D \subset \mathbb{Z}$. Let $A$ be the set of integers not in the domain of $f$. Find the cardinality of $A$.
102+
103+
**Solution:**
104+
Domain requires $x^2 - 9 \geq 0$ and $x+3 \neq 0$, so $x \notin \{-3,-2,-1,0,1,2\}$.
105+
Thus, $A = \{-3,-2,-1,0,1,2\}$; **cardinality = 6**.
106+
107+
**Answer:** 6
108+
109+
---
110+
111+
**Question 6:**
112+
Consider $S = \{a \mid a \in \mathbb{N}, a \leq 18\}$.
113+
Let $R_1 = \{(x,y) \mid x, y \in S, y = 3x\}$
114+
Let $R_2 = \{(x,y) \mid x, y \in S, y = x^2\}$
115+
116+
Find the cardinality of $R_1 \setminus (R_1 \cap R_2)$.
117+
118+
**Solution:**
119+
$S = \{0,1,2,\ldots,18\}$
120+
$R_1 = \{(0,0),(1,3),(2,6),(3,9),(4,12),(5,15),(6,18)\}$
121+
$R_2 = \{(0,0),(1,1),(2,4),(3,9),(4,16)\}$
122+
$R_1 \cap R_2 = \{(0,0),(3,9)\}$
123+
$R_1 \setminus (R_1 \cap R_2) = \{(1,3),(2,6),(4,12),(5,15),(6,18)\}$
124+
125+
**Answer:** 5
126+
127+
---
128+
129+
**Question 7:**
130+
In a Zoo, there are 6 Bengal white tigers and 7 Bengal royal tigers. Out of these, 5 are males and 10 are either Bengal royal tigers or males. Find the number of female Bengal white tigers.
131+
132+
**Solution:**
133+
Let BW = Bengal White, BR = Bengal Royal, M = Male.
134+
$n(BR) = 7$, $n(M) = 5$, $n(BR \cup M) = 10$
135+
Using inclusion-exclusion:
136+
137+
$$
138+
n(BR \cup M) = n(BR) + n(M) - n(BR \cap M)
139+
$$
140+
141+
$$
142+
10 = 7 + 5 - n(BR \cap M) \implies n(BR \cap M) = 2
143+
$$
144+
145+
So, male Bengal Royal tigers = 2, male Bengal White tigers = 3
146+
Female Bengal White tigers = 6 - 3 = **3**
147+
148+
**Answer:** 3
149+
150+
---
151+
152+
## 4. Additional Examples and Incorrect Questions (Not for Marks)
153+
154+
**Example (Q8):**
155+
Define $R = \{(A,B) \mid A \text{ and } B \text{ are cousins}\}$,
156+
and $S = \{(A,B) \mid A \text{ is son of } B\}$.
157+
158+
**Solution:**
159+
(Not fully solved, but shows how relations are defined for family relationships.)
160+
161+
---
162+
163+
**Example (Q9):**
164+
Given $R(m)$ has cardinality $m = 8$, $S(n)$ has cardinality $n = 8$, so $m + n = 16$.
165+
166+
**Example (Q10):**
167+
Define $f = \{(A,B) \mid A \text{ is son of } B\}$ as a function from $P$ to $Q$.
168+
169+
**Analysis:**
170+
171+
- **Option 1:** Not a function if some $L \in P$ has no image.
172+
- **Option 2:** Function, not injective (not one-one).
173+
- **Option 3:** Function, onto (every element in codomain has preimage).
174+
- **Option 4:** Bijective (both injective and surjective).
175+
176+
---
177+
178+
## Summary Table
179+
180+
| Question | Type | Solution/Answer |
181+
| :-- | :-- | :-- |
182+
| 1 | MSQ | (a), (b) |
183+
| QL | Ex. | Bijective function example |
184+
| Q3 | Ex. | Cardinality = 11 |
185+
| Q4 | Ex. | $x = 30$, only Avatar \& RRR = 10 |
186+
| 5 | NAT | 6 |
187+
| 6 | NAT | 5 |
188+
| 7 | NAT | 3 |
189+
| Q8-Q10 | Ex. | Family relations and function examples |
190+
191+

layouts/_default/list.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{{ define "main" }}
2+
<div class='hx-mx-auto hx-flex {{ partial "utils/page-width" . }}'>
3+
{{ partial "sidebar.html" (dict "context" .) }}
4+
{{ partial "toc.html" . }}
5+
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
6+
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 hx-md-px-12">
7+
<div class="content">
8+
<h1>HELLO</h1>
9+
{{ if .Title }}<h1>{{ .Title }}</h1>{{ end }}
10+
{{ .Content }}
11+
</div>
12+
<div class="hx-mt-16"></div>
13+
{{ partial "components/last-updated.html" . }}
14+
{{ partial "components/comments.html" . }}
15+
</main>
16+
</article>
17+
</div>
18+
{{ end }}

layouts/_default/single.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{{ define "main" }}
2+
<div class='hx-mx-auto hx-flex {{ partial "utils/page-width" . }}'>
3+
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}
4+
{{ partial "toc.html" . }}
5+
<article class="hx-w-full hx-break-words hx-flex hx-min-h-[calc(100vh-var(--navbar-height))] hx-min-w-0 hx-justify-center hx-pb-8 hx-pr-[calc(env(safe-area-inset-right)-1.5rem)]">
6+
<main class="hx-w-full hx-min-w-0 hx-max-w-6xl hx-px-6 hx-pt-4 hx-md-px-12">
7+
<br class="hx-mt-1.5 hx-text-sm" />
8+
{{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 hx-dark-text-slate-100">{{ .Title }}</h1>{{ end }}
9+
<div class="hx-mb-16"></div>
10+
<h1>HELLO</h1>
11+
<div class="content">
12+
{{ .Content }}
13+
</div>
14+
<div class="hx-mt-16"></div>
15+
{{ partial "components/comments.html" . }}
16+
</main>
17+
</article>
18+
</div>
19+
{{ end }}

layouts/iit-madras/list.html

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ define "main" }} {{- $imagePath := .Site.Params.blog.list.image | default
2-
"images/abc.jpg" -}} {{- $borderClass := "hx-mt-8 hx-border-t" -}} {{- $readMore
2+
"images/abc.jpg" -}} {{- $borderClass := "hx-mt-12 hx-mb-12 hx-border-t" -}} {{- $readMore
33
:= (T "readMore") | default "Read here →" -}}
44
<div class="hx-mx-auto hx-flex {{ partial `utils/page-width` . }}">
55
{{ partial "sidebar.html" (dict "context" . "disableSidebar" true
@@ -69,6 +69,85 @@ <h2 class="hx-text-xl hx-font-bold">{{ .Title }}</h2>
6969
{{ end }}
7070
</ul>
7171
</div>
72+
73+
74+
<hr
75+
class="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400"
76+
/>
77+
78+
<div class="grid-layout-section">
79+
<ul class="grid-container">
80+
{{ range first 6 (where .Site.RegularPages "Params.tags" "intersect"
81+
(slice "English")) }}
82+
<li class="grid-item">
83+
<a href="{{ .RelPermalink }}" class="grid-layout__item-link">
84+
<div class="grid-layout__item">
85+
<img
86+
src="{{ .Params.image | default $imagePath }}"
87+
alt="{{ .Title }}"
88+
class="hx-w-full hx-h-48 hx-object-cover hx-rounded-md hx-mb-4"
89+
/>
90+
<div class="grid-layout__item-content">
91+
<p class="hx-opacity-100 hx-text-xs hx-leading-7">
92+
{{ with index .Params.tags 0 }}
93+
<span class="gradient-tag mona-sans hx-inline-block"
94+
>{{ . }}</span
95+
>
96+
{{ end }}
97+
</p>
98+
<h2 class="hx-text-xl hx-font-bold">{{ .Title }}</h2>
99+
<p class="grid-card-description hx-opacity-80">
100+
{{- partial "utils/page-description" . -}}
101+
</p>
102+
</div>
103+
</div>
104+
</a>
105+
</li>
106+
{{ end }}
107+
</ul>
108+
</div>
109+
110+
<hr
111+
class="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400"
112+
/>
113+
114+
<div class="grid-layout-section">
115+
<ul class="grid-container three-grid">
116+
{{ range first 6 (where .Site.RegularPages "Params.tags" "intersect"
117+
(slice "Notes")) }}
118+
<li class="grid-item featured-grid-item">
119+
<a href="{{ .RelPermalink }}" class="grid-layout__item-link">
120+
<div class="grid-layout__item">
121+
<img
122+
src="{{ .Params.image | default $imagePath }}"
123+
alt="{{ .Title }}"
124+
class="hx-w-full hx-h-48 hx-object-cover hx-rounded-md hx-mb-4"
125+
/>
126+
<div class="grid-layout__item-content">
127+
<p class="hx-opacity-100 hx-text-xs hx-leading-7">
128+
{{ with index .Params.tags 0 }}
129+
<span class="gradient-tag mona-sans hx-inline-block"
130+
>{{ . }}</span
131+
>
132+
{{ end }}
133+
</p>
134+
<h2 class="hx-text-xl hx-font-bold">{{ .Title }}</h2>
135+
<p class="grid-card-description hx-opacity-80">
136+
{{- partial "utils/page-description" . -}}
137+
</p>
138+
</div>
139+
</div>
140+
</a>
141+
</li>
142+
{{ end }}
143+
</ul>
144+
</div>
145+
146+
<hr
147+
class="{{$borderClass}} dark:hx-border-neutral-800 contrast-more:hx-border-t contrast-more:hx-border-neutral-400 contrast-more:hx-shadow-none contrast-more:dark:hx-border-neutral-400"
148+
/>
149+
150+
72151
</main>
73152
</article>
74153
<div class="max-xl:hx-hidden hx-h-0 hx-w-64 hx-shrink-0"></div>
@@ -157,10 +236,14 @@ <h2 class="hx-text-xl hx-font-bold">{{ .Title }}</h2>
157236
/* Media query for larger screens (e.g., tablets and desktops) */
158237
@media (min-width: 1005px) {
159238
.grid-container {
160-
grid-template-columns: 1.2fr 1fr; /* Left takes 3/4, Right takes 1/4 */
239+
grid-template-columns: 1fr 1fr; /* Left takes 3/4, Right takes 1/4 */
161240
}
162241

163-
.card-large {
242+
.three-grid {
243+
grid-template-columns: repeat(3, 1fr);
244+
}
245+
246+
.card-large {
164247
grid-row: 1 / span 3;
165248
}
166249
}

0 commit comments

Comments
 (0)