Skip to content

Commit

Permalink
Merge pull request #518 from ripe-tech/hg/compose_url
Browse files Browse the repository at this point in the history
feat: add compose url option to the ripe-sdk demo
  • Loading branch information
hugo-gomes authored Jun 23, 2023
2 parents 1a28f4e + 7c8c3b5 commit 1f279d6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/python/ripe_demo/controllers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def simple(self):
return self.template(
"simple.html.tpl",
url=self.field("url"),
compose_url=self.field("compose_url"),
brand=self.field("brand"),
model=self.field("model"),
variant=self.field("variant"),
Expand Down
2 changes: 2 additions & 0 deletions src/python/ripe_demo/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ window.onload = function() {
const element = document.getElementById("configurator-prc");
const _body = document.querySelector("body");
const url = _body.dataset.url || "https://sandbox.platforme.com/api/";
const composeUrl = _body.dataset.compose_url || null;
const brand = _body.dataset.brand || "dummy";
const model = _body.dataset.model || "cube";
const variant = _body.dataset.variant || "";
Expand All @@ -35,6 +36,7 @@ window.onload = function() {
version: version,
format: format,
url: url,
composeUrl: composeUrl,
currency: currency,
country: country,
guess: guess,
Expand Down
2 changes: 1 addition & 1 deletion src/python/ripe_demo/templates/partials/layout.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<title>{{ title }}{% block title %}RIPE SDK Demo{% endblock %}</title>
{% endblock %}
</head>
<body class="{% block body_class %}ux wait-load{% endblock %}" data-url="{{ url|default('', True) }}"
<body class="{% block body_class %}ux wait-load{% endblock %}" data-url="{{ url|default('', True) }}" data-compose_url="{{ compose_url|default('', True) }}"
data-brand="{{ brand|default('', True) }}" data-model="{{ model|default('', True) }}"
data-variant="{{ variant|default('', True) }}" data-version="{{ version|default('', True) }}"
data-country="{{ country|default('', True) }}" data-currency="{{ currency|default('', True) }}"
Expand Down

1 comment on commit 1f279d6

@vercel
Copy link

@vercel vercel bot commented on 1f279d6 Jun 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

ripe-sdk – ./

ripe-sdk-platforme.vercel.app
ripe-sdk-docs-csr.vercel.app
ripe-sdk-git-master-platforme.vercel.app

Please sign in to comment.