~netlandish/links

7d0d0bcffec407ff287e61efac26a835d66123f8 — Peter Sanchez 4 days ago b268734 master
Adding default marker on link listings page
2 files changed, 14 insertions(+), 1 deletions(-)

M list/routes.go
M templates/listing_list.html
M list/routes.go => list/routes.go +1 -0
@@ 998,6 998,7 @@ func (s *Service) ListingList(c echo.Context) error {
	pd.Data["exclude_tags"] = lt.Translate("Exclude Tags")
	pd.Data["apply"] = lt.Translate("Apply")
	pd.Data["clear"] = lt.Translate("Clear")
	pd.Data["is_default"] = lt.Translate("Is Default")

	type GraphQLResponse struct {
		Listings struct {

M templates/listing_list.html => templates/listing_list.html +13 -1
@@ 36,6 36,7 @@
                  <th class="text-uppercase">{{.pd.Data.title}}</th>
                  <th class="text-uppercase">{{.pd.Data.tags}}</th>
                  <th class="text-uppercase">URL</th>
                  <th class="text-uppercase">{{ .pd.Data.is_default }}</th>
                  <th></th>
              </tr>
          </thead>


@@ 49,7 50,7 @@
                          <small>{{formatDate .CreatedOn}}</small>
                      </time>
                  </td>
                  <td>
		  <td>
                      <div class="link-tag">
                          {{if .Tags}}
                          {{range .Tags}}


@@ 64,6 65,17 @@
                      </div>
                  </td>
                  <td><a href="{{buildServiceURL .LookupName .Slug}}" target="_blank">{{truncate (buildServiceURL .LookupName .Slug) 50}}</a></td>
		  <td>
                    {{if .IsDefault}}
                        <svg style="width:20px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="text-primary">
                          <path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
                        </svg>
                    {{else}}
                        <svg style="width:20px" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="text-error">
                          <path stroke-linecap="round" stroke-linejoin="round" d="m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" />
                        </svg>
                    {{end}}
                  </td>
                  <td>
                      <details class="dropdown">
                          <summary class="button outline is-small">{{$.pd.Data.actions}}</summary>