Skip to content

Commit

Permalink
Fix minor styling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kimakan committed Dec 6, 2024
1 parent 7cb39a6 commit f6d6cf2
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 11 deletions.
2 changes: 1 addition & 1 deletion daiquiri/auth/templates/account/account_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1>{% trans "Update profile" %}</h1>
{{ profile_form }}

<input type="submit" value="{% trans 'Update profile' %}" class="btn btn-primary" />
<input type="submit" name="cancel" value="{% trans 'Cancel' %}" class="btn btn-default" />
<input type="submit" name="cancel" value="{% trans 'Cancel' %}" class="btn btn-outline-secondary" />
</form>

{% endblock %}
2 changes: 1 addition & 1 deletion daiquiri/contact/templates/contact/contact.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ <h1>{% trans "Contact Form" %}</h1>
{{ form }}

<input type="submit" value="{% trans 'Send message' %}" class="btn {{ submit_danger|yesno:'btn-danger,btn-primary' }}" />
<input type="submit" name="cancel" value="{% trans 'Cancel' %}" class="btn btn-default" />
<input type="submit" name="cancel" value="{% trans 'Cancel' %}" class="btn btn-outline-secondary" />
</form>
{% else %}
<p>
Expand Down
2 changes: 2 additions & 0 deletions daiquiri/core/assets/js/components/table/Table.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const Table = ({ columns, rows, pageSizes, params, setParams }) => {
const column = columns[columnIndex]
const value = rows.results[rowIndex][columnIndex]

console.log(value)

if (isModalColumn(column)) {
setModalValues({
title: value,
Expand Down
2 changes: 1 addition & 1 deletion daiquiri/core/assets/js/components/table/TableCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const TableCell = ({ column, value, rowIndex, columnIndex, setActive, showModal
} else if (isFileColumn(column)) {
// render a file link
return (
<a href={getFileUrl(column, value)} target="_blank" rel="noreferrer">{getBasename(value)}1</a>
<a href={getFileUrl(column, value)} target="_blank" rel="noreferrer">{getBasename(value)}</a>
)
} else if (isLinkColumn(column)) {
// render a regular link
Expand Down
1 change: 1 addition & 0 deletions daiquiri/core/assets/scss/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ $bootstrap-icons-font-dir: '~bootstrap-icons/font/fonts';

@import 'base/browser';
@import 'base/card';
@import 'base/codehilite';
@import 'base/fonts';
@import 'base/footer';
@import 'base/form';
Expand Down
86 changes: 86 additions & 0 deletions daiquiri/core/assets/scss/base/codehilite.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 125%;
color: #333;
word-break: break-all;
word-wrap: break-word;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.codehilite .hll { background-color: #ffffcc }
.codehilite { background: #f8f8f8; }
.codehilite .c { color: #3D7B7B; font-style: italic } /* Comment */
.codehilite .err { border: 1px solid #FF0000 } /* Error */
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
.codehilite .o { color: #666666 } /* Operator */
.codehilite .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #9C6500 } /* Comment.Preproc */
.codehilite .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .gr { color: #E40000 } /* Generic.Error */
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #008400 } /* Generic.Inserted */
.codehilite .go { color: #717171 } /* Generic.Output */
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.codehilite .gt { color: #0044DD } /* Generic.Traceback */
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #B00040 } /* Keyword.Type */
.codehilite .m { color: #666666 } /* Literal.Number */
.codehilite .s { color: #BA2121 } /* Literal.String */
.codehilite .na { color: #687822 } /* Name.Attribute */
.codehilite .nb { color: #008000 } /* Name.Builtin */
.codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.codehilite .no { color: #880000 } /* Name.Constant */
.codehilite .nd { color: #AA22FF } /* Name.Decorator */
.codehilite .ni { color: #717171; font-weight: bold } /* Name.Entity */
.codehilite .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #0000FF } /* Name.Function */
.codehilite .nl { color: #767600 } /* Name.Label */
.codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
.codehilite .nv { color: #19177C } /* Name.Variable */
.codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.codehilite .w { color: #bbbbbb } /* Text.Whitespace */
.codehilite .mb { color: #666666 } /* Literal.Number.Bin */
.codehilite .mf { color: #666666 } /* Literal.Number.Float */
.codehilite .mh { color: #666666 } /* Literal.Number.Hex */
.codehilite .mi { color: #666666 } /* Literal.Number.Integer */
.codehilite .mo { color: #666666 } /* Literal.Number.Oct */
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
.codehilite .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
.codehilite .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.codehilite .sx { color: #008000 } /* Literal.String.Other */
.codehilite .sr { color: #A45A77 } /* Literal.String.Regex */
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #0000FF } /* Name.Function.Magic */
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
.codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
2 changes: 1 addition & 1 deletion daiquiri/core/assets/scss/base/layout.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.content {
margin-top: 4rem;
margin-top: 2rem;
}
3 changes: 3 additions & 0 deletions daiquiri/core/assets/scss/base/modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
:last-child {
margin-bottom: 0;
}
img {
width: 100%;
}
}

.modal-separator {
Expand Down
8 changes: 5 additions & 3 deletions daiquiri/metadata/templates/metadata/schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ <h2>{% trans 'Tables' %}</h2>

{% for table in tables %}
<div class="card mb-3">
<div class="card-header">
<h5 class="card-header">
<a href="{% url 'metadata:table' schema.name table.name %}">
{% if table.title %}
{{ table.title }} ({{ table }})
{% else %}
{{ table.name }}
{% endif %}
</a>
</div>
</h5>
<div class="card-body">
{% if table.description %}
{{ table.description | markdown }}
Expand All @@ -57,8 +57,10 @@ <h2>{% trans 'Tables' %}</h2>
{% endif %}
</div>
{% if table.doi %}
<div class="card-footer">
<div class="card-footer text-muted">
<small>
DOI: {% doi_link table.doi %}
</small>
</div>
{% endif %}
</div>
Expand Down
8 changes: 5 additions & 3 deletions daiquiri/metadata/templates/metadata/schemas.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ <h1 class="overflow-hidden">
{% block page %}
{% for schema in schemas %}
<div class="card mb-3">
<div class="card-header">
<h5 class="card-header">
<a href="{% url 'metadata:schema' schema.name %}">
{% if schema.title %}
{{ schema.title }} ({{ schema }})
{% else %}
{{ schema }}
{% endif %}
</a>
</div>
</h5>
<div class="card-body">
{% if schema.description %}
{{ schema.description | markdown }}
Expand All @@ -30,8 +30,10 @@ <h1 class="overflow-hidden">
{% endif %}
</div>
{% if schema.doi %}
<div class="card-footer">
<div class="card-footer text-muted">
<small>
DOI: {% doi_link schema.doi %}
</small>
</div>
{% endif %}
</div>
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = []
license = {text = "Apache-2.0"}
authors = [
{name = "Jochen Klar", email = "[email protected]"},
{name = "nastasia Galkin", email = "[email protected]"},
{name = "Anastasia Galkin", email = "[email protected]"},
{name = "Yori Fournier", email = "[email protected]"},
{name = "Kirill Makan", email = "[email protected]"},
]
Expand Down Expand Up @@ -55,6 +55,7 @@ dependencies = [
"jsonfield~=3.1.0",
"lunr~=0.6.2",
"Markdown~=3.4.3",
"Pygments~=2.15.1",
"queryparser-python3~=0.6.1",
"rules~=3.3",
"XlsxWriter~=3.1.2",
Expand Down

0 comments on commit f6d6cf2

Please sign in to comment.