from pathlib import Path p = Path('/opt/tylorindar-safelink/static/index.html') t = p.read_text(encoding='utf-8') css = ''' /* LD FDPI detail card */ .ld-app-card { cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease; } .ld-app-card:hover { border-color: rgba(143,227,245,.45); box-shadow: 0 16px 40px rgba(0,0,0,.28); } .ld-app-stretch { position: absolute; inset: 0; z-index: 1; border-radius: 16px; } .ld-app-card .ld-app-btn, .ld-app-card .ld-app-actions { position: relative; z-index: 2; } .ld-app-btn-detail { background: rgba(143,227,245,.08); border-color: rgba(143,227,245,.28); color: #bdeff8; } .ld-app-btn-detail:hover { background: rgba(143,227,245,.14); } ''' if '.ld-app-stretch' not in t: t = t.replace('', css + '', 1) needle = '
' if needle in t and 'class="ld-app-stretch"' not in t: t = t.replace( needle, needle + '\n ', 1, ) needle2 = '' if needle2 in t and 'ld-app-btn-detail' not in t: t = t.replace( needle2, 'Detayları Gör →' + needle2, 1, ) p.write_text(t, encoding='utf-8') print('card clickable/detail link added')