Skip to content

Commit

Permalink
Add cheatsheet under manuals
Browse files Browse the repository at this point in the history
  • Loading branch information
HelNershingThapa authored and Aadesh-Baral committed Mar 29, 2022
1 parent 2691f1e commit 5b58ada
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 34 deletions.
9 changes: 9 additions & 0 deletions frontend/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"banner.button.agree": "I agree",
"banner.privacyPolicy": "privacy policy",
"banner.text": "We use cookies and similar technologies to recognize and analyze your visits, and measure traffic usage and activity. You can learn about how we use the data about your visit or information you provide reading our {link}. By clicking \"I Agree\", you consent to the use of cookies.",
"banner.button.close": "Close",
"banner.button.learnmore": "Learn More",
"banner.title.notification": "Important notification for users",
"banner.text.archivalNotification": "Attention: as part of the ongoing maintenance of the Tasking Manager, projects created before 2020 will be archived.",
"comment.input.imageUpload.error": "The image upload failed.",
"comment.input.imageUpload.progress": "Uploading file...",
"comment.input.sending.progress": "Sending message...",
Expand Down Expand Up @@ -406,6 +410,8 @@
"projects.formInputs.random_task_selection": "Enforce random task selection",
"projects.formInputs.random_task_selection.mapping": "Enforce random task selection on mapping",
"projects.formInputs.random_task_selection.description": "If checked, users must edit tasks at random for the initial editing stage (managers and admins are exempt).",
"projects.formInputs.rapid_power_user": "Enable RapiD Power User Features",
"projects.formInputs.rapid_power_user.description": "If checked, RapiD will load with the power user dialog enabled.",
"projects.formInputs.imagery": "Imagery",
"projects.formInputs.imagery.note": "Follow this format for TMS URLs: {exampleUrl}",
"projects.formInputs.priority_areas.options.polygon": "Draw polygon",
Expand Down Expand Up @@ -531,6 +537,7 @@
"project.stats.totalEdits": "Total map edits",
"project.stats.changesets": "Changesets",
"project.stats.edits": "Edits",
"project.stats.edits.info": "These stats are retrieved using the default changeset comment of the project",
"project.tasks.unsaved_map_changes.title": "You have some unsaved map changes",
"project.tasks.unsaved_map_changes.split": "Save or undo it to be able to split the task",
"project.tasks.unsaved_map_changes.unlock": "Save or undo it to be able to select another task",
Expand Down Expand Up @@ -988,6 +995,8 @@
"pages.learn.tutorials.tm_manual.description": "Learn how to find a project and task that interests you, how to lock a task to edit and select the suitable editing software.",
"pages.learn.tutorials.osm_step_by_step.title": "Learn OpenStreetMap Step by Step",
"pages.learn.tutorials.osm_step_by_step.description": "Beginner’s Guide to mapping on OpenStreetMap",
"pages.learn.tutorials.cheatsheet.title": "Tasking Manager Cheatsheet",
"pages.learn.tutorials.cheatsheet.description": "TM's concise set of notes used for quick reference",
"pages.learn.tutorials.learnosm.title": "Administration Guide",
"pages.learn.tutorials.learnosm.description": "Manual on how to create and manage projects in the Tasking Manager",
"pages.learn.map.steps.project.title": "Select a project",
Expand Down
73 changes: 39 additions & 34 deletions frontend/src/views/learn.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,43 +88,43 @@ const Steps = ({ items }) => (
);

const Manuals = ({ contents }) => (
<div className="mv3">
<h3 className="f2 ttu barlow-condensed fw6">
<FormattedMessage {...messages.learnManualsTitle} />
</h3>
<div className="w-100 cf">
{contents.map((content, i) => (
<div key={i} style={{ height: '20rem' }} className="w-25-l w-third-m w-100 fl ph2">
<div className="shadow-4">
<a
className="no-underline"
rel="noopener noreferrer"
target="_blank"
href={content.url}
>
<div
className="bg-tan w-100 tc h4"
style={{
background: `#f0efef url(${content.img}) no-repeat center`,
backgroundSize: '55%',
}}
></div>
<div className="pa3" style={{ height: '12rem' }}>
<p className="fw7 f4 mt0 blue-dark">
<FormattedMessage {...messages[`${content.message}Title`]} />
</p>
<div className="mv3">
<h3 className="f2 ttu barlow-condensed fw6">
<FormattedMessage {...messages.learnManualsTitle} />
</h3>
<div className="w-100 cf">
{contents.map((content, i) => (
<div key={i} style={{ height: '20rem' }} className="w-25-l w-third-m w-100 fl ph2">
<div className="shadow-4">
<a
className="no-underline"
rel="noopener noreferrer"
target="_blank"
href={content.url}
>
<div
className="bg-tan w-100 tc h4"
style={{
background: `#f0efef url(${content.img}) no-repeat center`,
backgroundSize: '55%',
}}
></div>
<div className="pa3" style={{ height: '12rem' }}>
<p className="fw7 f4 mt0 blue-dark">
<FormattedMessage {...messages[`${content.message}Title`]} />
</p>

<p className="blue-grey lh-title f5">
<FormattedMessage {...messages[`${content.message}Description`]} />
</p>
</div>
</a>
<p className="blue-grey lh-title f5">
<FormattedMessage {...messages[`${content.message}Description`]} />
</p>
</div>
</a>
</div>
</div>
</div>
))}
))}
</div>
</div>
</div>
);
);

const Videos = ({ contents }) => {
const [activeVideo, setActiveVideo] = useState(null);
Expand Down Expand Up @@ -348,6 +348,11 @@ const LearnToMap = ({ section }) => {
url: 'https://learnosm.org/en/beginner/',
img: LearnOSMLogo,
},
{
message: 'learnTMCheatsheet',
url: 'https://drive.google.com/file/d/19pckU4Cru-cSz_aclsLsBk-45SQ1Qyy_/view?usp=sharing',
img: QuickstartLogo,
},
];

const videos = [
Expand Down
8 changes: 8 additions & 0 deletions frontend/src/views/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ export default defineMessages({
id: 'pages.learn.tutorials.osm_step_by_step.description',
defaultMessage: 'Beginner’s Guide to mapping on OpenStreetMap',
},
learnTMCheatsheetTitle: {
id: 'pages.learn.tutorials.cheatsheet.title',
defaultMessage: 'Tasking Manager Cheatsheet',
},
learnTMCheatsheetDescription: {
id: 'pages.learn.tutorials.cheatsheet.description',
defaultMessage: "TM's concise set of notes used for quick reference",
},
learnOSMTutorialTitle: {
id: 'pages.learn.tutorials.learnosm.title',
defaultMessage: 'Administration Guide',
Expand Down

0 comments on commit 5b58ada

Please sign in to comment.