Skip to content

Commit fc68385

Browse files
imApoorva36anirudhprabhakaran3nishant-nayak
authored
Migrating pages (#68)
* Added Model for SIGs * Added model for SIGs * Modified SIG Model and configured django-admin for it and made basic sig.html * Added changes and modifies sig.html * Modified minor changes and styling changed * Added hrefs for SIGs * Modified minor changes and styling changed and urls modified to avoid breaking * removed learn more button * Added Model for SIGs * Modified SIG Model and configured django-admin for it and made basic sig.html * Added changes and modifies sig.html * Modified minor changes and styling changed * Added hrefs for SIGs * Modified minor changes and styling changed and urls modified to avoid breaking * removed learn more button * PR cleanup * Final Set of All Changes for Sig pages with all necessary additions and code fixes * Fixed models, added slug field and refined migration files * Commit so that db gets added * Added minor fixes * Minor changes * Added SIG Links in footer and added config_db dump * Modified Navbar and it's various components accordingly * Minor Changes Resolving sizes and optimisation * Modified SIGs data * Modified config_db file to proper json format * Added Diode content and fixed sig pages display issues * Added Impulse to Navbar * Small Changes * made navbar responsive and resolved sig pages UI Changes * fixed 0004_migration file repititive code * fixed sig logo issues and fixed small navbar * Update corpus/templates/pages/sig.html --------- Co-authored-by: Anirudh Prabhakaran <[email protected]> Co-authored-by: Nishant Nayak <[email protected]>
1 parent ff2b471 commit fc68385

File tree

12 files changed

+285
-38
lines changed

12 files changed

+285
-38
lines changed

corpus/config/admin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from django.contrib import admin
22

33
from .models import ModuleConfiguration
4+
from .models import SIG
45
from .models import Society
56

67

@@ -10,5 +11,11 @@ class SocietyAdmin(admin.ModelAdmin):
1011
list_display_links = ("name",)
1112

1213

14+
class SIGAdmin(admin.ModelAdmin):
15+
list_display = ("id", "name")
16+
list_display_links = ("name",)
17+
18+
1319
admin.site.register(Society, SocietyAdmin)
1420
admin.site.register(ModuleConfiguration)
21+
admin.site.register(SIG, SIGAdmin)

corpus/config_db.json

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,63 @@
11
[
2+
{
3+
"fields": {
4+
"about": "The NITK-IEEE Computer Society is a conglomeration of students with a passion for Computer Science and Information Technology. This SIG is a great platform for those who want to gain expertise in computer based technology.\r\nIn the true spirit of divide and conquer, our community intends to explore and contribute to the rapidly evolving world of computer technologies by carrying out research and projects in the broad domains of computer science, in the form of 3 research groups : Intelligence, Systems and Core Computer Science.",
5+
"name": "CompSoc",
6+
"slug": "compsoc",
7+
"what_we_do": "Intelligence deals with fields such as Machine Learning, Artificial Intelligence, Deep Learning, Computer Vision, NLP. Systems is related to fields involving Operating Systems, Parallel Computing, Network Security, Distributed Systems. Core Computer Science involves Algorithms, Cryptography, Databases, Game Theory, Web & Software Development ."
8+
},
9+
"model": "config.sig",
10+
"pk": 1
11+
},
12+
{
13+
"fields": {
14+
"about": "The NITK Diode SIG is a combination of the Circuits and Systems (CAS) Society, Signal Processing Society (SPS) and the Industrial Applications Society (IAS).\r\nThe SIG consists of a team of students with a strong interest in the field of Electronics and Electrical Science, and works on conceiving and pioneering solutions to fundamental and applied problems in the fields of robotics, microcontrollers and signal processing.",
15+
"name": "Diode",
16+
"slug": "diode",
17+
"what_we_do": "For the 2022-23 academic year, IAS showcased a project on a three-level boost converter design for MPPT applications in PV cells. SPS also boasts to showcase state-of-the-art projects such as 'Low Light Image Enhancement using MIRNet', and 'Leveraging Frequency Analysis for Deep Fake Image Classification' at the annual project expo at NITK. In addition, SPS finds its presence in paper discussion sessions, expert talks, and many more enriching activities. Nation wide Workshops, Knowledge sharing sessions and Hackathons were conducted throughout the year by the all three chapters under Diode."
18+
},
19+
"model": "config.sig",
20+
"pk": 2
21+
},
22+
{
23+
"fields": {
24+
"about": "Piston is a SIG dedicated to the engineering applications of Mechanical, Civil, Chemical and Material Sciences. The SIG functions as a platform for students interested in learning and advancing specific areas of knowledge and technology. The SIG members co-operate, communicate, and organise meets, talks and conferences to discuss the latest technological advancements and applications.",
25+
"name": "Piston",
26+
"slug": "piston",
27+
"what_we_do": "The SIG specializes on a lot of areas like Aerospace Engineering, Automobile Engineering, Chemical and Thermal Engineering, Heat and Renewable Energy Engineering, Robotics, Controls & Mechatronics and Structures & Materials."
28+
},
29+
"model": "config.sig",
30+
"pk": 3
31+
},
32+
{
33+
"fields": {
34+
"about": "The Women in Engineering affinity group of IEEE NITK aims to increase inclusivity and acceptance in tech on campus. We coordinate events and mentorship programs to inspire our colleagues and other women and girls to pursue a career in engineering. It is a professional organisation dedicated to promoting technical interests among women engineers and scientists.",
35+
"name": "WiE",
36+
"slug": "wie",
37+
"what_we_do": "It was launched on February 18th 2009 by Prof. Marimuthu, the R10 WiE Coordinator. Our mission is to inspire, engage, encourage, and empower IEEE women student members and facilitate the recruitment and retention of women in technical disciplines globally."
38+
},
39+
"model": "config.sig",
40+
"pk": 4
41+
},
42+
{
43+
"fields": {
44+
"about": "IEEE SIGHT caters to the guiding philosophy of IEEE - \u2018Advancing Technology for Humanity\u2019. IEEE Special Interest Group on Humanitarian Technology (SIGHT) provides IEEE members with the opportunity to work with a large network of volunteers around the world carrying out and/or supporting impactful humanitarian activities on the local level. IEEE SIGHT focuses on sustainable solutions that make a long-term difference in the lives of people. SIGHT operates through local volunteers and partners working with local communities.",
45+
"name": "SIGHT",
46+
"slug": "sight",
47+
"what_we_do": "We focus on taking up projects in the open-source platforms. This helps us drive down the cost of the final product and make the solution affordable to a large section of people."
48+
},
49+
"model": "config.sig",
50+
"pk": 5
51+
},
252
{
353
"fields": {
454
"dark_image": "img/logo/compsoc-dark.png",
555
"description": "The IEEE NITK Computer Society Chapter intends to explore and contribute to the rapidly evolving world of computer technologies by carrying out research and projects in the broad domains of computer science in the form of three focus groups: Intelligence, Systems and Theoretical Computer Science.",
656
"image": "img/logo/compsoc-light.png",
757
"name": "CS",
58+
"sigs": [
59+
1
60+
],
861
"url": "https://www.computer.org/"
962
},
1063
"model": "config.society",
@@ -16,6 +69,9 @@
1669
"description": "The IEEE NITK Signal Processing Society Chapter focuses projects and research in areas of signal processing and machine learning. Projects undertaken here are oriented towards healthcare and solutions to humanitarian needs.",
1770
"image": "img/logo/sps.png",
1871
"name": "SPS",
72+
"sigs": [
73+
2
74+
],
1975
"url": "https://signalprocessingsociety.org/"
2076
},
2177
"model": "config.society",
@@ -27,6 +83,9 @@
2783
"description": "The IEEE NITK Circuits and Systems Society Chapter focuses on areas around electrical and electronic circuits with applications in healthcare, industry appliances, home appliances and electronics systems research.",
2884
"image": "img/logo/cass-light.png",
2985
"name": "CASS",
86+
"sigs": [
87+
2
88+
],
3089
"url": "https://ieee-cas.org/"
3190
},
3291
"model": "config.society",
@@ -38,6 +97,9 @@
3897
"description": "The IEEE IAS vision \u201cto be a world leader in the advancement of technology and dissemination of technical information to support professionals engaged in the applications of electrical and electronic engineering to industry\u201d has become possible with the professional connection of Industry Professionals in Electrical and Electronic Engineering.",
3998
"image": "img/logo/ias-light.png",
4099
"name": "IAS",
100+
"sigs": [
101+
3
102+
],
41103
"url": "https://ias.ieee.org/"
42104
},
43105
"model": "config.society",
@@ -49,6 +111,9 @@
49111
"description": "The IEEE Photonics Society forms the hub of a vibrant technical community dedicated to transforming breakthroughs in quantum physics into the devices, systems and products to revolutionize our daily lives. From ubiquitous and inexpensive global communications via fiber optics, to lasers for medical and other applications, to flat-screen displays, to photovoltaic devices for solar energy, to LEDs for energy-efficient illumination, there are myriad examples of the society's impact on the world around us.",
50112
"image": "img/logo/photonics.png",
51113
"name": "PHO",
114+
"sigs": [
115+
3
116+
],
52117
"url": "https://www.photonicssociety.org/"
53118
},
54119
"model": "config.society",
@@ -60,6 +125,9 @@
60125
"description": "The IEEE RAS Student Chapter focuses on the interdisciplinary nature of technology and engineering and strives to advance robotics and intelligent systems technology in various fields of biomedical engineering, security, industry and home automation through research and ingenuity.",
61126
"image": "img/logo/ras.png",
62127
"name": "RAS",
128+
"sigs": [
129+
2
130+
],
63131
"url": "https://www.ieee-ras.org/"
64132
},
65133
"model": "config.society",
@@ -71,6 +139,9 @@
71139
"description": "GRSS - The Geoscience and Remote Sensing Society (GRSS) is a technical Society of the Institute of Electrical and Electronics Engineers (IEEE). GRSS encourages its members to participate in science, engineering, applications, and education linked to the advancement of geoscience and remote sensing for the benefit of society.",
72140
"image": "img/logo/grss-light.png",
73141
"name": "GRSS",
142+
"sigs": [
143+
3
144+
],
74145
"url": "https://www.grss-ieee.org/"
75146
},
76147
"model": "config.society",
@@ -82,6 +153,9 @@
82153
"description": "The IEEE Computational Intelligence Society (CIS) is a vibrant community working towards a common goal - to unravel the mysteries of the ever-evolving field of computational intelligence with its focus on neural networks, fuzzy systems, and evolutionary computation. The society hosts conferences, publishes journals, and provides educational resources to foster learning and collaboration leading to the development of cutting-edge applications and forging the future of AI.",
83154
"image": "img/logo/cis-light.png",
84155
"name": "CIS",
156+
"sigs": [
157+
1
158+
],
85159
"url": "https://cis.ieee.org/"
86160
},
87161
"model": "config.society",
@@ -93,6 +167,9 @@
93167
"description": "The IEEE NITK WIE is a professional organisation dedicated to promoting technical interests among women engineers and scientists. It was launched on February 18th 2009 by Prof Marimuthu, the R10 WIE Coordinator. Our mission is to inspire, engage, encourage, and empower IEEE women student members and facilitate the recruitment and retention of women in technical disciplines globally.",
94168
"image": "img/logo/wie.png",
95169
"name": "WIE",
170+
"sigs": [
171+
4
172+
],
96173
"url": "https://wie.ieee.org/"
97174
},
98175
"model": "config.society",
@@ -104,6 +181,9 @@
104181
"description": "IEEE Special Interest Group on Humanitarian Technology (SIGHT) provides IEEE members with the opportunity to work with a large network of volunteers around the world carrying out and/or supporting impactful humanitarian activities on the local level. IEEE SIGHT focuses on sustainable solutions that make a long-term difference in the lives of people. SIGHT operates through local volunteers and partners working with local communities.",
105182
"image": "img/logo/sight.png",
106183
"name": "SIGHT",
184+
"sigs": [
185+
5
186+
],
107187
"url": "https://sight.ieee.org/"
108188
},
109189
"model": "config.society",

