Skip to content

Commit 5bce2bf

Browse files
author
aryan
committed
Home shortcode styled and added sections
1 parent c6903ae commit 5bce2bf

File tree

18 files changed

+522
-117
lines changed

18 files changed

+522
-117
lines changed

content/_index.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ width: normal
99
---
1010

1111
<!-- markdownlint-disable MD033 MD034 -->
12-
{{< hextra/hero-badge link="/notes">}}
12+
<!-- {{< hextra/hero-badge link="/notes">}}
1313
<div class="hx-w-2 hx-h-2 hx-rounded-full hx-bg-primary-400"></div>
1414
Notes
1515
{{< icon name="arrow-circle-right" attributes="height=14" >}}
@@ -29,7 +29,7 @@ width: normal
2929
3030
<div class="hx-mb-12">
3131
{{< hextra/hero-button text="Get Started" link="notes" >}}
32-
</div>
32+
</div> -->
3333

3434
<!-- <div class="hx-mt-6"></div>
3535
@@ -40,7 +40,7 @@ width: normal
4040

4141
<div class="hx-mb-6"></div>
4242

43-
{{< hextra/feature-grid >}}
43+
<!-- {{< hextra/feature-grid >}}
4444
{{< hextra/feature-card
4545
title="Practice Questions"
4646
subtitle="Environment variables are a simple way of configuring your applications, their deployment and their behaviour."
@@ -61,23 +61,23 @@ width: normal
6161
style="background: radial-gradient(ellipse at 50% 80%,rgba(203, 28, 66, 0.1),hsla(0,0%,100%,0));"
6262
>}}
6363
64-
<!-- {{< hextra/feature-card
64+
{{< hextra/feature-card
6565
title="Extra Weekly Activites"
6666
subtitle="See supported languages and how to configure your app to deploy successfully"
6767
link="doc/applications"
68-
>}} -->
69-
<!-- {{< hextra/feature-card
68+
>}}
69+
{{< hextra/feature-card
7070
title="IITM BS Degree Graded Assignments"
7171
subtitle="See available add-ons such as MySQL, PostgreSQL, Redis, Mongo, Elastic..."
7272
link="assignments"
73-
>}} -->
73+
>}}
7474
{{< hextra/feature-card
7575
title="About "
7676
icon="github"
7777
subtitle="See available add-ons such as MySQL, PostgreSQL, Redis, Mongo, Elastic..."
7878
link="about"
7979
>}}
8080
81-
{{< /hextra/feature-grid >}}
81+
{{< /hextra/feature-grid >}} -->
8282

8383
{{< home/home >}}

content/exercises/graded-assignments/mathematics-1/_index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
draft: true
2+
draft: false
3+
description: Solution for IIT Madras Course Mathematics I Garaded Assignments
34
cascade:
45
title: Mathematics I
56
subtitle: Graded Assignment

content/exercises/graded-assignments/statistics-1/week-4-questions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ $$
7979
Therefore, Standard deviation of sales of BBK Electronics = $\sqrt{S_y^2}$
8080

8181
---
82+
{{< qna/question type="answer" >}}
8283

8384
#### 3. What is the sample co-variance between the sales of OnePlus and BBK Electronics? (Enter the answer correct to 2 decimal accuracy)
8485

@@ -93,6 +94,7 @@ $$
9394
$$
9495
= \frac{(a - m_x)(b - m_y) + (c - m_x)(d - m_y) + (e - m_x)(f - m_y) + (g - m_x)(h - m_y) + (i - m_x)(j - m_y) + (k - m_x)(l - m_y) + (m - m_x)(n - m_y)}{6}
9596
$$
97+
{{< /qna/question >}}
9698

9799
---
98100

content/notes/books/m1-vol1-sets-&-functions-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: M1_VOL1_SETS&FUNCTIONS.pdf
2+
title: M1 VOL1 SETS & FUNCTIONS
33
date: 2025-05-08
44
tags:
55
- Notes

content/notes/books/m1-vol1-sets-&-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: M1_VOL1_SETS&FUNCTIONS.pdf
2+
title: M1 VOL1 SETS & FUNCTIONS.pdf
33
date: 2025-05-08
44
math: true
55
tags:

