Skip to content

Commit 97bd2b1

Browse files
committed
Add maths methods and transition to complete njk usage.
1 parent 0c70297 commit 97bd2b1

File tree

18 files changed

+474
-981
lines changed

18 files changed

+474
-981
lines changed

src/_includes/layouts/base.njk

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link rel="stylesheet" href="/css/style.css">
1717
<link rel="stylesheet" href="/css/research.css">
1818
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
19-
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" ... />
19+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" xintegrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer" />
2020
<script data-goatcounter="https://aryan-gupta.goatcounter.com/count"
2121
async src="//gc.zgo.at/count.js"></script>
2222
</head>
@@ -33,40 +33,39 @@
3333
</svg>
3434
</button>
3535
<ul class="nav-links">
36-
<li>
37-
<a href="/index.html#about">
38-
<svg viewBox="0 0 24 24" class="nav-icon" xmlns="http://www.w3.org/2000/svg">
39-
<path d="M12,11A5,5,0,1,0,7,6,5.006,5.006,0,0,0,12,11Zm0-8A3,3,0,1,1,9,6,3,3,0,0,1,12,3ZM3,22a9,9,0,0,1,18,0,1,1,0,0,1-2,0A7,7,0,0,0,5,22a1,1,0,0,1-2,0Z"/>
40-
</svg>
41-
About
42-
</a>
43-
</li>
44-
<li>
45-
<a href="/vce/">
46-
<svg viewBox="0 0 24 24" class="nav-icon" xmlns="http://www.w3.org/2000/svg">
47-
<path d="M12 10.4V20M12 10.4C12 8.15979 12 7.03969 11.564 6.18404C11.1805 5.43139 10.5686 4.81947 9.81596 4.43597C8.96031 4 7.84021 4 5.6 4H4.6C4.03995 4 3.75992 4 3.54601 4.10899C3.35785 4.20487 3.20487 4.35785 3.10899 4.54601C3 4.75992 3 5.03995 3 5.6V16.4C3 16.9601 3 17.2401 3.10899 17.454C3.20487 17.6422 3.35785 17.7951 3.54601 17.891C3.75992 18 4.03995 18 4.6 18H7.54668C8.08687 18 8.35696 18 8.61814 18.0466C8.84995 18.0879 9.0761 18.1563 9.29191 18.2506C9.53504 18.3567 9.75977 18.5065 10.2092 18.8062L12 20M12 10.4C12 8.15979 12 7.03969 12.436 6.18404C12.8195 5.43139 13.4314 4.81947 14.184 4.43597C15.0397 4 16.1598 4 18.4 4H19.4C19.9601 4 20.2401 4 20.454 4.10899C20.6422 4.20487 20.7951 4.35785 20.891 4.54601C21 4.75992 21 5.03995 21 5.6V16.4C21 16.9601 21 17.2401 20.891 17.454C20.7951 17.6422 20.6422 17.7951 20.454 17.891C20.2401 18 19.9601 18 19.4 18H16.4533C15.9131 18 15.643 18 15.3819 18.0466C15.15 18.0879 14.9239 18.1563 14.7081 18.2506C14.465 18.3567 14.2402 18.5065 13.7908 18.8062L12 20"/>
48-
</svg>
49-
VCE Resources
50-
</a>
51-
</li>
52-
<li>
53-
<a href="/blog/">
54-
<svg class="nav-icon" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
55-
56-
<path d="M6 3v1.5c1.469 0 2.85 0.572 3.889 1.611s1.611 2.42 1.611 3.889h1.5c0-3.866-3.134-7-7-7z"></path>
57-
<path d="M7.5 6l-1 1-3.5 1-3 6.5 0.396 0.396 3.638-3.638c-0.022-0.083-0.034-0.169-0.034-0.259 0-0.552 0.448-1 1-1s1 0.448 1 1-0.448 1-1 1c-0.090 0-0.176-0.012-0.259-0.034l-3.638 3.638 0.396 0.396 6.5-3 1-3.5 1-1-2.5-2.5z"></path>
58-
</svg>
59-
Blogs
60-
</a>
61-
</li>
62-
<li>
63-
<a href="/research/">
64-
<svg class="nav-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
65-
<path d="M16,5c0,0.552-0.448,1-1,1s-1-0.448-1-1s0.448-1,1-1S16,4.448,16,5z M7,18c-0.552,0-1,0.448-1,1 s0.448,1,1,1s1-0.448,1-1S7.552,18,7,18z M10,6.5C9.724,6.5,9.5,6.724,9.5,7S9.724,7.5,10,7.5s0.5-0.224,0.5-0.5S10.276,6.5,10,6.5z M11,11.5c-0.276,0-0.5,0.224-0.5,0.5s0.224,0.5,0.5,0.5s0.5-0.224,0.5-0.5S11.276,11.5,11,11.5z M6,9.5c-0.276,0-0.5,0.224-0.5,0.5 s0.224,0.5,0.5,0.5s0.5-0.224,0.5-0.5S6.276,9.5,6,9.5z M12.36,7c0-1.301-1.059-2.36-2.36-2.36S7.64,5.699,7.64,7 S8.699,9.36,10,9.36S12.36,8.301,12.36,7z M11.64,7c0,0.904-0.736,1.64-1.64,1.64S8.36,7.904,8.36,7S9.096,5.36,10,5.36 S11.64,6.096,11.64,7z M7.56,14.4c0-1.081-0.879-1.96-1.96-1.96s-1.96,0.879-1.96,1.96s0.879,1.96,1.96,1.96S7.56,15.48,7.56,14.4z M6.84,14.4c0,0.684-0.557,1.24-1.24,1.24s-1.24-0.557-1.24-1.24s0.557-1.24,1.24-1.24S6.84,13.716,6.84,14.4z M31.36,25.5V31 c0,0.199-0.161,0.36-0.36,0.36H9c-0.146,0-0.277-0.088-0.333-0.223s-0.025-0.289,0.078-0.393l3.667-3.666 c0.067-0.067,0.159-0.105,0.254-0.105H25.14V25.5c0-0.199,0.161-0.36,0.36-0.36h2.229c0.704-1.289,1.075-2.744,1.075-4.222 c0-3.116-1.64-5.983-4.304-7.57c-0.544,0.906-1.536,1.514-2.668,1.514c-0.525,0-1.021-0.131-1.454-0.361l-3.062,5.301 c-0.099,0.174-0.318,0.232-0.492,0.132l-1.275-0.736l-0.557,0.964l1.276,0.737c0.083,0.048,0.143,0.126,0.167,0.219 c0.025,0.092,0.012,0.19-0.036,0.272l-0.917,1.587c-0.099,0.173-0.317,0.232-0.492,0.132l-4.763-2.749 c-0.172-0.1-0.231-0.319-0.132-0.491l0.917-1.588c0.048-0.083,0.126-0.144,0.219-0.168c0.091-0.024,0.191-0.013,0.273,0.036 l1.276,0.736l0.556-0.964l-1.276-0.736c-0.083-0.048-0.143-0.126-0.167-0.218c-0.025-0.092-0.012-0.19,0.036-0.273l7.666-13.276 C17.652,2.074,15.378,1.36,13,1.36C6.582,1.36,1.36,6.582,1.36,13S6.582,24.64,13,24.64v0.721C6.185,25.36,0.64,19.815,0.64,13 S6.185,0.64,13,0.64c2.506,0,4.903,0.748,6.958,2.153l1.14-1.973c0.1-0.172,0.321-0.229,0.491-0.132l4.763,2.747 c0.083,0.048,0.144,0.126,0.168,0.219s0.012,0.19-0.036,0.273l-2.998,5.191c0.875,0.551,1.458,1.525,1.458,2.633 c0,0.326-0.051,0.64-0.145,0.936c2.923,1.708,4.727,4.832,4.727,8.23c0,1.468-0.339,2.915-0.984,4.222H31 C31.199,25.14,31.36,25.301,31.36,25.5z M12.734,19.688c-0.005-0.002-0.01-0.005-0.014-0.008l-1.262-0.729l-0.557,0.964l4.139,2.389 l0.557-0.963L12.734,19.688z M13.892,19.525l0.478,0.276l0.557-0.964l-0.964-0.557l-0.556,0.964L13.892,19.525z M19.784,14.09 c-0.65-0.57-1.062-1.407-1.062-2.338c0-1.714,1.396-3.109,3.11-3.109c0.35,0,0.687,0.058,1.001,0.165l2.846-4.929L21.54,1.492 l-8.806,15.25l1.26,0.728c0.005,0.003,0.011,0.006,0.016,0.009l1.092,0.631l1.771,1.021L19.784,14.09z M24.223,11.752 c0-1.317-1.072-2.39-2.39-2.39s-2.39,1.072-2.39,2.39c0,0.784,0.379,1.481,0.964,1.917c0.009,0.004,0.019,0.009,0.027,0.015 c0.029,0.017,0.055,0.036,0.077,0.059c0.379,0.252,0.833,0.399,1.321,0.399c0.972,0,1.81-0.583,2.183-1.417 c0.005-0.012,0.011-0.024,0.017-0.037C24.155,12.4,24.223,12.084,24.223,11.752z M30.64,25.86h-2.673 c-0.021-0.001-0.038-0.001-0.055,0H25.86v1.474c0,0.199-0.161,0.36-0.36,0.36H12.816L9.869,30.64H30.64V25.86z"/>
66-
</svg>
67-
Research
68-
</a>
69-
</li>
36+
<li>
37+
<a href="/#about">
38+
<svg viewBox="0 0 24 24" class="nav-icon" xmlns="http://www.w3.org/2000/svg">
39+
<path d="M12,11A5,5,0,1,0,7,6,5.006,5.006,0,0,0,12,11Zm0-8A3,3,0,1,1,9,6,3,3,0,0,1,12,3ZM3,22a9,9,0,0,1,18,0,1,1,0,0,1-2,0A7,7,0,0,0,5,22a1,1,0,0,1-2,0Z"/>
40+
</svg>
41+
About
42+
</a>
43+
</li>
44+
<li>
45+
<a href="/vce/">
46+
<svg viewBox="0 0 24 24" class="nav-icon" xmlns="http://www.w3.org/2000/svg">
47+
<path d="M12 10.4V20M12 10.4C12 8.15979 12 7.03969 11.564 6.18404C11.1805 5.43139 10.5686 4.81947 9.81596 4.43597C8.96031 4 7.84021 4 5.6 4H4.6C4.03995 4 3.75992 4 3.54601 4.10899C3.35785 4.20487 3.20487 4.35785 3.10899 4.54601C3 4.75992 3 5.03995 3 5.6V16.4C3 16.9601 3 17.2401 3.10899 17.454C3.20487 17.6422 3.35785 17.7951 3.54601 17.891C3.75992 18 4.03995 18 4.6 18H7.54668C8.08687 18 8.35696 18 8.61814 18.0466C8.84995 18.0879 9.0761 18.1563 9.29191 18.2506C9.53504 18.3567 9.75977 18.5065 10.2092 18.8062L12 20M12 10.4C12 8.15979 12 7.03969 12.436 6.18404C12.8195 5.43139 13.4314 4.81947 14.184 4.43597C15.0397 4 16.1598 4 18.4 4H19.4C19.9601 4 20.2401 4 20.454 4.10899C20.6422 4.20487 20.7951 4.35785 20.891 4.54601C21 4.75992 21 5.03995 21 5.6V16.4C21 16.9601 21 17.2401 20.891 17.454C20.7951 17.6422 20.6422 17.7951 20.454 17.891C20.2401 18 19.9601 18 19.4 18H16.4533C15.9131 18 15.643 18 15.3819 18.0466C15.15 18.0879 14.9239 18.1563 14.7081 18.2506C14.465 18.3567 14.2402 18.5065 13.7908 18.8062L12 20"/>
48+
</svg>
49+
VCE Resources
50+
</a>
51+
</li>
52+
<li>
53+
<a href="/blog/">
54+
<svg class="nav-icon" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
55+
<path d="M6 3v1.5c1.469 0 2.85 0.572 3.889 1.611s1.611 2.42 1.611 3.889h1.5c0-3.866-3.134-7-7-7z"></path>
56+
<path d="M7.5 6l-1 1-3.5 1-3 6.5 0.396 0.396 3.638-3.638c-0.022-0.083-0.034-0.169-0.034-0.259 0-0.552 0.448-1 1-1s1 0.448 1 1-0.448 1-1 1c-0.090 0-0.176-0.012-0.259-0.034l-3.638 3.638 0.396 0.396 6.5-3 1-3.5 1-1-2.5-2.5z"></path>
57+
</svg>
58+
Blogs
59+
</a>
60+
</li>
61+
<li>
62+
<a href="/research/">
63+
<svg class="nav-icon" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
64+
<path d="M16,5c0,0.552-0.448,1-1,1s-1-0.448-1-1s0.448-1,1-1S16,4.448,16,5z M7,18c-0.552,0-1,0.448-1,1 s0.448,1,1,1s1-0.448,1-1S7.552,18,7,18z M10,6.5C9.724,6.5,9.5,6.724,9.5,7S9.724,7.5,10,7.5s0.5-0.224,0.5-0.5S10.276,6.5,10,6.5z M11,11.5c-0.276,0-0.5,0.224-0.5,0.5s0.224,0.5,0.5,0.5s0.5-0.224,0.5-0.5S11.276,11.5,11,11.5z M6,9.5c-0.276,0-0.5,0.224-0.5,0.5 s0.224,0.5,0.5,0.5s0.5-0.224,0.5-0.5S6.276,9.5,6,9.5z M12.36,7c0-1.301-1.059-2.36-2.36-2.36S7.64,5.699,7.64,7 S8.699,9.36,10,9.36S12.36,8.301,12.36,7z M11.64,7c0,0.904-0.736,1.64-1.64,1.64S8.36,7.904,8.36,7S9.096,5.36,10,5.36 S11.64,6.096,11.64,7z M7.56,14.4c0-1.081-0.879-1.96-1.96-1.96s-1.96,0.879-1.96,1.96s0.879,1.96,1.96,1.96S7.56,15.48,7.56,14.4z M6.84,14.4c0,0.684-0.557,1.24-1.24,1.24s-1.24-0.557-1.24-1.24s0.557-1.24,1.24-1.24S6.84,13.716,6.84,14.4z M31.36,25.5V31 c0,0.199-0.161,0.36-0.36,0.36H9c-0.146,0-0.277-0.088-0.333-0.223s-0.025-0.289,0.078-0.393l3.667-3.666 c0.067-0.067,0.159-0.105,0.254-0.105H25.14V25.5c0-0.199,0.161-0.36,0.36-0.36h2.229c0.704-1.289,1.075-2.744,1.075-4.222 c0-3.116-1.64-5.983-4.304-7.57c-0.544,0.906-1.536,1.514-2.668,1.514c-0.525,0-1.021-0.131-1.454-0.361l-3.062,5.301 c-0.099,0.174-0.318,0.232-0.492,0.132l-1.275-0.736l-0.557,0.964l1.276,0.737c0.083,0.048,0.143,0.126,0.167,0.219 c0.025,0.092,0.012,0.19-0.036,0.272l-0.917,1.587c-0.099,0.173-0.317,0.232-0.492,0.132l-4.763-2.749 c-0.172-0.1-0.231-0.319-0.132-0.491l0.917-1.588c0.048-0.083,0.126-0.144,0.219-0.168c0.091-0.024,0.191-0.013,0.273,0.036 l1.276,0.736l0.556-0.964l-1.276-0.736c-0.083-0.048-0.143-0.126-0.167-0.218c-0.025-0.092-0.012-0.19,0.036-0.273l7.666-13.276 C17.652,2.074,15.378,1.36,13,1.36C6.582,1.36,1.36,6.582,1.36,13S6.582,24.64,13,24.64v0.721C6.185,25.36,0.64,19.815,0.64,13 S6.185,0.64,13,0.64c2.506,0,4.903,0.748,6.958,2.153l1.14-1.973c0.1-0.172,0.321-0.229,0.491-0.132l4.763,2.747 c0.083,0.048,0.144,0.126,0.168,0.219s0.012,0.19-0.036,0.273l-2.998,5.191c0.875,0.551,1.458,1.525,1.458,2.633 c0,0.326-0.051,0.64-0.145,0.936c2.923,1.708,4.727,4.832,4.727,8.23c0,1.468-0.339,2.915-0.984,4.222H31 C31.199,25.14,31.36,25.301,31.36,25.5z M12.734,19.688c-0.005-0.002-0.01-0.005-0.014-0.008l-1.262-0.729l-0.557,0.964l4.139,2.389 l0.557-0.963L12.734,19.688z M13.892,19.525l0.478,0.276l0.557-0.964l-0.964-0.557l-0.556,0.964L13.892,19.525z M19.784,14.09 c-0.65-0.57-1.062-1.407-1.062-2.338c0-1.714,1.396-3.109,3.11-3.109c0.35,0,0.687,0.058,1.001,0.165l2.846-4.929L21.54,1.492 l-8.806,15.25l1.26,0.728c0.005,0.003,0.011,0.006,0.016,0.009l1.092,0.631l1.771,1.021L19.784,14.09z M24.223,11.752 c0-1.317-1.072-2.39-2.39-2.39s-2.39,1.072-2.39,2.39c0,0.784,0.379,1.481,0.964,1.917c0.009,0.004,0.019,0.009,0.027,0.015 c0.029,0.017,0.055,0.036,0.077,0.059c0.379,0.252,0.833,0.399,1.321,0.399c0.972,0,1.81-0.583,2.183-1.417 c0.005-0.012,0.011-0.024,0.017-0.037C24.155,12.4,24.223,12.084,24.223,11.752z M30.64,25.86h-2.673 c-0.021-0.001-0.038-0.001-0.055,0H25.86v1.474c0,0.199-0.161,0.36-0.36,0.36H12.816L9.869,30.64H30.64V25.86z"/>
65+
</svg>
66+
Research
67+
</a>
68+
</li>
7069
</ul>
7170
</nav>
7271
</header>
@@ -83,4 +82,4 @@
8382
<script src="/js/particles-config.js"></script>
8483
<script src="/js/main.js"></script>
8584
</body>
86-
</html>
85+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: 'layouts/base.njk'
3+
---
4+
5+
<main>
6+
<section id="resource-section">
7+
<h2>{{ title }}</h2>
8+
<p>
9+
{{ description }}
10+
</p>
11+
<hr>
12+
13+
{{ content | safe }}
14+
15+
</section>
16+
</main>

