project.html 7.26 KB
Newer Older
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
1
2
3
{{ define "main" }}
  <div class="main" role="main">
    <article class="article">
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
4
      <div class="container">
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
5
6
7
      {{ with .Params.image }}<img src="{{ . }}" class="article-image" />{{ end }}
      {{ with .Params.series }}<p class="article-title-series"><a href="{{ "/" | relURL }}series/{{ index . 0 | urlize }}/">{{ index . 0 }}</a>&nbsp;/</p>{{ end }}
      <h1 class="article-title">{{ .Title }}</h1>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
8

Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
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
      <hr class="article-title-bottom">
      <ul class="article-meta">
        <li class="article-description">{{ .Params.description }}</li>
        {{- if .Params.categories }}
        {{- range .Params.categories }}
        <li class="article-meta-categories">
          <a href="{{ "/" | relURL }}categories/{{ . | urlize }}/">
            <i class="fas fa-folder"></i>
            {{ . }}
          </a>&nbsp;
        </li>
        {{- end }}
        {{- end }}
        {{- if .Params.tags }}
        {{- range .Params.tags }}
        <li class="article-meta-tags">
          <a href="{{ "/" | relURL }}tags/{{ . | urlize }}/">
            <i class="fas fa-tag"></i>
            {{ . }}
          </a>&nbsp;
        </li>
        {{- end }}
        {{- end }}
      </ul>
      {{ partial "toc.html" . }}

Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
35
      <div class="article-content">
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
36
37

          {{- if .Params.logo }}
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
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
          <div class="row card-row">
            <div class="col card-col">
              <div class="card card-project">
                {{ with .Params.logo }}<img class="card-img-top" src="{{ . }}" alt="Card image cap"> {{ end }}
                <div class="card-body text-center">

                  {{- if .Params.github }}
                  {{ with .Params.github }}<a href="{{ . }}"><i class="fab fa-github fa-lg icon" style="color:#00a9e0"></i></a>{{ end }}
                  {{ end }}

                  {{- if .Params.gitlab }}
                  {{ with .Params.gitlab }}<a href="{{ . }}"><i class="fab fa-gitlab fa-lg icon" style="color:#00a9e0"></i></a>{{ end }}
                  {{ end }}

                  {{- if .Params.docs }}
                  {{ with .Params.docs }}<a href="{{ . }}"><i class="fas fa-book fa-lg icon" style="color:#00a9e0"></i></a>{{ end }}
                  {{ end }}

                  {{- if .Params.docker }}
                  {{ with .Params.docker }}<a href="{{ . }}"><i class="fab fa-docker fa-lg icon" style="color:#00a9e0"></i></a>{{ end }}
                  {{ end }}

                  {{- if .Params.pypi }}
                  {{ with .Params.pypi }}<a href="{{ . }}"><i class="fab fa-python fa-lg icon" style="color:#00a9e0"></i></a>{{ end }}
                  {{ end }}
                </div>
              </div>

              {{- if .Params.demos }}
                {{- if gt (len .Params.demos) 1 }}
                  <div class="card text-center card-project">
                    <div class="card-header">
                      <ul class="nav nav-tabs card-header-tabs">
                        {{ range $index, $vale := .Params.demos }}
                          {{ range where $.Site.Pages "File.BaseFileName" . }}
                            <li class="nav-item">
                              <a class="nav-link {{- if eq $index 0 }} show active {{ end }}" id="{{ .Params.id }}-tab" data-toggle="tab" href="#{{ .Params.id }}" role="tab" aria-controls="{{ .Params.id }}" aria-selected="true"> Demo {{ add $index 1 }}</a>
                            </li>
                          {{ end }}
                        {{ end }}
                      </ul>
                    </div>

                    <div class="tab-content" id="myTabContent">
                      {{ range $index, $vale := .Params.demos }}
                        {{ range where $.Site.Pages "File.BaseFileName" . }}
                          <div class="card-body tab-pane fade {{- if eq $index 0 }} show active {{ end }}" id="{{ .Params.id }}" role="tabpanel" aria-labelledby="{{ .Params.id }}-tab">
                            <h5 class="card-title"> {{ .Title }}</h5>
                            <p class="card-text"> {{ .Params.subtitle }}</p>
