61241bfbbff01f7888533518b5394984ee64536e lrnassar Tue Nov 18 12:16:57 2025 -0800 Adding new tip of the day feature. Only for .ucsc domains, it will display a new tip every weekday on the home page. The script generateTipOfDay.py runs weekdays and overwrites the tipOfDay page using the raw page, saving the used tips in a hash file on the running user (e.g. hive qateam), then recycling the list picking a random tip again once the full list has been run through. This is page and allTips page are autoPushed daily. Refs #19784 diff --git src/hg/htdocs/index.html src/hg/htdocs/index.html index be588892bb4..24954829683 100755 --- src/hg/htdocs/index.html +++ src/hg/htdocs/index.html @@ -141,30 +141,41 @@ return false; } } } document.getElementById('searchBarSearchButton').addEventListener('click', searchBarClick); $('#searchBarSearchString').bind('keypress', function(e) { // binds listener to url field if (e.which === 13) { // listens for return key e.preventDefault(); // prevents return from also submitting whole form searchBarClick(); } }); </script> </span></div> +<!-- Add tips message only for .ucsc Browser instances. To add a new tip, add a line to allTipsRaw.html in htdocs --> +<!--#if expr='$SERVER_NAME = /\.ucsc\.edu$/' --> + +<div style="background-color: #f0f8ff; border-left: 4px solid #4a90e2; padding: 12px 15px; margin-top: 15px; margin-left: auto; margin-right: auto; max-width: 70%; border-radius: 4px; display: flex; align-items: center; gap: 12px;"> + <img src="/images/didYouKnow.png" alt="Did you know?" style="height: 50px; width: auto; flex-shrink: 0;"> + <p style="margin: 0; font-size: 14px; line-height: 1.5; color: #333;"> + <!--#include virtual="tipOfDay.html"--> + </p> +</div> + +<!--#endif --> <div class="row"> <!-- Tools --> <!--#include virtual="ourTools.html"--> <!-- Latest Releases --> <!--#include virtual="indexReleases.html"--> </div> <!-- Meetings and Workshops --> <!--#include virtual="indexMeetings.html"--> <div class="row"> <!-- Sharing --> <!--#include virtual="indexSharing.html"-->