Refactor about page v2#760
Conversation
lpatmo
left a comment
There was a problem hiding this comment.
Looks great! @railsstudent Could I move <img src="iframe.php?url=https%3A%2F%2Favatars1.githubusercontent.com%2Fu%2F1159649%3Fv%3D4%26amp%3Bs%3D460" class="img-circle" alt="Connie Leung"/> up to the core contributors section? Will link to your twitter and github.
distalx
left a comment
There was a problem hiding this comment.
Thanks for the PR! Here are some suggestions I hope you'll find helpful.
| @@ -0,0 +1,235 @@ | |||
| { | |||
There was a problem hiding this comment.
We should move this file under imports/data directory, and break it down to two files,
The scope of the private directory is limited to server side only.
very roughly :
imports/data/flags.json and imports/data/contributors.json
[
{
name: 'xyz',
avatar: 'http://link or gravater',
intro: 'lorem ipsum',
socials:[
{website: 'URL'},
{twitter: '@handel'},
....
],
type: 'code'
},
....
]
on about page you can load this json files with their relative path
imports contributors from 'imports/data/contributors.json'
with the help of the helper function contributors can be passed to the template
`contributors : function() { return contributors }`
and then we can iterate over it using
{{#each contributors}} {{/each}} block.
To display contributors into their respective section we can use equals template helper {{#if equals type 'code'}}
There was a problem hiding this comment.
I do not see imports/data directory in the project. Should I create it? thanks.
There was a problem hiding this comment.
Yes, imports directory is a part of a new directory structure suggested in meteor guide, our migration to the new directory structure is long over due.
There was a problem hiding this comment.
Noted. Will get this done before Sunday.
Refactor about page
@railsstudent I added a short placeholder-ish description for you, but please feel free to edit!
…t/codebuddies into railsstudent-refactor-about-page-v2
|
@railsstudent , Thanks for the pull request. |
Externalize details of contributors in private/about.json and read the data from it when rendering the images and popups in about.html.
When new contributors wants to add themselves to about page, they can append JSON object of personal details in code-contributors array.
The html code in title attribute in original design is errone hone with all these angle brackets