Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beta #10

Merged
merged 4 commits into from
May 20, 2022
Merged

Beta #10

merged 4 commits into from
May 20, 2022

Conversation

herzkadani
Copy link
Owner

api unifying implemented in backend & frontend

@herzkadani herzkadani added the enhancement New feature or request label May 19, 2022
@herzkadani herzkadani requested a review from gianklug May 19, 2022 15:13
Copy link
Collaborator

@gianklug gianklug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, now we can continue adding even more providers 🎉

@@ -102,5 +99,5 @@ def get_any_deal(deal):
output["daydeal_weekly"] = deals[2]
output["blickdeal"] = deals[3]
output["galaxus"] = deals[4]
with open("/var/www/alldeals/frontend/deals.json", "w") as f:
with open("/var/www/alldeals-beta/frontend/deals.json", "w") as f:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should make this relative and/or separate frontend and backend again

Copy link
Owner Author

@herzkadani herzkadani May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would be in favor of separating frontend and backend more clearly again. I am not a big fan of the data provider updating the frontend. Having the backend providing the data via API and the frontend consuming the data from the API as originally would be more layered architecture compliant.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, let's create an issue for that and work on it at some point.

frontend/index.php Outdated Show resolved Hide resolved
frontend/index.php Outdated Show resolved Hide resolved
$isexpired = ($data[$key]['availability']=='0%' ? 'expired' : '');

$htmloutput.='<div class="deal_badge' .$isexpired.'">
<div class="progress" data-label="'.$data[$key]['availability'].'" style="border-color: '.$brandcolors[$key].'; text-shadow: -1px -1px 0 '.$brandcolors[$key].', 0 -1px 0'.$brandcolors[$key].', 1px -1px 0 '.$brandcolors[$key].', 1px 0 0 '.$brandcolors[$key].', 1px 1px 0 '.$brandcolors[$key].', 0 1px 0 '.$brandcolors[$key].', -1px 1px 0 '.$brandcolors[$key].', -1px 0 0'.$brandcolors[$key].';">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should use a templating engine like twig for such large text blobs as it becomes unreadable pretty quick

Copy link
Owner Author

@herzkadani herzkadani May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion the only thing that would make this section hard to read is the lack of code hightlighting on the HTML attributes since it is represented as a string. I don't have any experience with templating engines nevertheless I doubt they make things easier on this scale.

frontend/index.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@gianklug gianklug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, I think we can merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants