Explorar o código

# feat:文章标题添加跳转文章详情

yang yi hai 1 semana
pai
achega
26283bbda6

+ 1 - 1
pythonweb/admissionsAndEmploymentApp/templates/admissionsAndEmployment.html

@@ -28,7 +28,7 @@
                         <img src="{{ article.cover }}" alt="{{ article.title }}" class="img-responsive" style="height:200px;object-fit:cover;">
                         {% endif %}
                         <div class="caption">
-                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{ article.title }}</h4>
+                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"><a href="{%url 'article' id=article.id%}" target="_blank">{{ article.title }}</a></h4>
                             <p style="text-align:center;color:#999;">{{ article.created_at|date:"Y-m-d" }}</p>
                         </div>
                     </div>

+ 1 - 1
pythonweb/partyApp/templates/party.html

@@ -28,7 +28,7 @@
                         <img src="{{ article.cover }}" alt="{{ article.title }}" class="img-responsive" style="height:200px;object-fit:cover;">
                         {% endif %}
                         <div class="caption">
-                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{ article.title }}</h4>
+                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"><a href="{%url 'article' id=article.id%}" target="_blank">{{ article.title }}</a></h4>
                             <p style="text-align:center;color:#999;">{{ article.created_at|date:"Y-m-d" }}</p>
                         </div>
                     </div>

+ 1 - 1
pythonweb/scientificApp/templates/scientific.html

@@ -25,7 +25,7 @@
                         <img src="{{ article.cover }}" alt="{{ article.title }}" class="img-responsive" style="height:200px;object-fit:cover;">
                         {% endif %}
                         <div class="caption">
-                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{ article.title }}</h4>
+                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"><a href="{%url 'article' id=article.id%}" target="_blank">{{ article.title }}</a></h4>
                             <p style="text-align:center;color:#999;">{{ article.created_at|date:"Y-m-d" }}</p>
                         </div>
                     </div>

+ 1 - 1
pythonweb/teamApp/templates/team.html

@@ -43,7 +43,7 @@
                         <img src="{{ article.cover }}" alt="{{ article.title }}" class="img-responsive" style="height:200px;object-fit:cover;">
                         {% endif %}
                         <div class="caption">
-                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;">{{ article.title }}</h4>
+                            <h4 style="text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;"><a href="{%url 'article' id=article.id%}" target="_blank">{{ article.title }}</a></h4>
                             <p style="text-align:center;color:#999;">{{ article.created_at|date:"Y-m-d" }}</p>
                         </div>
                     </div>