Skip to content
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 src/_includes/profile_common.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
Provides: search/autocomplete, share button, URL bar management, utility functions.
Usage: include profile_common.html (with liquid curly-percent tags)
-->
<link rel="stylesheet" href="{{ '/assets/css/reprodb-search-hero.css' | relative_url }}">
<link rel="stylesheet" href="{{ '/assets/css/reprodb-profile.css' | relative_url }}">
<script src="{{ '/assets/js/reprodb-profile.js' | relative_url }}"></script>
49 changes: 3 additions & 46 deletions src/assets/css/reprodb-profile.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,24 @@
/* reprodb-profile.css — Styles for the unified profile page and profile_common. */
/* reprodb-profile.css — Styles for the unified profile page and profile_common.
Search box & hero base styles are in reprodb-search-hero.css (shared). */

/* ── Search hero container ─────────────────────────────────────────────── */
/* ── Profile-specific hero overrides ───────────────────────────────────── */
.profile-search-hero {
display: flex;
align-items: center;
justify-content: center;
min-height: 40vh;
text-align: center;
transition: min-height 0.4s ease, padding 0.4s ease;
padding: 0 16px;
}
.profile-search-hero.has-profile {
min-height: 0;
padding-top: 8px;
padding-bottom: 0;
}
.profile-search-hero-inner {
width: 100%;
max-width: 600px;
transition: max-width 0.4s ease;
}
.profile-search-hero.has-profile .profile-search-hero-inner {
max-width: 480px;
}
.profile-search-heading {
font-size: 1.4em;
font-weight: 400;
color: #555;
margin-bottom: 16px;
transition: font-size 0.4s ease, margin 0.4s ease, opacity 0.3s ease;
}
Expand All @@ -38,31 +30,6 @@
height: 0;
}

/* ── Search box ────────────────────────────────────────────────────────── */
.profile-search-box {
display: block;
width: 100%;
padding: 14px 48px 14px 20px;
font-size: 1.1em;
border: 2px solid #ddd;
border-radius: 28px;
outline: none;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: box-shadow 0.2s, border-color 0.2s;
box-sizing: border-box;
}
.profile-search-box:focus {
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
border-color: #4285f4;
}
.profile-search-icon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
}

/* ── Autocomplete results ──────────────────────────────────────────────── */
.profile-search-results { list-style:none; padding:0; margin:4px 0 0 0; max-height:260px; overflow-y:auto; border:1px solid #ddd; border-radius:12px; position:absolute; background:#fff; z-index:100; width:100%; box-shadow: 0 4px 16px rgba(0,0,0,0.10); }
.profile-search-results li { padding:8px 14px; cursor:pointer; border-bottom:1px solid #f0f0f0; }
Expand Down Expand Up @@ -159,11 +126,6 @@
/* ── Dark-mode overrides ───────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .profile-search-heading { color: #aab0b8; }
html:not([data-theme="light"]) .profile-search-box {
background-color: #1e2127; color: #d6d9dc; border-color: #4a4f57;
}
html:not([data-theme="light"]) .profile-search-box:focus { border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) .profile-search-icon { stroke: #888; }
html:not([data-theme="light"]) .profile-search-results {
background: #1e2127; border-color: #4a4f57; color: #d6d9dc; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
Expand Down Expand Up @@ -192,11 +154,6 @@
html:not([data-theme="light"]) .avail-warn { color: #f0c040; background: #332b00; border-color: #665500; }
}
html[data-theme="dark"] .profile-search-heading { color: #aab0b8; }
html[data-theme="dark"] .profile-search-box {
background-color: #1e2127; color: #d6d9dc; border-color: #4a4f57;
}
html[data-theme="dark"] .profile-search-box:focus { border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html[data-theme="dark"] .profile-search-icon { stroke: #888; }
html[data-theme="dark"] .profile-search-results {
background: #1e2127; border-color: #4a4f57; color: #d6d9dc; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
Expand Down
108 changes: 108 additions & 0 deletions src/assets/css/reprodb-search-hero.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
/* reprodb-search-hero.css — Shared search hero styles for index and profile pages.
Provides the collapsible hero container, search box, and search icon. */

/* ── Hero container ────────────────────────────────────────────────────── */
.rdb-search-hero {
display: flex;
align-items: center;
justify-content: center;
min-height: 30vh;
transition: min-height 0.4s ease, padding 0.4s ease;
padding: 0 16px;
}
.rdb-search-hero.has-results {
min-height: 0;
padding-top: 8px;
padding-bottom: 0;
}
.rdb-search-hero-inner {
width: 100%;
max-width: 720px;
transition: max-width 0.4s ease;
}
.rdb-search-hero.has-results .rdb-search-hero-inner {
max-width: 720px;
}

/* ── Tagline / heading that fades out ──────────────────────────────────── */
.rdb-search-tagline {
font-size: 0.92em;
color: #555;
margin-bottom: 16px;
line-height: 1.6;
text-align: justify;
transition: font-size 0.35s ease, margin 0.35s ease, opacity 0.3s ease,
max-height 0.35s ease, padding 0.35s ease;
max-height: 8em;
overflow: hidden;
}
@media (max-width: 600px) {
.rdb-search-tagline { font-size: 0.88em; }
}
.rdb-search-hero.has-results .rdb-search-tagline {
font-size: 0;
margin: 0;
opacity: 0;
max-height: 0;
padding: 0;
}

/* ── Search box (shared between profile and artifact search) ───────────── */
.rdb-search-box-wrap {
position: relative;
width: 100%;
}
.rdb-search-input {
display: block;
width: 100%;
padding: 14px 48px 14px 20px;
font-size: 1.1em;
border: 2px solid #ddd;
border-radius: 28px;
outline: none;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: box-shadow 0.2s, border-color 0.2s;
box-sizing: border-box;
background: #fff;
color: #333;
}
.rdb-search-input:focus {
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
border-color: #4285f4;
}
.rdb-search-icon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
}
.rdb-search-clear {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}

/* ── Dark-mode ─────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) .rdb-search-tagline { color: #aab0b8; }
html:not([data-theme="light"]) .rdb-search-input {
background: #1e2127; color: #d6d9dc; border-color: #4a4f57;
}
html:not([data-theme="light"]) .rdb-search-input:focus {
border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
html:not([data-theme="light"]) .rdb-search-icon { stroke: #888; }
html:not([data-theme="light"]) .rdb-search-clear { stroke: #888; }
}
html[data-theme="dark"] .rdb-search-tagline { color: #aab0b8; }
html[data-theme="dark"] .rdb-search-input {
background: #1e2127; color: #d6d9dc; border-color: #4a4f57;
}
html[data-theme="dark"] .rdb-search-input:focus {
border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
html[data-theme="dark"] .rdb-search-icon { stroke: #888; }
html[data-theme="dark"] .rdb-search-clear { stroke: #888; }
126 changes: 41 additions & 85 deletions src/assets/css/reprodb-search.css
Original file line number Diff line number Diff line change
@@ -1,105 +1,65 @@
/* reprodb-search.css — Styles for the main search / index page. */
/* reprodb-search.css — Styles for the main search / index page.
Search box & hero styles are in reprodb-search-hero.css (shared). */

/* ── Search container ──────────────────────────────────────────────────── */
html { overflow-y: scroll; }
#search-container {
max-width: 720px;
margin: 2em auto;
text-align: center;
}
.rdb-search-box-wrap {
position: relative;
width: 100%;
}
#searchBox {
display: block;
width: 100%;
padding: 14px 48px 14px 20px;
font-size: 1.1em;
border: 2px solid #ddd;
border-radius: 28px;
outline: none;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: box-shadow 0.2s, border-color 0.2s;
box-sizing: border-box;
background: #fff;
color: #333;
}
#searchBox:focus {
box-shadow: 0 4px 16px rgba(0,0,0,0.12);
border-color: #4285f4;
}
.rdb-search-icon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
pointer-events: none;
}
#clearIcon {
position: absolute;
right: 16px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
}

/* ── Filters row ───────────────────────────────────────────────────────── */
/* ── Filters / toolbar row ─────────────────────────────────────────── */
#filters {
margin-top: 12px;
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 10px;
justify-content: center;
gap: 8px;
align-items: center;
}
#filters select {
padding: 8px 12px;
padding: 6px 10px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 0.95em;
font-size: 0.9em;
background: #fff;
}
.rdb-area-checks {
.rdb-search-status {
margin-left: auto;
font-size: 0.85em;
color: #666;
white-space: nowrap;
}
#sortSelect {
font-size: 0.85em;
}