src/css/layout.css

Lines changed: 11 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,11 @@ footer {
121121
z-index: 1;
122122
}
123123

124-
#spec-maths-resources,
125-
#physics-resources,
126-
#chem-resources,
127-
#eng-resources {
124+
#resource-section {
128125
padding-bottom: 30px;
129126
}
130127

131-
#spec-maths-resources > p:first-of-type,
132-
#physics-resources > p:first-of-type,
133-
#chem-resources > p:first-of-type,
134-
#eng-resources > p:first-of-type {
128+
#resource-section > p:first-of-type {
135129
text-align: center;
136130
margin-bottom: 30px;
137131
max-width: 650px;
@@ -141,20 +135,14 @@ footer {
141135
font-size: 0.95em;
142136
}
143137

144-
#spec-maths-resources hr,
145-
#physics-resources hr,
146-
#chem-resources hr,
147-
#eng-resources hr {
138+
#resource-section hr {
148139
border: none;
149140
border-top: 1px solid #444;
150141
margin: 40px auto;
151142
width: 70%;
152143
}
153144

154-
#spec-maths-resources h3,
155-
#physics-resources h3,
156-
#chem-resources h3,
157-
#eng-resources h3 {
145+
#resource-section h3 {
158146
color: #e0e0e0;
159147
margin-top: 35px;
160148
margin-bottom: 15px;
@@ -164,10 +152,7 @@ footer {
164152
font-size: 1.3em;
165153
}
166154

