Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop and Design the User Picks in newsletter layout and the latest contributors in the newsletter landing page. #95

Closed
2 tasks
keithmifsud opened this issue Jul 2, 2018 · 1 comment

Comments

@keithmifsud
Copy link
Contributor

keithmifsud commented Jul 2, 2018

When we have user contributions to the newsletter, the user_pick section should be design and the newsletter landing page should be refactored/tested.

Contributors:

An include showing up to three contributors, including a profile photo and links to GH, Twitter, website and LinkedIn if and what is available. My opinion is that precedence should be given to contributors which are not team members at LearnK8s and team members should only be shown while there are less than 3 third-party contributors. Third party contributors are community members that have submitted links to a newsletter issue (in the "Your Picks" section).

In the newsletter landing page there should be a condition stating that if contributors are specified in the front-matter then the _includes/newsletter/contributors/static.html should be included, otherwise, the ``_includes/newsletter/contributors/latest.html` will be included as per specs above.

  • Develop an include as per above specs.
  • Ability to override which contributors to display in the front-matter.
<!--

  first, loop through all the issues until we make up three contributors that have at least their full name and their avatar.

  if there's not enough contributors, then they can be manually set in frotn matter. The contributors in front matter will take precedence over the latest ones.


-->

{% assign contributors_number = 0 %}
{% assign contributors = "" %}

{% for issue in site.newsletter %}
  {% if contributors_number < 3 %}
    {% if issue.user_pick %}
      {% for pick in issue.user_pick %}
        {% if pick.user_full_name && pick.user_avatar %}
          {% if contributors_number > 0 %}
          {% assign contributors = contributors | append: ',' }} %}
          {% endif %}
          {% assign contributors = contributors | append: issue.issue | append: "-" | append: forloop.index %}
          {% assign contributors_number = contributors_number | | plus: 1 %}
        {% endif %}
      {% endfor %}
    {% endif %}
  {% endif %}
{% endfor %}

{{ contributors }}
@danielepolencic
Copy link
Contributor

Removed contributors. This isn't relevant anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants