From 1798624bcea9611d9c390373dde347b069ba5d9c Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Thu, 2 Jan 2025 10:25:18 -0500 Subject: [PATCH] Create macro for section heading - Update layouts to use new macro - Reformat some files --- src/_includes/layouts/about.html | 64 +++++++++---------- src/_includes/layouts/base.html | 2 +- src/_includes/layouts/home.html | 5 +- src/_includes/macros.html | 10 +++ src/_includes/partials/education.html | 7 +- .../partials/professionalExperience.html | 9 +-- src/_includes/partials/research.html | 7 +- src/_includes/partials/resume.html | 8 +-- src/index.md | 4 +- 9 files changed, 55 insertions(+), 61 deletions(-) create mode 100644 src/_includes/macros.html diff --git a/src/_includes/layouts/about.html b/src/_includes/layouts/about.html index 1ffb65c..ea65070 100644 --- a/src/_includes/layouts/about.html +++ b/src/_includes/layouts/about.html @@ -1,42 +1,38 @@ {% extends "layouts/base.html" %} +{% from "macros.html" import sectionHeading %} {% block content %}
-
-
-

Bio

-
+ {{ sectionHeading("Bio") }} + +
+
+
-
-
- -
-
- {{ content | safe }} -
+
+ {{ content | safe }}
-
- -
-
- {% for item in contact.items %} -
- - {{ item.label }} - -


{{ item.label }}: {{ item.displayText }}

-
- {% endfor %} +
+ + {{ sectionHeading("Contact Me") }} + +
+ {% for item in contact.items %} +
+ + {{ item.label }} + +


{{ item.label }}: {{ item.displayText }}

+ {% endfor %} +
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/src/_includes/layouts/base.html b/src/_includes/layouts/base.html index 455e51f..145105b 100644 --- a/src/_includes/layouts/base.html +++ b/src/_includes/layouts/base.html @@ -12,4 +12,4 @@
{% include "partials/footer.html" %}
- + \ No newline at end of file diff --git a/src/_includes/layouts/home.html b/src/_includes/layouts/home.html index daeebaa..6d7269c 100644 --- a/src/_includes/layouts/home.html +++ b/src/_includes/layouts/home.html @@ -1,11 +1,14 @@ {% extends "layouts/base.html" %} +{% from "macros.html" import sectionHeading %} {% block content %}
+ {{ sectionHeading("Welcome") }} +
{{ content | safe }}
-{% endblock %} +{% endblock %} \ No newline at end of file diff --git a/src/_includes/macros.html b/src/_includes/macros.html new file mode 100644 index 0000000..0f99721 --- /dev/null +++ b/src/_includes/macros.html @@ -0,0 +1,10 @@ + +{% macro sectionHeading(name) %} +
+
+

+ {{ name }} +

+
+
+{% endmacro %} \ No newline at end of file diff --git a/src/_includes/partials/education.html b/src/_includes/partials/education.html index 5cc06c7..902052a 100644 --- a/src/_includes/partials/education.html +++ b/src/_includes/partials/education.html @@ -1,6 +1,3 @@ -
-
-

Education

-
-
\ No newline at end of file +{% from "macros.html" import sectionHeading %} +{{ sectionHeading("Education") }} \ No newline at end of file diff --git a/src/_includes/partials/professionalExperience.html b/src/_includes/partials/professionalExperience.html index 303b46a..f6b0aa1 100644 --- a/src/_includes/partials/professionalExperience.html +++ b/src/_includes/partials/professionalExperience.html @@ -1,11 +1,6 @@ - +{% from "macros.html" import sectionHeading %} +{{ sectionHeading("Professional Experience") }} {% for profExp in collections.professionalExperience %}
diff --git a/src/_includes/partials/research.html b/src/_includes/partials/research.html index 3e9991e..aec9a33 100644 --- a/src/_includes/partials/research.html +++ b/src/_includes/partials/research.html @@ -1,6 +1,3 @@ -
-
-

Research

-
-
\ No newline at end of file +{% from "macros.html" import sectionHeading %} +{{ sectionHeading("Research") }} \ No newline at end of file diff --git a/src/_includes/partials/resume.html b/src/_includes/partials/resume.html index 900a6bd..375bf91 100644 --- a/src/_includes/partials/resume.html +++ b/src/_includes/partials/resume.html @@ -1,9 +1,7 @@ -
-
-

Resume

-
-
+{% from "macros.html" import sectionHeading %} +{{ sectionHeading("Resume") }} +

diff --git a/src/index.md b/src/index.md index 1914d54..d4fca0a 100644 --- a/src/index.md +++ b/src/index.md @@ -3,10 +3,8 @@ title: Sravan Balaji layout: "layouts/home.html" --- -# Welcome! - Welcome to my personal website! This started out as a side project to learn about web development and UI design, but it has since expanded into a professional portfolio and blog (sort of). If you are a fan of dark mode, try out the toggle button in the upper right corner! On this website, you can find information about my [educational](./portfolio.html#education) and [professional career](./portfolio.html#professional_experience) as well as some of my [personal interests](./personal.html). If you are looking to create your own website and are curious about how I created and hosted this one, please see the [documentation](./documentation.html) page. -This website is a constant work in progress and updates will be made as I find time. You can follow development and make suggestions on [GitHub](https://github.com/balajsra/sravanbalaji.com). +This website is a constant work in progress and updates will be made as I find time. You can follow development and make suggestions on [GitHub](https://github.com/balajsra/sravanbalaji.com). \ No newline at end of file