87
                            <a href="{{ .Params.demo }}" class="btn btn-primary">Show more</a>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
88
89
90
91
92
93
94
95
96
97
98
                          </div>
                        {{ end }}
                      {{ end }}
                    </div>
                  </div>
                {{- else if eq (len .Params.demos) 1 }}
                  {{ range where $.Site.Pages "File.BaseFileName" ( index .Params.demos 0 ) }}
                    <div class="card card-project">
                      <div class="card-body text-center">
                        <h5 class="card-title"> {{ .Title }}</h5>
                        <p class="card-text"> {{ .Params.subtitle }}</p>
99
                        <a href=" {{ .Params.demo }}" class="btn btn-primary">Show more</a>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
100
101
102
103
104
105
                      </div>
                    </div>
                  {{ end }}
                {{ end }}
                {{ end }}
              </div>
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
106
            </div>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
107
            {{ end }}
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
108

Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
109
          {{ .Content }}
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
110
111
        </div>

112
113
114
115
116
117
118
119
120
121
122
123
        <div class="related">
        {{ $relatedPages := slice }}
        {{ if .Params.related }}
          <h3>Related projects</h3>
          <div class="row">
    	        {{ range .Params.related }}
                  {{ range where $.Site.Pages "File.BaseFileName" . }}
                    {{ $relatedPages = $relatedPages | append . }}
                  <div class="col-auto mb-3" style="width: 18rem;">
                    <div class="card">
                      {{ if .Params.logo }}
                      <a href="{{ .RelPermalink }}">{{ with .Params.logo }}<img class="card-img-top" src="{{ . }}" alt="Card image cap">{{ end }}</a>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
124
                      {{ end }}
125
126
127
128
129
130
131
                      <div class="card-body">
                        <a href="{{ .RelPermalink }}"><h5 class="card-title">{{ .Title }}</h5></a>

                        {{ if .Params.subtitle }}
                        {{ with .Params.subtitle }}<p class="card-text">{{ . }}</p> {{ end }}
                        {{ end }}
                      </div>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
132
133
                    </div>
                  </div>
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
                  {{ end }}
    	       {{ end }}
          </div>
          {{ end }}

          <!-- Proyectos similares (con la misma categoria o las mismas tags) -->
          {{ $related := (where .Site.RegularPages "Section" "projects").RelatedIndices . "categories" "tags" | first 5 }}
          {{ $related := $related | complement $relatedPages }} <!-- Delete posts that are on .Params.related -->
          {{ with $related }}
          <h3>See also</h3>
          <div class="row">
    	       {{ range . }}
             <div class="col-auto mb-3" style="width: 18rem;">
              <div class="card">
                {{ if .Params.logo }}
                <a href="{{ .RelPermalink }}">{{ with .Params.logo }}<img class="card-img-top" src="{{ . }}" alt="Card image cap">{{ end }}</a>
Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
150
                {{ end }}
151
152
                <div class="card-body">
                  <a href="{{ .RelPermalink }}"><h5 class="card-title">{{ .Title }}</h5></a>
Fran Acien's avatar
Fran Acien committed
153

154
155
156
                  {{ if .Params.subtitle }}
                  {{ with .Params.subtitle }}<p class="card-text">{{ . }}</p> {{ end }}
                  {{ end }}
Fran Acien's avatar
Fran Acien committed
157

Francisco Jesús Acién Pérez's avatar
stable    
Francisco Jesús Acién Pérez committed
158

159
160
                </div>
              </div>
Fran Acien's avatar
Fran Acien committed
161
            </div>
162
    	      {{ end }}
Fran Acien's avatar
Fran Acien committed
163
          </div>
164
          {{ end }}
Fran Acien's avatar
Fran Acien committed
165
166
167
        </div>
      </div>
    </article>
Francisco Jesús Acién Pérez's avatar
adding  
Francisco Jesús Acién Pérez committed
168
169
  </div>
{{ end }}