From 44205a6a81662fb0baafa8e79c7eadc0a6e3e484 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Fri, 16 Sep 2016 19:12:47 +0200
Subject: [PATCH] Add feeds page and feeds icon

---
 .../static/scipost/images/feed-icon-14x14.png | Bin 0 -> 689 bytes
 .../static/scipost/images/feed-icon-28x28.png | Bin 0 -> 1737 bytes
 scipost/templates/scipost/feeds.html          |  29 +++
 scipost/templates/scipost/index.html          |   2 +-
 scipost/urls.py                               |   1 +
 static/scipost/SciPost.css                    | 189 +++++++++++++++++-
 6 files changed, 219 insertions(+), 2 deletions(-)
 create mode 100755 scipost/static/scipost/images/feed-icon-14x14.png
 create mode 100755 scipost/static/scipost/images/feed-icon-28x28.png
 create mode 100644 scipost/templates/scipost/feeds.html

diff --git a/scipost/static/scipost/images/feed-icon-14x14.png b/scipost/static/scipost/images/feed-icon-14x14.png
new file mode 100755
index 0000000000000000000000000000000000000000..b3c949d2244f2c0c81d65e74719af2a1b56d06a3
GIT binary patch
literal 689
zcmV;i0#5yjP)<h;3K|Lk000e1NJLTq000gE000gM1^@s6A4o0H00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU!LrFwIRCwBq
zl1)eyVHn4M^Ulo9v@t~@+ZN^_p-4n3!zl8WhftwQbP(%Mhi;zwxJA&VI<E(BK|x3b
zLQ)Y?)FFfX%E%>(tky!*UETcH-TCU7SrqEjJM#?B`_A)!p7(kFf9-P@=@15kkTkGK
zgFusyy#KECqZzRdBLb=P?$(kUP;>kYTDeG&{|a+iOiRbI6nbQ)j#7bOf>iF=<d6}D
z?Dawoy?!4%yRZFKV)gwa+~EwmpT{&6=we<e`gOpNYbirA8ivozol9s+l59<pY-qu0
z?gX*Q=xu`Wev~FaWyML2sJ1dSyv6T?3l6vif*(sPO%1T}v5jp<&tV-ri<_|FT_0iK
zZvZ6=gthh5_1=%Sr7y2>C+|_py<&Fo1F5cC*iEM?zZGC{ejNg4LWYp=S$L6Qaby6y
zp$+F`250{%tU{Lg$5*ROH}y!1UKJS4*xqd7P(Y3JQF?lrnf?yerr%&6yGXLG1ur*B
z{$&R1@Oj)yl@%rY5rh?j(j10Yz_DBs`AKFU_QnB;)(aqQmGi&ieOS|21^NP9UMpa<
zU&p!f6RZ6Owp^X!EXA=0SbN&h?CrQK%Q3(=YBqqHD^9ZUM0Hxt-6-KT;>lf@j?Z+v
zHm(}`>85I&E<7e}oz?6UwjAogowzGO8kSN7+2`b^$Az9L{K5*ko87EV45LT-`_##3
z>d3AGh@>=mbg34|6}+-gT9N+6Dr@44VEl44O&{&|w=qpbzC#iWMKa?5)>tI+KLQK@
Xq0QFqn(9Yl00000NkvXXu0mjfZ8t<K

literal 0
HcmV?d00001

diff --git a/scipost/static/scipost/images/feed-icon-28x28.png b/scipost/static/scipost/images/feed-icon-28x28.png
new file mode 100755
index 0000000000000000000000000000000000000000..d64c669c7589d3a886682dbd1f3c83b716a420f5
GIT binary patch
literal 1737
zcmV;)1~&PLP)<h;3K|Lk000e1NJLTq000~S000~a1^@s6at+^<00004XF*Lt006JZ
zHwB960000PbVXQnQ*UN;cVTj606}DLVr3vnZDD6+Qe|Oed2z{QJOBU&TS-JgRCwBy
zR#}V`MHv37tGZ{H*;$T--IaTVAcq@dS%V}l@qvI!Vt62kKBx#p5nj9!5`!9iRZM(9
zV(>sAF&N>2z!Fdr4Imm26om*2a>%jE0(;Kv%yf78|JB{oGfPNxX8x(_?yCCg`;V_$
zXsz+vi(@PROR2wt+9on+`tt9tz79KlSO2H>IyGO>#kRR$cU=`Hmyc#J&lVDyanqor
z1tA1LcZEeQ^@U{`(^^*e%-kna7Wft<Kc~Ko#`6RXPbARUK7gBNPor?_+FV6LmowP#
z2@k@%^A9|?5Ka=%5h!oT3KrDig5ZrQVaA&A#t1MRC&F<`DvYfgie!2w+P=HGT9J!Z
zXU0#1Phjv01R~&u{*yFO(atR)N(%^PLJLb3Y|2s*m@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xIRgZc&Haz
z97Enup@;TFsZ2B(s4qPM$>$Fs^Ts74UpfJM^h3sV?wMW0WJehh2{~g4ogxB$XB+z3
zj>dqsQ-JDmG0PG|RvIr$F{C4kCg$jP$}HFbr*4{YjY!qNUc40!F-=kycOU+QnB?Mx
z8|Kk4n-6^So&Tjm@IeU{f$7jOq0(5vX+iOD$&HEn>6Ln&9A*v|n??7|MdU7@C{vjR
z$f_|A<e7o%=PHwn<j}a3)y)guhb*I|GI%ABWHwp;`l*VEI(NquGV3xk$+!PiRwpD@
z)nmb@n%8r)VxAh=0G84yaVk#>5hO^O4ut*#ZxgtJGkT`cL-*i%v!F$w>{{>2ab(X<
zB7{67ze4nP(?WE=r;}pbYUptK=i7b_Vo0DObgB4h*)ZMw#4Moef;n1P)m$$SapFyk
zgn28|VG$Q8#!==OS!68?6Qk&A<31f;^D`aBP}NOF+u83;43FmqXr@XA^@G5zL#R|Z
z-6OEbB$o=0VUJMXVpoM`Q5^X>w^j&dHb$?C`9O1za}2k1oIVYauA>==_^=F>L6=L^
zy)3G=Vq5~I&uoz(IUI+sizYAj3Qn3MPY>NxTc2EAJ9P$<DZ2!Q5G-;h{4$yHg3L1o
z?Z)7dlo@6|ySaedmro*#-j50EJrTXSA6{DhG7VWtm$U!JYkc_nU*6Yob_f0AWLxI%
fb~p3IzXA*ZxM?n0numXw00000NkvXXu0mjf=bk6G

literal 0
HcmV?d00001

diff --git a/scipost/templates/scipost/feeds.html b/scipost/templates/scipost/feeds.html
new file mode 100644
index 000000000..45a1b3892
--- /dev/null
+++ b/scipost/templates/scipost/feeds.html
@@ -0,0 +1,29 @@
+{% extends 'scipost/base.html' %}
+
+{% block pagetitle %}: Feeds{% endblock pagetitle %}
+
+{% load staticfiles %}
+
+{% block bodysup %}
+
+
+<section>
+  <div class="flex-container">
+    <div class="flex-greybox">
+      <h1>SciPost Feeds</h1>
+    </div>
+  </div>
+
+  <div class="flex-container">
+    <div class="flex-whitebox">
+      <h3>News feeds</h3>
+      <p>We provide both RSS (2.0) and Atom feeds for latest news and announcements.</p>
+      <p>The URL of the RSS feed is <a href="https://scipost.org/rss/news/">https://scipost.org/rss/news/</a>.</p>
+      <p>The URL of the Atom feed is <a href="https://scipost.org/atom/news/">https://scipost.org/atom/news/</a>.</p>
+    </div>
+  </div>
+
+</section>
+
+
+{% endblock bodysup %}
diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html
index 923f41dde..32f9b90b7 100644
--- a/scipost/templates/scipost/index.html
+++ b/scipost/templates/scipost/index.html
@@ -9,7 +9,7 @@
   <div class="flex-container">
     {% if latest_newsitems %}
     <div class="flex-greybox320">
-      <h1><a href="{% url 'scipost:news' %}">News</a></h1>
+      <h1><a href="{% url 'scipost:news' %}">News</a><a style="float: right;" href="{% url 'scipost:feeds' %}"><img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14px"></a></h1>
       <p>Latest news and announcements.</p>
       <hr class="hr6"/>
       <ul class="NewsItemsList">
diff --git a/scipost/urls.py b/scipost/urls.py
index f2cbe1d59..9e98732a2 100644
--- a/scipost/urls.py
+++ b/scipost/urls.py
@@ -27,6 +27,7 @@ urlpatterns = [
     url(r'^privacy_policy$', TemplateView.as_view(template_name='scipost/privacy_policy.html'), name='privacy_policy'),
 
     # Feeds
+    url(r'^feeds$', TemplateView.as_view(template_name='scipost/feeds.html'), name='feeds'),
     url(r'^rss/news/$', LatestNewsFeedRSS()),
     url(r'^atom/news/$', LatestNewsFeedAtom()),
     url(r'^rss/comments/$', LatestCommentsFeedRSS()),
diff --git a/static/scipost/SciPost.css b/static/scipost/SciPost.css
index 66160bd59..b469db734 100644
--- a/static/scipost/SciPost.css
+++ b/static/scipost/SciPost.css
@@ -49,6 +49,7 @@ hr.hr12 {
     box-shadow: inset 0 12px 12px -12px rgba(0, 0, 0, 0.5);
 }
 
+
 ul.personalTabMenu {
   background-color: #dddddd;
   display: inline-block;
@@ -206,6 +207,18 @@ ul.personalTabMenu li a.inactive {
   margin: 10px;
   padding: 10px;
 }
+.flex-greybox640 {
+  background-color: #f4f4f4; 
+  width: 640px;
+  margin: 10px;
+  padding: 10px;
+}
+.flex-greybox800 {
+  background-color: #f4f4f4; 
+  width: 800px;
+  margin: 10px;
+  padding: 10px;
+}
 .flex-whitebox {
   margin: 10px;
   padding: 10px;
@@ -215,6 +228,16 @@ ul.personalTabMenu li a.inactive {
   margin: 10px;
   padding: 10px;
 }
+.flex-whitebox640 {
+  width: 640px;
+  margin: 10px;
+  padding: 10px;
+}
+.flex-whitebox800 {
+  width: 800px;
+  margin: 10px;
+  padding: 10px;
+}
 .flex-whitebox0 {
   margin: 0px;
   padding: 0px;
@@ -642,7 +665,10 @@ select {
 /*  animation-iteration-count: infinite; */
 }
 
-.SciPostPhysicsTab {
+
+/* SciPost Physics Journal style */
+
+div.SciPostPhysicsBanner {
   background-color: #002B49;
   color: #FFA300;
   margin: 10px;
@@ -650,3 +676,164 @@ select {
   font-size: 150%;
   text-align: center;
 }
+div.SciPostPhysicsBanner a {
+  color: #FFA300;
+  padding: 4px;
+}
+div.SciPostPhysicsBanner a.active {
+  background-color: #eeeeee;
+  border: 1px solid black;
+  padding: 4px;
+}
+div.SciPostPhysicsBanner a.inactive {
+  background-color: #dddddd;
+  border: none;
+}
+
+
+ul.NewsItemsList {
+  list-style-type: none;
+  margin: 0px;
+  padding: 0px;
+}
+ul.NewsItemsList li {
+  margin: 10px;
+}
+h3.NewsHeadline {
+  background-color: #002B49;
+  color: #C3D7EE;
+  padding: 10px;
+}
+
+.SciPostPhysicsTab {
+  background-color: #002B49;
+  color: #FFA300;
+  margin: 2px;
+  padding: 5px 10px;
+  font-size: 120%;
+  text-align: center;
+}
+.SciPostPhysicsTab h3 a {
+  color: #FFA300;
+}
+
+ul.SciPostPhysicsTabMenu {
+  background-color: #dddddd;
+  display: inline-block;
+  font-size: 16px;
+  padding: 0px;
+}
+ul.SciPostPhysicsTabMenu li {
+  display: inline-block;
+  margin: 0px;
+  padding: 10px;
+}
+ul.SciPostPhysicsTabMenu li a {
+  padding: 4px;
+}
+ul.SciPostPhysicsTabMenu li a.active {
+  background-color: #eeeeee;
+  border: 1px solid black;
+  padding: 4px;
+}
+ul.SciPostPhysicsTabMenu li a.inactive {
+  background-color: #dddddd;
+  border: none;
+}
+
+ul.publicationHeaderList {
+  list-style-type: none;
+  margin: 0px;
+  padding: 0px;
+}
+
+li.publicationHeader {
+  background-color: #fafafa;
+  margin: 10px;
+  padding: 0px;
+}
+
+p.publicationTitle {
+  background-color: #eeeeee;
+  font-size: 16px;
+  margin: 0px;
+  padding: 10px;
+}
+
+p.publicationAuthors {
+  font-weight: bold;  
+}
+
+ul.publicationClickables {
+  background-color: #f8f8f8;
+  display: inline-block;
+  list-style-type: none;
+  margin: 0px;
+  padding: 0px;
+}
+
+ul.publicationClickables li {
+  display: inline-block;
+  margin: 0px 10px;
+  padding: 5px;
+}
+
+li.publicationPDF {
+  font-size: 16px;
+  font-weight: bold;
+  padding: 2px;
+}
+
+
+/* For modal boxes (e.g. BiBTeX) */
+.modalDialog {
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  background: rgba(0,0,0,0.5);
+  z-index: 99999;
+  opacity: 0;
+  -webkit-transition: opacity 200ms ease-in;
+  -moz-transition: opacity 200ms ease-in;
+  transition: opacity 200ms ease-in;
+  pointer-events: none;
+}
+
+.modalDialog:target {
+  opacity: 1;
+  pointer-events: auto;
+}
+
+.modalDialog > div {
+  width: 600px;
+  position: relative;
+  margin: 10% auto;
+  padding: 10px;
+  border-radius: 10px;
+  background: #ffffff;
+}
+
+.close {
+  background: #606061;
+  color: #ffffff;
+  line-height: 25px;
+  position: absolute;
+  right: -12px;
+  text-align: center;
+  top: -10px;
+  width: 24px;
+  text-decoration: none;
+  font-weight: bold;
+  -webkit-border-radius: 12px;
+  -moz-border-radius: 12px;
+  border-radius: 12px;
+  -moz-box-shadow: 1px 1px 3px #000;
+  -webkit-box-shadow: 1px 1px 3px #000;
+  box-shadow: 1px 1px 3px #000;
+}
+
+.close:hover {
+  background: #999999;
+}
\ No newline at end of file
-- 
GitLab