Skip to content

Commit

Permalink
Remove image credit for now
Browse files Browse the repository at this point in the history
  • Loading branch information
manuelroth committed Aug 13, 2018
1 parent df50b5a commit 8ece3f7
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 106 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"title": "FIXTURE: All question types with image and credit",
"title": "FIXTURE: All question types with images",
"department": "Storytelling / Infografik",
"publication": "nzz",
"acronym": "mro",
"elements": [
{
"id": "cd11d746cd1d1b6018d83e00b701e899-1532100973311-320454144",
"type": "multipleChoice",
"credit": {
"link": {
"url": "https://www.stmoritz.ch/",
"isValid": true
},
"text": "St.Moritz Tourismus"
},
"choices": ["Engelberg", "Adelboden", "Stoos"],
"articleRecommendations": [],
"introduction":
Expand All @@ -33,13 +26,6 @@
{
"id": "cd11d746cd1d1b6018d83e00b701e899-1532101097031-10309866",
"type": "numberGuess",
"credit": {
"link": {
"url": "",
"isValid": false
},
"text": ""
},
"articleRecommendations": [],
"introduction":
"Für den Winter 2016/2017 hatte Saas-Fee eine Marketing-Aktion gestartet. ",
Expand All @@ -55,13 +41,6 @@
{
"id": "cd11d746cd1d1b6018d83e00b701e899-1532101186644-655788839",
"type": "mapPointGuess",
"credit": {
"link": {
"url": "https://www.stmoritz.ch/",
"isValid": true
},
"text": "St.Moritz Tourismus"
},
"answer": {
"type": "Feature",
"geometry": {
Expand Down
40 changes: 0 additions & 40 deletions resources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
},
"introduction": { "$ref": "#/definitions/introduction" },
"image": { "$ref": "#/definitions/image" },
"credit": { "$ref": "#/definitions/credit" },
"question": {
"type": "string",
"title": "Frage"
Expand Down Expand Up @@ -124,7 +123,6 @@
},
"introduction": { "$ref": "#/definitions/introduction" },
"image": { "$ref": "#/definitions/image" },
"credit": { "$ref": "#/definitions/credit" },
"question": {
"type": "string",
"title": "Frage"
Expand Down Expand Up @@ -198,7 +196,6 @@
},
"introduction": { "$ref": "#/definitions/introduction" },
"image": { "$ref": "#/definitions/image" },
"credit": { "$ref": "#/definitions/credit" },
"question": {
"type": "string",
"title": "Frage"
Expand Down Expand Up @@ -319,43 +316,6 @@
}
}
},
"credit": {
"type": "object",
"title": "Bildcredit",
"Q:options": {
"availabilityChecks": [
{
"type": "ToolEndpoint",
"withData": true,
"endpoint": "availability-checks/credit"
}
]
},
"properties": {
"text": {
"title": "Credit",
"type": "string"
},
"link": {
"Q:type": "link",
"title": "Link",
"type": "object",
"properties": {
"url": {
"title": "Link",
"type": "string",
"Q:options": {
"placeholder":
"Direktlink zum Fotografen, https://..."
}
},
"isValid": {
"type": "boolean"
}
}
}
}
},
"geojson-point": {
"type": "object",
"title": "Punkt",
Expand Down
26 changes: 0 additions & 26 deletions routes/availability-checks.js

This file was deleted.

2 changes: 1 addition & 1 deletion routes/fixtures/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fixtureDataDirectory = "../../resources/fixtures/data";
// provide every fixture data file present in ../../resources/fixtures/data
const fixtureData = [
require(`${fixtureDataDirectory}/all.json`),
require(`${fixtureDataDirectory}/all-question-types-with-images-and-credit.json`),
require(`${fixtureDataDirectory}/all-question-types-with-images.json`),
require(`${fixtureDataDirectory}/cover-with-title-no-last-card.json`),
require(`${fixtureDataDirectory}/single-multiple-choice.json`),
require(`${fixtureDataDirectory}/single-number-guess.json`),
Expand Down
1 change: 0 additions & 1 deletion routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ module.exports = [
require("./schema.js"),
require("./locales.js"),
require("./health.js"),
require("./availability-checks.js"),
require("./fixtures/data.js")
].concat(
require("./scripts.js"),
Expand Down
5 changes: 2 additions & 3 deletions styles_src/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,8 @@
left: 0;
}

.q-quiz-question-image-credit {
margin-top: 4px !important;
margin-bottom: 8px !important;
.q-quiz-question-title {
margin-top: 8px;
}

.q-quiz-play-another-container {
Expand Down
16 changes: 3 additions & 13 deletions views/Question.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,11 @@
<source srcset="{{ question.image.urls.image1x }} 1x, {{ question.image.urls.image2x }} 2x">
<img class="q-quiz-question-image q-quiz-question-image--responsive" src="{{ question.image.urls.image1x }}" />
</picture>
{{#if question.credit }}
<p class="q-quiz-question-image-credit s-font-note s-font-note--light">
{{#if question.credit.text }}{{#if question.credit.link.url && question.credit.link.isValid }} (Bild:
<a href="{{ question.credit.link.url }}" target="blank" rel="noopener noreferrer">{{ question.credit.text }}</a>) {{ else }} (Bild: {{ question.credit.text }}) {{/if}}{{/if}}
</p>
{{/if}} {{ else }}
{{ else }}
<picture class="q-quiz-question-image" data-imageServiceUrl="{{imageServiceUrl}}" data-imageKey="{{question.image.key}}"
style="position:relative; display: block; padding-bottom: {{ question.image.height / question.image.width * 100 }}%;"></picture>
{{#if question.credit }}
<p class="q-quiz-question-image-credit s-font-note s-font-note--light">
{{#if question.credit.text }}{{#if question.credit.link.url && question.credit.link.isValid }} (Bild:
<a href="{{ question.credit.link.url }}" target="blank" rel="noopener noreferrer">{{ question.credit.text }}</a>) {{ else }} (Bild: {{ question.credit.text }}) {{/if}}{{/if}}
</p>
{{/if}} {{/if}} {{/if}}
{{#if question.question}}<h3 class="s-q-item__title">{{question.question}}</h3>{{/if}}
{{/if}} {{/if}}
{{#if question.question}}<h3 class="s-q-item__title q-quiz-question-title">{{question.question}}</h3>{{/if}}
<div>
{{#if isMultipleChoice}}
<MultipleChoice question="{{question}}" /> {{/if}} {{#if isNumberGuess}}
Expand Down

0 comments on commit 8ece3f7

Please sign in to comment.