From 1e6a18d5056ce71fa2bd4d580e4b76f890336a95 Mon Sep 17 00:00:00 2001 From: nadav pesach Date: Fri, 29 Jan 2021 14:58:36 +0200 Subject: [PATCH 01/10] feat: daily horoscope by sign --- app/static/horoscope.js | 18 ++ app/templates/base.html | 33 ++- app/templates/profile.html | 402 +++++++++++++++++++------------------ 3 files changed, 242 insertions(+), 211 deletions(-) create mode 100644 app/static/horoscope.js diff --git a/app/static/horoscope.js b/app/static/horoscope.js new file mode 100644 index 00000000..2cdaccea --- /dev/null +++ b/app/static/horoscope.js @@ -0,0 +1,18 @@ +function daily_horoscope(sign) { + // sign = 'aries'##################### + // // change to get sign and then stop + // // change to get sign and then stop// change to get sign and then stop + + + + var x = 'https://aztro.sameerkumar.website/?sign=' + sign + '&day=today' + const xhr = new XMLHttpRequest(); + xhr.open("POST", x, true); + xhr.onload = function() { + obj = JSON.parse(this.responseText); + let daily = document.getElementById("daily_horoscope"); + str = `${obj.description}`; + daily.innerHTML = str; + } + xhr.send(); +} \ No newline at end of file diff --git a/app/templates/base.html b/app/templates/base.html index ddc549db..161d8da2 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -1,23 +1,26 @@ + {% block head %} + + + + - Calendar {% endblock %} + -{% block content %} - + {% block content %} {% endblock %} -{% endblock %} - - - - + + + - + + \ No newline at end of file diff --git a/app/templates/profile.html b/app/templates/profile.html index 9a0ddbda..f452ea4b 100644 --- a/app/templates/profile.html +++ b/app/templates/profile.html @@ -1,249 +1,267 @@ -{% extends "base.html" %} +{% extends "base.html" %} {% block content %} +
+
+ +
+ +
- -{% block content %} - -
-
- -
- -
- - -
-