layouts/blog/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
{{/* {{ if .Title }}<h1 class="hx-text-center hx-mt-2 hx-text-4xl hx-font-bold hx-tracking-tight hx-text-slate-900 dark:hx-text-slate-100">{{ .Title }}</h1>{{ end }} */}}
1919
{{/* <div class="content">{{ .Content }}</div> */}}
2020
{{/* <h1 class="hx-text-center " >Blog with featured tag</h1> */}}
21-
{{ partial "blog-cards.html" . }}
21+
{{ partial "blog-list.html" . }}
2222
</main>
2323
</article>
2424
<div class="max-xl:hx-hidden hx-h-0 hx-w-64 hx-shrink-0"></div>

layouts/exercises/single.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,20 @@
5757
</main>
5858
</article>
5959
</div>
60+
61+
<style>
62+
.sidebar-container {
63+
@media (min-width: 1280px) {
64+
display: none;
65+
}
66+
}
67+
.hextra-sidebar-collapsible-button {
68+
display: none;
69+
}
70+
.sidebar-container li > div{
71+
height: 0;
72+
display: none;
73+
}
74+
</style>
75+
6076
{{ end }}

layouts/partials/blog-cards.html

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
<div class="blogs-wrapper">
2-
{{ $imagePath := .Site.Params.blog.list.image | default "images/svg/circle-gradient.svg/" }}
3-
{{- $borderClass := "hx-mt-8 hx-border-t" -}} {{ $readMore := (T "readMore") |
4-
default "Read here →" }} {{ $pages := partial "utils/sort-pages" (dict "page"
5-
. "by" site.Params.blog.list.sortBy "weight" site.Params.blog.list.sortOrder)
6-
}} {{- range .Pages -}}
1+
{{ $imagePath := .Site.Params.blog.list.image | default "images/svg/circle-gradient.svg/" }}
2+
{{- $borderClass := "hx-mt-8 hx-border-t" -}} {{ $readMore := (T "readMore") |
3+
default "Read here →" }} {{ $pages := partial "utils/sort-pages" (dict "page"
4+
. "by" site.Params.blog.list.sortBy "weight" site.Params.blog.list.sortOrder) }}
5+
76
<div class="blog-card hx-mb-10">
87
<div class="blog-card-image">
98
{{ if .Params.image }}
@@ -101,13 +100,8 @@ <h3 class="blog-card-title" style="display: -webkit-box; -webkit-line-clamp: 2;
101100
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"
102101
/>
103102
</div>
104-
{{- end -}}
105-
106-
<div class="blog-card">
107-
{{ partial "google/blog-In-feed-ad.html" . }}
108-
</div>
103+
109104

110-
</div>
111105

