Skip to content

Instantly share code, notes, and snippets.

@hectorcorrea
Created November 17, 2020 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hectorcorrea/88bc58afce030c84bad039b79f14f78b to your computer and use it in GitHub Desktop.
Save hectorcorrea/88bc58afce030c84bad039b79f14f78b to your computer and use it in GitHub Desktop.
Sample one.html for SolrDora using hard-coded fields. Allows to easily set the display order.
{{ define "content" }}
<style>
/* https://stackoverflow.com/a/22955585/446681 */
.input-group{
width: 100%;
}
.input-group-addon{
width: 15%;
text-align: left;
}
.form-control {
width: 85%;
}
</style>
<div class="row">
<div class="col-md-12">
{{ $doc := . }}
<!-- id -->
<div class="input-group">
<span class="input-group-addon">Id</span>
{{ range $value := $doc.Values "id" }}
<input type="text" value="{{ $value }}" class="form-control">
{{ end }}
</div>
<!-- Title -->
<div class="input-group">
<span class="input-group-addon">Title</span>
{{ range $value := $doc.Values "title_txt_en" }}
<input type="text" value="{{ $value }}" class="form-control">
{{ end }}
</div>
<!-- Authors -->
<div class="input-group">
<span class="input-group-addon">Authors</span>
{{ range $value := $doc.Values "authors_all_txts_en" }}
<input type="text" value="{{ $value }}" class="form-control">
{{ end }}
</div>
<!-- Subjects -->
<div class="input-group">
<span class="input-group-addon">Subjects</span>
{{ range $value := $doc.Values "subjects_txts_en" }}
<input type="text" value="{{ $value }}" class="form-control">
{{ end }}
</div>
</div> <!-- col-md-12 -->
</div>
{{ end }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment