go-micro.dev/v5@v5.12.0/internal/website/_layouts/default.html (about) 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 6 <title>{% if page.title %}{{ page.title }} | {% endif %}Go Micro Documentation</title> 7 <style> 8 :root { 9 --bg: #ffffff; 10 --border: #e5e5e5; 11 --sidebar-width: 230px; 12 } 13 * { box-sizing: border-box; } 14 body { font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; margin:0; background: var(--bg); color:#222; } 15 a { color:#0366d6; text-decoration:none; } 16 a:hover { text-decoration:underline; } 17 header { display:flex; align-items:center; justify-content:space-between; padding:.75rem 1.5rem; background:#fff; border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20; flex-wrap:wrap; } 18 .right-tools { display:flex; align-items:center; gap:.75rem; } 19 .search-inline { position:relative; } 20 .search-inline input { padding:.4rem .6rem; border:1px solid #d0d7de; border-radius:4px; font-size:.85rem; width:160px; } 21 .search-inline input:focus { outline:none; border-color:#0366d6; } 22 .dark-toggle { cursor:pointer; background:#f6f8fa; border:1px solid #d0d7de; padding:.35rem .6rem; border-radius:4px; font-size:.75rem; } 23 .dark body, body.dark { --bg:#0d1117; --border:#30363d; color:#e6edf3; background:#0d1117; } 24 body.dark header, body.dark .sidebar, body.dark .content, body.dark footer { background:#0d1117; } 25 body.dark a { color:#58a6ff; } 26 body.dark pre { background:#161b22; border-color:#30363d; } 27 body.dark .sidebar a:hover { background:#161b22; } 28 .logo-link { display:flex; align-items:center; gap:.5rem; font-weight:600; color:#222; white-space:nowrap; } 29 .logo-link img { height:36px; } 30 header nav { display:flex; align-items:center; flex-wrap:wrap; } 31 header nav a { margin-left:1rem; font-weight:500; white-space:nowrap; } 32 .layout { display:flex; align-items:flex-start; max-width: 1400px; margin:0 auto; padding:0 1.25rem 4rem; } 33 .sidebar { width:var(--sidebar-width); padding:1.25rem .75rem 2rem; border-right:1px solid var(--border); position:sticky; top:60px; max-height:calc(100vh - 60px); overflow:auto; font-size:.9rem; } 34 .sidebar h4 { margin:1.2rem 0 .5rem; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; color:#555; } 35 .sidebar ul { list-style:none; margin:0; padding:0; } 36 .sidebar li { margin:.35rem 0; } 37 .sidebar a { color:#222; display:block; padding:.25rem .4rem; border-radius:4px; } 38 .sidebar a:hover { background:#f2f5f8; } 39 .content { flex:1; min-width:0; padding:2rem 2.5rem; } 40 .content .markdown-body { max-width: 100%; } 41 pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; } 42 pre { background:#f6f8fa; border:1px solid #d0d7de; padding:.9rem 1rem; border-radius:6px; overflow-x:auto; max-width:100%; } 43 code { word-wrap: break-word; } 44 pre code { word-wrap: normal; } 45 table { border-collapse:collapse; width:100%; overflow-x:auto; display:block; } 46 th, td { border:1px solid #d0d7de; padding:.5rem .6rem; text-align:left; } 47 th { background:#f2f5f8; } 48 img { max-width:100%; height:auto; } 49 footer { max-width:1400px; margin:0 auto; padding:2rem 1.5rem; border-top:1px solid var(--border); font-size:.8rem; color:#555; } 50 .menu-toggle { display:none; background:#0366d6; color:#fff; border:none; padding:.5rem .75rem; border-radius:4px; cursor:pointer; font-size:.85rem; margin-left:auto; } 51 .sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:25; } 52 .sidebar-overlay.active { display:block; } 53 @media (max-width: 900px) { 54 header { padding:.5rem 1rem; } 55 header nav a { margin-left:.5rem; font-size:.85rem; } 56 .logo-link { font-size:1.1rem !important; } 57 .logo-link img { height:28px; } 58 .menu-toggle { display:block; } 59 .layout { padding:0; } 60 .sidebar { position:fixed; left:-100%; top:60px; bottom:0; width:280px; max-width:85vw; background:var(--bg); border-right:1px solid var(--border); border-bottom:none; z-index:30; transition:left 0.3s ease; overflow-y:auto; padding:1rem; } 61 .sidebar.active { left:0; } 62 .content { width:100%; padding:1.5rem 1rem; } 63 .content h1 { font-size:1.75rem; margin-top:0; } 64 .content h2 { font-size:1.4rem; } 65 .content h3 { font-size:1.15rem; } 66 pre { padding:.6rem; font-size:.8rem; overflow-x:auto; white-space:pre; } 67 table { font-size:.85rem; } 68 footer { padding:1.5rem 1rem; font-size:.75rem; } 69 } 70 @media (max-width: 480px) { 71 header nav a { font-size:.75rem; margin-left:.4rem; } 72 .logo-link span { font-size:1rem !important; } 73 .content { padding:1rem .75rem; } 74 .content h1 { font-size:1.5rem; } 75 .content h2 { font-size:1.25rem; } 76 pre { font-size:.75rem; padding:.5rem; } 77 .sidebar { width:100%; max-width:100%; } 78 } 79 </style> 80 </head> 81 <body> 82 <header> 83 <a class="logo-link" href="/"> 84 <img src="/images/logo.png" alt="Go Micro Logo"> 85 <span style="font-size: 1.3rem; font-weight: bold; color: #222;">Go Micro</span> 86 </a> 87 <button class="menu-toggle" id="menuToggle">☰ Menu</button> 88 <nav> 89 <a href="/docs/">Docs</a> 90 <a href="/docs/search.html">Search</a> 91 <a href="https://github.com/micro/go-micro" target="_blank" rel="noopener">GitHub</a> 92 <a href="/">Home</a> 93 </nav> 94 </header> 95 <div class="sidebar-overlay" id="sidebarOverlay"></div> 96 <div class="layout"> 97 <aside class="sidebar"> 98 {% assign nav = site.data.navigation %} 99 {% for section in nav %} 100 {% unless section[0] == 'search_order' %} 101 <h4>{{ section[0] | capitalize }}</h4> 102 <ul> 103 {% for item in section[1] %} 104 <li><a href="{{ item.url }}" {% if item.url == page.url %}style="font-weight:600"{% endif %}>{{ item.title }}</a></li> 105 {% endfor %} 106 </ul> 107 {% endunless %} 108 {% endfor %} 109 </aside> 110 <main class="content markdown-body"> 111 {% assign crumbs = page.url | split:'/' %} 112 {% assign docs_root = site.baseurl | append: '/' %} 113 {% if page.url != docs_root and page.url contains docs_root %} 114 <nav style="font-size:.75rem; margin-bottom:1rem;"> 115 <a href="/docs/">Docs</a> 116 {% capture path_acc %}/docs{% endcapture %} 117 {% for c in crumbs %} 118 {% if forloop.index0 > 1 and c != '' %} 119 {% capture path_acc %}{{ path_acc }}/{{ c }}{% endcapture %} 120 › <a href="{{ path_acc }}/">{{ c | replace:'.html','' | replace:'index','' | replace:'realworld','Real-World' | replace:'guides','Guides' | replace:'migration','Migration' | replace:'architecture','Architecture' | replace:'examples','Examples' | replace:'config','Configuration' | replace:'observability','Observability' | capitalize }}</a> 121 {% endif %} 122 {% endfor %} 123 </nav> 124 {% endif %} 125 {{ content }} 126 {% assign order = site.data.navigation.search_order %} 127 {% if page.url %} 128 {% assign current_index = -1 %} 129 {% for u in order %} 130 {% if u == page.url %}{% assign current_index = forloop.index0 %}{% endif %} 131 {% endfor %} 132 {% if current_index != -1 %} 133 <hr style="margin:2.5rem 0;" /> 134 <div style="display:flex; justify-content:space-between; font-size:.85rem;"> 135 <div> 136 {% if current_index > 0 %} 137 {% assign prev_url = order[current_index | minus: 1] %} 138 <a href="{{ prev_url }}">← Previous</a> 139 {% endif %} 140 </div> 141 <div> 142 {% assign next_index = current_index | plus: 1 %} 143 {% if next_index < order.size %} 144 {% assign next_url = order[next_index] %} 145 <a href="{{ next_url }}">Next →</a> 146 {% endif %} 147 </div> 148 </div> 149 {% endif %} 150 {% endif %} 151 </main> 152 </div> 153 <footer> 154 © {{ site.time | date: '%Y' }} Go Micro. Apache 2.0 Licensed. <a href="/docs/">Docs</a> · <a href="/docs/search.html">Search</a> · <a href="https://github.com/micro/go-micro">GitHub</a> · <a href="https://github.com/micro/go-micro/issues/new?labels=question&template=question.md" style="opacity:0.7">Support</a> 155 </footer> 156 <script> 157 (function(){ 158 const key='gm.dark'; 159 function apply(){ 160 if(localStorage.getItem(key)==='1'){ 161 document.body.classList.add('dark'); 162 } else { 163 document.body.classList.remove('dark'); 164 } 165 } 166 apply(); 167 const btn=document.getElementById('dark-toggle'); 168 if(btn){ 169 btn.addEventListener('click', function(){ 170 localStorage.setItem(key, localStorage.getItem(key)==='1' ? '0' : '1'); 171 apply(); 172 }); 173 } 174 // Mobile menu toggle 175 const menuToggle = document.getElementById('menuToggle'); 176 const sidebar = document.querySelector('.sidebar'); 177 const overlay = document.getElementById('sidebarOverlay'); 178 if(menuToggle && sidebar && overlay){ 179 menuToggle.addEventListener('click', function(){ 180 sidebar.classList.toggle('active'); 181 overlay.classList.toggle('active'); 182 }); 183 overlay.addEventListener('click', function(){ 184 sidebar.classList.remove('active'); 185 overlay.classList.remove('active'); 186 }); 187 // Close sidebar when clicking a link 188 sidebar.querySelectorAll('a').forEach(function(link){ 189 link.addEventListener('click', function(){ 190 sidebar.classList.remove('active'); 191 overlay.classList.remove('active'); 192 }); 193 }); 194 } 195 })(); 196 </script> 197 </body> 198 </html>