feat(about): attach settings to links in about modal
This commit is contained in:
committed by
Benedikt Rötsch
parent
67a73599bb
commit
2706e31411
6
app.js
6
app.js
@@ -54,7 +54,13 @@ app.use(catchErrors(async function (request, response, next) {
|
|||||||
|
|
||||||
// Make query string available in templates to render links properly
|
// Make query string available in templates to render links properly
|
||||||
const qs = querystring.stringify(request.query)
|
const qs = querystring.stringify(request.query)
|
||||||
|
const settingsQs = querystring.stringify(Object.assign({}, request.query, {
|
||||||
|
space_id: response.locals.settings.spaceId,
|
||||||
|
preview_token: response.locals.settings.previewToken,
|
||||||
|
delivery_token: response.locals.settings.deliveryToken
|
||||||
|
}))
|
||||||
response.locals.queryString = qs ? `?${qs}` : ''
|
response.locals.queryString = qs ? `?${qs}` : ''
|
||||||
|
response.locals.queryStringSettings = settingsQs ? `?${settingsQs}` : ''
|
||||||
response.locals.query = request.query
|
response.locals.query = request.query
|
||||||
response.locals.currentPath = request.path
|
response.locals.currentPath = request.path
|
||||||
|
|
||||||
|
|||||||
@@ -144,31 +144,31 @@ section.modal#about-this-modal
|
|||||||
li
|
li
|
||||||
img(src='/images/icon-nodejs.svg')
|
img(src='/images/icon-nodejs.svg')
|
||||||
br
|
br
|
||||||
a(href="https://the-example-app-nodejs.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
a(href=`https://the-example-app-nodejs.herokuapp.com/${queryStringSettings}` rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||||
br
|
br
|
||||||
a(href="https://github.com/contentful/the-example-app.nodejs" rel="noopener" target="_blank") GitHub
|
a(href="https://github.com/contentful/the-example-app.nodejs" rel="noopener" target="_blank") GitHub
|
||||||
li
|
li
|
||||||
img(src='/images/icon-dotnet.svg')
|
img(src='/images/icon-dotnet.svg')
|
||||||
br
|
br
|
||||||
a(href="https://the-example-app-csharp.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
a(href=`https://the-example-app-csharp.herokuapp.com/${queryStringSettings}` rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||||
br
|
br
|
||||||
a(href="https://github.com/contentful/the-example-app.csharp" rel="noopener" target="_blank") GitHub
|
a(href="https://github.com/contentful/the-example-app.csharp" rel="noopener" target="_blank") GitHub
|
||||||
li
|
li
|
||||||
img(src='/images/icon-ruby.svg')
|
img(src='/images/icon-ruby.svg')
|
||||||
br
|
br
|
||||||
a(href="https://the-example-app-rb.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
a(href=`https://the-example-app-rb.herokuapp.com/${queryStringSettings}` rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||||
br
|
br
|
||||||
a(href="https://github.com/contentful/the-example-app.rb" rel="noopener" target="_blank") GitHub
|
a(href="https://github.com/contentful/the-example-app.rb" rel="noopener" target="_blank") GitHub
|
||||||
li
|
li
|
||||||
img(src='/images/icon-php.svg')
|
img(src='/images/icon-php.svg')
|
||||||
br
|
br
|
||||||
a(href="https://the-example-app-php.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
a(href=`https://the-example-app-php.herokuapp.com/${queryStringSettings}` rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||||
br
|
br
|
||||||
a(href="https://github.com/contentful/the-example-app.php" rel="noopener" target="_blank") GitHub
|
a(href="https://github.com/contentful/the-example-app.php" rel="noopener" target="_blank") GitHub
|
||||||
li
|
li
|
||||||
img(src='/images/icon-python.svg')
|
img(src='/images/icon-python.svg')
|
||||||
br
|
br
|
||||||
a(href="https://the-example-app-py.herokuapp.com/" rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
a(href=`https://the-example-app-py.herokuapp.com/${queryStringSettings}` rel="noopener" target="_blank")= translate("hostedLabel", currentLocale.code)
|
||||||
br
|
br
|
||||||
a(href="https://github.com/contentful/the-example-app.py" rel="noopener" target="_blank") GitHub
|
a(href="https://github.com/contentful/the-example-app.py" rel="noopener" target="_blank") GitHub
|
||||||
li
|
li
|
||||||
|
|||||||
Reference in New Issue
Block a user