corpus/corpus/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
urlpatterns = [
2222
path("admin/", admin.site.urls),
23-
path("", include("pages.urls")),
2423
path("accounts/", include("accounts.urls")),
24+
path("", include("pages.urls")),
2525
path("embedathon/", include("embedathon.urls")),
2626
path("impulse/", include("impulse.urls")),
2727
path("electrika/", include("electrika.urls")),

corpus/pages/urls.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from django.urls import path
22

3-
from .views import about_us
4-
from .views import index
3+
from . import views
54

65
urlpatterns = [
7-
path("", index, name="index"),
8-
path("about_us/", about_us, name="about_us"),
6+
path("", views.index, name="index"),
7+
path("about_us/", views.about_us, name="about_us"),
8+
path("sig/<str:sig_name>/", views.sig, name="sig"),
99
]

corpus/pages/views.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
from config.models import SIG
12
from config.models import Society
3+
from django.shortcuts import get_object_or_404
24
from django.shortcuts import render
35

46

@@ -25,3 +27,17 @@ def about_us(request):
2527
"socieites": societies,
2628
},
2729
)
30+
31+
32+
def sig(request, sig_name):
33+
sig_data = get_object_or_404(SIG, slug=sig_name)
34+
35+
# Retrieve the related society details using the SIG instance
36+
societies_linked_to_sig = sig_data.societies.all()
37+
38+
args = {
39+
"sig": sig_data,
40+
"societies_linked_to_sig": societies_linked_to_sig,
41+
}
42+
43+
return render(request, "pages/sig.html", args)

