Welcome to mirror list, hosted at ThFree Co, Russian Federation.

single.html « _default « layouts - github.com/gurusabarish/hugo-profile.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7a93b0e20cadefef01040f27c4f596380feeae71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
{{ define "head"}}
<meta name="description" content="{{ .Params.description }}" />
<title>{{ .Title }}</title>
<style>
  article {
    font-family: 'Peddana', serif;
    line-height: 1.3;
    font-size: 30px;
  }

  article blockquote {
    margin: 0 !;
    border-left: 4px solid #248aaa !important;
    background-color: #248baa15 !important;
    padding: 0.3rem !important;
    padding-left: 1rem !important;
  }

  article blockquote>p {
    color: #3c4858 !important;
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  article h1 {
    font-size: 55px !important;
  }

  article h2 {
    font-size: 42px !important;
  }

  article h3 {
    font-size: 35px !important;
  }

  article h4,
  h5,
  h6 {
    font-size: 30px !important;
  }

  article table {
    border-radius: 0.1rem;
    background: #e5e9f2;
    border: 1px solid #c0ccda;
    padding: 0.1rem;
  }

  article table tr {
    height: 40px !important;
  }

  article table th,
  td {
    padding: 0.5rem;
    border-left: 1px solid #8392a5;
    border-bottom: 1px solid #8392a5;
  }

  article table thead tr {
    background: #248aaa;
    color: #e5e9f2;
  }

  article tbody tr:nth-child(odd) {
    background-color: #e5e9f2;
  }

  article tbody tr:hover {
    background: #c0ccda;
  }

  article img {
    width: 100%;
  }

  article caption,
  figcaption {
    caption-side: bottom;
    text-align: center;
    color: #8392a5;
  }

  article pre {
    margin: 5px;
    padding: 5%;
    font-size: 18px;
    max-height: 400px;
    border-radius: 2%;
    background-color: #1f618d !important;
    color: white;
  }

  article pre>code {
    padding: 10px !important;
  }

  article a.header-anchor {
    text-decoration: none;
    color: #1c2d41;
  }

  article a.header-anchor i {
    font-size: 10pt;
    color: #3c4858;
    display: none;
    margin-left: 0.5rem;
  }

  article a.header-anchor:hover i {
    display: inline-block;
  }

  article a.header-anchor code {
    color: #e83e8c;
  }

  article kbd {
    background-color: #248aaa !important;
    color: #f9fafc;
  }

  article mark {
    background-color: #ffc21280;
  }
</style>

{{ end }}


{{ define "main" }}

<section class="bg-white">
  <div class="container">
    <div class="row justify-content-md-center">
      <div class="col-md-8">
        <!-- title and date -->
        <div class="p-2">
          <h1>{{.Title}}</h1>
          <div class="text-muted">
            <!-- Date -->
            <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-calendar" fill="currentColor"
              xmlns="http://www.w3.org/2000/svg">
              <path fill-rule="evenodd"
                d="M1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1zm1-3a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2z" />
              <path fill-rule="evenodd"
                d="M3.5 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5zm9 0a.5.5 0 0 1 .5.5V1a.5.5 0 0 1-1 0V.5a.5.5 0 0 1 .5-.5z" />
            </svg>
            {{ dateFormat "Jan 2, 2006" .Date }}

            <!-- Author -->
            {{ if .Params.author }}
            <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-person-fill" fill="currentColor"
              xmlns="http://www.w3.org/2000/svg">
              <path fill-rule="evenodd"
                d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />
            </svg>
            {{ .Params.author }}
            {{ end }}

            <!-- Edit in Github -->
            {{ if .Params.github_link }}
            <a href="{{ .Params.github_link }}" target="_blank" title="Edit on github">
              <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-pencil float-right" fill="currentColor"
                xmlns="http://www.w3.org/2000/svg">
                <path fill-rule="evenodd"
                  d="M11.293 1.293a1 1 0 0 1 1.414 0l2 2a1 1 0 0 1 0 1.414l-9 9a1 1 0 0 1-.39.242l-3 1a1 1 0 0 1-1.266-1.265l1-3a1 1 0 0 1 .242-.391l9-9zM12 2l2 2-9 9-3 1 1-3 9-9z" />
                <path fill-rule="evenodd"
                  d="M12.146 6.354l-2.5-2.5.708-.708 2.5 2.5-.707.708zM3 10v.5a.5.5 0 0 0 .5.5H4v.5a.5.5 0 0 0 .5.5H5v.5a.5.5 0 0 0 .5.5H6v-1.5a.5.5 0 0 0-.5-.5H5v-.5a.5.5 0 0 0-.5-.5H3z" />
              </svg>
            </a>
            {{ end}}
          </div>

          {{ if .Site.Params.showdescription }}
          <div class="text-dark py-2">
            {{ .Params.description }}
          </div>
          {{ end }}
        </div>

        <div>
          <nav aria-label="breadcrumb">
            <ol class="breadcrumb">
              <!-- Initialise a scratch variable "path" to an empty string -->
              {{ $.Scratch.Set "path" "" }}
              <li><a href="/">Home</a></li>
              <!-- For each non-empty item in the URL path -->
              {{ range $element := split .RelPermalink "/" }}
              {{ if ne $element "" }}
              <!-- Add the element to the scratch variable -->
              {{ $.Scratch.Add "path" "/" }}{{ $.Scratch.Add "path" $element }}
              <!-- Populate the href from the scratch variable -->
              <span class="text-muted px-2">/</span>
              <li><a href="{{ $.Scratch.Get "path" }}">{{ humanize . }}</a></li>
              {{ end }}
              {{ end }}
            </ol>
          </nav>
        </div>
        <!-- image -->
        <div class="py-2">
          {{ with .Params.bg_image }}
          <img class="img-fluid" src="{{ . }}">
          {{ end }}
        </div>

        <!-- content -->
        <article>
          {{.Content}}
        </article>

        <!-- Tags -->
        <div class="mb-4 p-5">
          <div class="card">
            <h5 class="card-header m-0">Tags</h5>
            <div class=" card-body">
              {{ if .Params.tags }}
              {{ range .Params.tags }}
              <a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}" class="btn btn-info btn-rounded mb-2">{{  . }}</a>
              {{ end }}
              {{ end }}
            </div>
            </a>
          </div>
        </div>


        {{ template "_internal/disqus.html" . }}

      </div>
    </div>
  </div>
</section>
{{ end }}