/* ── Icon action buttons ──────────────────────────────────────────── */
.rdb-action-btns {
display: inline-flex;
gap: 10px;
gap: 2px;
align-items: center;
}
.rdb-area-checks label {
.rdb-icon-btn {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 0.95em;
cursor: pointer;
user-select: none;
}

/* ── Status & action buttons ───────────────────────────────────────────── */
#searchStatus {
margin-top: 8px;
font-size: 0.9em;
color: #666;
display: inline;
}
.rdb-search-action-btn {
margin-left: 10px;
padding: 4px 14px;
justify-content: center;
width: 28px;
height: 28px;
padding: 0;
border: 1px solid #ccc;
border-radius: 4px;
background: #fff;
cursor: pointer;
font-size: 0.9em;
vertical-align: middle;
}
#shareBtn.rdb-search-action-btn { margin-left: 6px; }

/* ── Sort controls ─────────────────────────────────────────────────────── */
#sort-controls {
margin-top: 1em;
margin-bottom: 8px;
font-size: 0.9em;
color: #555;
transition: background 0.15s, color 0.15s;
position: relative;
}
.rdb-icon-btn:hover {
background: #f0f0f0;
color: #333;
}
.rdb-icon-btn svg {
display: block;
}
#sort-controls a { margin-left: 6px; }

/* ── Profile cards (author/institution cards in search results) ─────── */
#profileCards {
Expand Down Expand Up @@ -154,10 +114,9 @@

/* ── Dark mode ─────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
html:not([data-theme="light"]) #searchBox { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html:not([data-theme="light"]) #searchBox:focus { border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html:not([data-theme="light"]) #filters select { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html:not([data-theme="light"]) .rdb-search-action-btn { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html:not([data-theme="light"]) .rdb-icon-btn { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html:not([data-theme="light"]) .rdb-icon-btn:hover { background: #2a3038; color: #fff; }
html:not([data-theme="light"]) #pagination button { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html:not([data-theme="light"]) .profile-card { background: #23272d; border-color: #4a4f57; color: #d6d9dc; }
html:not([data-theme="light"]) .profile-card:hover { border-color: #5a9cf5; }
Expand All @@ -166,14 +125,12 @@
html:not([data-theme="light"]) .rdb-result-meta { color: #aab0b8; }
html:not([data-theme="light"]) .rdb-badge { background: #2e3d2e; color: #c8e6c9; }
html:not([data-theme="light"]) .rdb-badge--award { background: #3d3525; color: #ffe0b2; }
html:not([data-theme="light"]) #searchStatus { color: #aab0b8; }
html:not([data-theme="light"]) #sort-controls { color: #aab0b8; }
html:not([data-theme="light"]) .rdb-search-status { color: #aab0b8; }
html:not([data-theme="light"]) #noResults { color: #888; }
}
html[data-theme="dark"] #searchBox { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html[data-theme="dark"] #searchBox:focus { border-color: #5a9cf5; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
html[data-theme="dark"] #filters select { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html[data-theme="dark"] .rdb-search-action-btn { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html[data-theme="dark"] .rdb-icon-btn { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html[data-theme="dark"] .rdb-icon-btn:hover { background: #2a3038; color: #fff; }
html[data-theme="dark"] #pagination button { background: #1e2127; color: #d6d9dc; border-color: #4a4f57; }
html[data-theme="dark"] .profile-card { background: #23272d; border-color: #4a4f57; color: #d6d9dc; }
html[data-theme="dark"] .profile-card:hover { border-color: #5a9cf5; }
Expand All @@ -182,6 +139,5 @@ html[data-theme="dark"] .rdb-result-authors { color: #aab0b8; }
html[data-theme="dark"] .rdb-result-meta { color: #aab0b8; }
html[data-theme="dark"] .rdb-badge { background: #2e3d2e; color: #c8e6c9; }
html[data-theme="dark"] .rdb-badge--award { background: #3d3525; color: #ffe0b2; }
html[data-theme="dark"] #searchStatus { color: #aab0b8; }
html[data-theme="dark"] #sort-controls { color: #aab0b8; }
html[data-theme="dark"] .rdb-search-status { color: #aab0b8; }
html[data-theme="dark"] #noResults { color: #888; }
Loading