corpus/templates/base.html

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,13 @@
4242
</head>
4343

4444
<body>
45-
46-
<div class="navbar bg-primary text-primary-content sticky top-0 z-10">
47-
<div class="navbar-start">
48-
<div class="dropdown">
49-
<label tabindex="0" class="btn btn-ghost btn-circle">
50-
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24"
51-
stroke="currentColor">
52-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h7"/>
53-
</svg>
54-
</label>
55-
{% include "components/navbar_dropdown.html" %}
56-
</div>
45+
<div class="lg:hidden">
46+
{% include "components/navbar_small.html" %}
5747
</div>
58-
<div class="navbar-center">
59-
<a href="{% url 'index' %}" class="btn btn-ghost normal-case text-xl">Corpus</a>
60-
</div>
61-
<div class="navbar-end">
62-
{% include "components/navbar_right.html" %}
48+
49+
<div class="hidden lg:block">
50+
{% include "components/navbar_large.html" %}
6351
</div>
64-
</div>
6552

6653
{% if messages %}
6754
{% for message in messages %}
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,39 @@
11
<ul class="mx-2">
2-
<li class="text-xl font-bold text-white my-2">General</li>
2+
<li class="text-lg font-bold text-white my-2">General</li>
33
<li><a href="{% url 'index' %}">Home</a></li>
44
<li><a href="{% url 'about_us' %}">About Us</a></li>
5+
<li><a href="https://ieee-nitk.github.io/blog/">Blog</a></li>
6+
<li><a href="https://ieee-nitk.github.io/gyan/">Gyan</a></li>
7+
<li><a href="https://ieee-nitk.github.io/virtual-expo/">Virtual Expo</a></li>
58
</ul>
69

