fix: logo crop, navbar alignment, buyer names, tender URLs

- Crop logo image (remove 58% bottom whitespace)
- Logo 90px, centered with nav links
- Cursor fix restored (no I-beam on non-interactive content)
- Contracts Finder: fix empty authority_name (was looking for procurer role, CF uses buyer)
- Contracts Finder: generate notice_url from OCID when release.url is empty
- Find a Tender: fix doubled base URL in notice_url
- Dashboard: use authority_name field (not buyer) for tender cards
- Card shadows strengthened on auth pages
- Password eye icon repositioned inside input
This commit is contained in:
Peter Foster
2026-02-14 16:15:21 +00:00
parent f969ecae04
commit d1aa21c59f
5 changed files with 824 additions and 481 deletions

View File

@@ -1139,7 +1139,7 @@
<svg class="meta-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
</svg>
<span>${escapeHtml(tender.buyer || 'Unknown Buyer')}</span>
<span>${escapeHtml(tender.authority_name || tender.buyer || 'Unknown Buyer')}</span>
</div>
<div class="meta-item">
<svg class="meta-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -1251,17 +1251,17 @@
<h3>Description</h3>
<div class="detail-value">${escapeHtml(tender.description || 'No description available')}</div>
</div>
${tender.external_url ? `
${tender.notice_url ? `
<div class="detail-section">
<h3>Links</h3>
<div class="detail-value"><a href="${escapeHtml(tender.external_url)}" target="_blank" rel="noopener">View on official portal →</a></div>
<div class="detail-value"><a href="${escapeHtml(tender.notice_url)}" target="_blank" rel="noopener">View on official portal →</a></div>
</div>
` : ''}
`;
document.getElementById('modalApplyBtn').onclick = () => {
if (tender.external_url) {
window.open(tender.external_url, '_blank');
if (tender.notice_url) {
window.open(tender.notice_url, '_blank');
} else {
alert('External link not available for this tender');
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 KiB

After

Width:  |  Height:  |  Size: 306 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -36,7 +36,7 @@ async function scrapeTenders() {
const parties = release.parties || [];
// Find procuring entity
const procurer = parties.find(p => p.roles && p.roles.includes('procurer'));
const procurer = parties.find(p => p.roles && (p.roles.includes('buyer') || p.roles.includes('procuringEntity') || p.roles.includes('procurer'))) || (release.buyer ? release.buyer : null);
const sourceId = release.ocid || release.id;
const title = tender.title || 'Untitled';
@@ -45,7 +45,7 @@ async function scrapeTenders() {
const deadline = tender.tenderPeriod?.endDate;
const authority = procurer?.name || 'Unknown';
const location = planning?.budget?.description || tender.procurementMethod || '';
const noticeUrl = release.url || '';
const noticeUrl = release.url || (sourceId ? 'https://www.contractsfinder.service.gov.uk/Notice/' + sourceId.replace('ocds-b5fd17-', '') : '');
const documentsUrl = tender.documents?.length > 0 ? tender.documents[0].url : '';
// Extract value

View File

@@ -47,7 +47,8 @@ async function scrapeTenders() {
const titleLink = element.find('.search-result-header a').first();
const title = titleLink.text().trim();
const noticeUrl = 'https://www.find-tender.service.gov.uk' + titleLink.attr('href');
const rawHref = titleLink.attr('href') || '';
const noticeUrl = rawHref.startsWith('http') ? rawHref : 'https://www.find-tender.service.gov.uk' + rawHref;
// Extract source ID from URL
const urlMatch = noticeUrl.match(/\/([A-Z0-9-]+)$/);