smithy

commit a9f07c700e6fbcf811906043839509d4d6a7275b

Author: Pedro Lucas Porcellis <porcellis@eletrotupi.com>

Add support for selecting source code line

I've also removed the fixed top bar, as it was overlapping with the
highlighted line code. It didn't serve a greater purpose as well.

 go.mod | 2 +-
 go.sum | 2 ++
 include/header.html | 2 +-
 include/style.css | 1 -
 pkg/smithy/smithy.go | 1 +


diff --git a/go.mod b/go.mod
index 3a89083785f45b8cf5b3c951fcaec29917b78d90..2fd36ea904a869d171cfeb23b660f98baeec4013 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@
 go 1.15
 
 require (
-	github.com/alecthomas/chroma v0.8.1
+	github.com/alecthomas/chroma v0.8.2
 	github.com/gin-gonic/gin v1.6.3
 	github.com/go-git/go-git/v5 v5.1.0
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect




diff --git a/go.sum b/go.sum
index 52b66f0ce43a687d4d8acb69499a7833e8520133..11eb64f6e3294e89ca096101e447c07ab48b9316 100644
--- a/go.sum
+++ b/go.sum
@@ -11,6 +11,8 @@ github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI=
 github.com/alecthomas/chroma v0.7.2-0.20200305040604-4f3623dce67a/go.mod h1:fv5SzZPFJbwp2NXJWpFIX7DZS4HgV1K4ew4Pc2OZD9s=
 github.com/alecthomas/chroma v0.8.1 h1:ym20sbvyC6RXz45u4qDglcgr8E313oPROshcuCHqiEE=
 github.com/alecthomas/chroma v0.8.1/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM=
+github.com/alecthomas/chroma v0.8.2 h1:x3zkuE2lUk/RIekyAJ3XRqSCP4zwWDfcw/YJCuCAACg=
+github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM=
 github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo=
 github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0=
 github.com/alecthomas/kong v0.1.17-0.20190424132513-439c674f7ae0/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI=




diff --git a/include/header.html b/include/header.html
index 70757c3c2382fcda4801938d979fbdb6d8825994..dcf0bb37db5cbaa4772c64f31678b70a9cca157b 100644
--- a/include/header.html
+++ b/include/header.html
@@ -10,7 +10,7 @@         
         <link rel="stylesheet" href="{{ css }}" />
     </head>
     <body>
-        <nav class="navbar navbar-expand navbar-light bg-light fixed-top">
+        <nav class="navbar navbar-expand navbar-light bg-light">
             <a class="navbar-brand" href="/">{{ .Site.Title }}</a>
             <div class="collapse navbar-collapse" id="navbarSupportedContent">
                 <ul class="navbar-nav mr-auto">




diff --git a/include/style.css b/include/style.css
index e30af43ca9f6a6afd0e2207a9292afcf3d16f03e..077c8a9cb3202f5c5074ccc2249c9df6ac4888b2 100644
--- a/include/style.css
+++ b/include/style.css
@@ -9,7 +9,6 @@
 body {
   color: #333;
   font-family: "FiraCode", "FiraMono", "Menlo", "Ubuntu Mono", "IBM Plex Mono";
-  margin-top: 80px;
 }
 
 td {




diff --git a/pkg/smithy/smithy.go b/pkg/smithy/smithy.go
index 6690a750c04b134fdc5565b80c35987125d44d50..4cea80e3d09b2f4d2106aae874f249891946b519 100644
--- a/pkg/smithy/smithy.go
+++ b/pkg/smithy/smithy.go
@@ -203,6 +203,7 @@
 	formatter := html.New(
 		html.WithClasses(true),
 		html.WithLineNumbers(true),
+		html.LineNumbersInTable(true),
 		html.LinkableLineNumbers(true, "L"),
 	)