710
<ul class="mx-2">
8-
<li class="text-xl font-bold text-white my-2">Embedathon</li>
11+
<li class="text-lg font-bold text-white my-2">SIGs</li>
12+
<li><a href="{% url 'sig' sig_name='compsoc' %}">CompSoc</a></li>
13+
<li><a href="{% url 'sig' sig_name='diode' %}">Diode</a></li>
14+
<li><a href="{% url 'sig' sig_name='piston' %}">Piston</a></li>
15+
</ul>
16+
17+
<ul class="mx-2">
18+
<li class="text-lg font-bold text-white my-2">Affinity Groups</li>
19+
<li><a href="{% url 'sig' sig_name='wie' %}">WiE</a></li>
20+
<li><a href="{% url 'sig' sig_name='sight' %}">SIGHT</a></li>
21+
</ul>
22+
23+
<ul class="mx-2">
24+
<li class="text-lg font-bold text-white my-2">Embedathon</li>
925
<li><a href="{% url 'embedathon_home' %}">Home</a></li>
1026
<li><a href="{% url 'embedathon_index' %}">Dashboard</a></li>
1127
</ul>
1228

1329
<ul class="mx-2">
14-
<li class="text-xl font-bold text-white my-2">Impulse</li>
30+
<li class="text-lg font-bold text-white my-2">Impulse</li>
1531
<li><a href="{% url 'impulse_home' %}">Home</a></li>
1632
<li><a href="{% url 'impulse_index' %}">Dashboard</a></li>
1733
</ul>
1834

1935
<ul class="mx-2">
20-
<li class="text-xl font-bold text-white my-2">Electrika</li>
36+
<li class="text-lg font-bold text-white my-2">Electrika</li>
2137
<li><a href="{% url 'electrika_home' %}">Home</a></li>
2238
<li><a href="{% url 'electrika_index' %}">Dashboard</a></li>
2339
</ul>

0 commit comments

Comments
 (0)