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

Fix some visual oddities with tables #86

Merged
merged 3 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<style>
html, body {
height: 100%;
width: fit-content;
}

body {
Expand Down
2 changes: 0 additions & 2 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="/">
<img src="/images/foundrylogo.png" alt="" style="max-height: 24px"
class="d-inline-block align-text-top">
KG-Registry
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent"
Expand Down
2 changes: 1 addition & 1 deletion _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

{%- include header.html -%}

<div class="container" style="margin-top: 2em; margin-bottom: 2em;">
<div class="container" style="margin-top: 2em; margin-bottom: 2em; margin-left: 6em; margin-right: 6em;">
{{ content }}
</div>

Expand Down
34 changes: 24 additions & 10 deletions _layouts/resource_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ <h1>
</div>
{% endif %}

<div class="card" style="margin-bottom: 1.5em;">
{% if page.products and page.products.size > 0 %}
<div class="card" style="margin-bottom: 1.5em; width: auto;">
<div class="card-header">
Products
</div>
<table class="table table-striped mb-0">
<table class="table table-striped mb-0" style="width: auto;">
<tbody>
{% for p in page.products %}
<tr>
Expand All @@ -90,20 +91,33 @@ <h1>
</td>
<td>{{p.name}}</td>
<td>{{p.category}}</td>
{% if p.is_kgx %}
<td>
{{p.description}}
KGX Available
</td>
{% if p.is_kgx %}
<td> KGX Available!</td>
{% endif %}
{% if p.infores_id %}
<td> infores:{{p.infores_id}}</td>
<td>
infores:{{p.infores_id}}
</td>
{% else %}
<td>
<span style="color: darkred;">infores unknown</span>
</td>
{% endif %}
<td>
{{p.description}}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% else %}
<div class="alert alert-warning" role="alert">
No products available. You could <a href="https://github.com/Knowledge-Graph-Hub/kg-registry/issues/new?template=update-resource.yml">suggest one to add!</a>
</div>
{% endif %}

{% if page.usages %}
<div class="card" style="margin-bottom: 1.5em;">
Expand Down Expand Up @@ -149,8 +163,8 @@ <h1>
{% endif %}
</div>

<div class="col-md-4" style="padding-right: 0">
<dl class="dl-horizontal" style="margin-left: 0">
<div class="col-md-4" style="width: auto;">
<dl class="dl-horizontal" style="margin-left: 4em">
<dt>
ID Space
<span data-toggle="tooltip" title="ID prefix" data-html="true"> </span>
Expand Down Expand Up @@ -334,13 +348,13 @@ <h1>
<dd>{% endif %}</dd>
</dl>

<div>
<!-- <div>
Generated by:
<a href="{{site.repo_src}}_layouts/resource_detail.html"
>_layouts/resource_detail.html</a
><br />
See
<a href="/faq/how-do-i-edit-metadata.html">metadata guide</a>
</div>
</div> -->
</div>
</div>
Loading