112106
<style>
113107
.svg-image {

layouts/partials/blog-list.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="blogs-wrapper">
2+
{{- range .Pages -}} {{ partial "blog-cards.html" . }} {{- end -}}
3+
4+
<div class="blog-card">{{ partial "google/blog-In-feed-ad.html" . }}</div>
5+
</div>
Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
2+
3+
{{ if .page.Title }}
4+
<a href="{{ .RelPermalink }}">
5+
<li class="chapter-item">
6+
{{- $img := (.Resources.ByType "image").GetMatch "*feature*" -}} {{- if
7+
$img -}}
8+
<img
9+
class="chapter-image"
10+
src="{{ $img.RelPermalink }}"
11+
alt="{{ .Title }}"
12+
loading="lazy"
13+
width="100"
14+
height="100"
15+
style="border-radius: 8px; margin-right: 10px; float: left"
16+
/>
17+
{{- end -}} {{- if .page.Params.image -}}
18+
<img
19+
class="chapter-image"
20+
src="{{ .page.Params.image }}"
21+
alt="{{ .Title }}"
22+
loading="lazy"
23+
width="100"
24+
height="100"
25+
style="border-radius: 8px; margin-right: 10px; float: left"
26+
/>
27+
{{- end -}} {{- if .page.Params.icon -}}
28+
<img
29+
class="chapter-image"
30+
src="{{ .page.Params.icon }}"
31+
alt="{{ .Title }}"
32+
loading="lazy"
33+
width="100"
34+
height="100"
35+
style="border-radius: 8px; margin-right: 10px; float: left"
36+
/>
37+
{{- end -}} {{ if .page.Params.emoji}}
38+
<span class="chapter-emoji">{{ .page.Params.emoji }}</span>
39+
{{ end -}}
40+
41+
<h2 class="chapter-title mona-sans">
42+
<span class="gradient-text"
43+
>{{ if lt (add .num 1) 10 }}0{{ end }}{{ add .num 1 }}</span
44+
>
45+
{{ .page.Title }}
46+
</h2>
47+
<p class="chapter-description">
48+
{{- if .page.Params.description -}}
49+
{{ .page.Params.description | markdownify | plainify }}
50+
{{- else -}}
51+
{{- partial "utils/page-description" .page -}}
52+
{{- end -}}
53+
{{/* {{- partial "utils/page-description" . -}} */}}
54+
</p>
55+
</li>
56+
</a>
57+
{{ end -}}
58+
59+
60+
<style>
61+
62+
63+
.gradient-text {
64+
background: linear-gradient(90deg, #ff7e5f, #feb47b);
65+
-webkit-background-clip: text;
66+
-webkit-text-fill-color: transparent;
67+
margin: 0 0.25rem;
68+
list-style-type: decimal-leading-zero;
69+
}
70+
71+
.chapter-image {
72+
display: none; /* Hide images by default */
73+
width: 100px;
74+
border-radius: 8px;
75+
margin-right: 10px;
76+
float: left;
77+
object-fit: cover;
78+
aspect-ratio: 4 / 3; /* Maintain aspect ratio */
79+
}
80+
81+
.chapter-item {
82+
list-style-type: none;
83+
margin: 20px 0;
84+
padding: 1.5rem;
85+
background-color: #ffffff;
86+
border-radius: 8px;
87+
font-size: 17px;
88+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
89+
transition: all 0.3s ease;
90+
}
91+
92+
.chapter-item:hover {
93+
background-color: #f9f9f9;
94+
border-color: #d0d0d0;
95+
transform: translateY(-2px);
96+
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
97+
cursor: pointer;
98+
}
99+
100+
.chapter-emoji {
101+
position: absolute;
102+
103+
left: -12px;
104+
transform: translateY(-100%);
105+
font-size: 28px;
106+
z-index: 1;
107+
}
108+
109+
.chapter-item {
110+
position: relative;
111+
}
112+
113+
.chapter-title {
114+
font-weight: bold;
115+
margin: 0 0 5px;
116+
color: #333;
117+
font-size: large;
118+
}
119+
120+
.chapter-description {
121+
margin: 0;
122+
color: #666;
123+
font-size: 14px;
124+
white-space: pre-wrap;
125+
overflow: hidden;
126+
text-overflow: ellipsis;
127+
display: -webkit-box;
128+
-webkit-line-clamp: 2; /* Limit to 2 lines */
129+
-webkit-box-orient: vertical;
130+
line-height: 1.5rem; /* Adjusted line height for readability */
131+
max-height: 3rem; /* Limit height to 2 lines */
132+
}
133+
134+
.chapter-item:focus-within {
135+
outline: 2px solid #0078d4;
136+
outline-offset: 2px;
137+
}
138+
139+
.chapter-item:hover .chapter-title {
140+
color: #0078d4;
141+
}
142+
143+
html[class~="dark"] {
144+
.chapter-item {
145+
color: #ffffff;
146+
background-color: #1e293b;
147+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
148+
}
149+
150+
.chapter-item:hover {
151+
box-shadow: 0 6px 10px rgba(0, 0, 0, 0.7);
152+
}
153+
154+
.chapter-title {
155+
color: #ffffff;
156+
}
157+
158+
.chapter-description {
159+
color: #dddddd;
160+
}
161+
}
162+
163+
@media (min-width: 769px) {
164+
.chapter-image {
165+
display: block; /* Show items on larger screens */
166+
}
167+
}
168+
169+
@media (max-width: 768px) {
170+
.chapter-image {
171+
display: none; /* Hide images on smaller screens */
172+
}
173+
}
174+
</style>

0 commit comments

Comments
 (0)