Skip to content

Commit

Permalink
convert breadcrumbs to use slugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pjc09h committed Jun 1, 2024
1 parent 8e11b3d commit 52d6523
Show file tree
Hide file tree
Showing 19 changed files with 15 additions and 122 deletions.
12 changes: 0 additions & 12 deletions resources/scss/global/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,6 @@ pre {
}
}

/**
* breadcrumbs
*/

h2#breadcrumbs {
li {
display: inline;
list-style: none;
margin: 0;
}
}

/**
* brackets, e.g., [bookmark]
*/
Expand Down
2 changes: 1 addition & 1 deletion sections/collages/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

"breadcrumbs" => [
"/collages" => "collages",
"/collages/{$collage->id}" => $collage->attributes->title,
"/collages/{$collage->attributes->slug}" => $collage->attributes->title,
],

"css" => [],
Expand Down
2 changes: 1 addition & 1 deletion sections/creators/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

"breadcrumbs" => [
"/creators" => "creators",
"/creators/{$creator->id}" => $creator->attributes->name,
"/creators/{$creator->attributes->name}" => $creator->attributes->name,
],

"creator" => $creator,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/boards/category.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
$app->twig->display(
"discourse/boards/category.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => $category["name"],
"category" => $category,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/boards/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
$app->twig->display(
"discourse/boards/index.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => "Boards",
"categories" => $categories,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/boards/newEdit.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
$app->twig->display(
"discourse/boards/newEdit.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => "Manage your topic",
#"category" => $category,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/boards/topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
$app->twig->display(
"discourse/boards/topic.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => $topic["title"],
"category" => $categorySlug,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/messages/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
$app->twig->display(
"discourse/messages/index.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => "Messages",
"inbox" => $inbox,
Expand Down
1 change: 0 additions & 1 deletion sections/discourse/wiki/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
$app->twig->display(
"discourse/wiki/index.twig",
[
"breadcrumbs" => true,
"sidebar" => true,
"title" => "{$topic["title"]} {$app->env->separator} Wiki",
"category" => "wiki",
Expand Down
2 changes: 1 addition & 1 deletion sections/literature/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@

"breadcrumbs" => [
"/literature" => "literature",
"/literature/{$literature->id}" => $literature->attributes->title,
"/literature/{$literature->attributes->doi}" => $literature->attributes->title,
],

"literature" => $literature,
Expand Down
2 changes: 1 addition & 1 deletion sections/requests/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

"breadcrumbs" => [
"/requests" => "requests",
"/requests/{$request->id}" => $request->attributes->title,
"/requests/{$request->attributes->slug}" => $request->attributes->title,
],

"successMessage" => $successMessage ?? null,
Expand Down
2 changes: 1 addition & 1 deletion sections/torrentGroups/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

"breadcrumbs" => [
"/torrents" => "torrents",
"/torrent-groups/{$torrentGroup->id}" => $torrentGroup->attributes->title,
"/torrent-groups/{$torrentGroup->attributes->slug}" => $torrentGroup->attributes->title,
],

"torrentGroup" => $torrentGroup,
Expand Down
2 changes: 1 addition & 1 deletion sections/torrents/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

"breadcrumbs" => [
"/torrents" => "torrents",
"/torrent-groups/{$torrentGroup->id}" => $torrentGroup->attributes->title,
"/torrent-groups/{$torrentGroup->attributes->slug}" => $torrentGroup->attributes->title,
],


Expand Down
6 changes: 3 additions & 3 deletions templates/creators/details.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@
{% if creator.attributes.semanticScholarId is not empty %}
<tr>
<th><span class="semanticScholarId nobr">Semantic Scholar</span></th>
<td><a href="https://www.semanticscholar.org/author/{{ creator.attributes.semanticScholarId }}" target="_blank" class="external">{{ creator.attributes.semanticScholarId }}</a></td>
<td><a href="https://www.semanticscholar.org/author/{{ creator.attributes.semanticScholarId }}" target="_blank" class="external monospace">{{ creator.attributes.semanticScholarId }}</a></td>
</tr>
{% endif %}

{# orcid #}
{% if creator.attributes.orcid is not empty %}
<tr>
<th><span class="orcid nobr">ORCiD</span></th>
<td><a href="https://orcid.org/{{ creator.attributes.orcid }}" target="_blank" class="external">https://orcid.org/{{ creator.attributes.orcid }}</a></td>
<td><a href="https://orcid.org/{{ creator.attributes.orcid }}" target="_blank" class="external monospace">https://orcid.org/{{ creator.attributes.orcid }}</a></td>
</tr>
{% endif %}

{# homepage #}
{% if creator.attributes.homepage is not empty %}
<tr>
<th><span class="homepage nobr">Homepage</span></th>
<td><a href="" target="_blank" class="external">{{ creator.attributes.homepage }}</a></td>
<td><a href="" target="_blank" class="external monospace">{{ creator.attributes.homepage }}</a></td>
</tr>
{% endif %}

Expand Down
4 changes: 2 additions & 2 deletions templates/literature/details.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<tr>
<th><span class="doi nobr">DOI</span></th>
<td>
<a href="https://doi.org/{{ literature.attributes.doi }}" target="_blank" class="external">{{ literature.attributes.doi }}</a>
<a href="https://doi.org/{{ literature.attributes.doi }}" target="_blank" class="external monospace">{{ literature.attributes.doi }}</a>
</td>
</tr>
{% endif %}
Expand All @@ -24,7 +24,7 @@
<tr>
<th><span class="semanticScholarId nobr">Semantic Scholar</span></th>
<td>
<a href="https://www.semanticscholar.org/paper/{{ literature.attributes.semanticScholarId }}" target="_blank" class="external">{{ literature.attributes.semanticScholarId }}</a>
<a href="https://www.semanticscholar.org/paper/{{ literature.attributes.semanticScholarId }}" target="_blank" class="external monospace">{{ literature.attributes.semanticScholarId }}</a>
</td>
</tr>
{% endif %}
Expand Down
89 changes: 0 additions & 89 deletions templates/literature/tableEntry.twig

This file was deleted.

4 changes: 2 additions & 2 deletions templates/tables/literature.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
{% if item.attributes.title is not empty %}
{{ item.attributes.title }}
{% else %}
{{ item.attributes.doi }}
<span class="monospace">{{ item.attributes.doi }}</span>
{% endif %}
</a>
</p>

<p class="flexRow">
{# doi #}
{% if item.attributes.doi is not empty %}
<span class="tooltip doi" title="DOI">{{ item.attributes.doi }}</span>
<span class="tooltip doi monospace" title="DOI">{{ item.attributes.doi }}</span>
{% endif %}

{# journal #}
Expand Down
2 changes: 1 addition & 1 deletion templates/tables/torrentGroups.twig
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

{# identifier #}
{% if torrentGroup.attributes.identifier is not empty %}
<span class="tooltip identifier" title="Identifier">{{ torrentGroup.attributes.identifier }}</span>
<span class="tooltip identifier monospace" title="Identifier">{{ torrentGroup.attributes.identifier }}</span>
{% endif %}

{# workgroup #}
Expand Down
2 changes: 1 addition & 1 deletion templates/torrentGroups/details.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
{% if torrentGroup.attributes.identifier is not empty %}
<tr>
<th><span class="identifier nobr">Identifier</span></th>
<td>{{ torrentGroup.attributes.identifier }}</td>
<td><span class="monospace">{{ torrentGroup.attributes.identifier }}</span></td>

<td/>
</tr>
Expand Down

0 comments on commit 52d6523

Please sign in to comment.