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:
@@ -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');
|
||||
}
|
||||
|
||||
BIN
public/logo.png
BIN
public/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 548 KiB After Width: | Height: | Size: 306 KiB |
1288
public/styles.css
1288
public/styles.css
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
|
||||
@@ -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-]+)$/);
|
||||
|
||||
Reference in New Issue
Block a user