diff --git a/all_paw_care/pages/routes.py b/all_paw_care/pages/routes.py index b5f14e9..95b36bb 100644 --- a/all_paw_care/pages/routes.py +++ b/all_paw_care/pages/routes.py @@ -1,17 +1,18 @@ from all_paw_care.pages import pages +from all_paw_care.content import pages as site_pages from flask import render_template,url_for @pages.route('/') @pages.route('/home') def home(): - return render_template("pages/index.html") + return render_template("pages/index.html", page=site_pages.home) @pages.route('/faq') def faq(): - return render_template("pages/faq.html") + return render_template("pages/faq.html", page=site_pages.faqs) @pages.route('/services') def services(): - return render_template("pages/services.html") + return render_template("pages/services.html", page=site_pages.services) diff --git a/all_paw_care/templates/pages/faq.html b/all_paw_care/templates/pages/faq.html index 1e38b81..897cb45 100644 --- a/all_paw_care/templates/pages/faq.html +++ b/all_paw_care/templates/pages/faq.html @@ -1,6 +1,6 @@ {% extends "jinja/types/page.html" %} -{% set title %}FAQ{% endset %} +{% set title %}{{ page.get_title() }}{% endset %} {% block content %}
@@ -9,20 +9,20 @@
- {% for faq in config.FAQS.items() %} + {% for faq in page.get_content() %}
-
+
- {{ faq[1][1] }} + {{ page.get_content()[faq]['answer'] }}
diff --git a/all_paw_care/templates/pages/index.html b/all_paw_care/templates/pages/index.html index b693c69..0ab7527 100644 --- a/all_paw_care/templates/pages/index.html +++ b/all_paw_care/templates/pages/index.html @@ -1,25 +1,25 @@ {% extends "jinja/types/page.html" %} -{% set title %}About me{% endset %} +{% set title %}{{ page.get_title() }}{% endset %} {% block content %}

- About me + {{ page.get_title() }}

- {% for row in config.ABOUT_ME %} + {% for row in page.get_content() %}

- {{ row[1] }} + {{ page.get_content()[row]['content'] }}

- {% for img in row[0] %} + {% for img in page.get_content()[row]['images'] %} {% if not loop.last %} @@ -29,7 +29,7 @@ {% endif %} {% endfor %} - +
diff --git a/all_paw_care/templates/pages/services.html b/all_paw_care/templates/pages/services.html index 03ff11e..05da5c7 100644 --- a/all_paw_care/templates/pages/services.html +++ b/all_paw_care/templates/pages/services.html @@ -1,114 +1,66 @@ {% extends "jinja/types/page.html" %} -{% set title %}Services{% endset %} +{% set title %}{{ page.get_title() }}{% endset %} {% block content %}

- Services & Pricing + {{ page.get_title() }}

-
-

- Primary services: -

-
+
-
- {% for service in config.SERVICES.items() %} -
-
- - {% for img in service[1][0] %} - {% if not loop.last %} - - {% else %} - - {% endif %} - {% endfor %} +{% for section in page.get_content() %} +
+

+ {{ section }} +

+
- -
-
-

{{ service[0] }}

+
+ {% for service in page.get_content()[section] %} +
+
+ + {% for img in service['images'] %} + {% if not loop.last %} + + {% else %} + + {% endif %} + {% endfor %} -
+ +
+
+

{{ service['title'] }}

-

- {{ service[1][1] }} -

+
- +

+ {{ service['price'] }} +

-

- {{ service[1][2] }} +

-
    - {% for included in service[1][3] %} -
  • {{ included }}
  • - {% endfor %} -
-

+

+ Service includes: +

    + {% for included in service['included'] %} +
  • {{ included }}
  • + {% endfor %} +
+

+
-
- {% endfor %} -
- -
-

- Add-on services: -

-
- -
- {% for service in config.SERVICES.items() %} -
-
- - {% for img in service[1][0] %} - {% if not loop.last %} - - {% else %} - - {% endif %} - {% endfor %} - - Woman walking dog - -
-

{{ service[0] }}

- -
- -

- {{ service[1][1] }} -

- - - -

- {{ service[1][2] }} - -

    - {% for included in service[1][3] %} -
  • {{ included }}
  • - {% endfor %} -
-

-
-
-
- {% endfor %} -
+ {% endfor %} +
+{% endfor %}