Skip to content

Instantly share code, notes, and snippets.

@pigreco
Last active November 23, 2025 09:45
Show Gist options
  • Select an option

  • Save pigreco/f629549719fd8fa90e299a7e51567f21 to your computer and use it in GitHub Desktop.

Select an option

Save pigreco/f629549719fd8fa90e299a7e51567f21 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pigreco
Copy link
Author

pigreco commented Nov 14, 2025

Map Tips

<div style="text-align: center; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; padding: 15px; background: white; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); min-width: 200px;">
  
  <div style="text-align: center; margin-bottom: 10px;">
    [% 
      CASE 
        WHEN "total_commits" > 20000 OR "username" = 'timlinux' THEN 
          '<span style="background: #ff0000; color: white; font-weight: bold; padding: 5px 12px; display: inline-block; border-radius: 4px; font-size: 11px;">πŸ‘‘ LEGEND</span>'
        ELSE ''
      END 
    %]
  </div>
  
  <div style="position: relative; display: inline-block;">
    <img src="[% "avatar_url" %]" style="width: 100px; height: 100px; border-radius: 50%; border: 3px solid #e1e4e8;">
    <span style="position: absolute; bottom: 0; right: 0; background: #28a745; color: white; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; border: 2px solid white;">[% "ranking" %]</span>
  </div>
  
  <h3 style="margin: 10px 0 5px 0; font-size: 18px; font-weight: 600;">
  <a href="[% "github_url" %]" target="_blank" style="color: #0366d6; text-decoration: none; transition: all 0.2s;" onmouseover="this.style.textDecoration='underline'; this.style.color='#0969da';" onmouseout="this.style.textDecoration='none'; this.style.color='#0366d6';">
    [% "name" %]
  </a>
  </h3>
  
  <h3 style="margin: 1px 0 5px 0; font-size: 12px; font-weight: 600;">
  <a href="[% "github_url" %]" target="_blank" style="color: #000000; text-decoration: none; transition: all 0.2s;" onmouseover="this.style.textDecoration='underline'; this.style.color='#0969da';" onmouseout="this.style.textDecoration='none'; this.style.color='#0366d6';">
    [% '('|| "username" ||')' %]
  </a>
  </h3>
  
  <p style="color: #586069; margin: 5px 0 10px 0; font-size: 14px;">
    [% 
     CASE 
       WHEN "total_commits" <= 10 THEN '🌱'
       WHEN "total_commits" <= 100 THEN 'πŸ₯‰'
       WHEN "total_commits" <= 1000 THEN 'πŸ₯ˆ'
       WHEN "total_commits" <= 5000 THEN 'πŸ₯‡'
       WHEN "total_commits" <= 20000 THEN 'πŸ’Ž'
     ELSE 'πŸ‘‘'
     END 
    %] 
    [% "total_commits" %] commits
  </p>
  
  [% 
    CASE 
      WHEN "qgis_core_commits" > 0 THEN 
        '<div style="background: linear-gradient(135deg, #6a9955 0%, #5a8945 100%); color: white; padding: 8px 12px; border-radius: 6px; margin: 6px 0; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
          <span style="font-size: 12px;">πŸš€ QGIS Core</span>
          <span style="font-weight: bold;">⭐ ' || "qgis_core_commits" || '</span>
        </div>'
      ELSE ''
    END 
  %]
  
  [% 
    CASE 
      WHEN "qgis_docs_commits" > 0 THEN 
        '<div style="background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%); color: white; padding: 8px 12px; border-radius: 6px; margin: 6px 0; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
          <span style="font-size: 12px;">πŸ“„ QGIS Documentation</span>
          <span style="font-weight: bold;">❀️ ' || "qgis_docs_commits" || '</span>
        </div>'
      ELSE ''
    END 
  %]
  
  [% 
    CASE 
      WHEN "qgis_web_commits" > 0 THEN 
        '<div style="background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%); color: white; padding: 8px 12px; border-radius: 6px; margin: 6px 0; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,0.1);">
          <span style="font-size: 12px;">🌐 QGIS Web Sites</span>
          <span style="font-weight: bold;">❀️ ' || "qgis_web_commits" || '</span>
        </div>'
      ELSE ''
    END 
  %]
  
  <p style="color: #586069; margin: 10px 0 0 0; font-size: 11px;">
    πŸ“ [% "location" %]
  </p>
  
</div>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment