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
|
||||
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.queryStringSettings = settingsQs ? `?${settingsQs}` : ''
|
||||
response.locals.query = request.query
|
||||
response.locals.currentPath = request.path
|
||||
|
||||
|
||||
@@ -144,31 +144,31 @@ section.modal#about-this-modal
|
||||
li
|
||||
img(src='/images/icon-nodejs.svg')
|
||||
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
|
||||
a(href="https://github.com/contentful/the-example-app.nodejs" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/icon-dotnet.svg')
|
||||
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
|
||||
a(href="https://github.com/contentful/the-example-app.csharp" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/icon-ruby.svg')
|
||||
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
|
||||
a(href="https://github.com/contentful/the-example-app.rb" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/icon-php.svg')
|
||||
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
|
||||
a(href="https://github.com/contentful/the-example-app.php" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
img(src='/images/icon-python.svg')
|
||||
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
|
||||
a(href="https://github.com/contentful/the-example-app.py" rel="noopener" target="_blank") GitHub
|
||||
li
|
||||
|
||||
Reference in New Issue
Block a user