Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Create template for project cards on homepage

未关闭
#46 8 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@tblacknc 已经在做这个了。

开始于 2022年1月19日。

评估

这个 Issue 还没有评估数据。

描述

Currently, we show cards for selected projects on the homepage (codeforphilly.org):

image

However, the HTML for each card is repeated, with information like heading hard-coded:

https://github.com/CodeForPhilly/codeforphilly.org/blob/develop/html-templates/home.tpl#L100-L115

Proposed Solution

If we use a template, then we can consolidate this repeated code into one place. In other words, we could have a template like this in the home.tpl page:

{template projectTile name description logo=no}
  <h1>{$name|escape}</h1>
    {$description|escape|markdown}
{/template}

And then create the individual cards using something like this:

{projectTile name="Project 1" description="## This is a cool project"}
{projectTile name="Project 2" description="## This is a another project"}

Here is a link to the template engine docs (owoo). Note that it is fairly old, but if we can get our work pretty far, and post it on the #cfp-homepage-redesign channel, we can hopefully lean a bit on @themightychris to fill in any gaps.

Outcome

The homepage should look the exact same, but the underlying code should be much cleaner, since it uses the template. If there are any useful changes to the look / homepage content, let's handle them after implementing a template (just to be sure we get templating down).

主要语言
CSS
星标
10
派生
7
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeForPhilly/codeforphilly.org 的其他 Issue

查看 CodeForPhilly/codeforphilly.org 的全部 Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。