167-
#spec-maths-resources h3:first-of-type,
168-
#physics-resources h3:first-of-type,
169-
#chem-resources h3:first-of-type,
170-
#eng-resources h3:first-of-type {
155+
#resource-section h3:first-of-type {
171156
margin-top: 0;
172157
}
173158

@@ -325,10 +310,7 @@ footer {
325310
h3 {
326311
font-size: 1.3em;
327312
}
328-
#spec-maths-resources h3,
329-
#physics-resources h3,
330-
#chem-resources h3,
331-
#eng-resources h3 {
313+
#resource-section h3 {
332314
font-size: 1.2em;
333315
}
334316
}
@@ -387,27 +369,18 @@ footer {
387369
font-size: 1.2em;
388370
}
389371

390-
#spec-maths-resources > p:first-of-type,
391-
#physics-resources > p:first-of-type,
392-
#chem-resources > p:first-of-type,
393-
#eng-resources > p:first-of-type {
372+
#resource-section > p:first-of-type {
394373
margin-bottom: 20px;
395374
font-size: 0.9em;
396375
line-height: 1.5;
397376
}
398377

399-
#spec-maths-resources hr,
400-
#physics-resources hr,
401-
#chem-resources hr,
402-
#eng-resources hr {
378+
#resource-section hr {
403379
margin: 30px auto;
404380
width: 80%;
405381
}
406382

407-
#spec-maths-resources h3,
408-
#physics-resources h3,
409-
#chem-resources h3,
410-
#eng-resources h3 {
383+
#resource-section h3 {
411384
font-size: 1.1em;
412385
margin-top: 25px;
413386
margin-bottom: 10px;
@@ -460,13 +433,10 @@ footer {
460433
font-size: 1.1em;
461434
}
462435

463-
#spec-maths-resources h3,
464-
#physics-resources h3,
465-
#chem-resources h3,
466-
#eng-resources h3 {
436+
#resource-section h3 {
467437
font-size: 1.0em;
468438
}
469439
.resource-list li {
470440
font-size: 0.8em;
471441
}
472-
}
442+
}

src/css/navigation.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ header nav ul.nav-links li a {
3838
transition: color 0.3s ease, background-color 0.3s ease;
3939
}
4040

41+
/* Style for the active navigation link */
42+
header nav ul.nav-links li a.active {
43+
color: #a78bfa;
44+
font-weight: 700;
45+
cursor: default;
46+
}
47+
48+
4149
.nav-icon {
4250
width: 1.3em;
4351
height: 1.3em;
@@ -60,10 +68,11 @@ header nav ul.nav-links li a {
6068
vertical-align: middle;
6169
}
6270

63-
header nav ul.nav-links li a:hover {
71+
header nav ul.nav-links li a:not(.active):hover {
6472
color: #a78bfa;
6573
}
6674

75+
6776
.mobile-nav-toggle {
6877
display: none;
6978
background: none;
@@ -242,4 +251,4 @@ h4:hover .heading-anchor-link {
242251
.mobile-nav-toggle {
243252
display: block;
244253
}
245-
}
254+
}

0 commit comments

Comments
 (0)