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

Remove links from outreachy project description #1764

Merged
merged 8 commits into from Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions data/outreachy.yml
Expand Up @@ -172,9 +172,11 @@ rounds:
for example, in the form of macros or templates. The OCaml compiler
doesn't provide a full built-in macro system, but the OCaml parser does
provide syntax for preprocessing purposes: attributes
(https://v3.ocaml.org/docs/metaprogramming#attributes-and-derivers) and
(https://v3.ocaml.org/docs/metaprogramming
#attributes-and-derivers) and
extension points
(https://v3.ocaml.org/docs/metaprogramming#extension-nodes-and-extenders).
(https://v3.ocaml.org/docs/metaprogramming
#extension-nodes-and-extenders).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, since these descriptions are just plain text, they cannot contain URLs in the first place. So the best thing here would be to remove the links.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is fine then.

We -the OCaml community- also have an official framework, called
`ppxlib`, to write preprocessors -called PPXs- based on that syntax and
integrate them into the compilation process.
Expand Down
13 changes: 9 additions & 4 deletions src/ocamlorg_frontend/pages/outreachy.eml
Expand Up @@ -10,24 +10,29 @@ Layout.render
<p>This is a record of all past OCaml Community <a href="https://www.outreachy.org/" target="_blank">Outreachy</a> Internship Projects.</p>
</div>
</div>

<div class="py-12 bg-default dark:bg-dark-default">
<div class="container-fluid">
<% metadata |> List.iter (fun (rounds : Data.Outreachy.t) -> %>
<h2 class="border-b border-primary-700 p-6 my-2 font-bold"><%s rounds.name %></h2>
<div class="grid gap-10 prose max-w-4xl">
<% rounds.projects |> List.iter (fun (project : Data.Outreachy.project) -> %>
<div x-data="{'is_shown': false}" class="p-5 flex flex-col gap-2">
<div x-data="{'is_shown': false}" class="p-5 flex flex-col">

<h3><%s project.title %></h3>

<div>Mentee: <i><%s project.mentee %></i></div>

<div>Mentor(s): <i><%s Fmt.(str "%a" (list ~sep:comma string) project.mentors) %></i></div>

<% if String.length project.description > 240 then ( %>
<div :class="is_shown ? '' : 'relative max-h-20 overflow-hidden'">
<div class="absolute bottom-0 h-10 left-0 right-0 bg-gradient-to-t from-white"></div>
<p> <%s project.description %> </p>
<p class="overflow-fix"> <%s project.description %> </p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overflow-fix doesn't seem defined anywhere and I don't think this file needs to be changed when we remove the offending links from the outreachy descriptions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I added it during debugging and forgot to remove it when I found the bug. Do you need me to take it out or is that already done?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when you look at the "Files changed" tab, you'll see that two files are being edited by this PR. Best is to check out the old version of outreachy.eml, so the PR doesn't make any changes to this file.

</div>
<button x-on:click="is_shown= !is_shown" class='text-left hover:underline text-primary-700 font-semibold' x-text="is_shown ? 'Show Less' : 'Show More'"></button>
<% ) else ( %>
<p> <%s project.description %> </p>
<p class="overflow-fix"> <%s project.description %> </p>
<% ); %>
<div class='flex flex-row gap-4'>
<% (match project.blog with None -> () | Some blog -> %>
Expand All @@ -43,4 +48,4 @@ Layout.render
</div>
<% ); %>
</div>
</div>
</div>