@@ -82,12 +82,20 | |||||
82 | padding: 7px 0; |
|
82 | padding: 7px 0; | |
83 | } |
|
83 | } | |
84 |
|
84 | |||
85 |
.navbar-igp-2 .nav-link |
|
85 | .navbar-igp-2 .nav-link{ | |
86 |
color: var(-- |
|
86 | color: var(--secondary); | |
87 | display: inline; |
|
87 | display: inline; | |
88 | padding: 0; |
|
88 | padding: 0; | |
89 | } |
|
89 | } | |
90 |
|
90 | |||
|
91 | .navbar-igp-2 ul>li:not(:first-of-type) a:hover{ | |||
|
92 | color: var(--secondary); | |||
|
93 | } | |||
|
94 | ||||
|
95 | .navbar-igp-2 li.active a { | |||
|
96 | color: var(--tertiary); | |||
|
97 | } | |||
|
98 | ||||
91 | .navbar-igp-2 ul>li:not(:first-of-type):before { |
|
99 | .navbar-igp-2 ul>li:not(:first-of-type):before { | |
92 | content: '|'; |
|
100 | content: '|'; | |
93 | margin: 0.2em; |
|
101 | margin: 0.2em; |
@@ -96,13 +96,18 | |||||
96 | <nav class="navbar navbar-expand"> |
|
96 | <nav class="navbar navbar-expand"> | |
97 | <div class="navbar-igp-2"> |
|
97 | <div class="navbar-igp-2"> | |
98 | <ul class="navbar-nav mr-auto"> |
|
98 | <ul class="navbar-nav mr-auto"> | |
99 | <li class="nav-item"> |
|
99 | <li class="nav-item active"> | |
100 | <a class="nav-link" |
|
100 | <a class="nav-link" | |
101 | href="https://www.gob.pe/igp"><span><i class="fas fa-home"> </i> IGP portal</span></a> |
|
101 | href="https://www.gob.pe/igp"><span><i class="fas fa-home"> </i> IGP portal</span></a> | |
102 | </li> |
|
102 | </li> | |
103 | <li class="nav-item"> |
|
103 | <li class="nav-item"> | |
104 | <a class="nav-link">Realtime at JRO</a> |
|
104 | <a class="nav-link" href="{% url 'url_main'%}">Realtime at JRO</a> | |
|
105 | </li> | |||
|
106 | {% if tag %} | |||
|
107 | <li class="nav-item"> | |||
|
108 | <a class="nav-link" href="{% url 'url_main' tag %}">{{tag | title}}</a> | |||
105 | </li> |
|
109 | </li> | |
|
110 | {% endif %} | |||
106 | {% if title != 'Home' %} |
|
111 | {% if title != 'Home' %} | |
107 | <li class="nav-item"> |
|
112 | <li class="nav-item"> | |
108 | <a class="nav-link">{{title}}</a> |
|
113 | <a class="nav-link">{{title}}</a> |
@@ -131,6 +131,7 def main(request, tag=None): | |||||
131 | experiments.append(dum) |
|
131 | experiments.append(dum) | |
132 |
|
132 | |||
133 | kwargs['experiments'] = experiments |
|
133 | kwargs['experiments'] = experiments | |
|
134 | kwargs['tag'] = tag | |||
134 |
|
135 | |||
135 | kwargs['date'] = date |
|
136 | kwargs['date'] = date | |
136 | kwargs['title'] = 'Home' |
|
137 | kwargs['title'] = 'Home' | |
@@ -175,7 +176,8 def plot(request, code=None, plot=None): | |||||
175 | exp = Experiment.objects.get(code=int(code)) |
|
176 | exp = Experiment.objects.get(code=int(code)) | |
176 | detail = ExpDetail.objects.get(experiment=exp, date=datetime.strptime(date, '%d-%m-%Y')) |
|
177 | detail = ExpDetail.objects.get(experiment=exp, date=datetime.strptime(date, '%d-%m-%Y')) | |
177 | meta = PlotMeta.objects.get(exp_detail=detail, plot=plot) |
|
178 | meta = PlotMeta.objects.get(exp_detail=detail, plot=plot) | |
178 |
|
179 | tag = detail.tag.lower().strip() if detail.tag else 'other' | ||
|
180 | ||||
179 | kwargs = { |
|
181 | kwargs = { | |
180 | 'code': code, |
|
182 | 'code': code, | |
181 | 'plot': plot, |
|
183 | 'plot': plot, | |
@@ -186,6 +188,7 def plot(request, code=None, plot=None): | |||||
186 | 'title': 'Home', |
|
188 | 'title': 'Home', | |
187 | 'name' : exp.name, |
|
189 | 'name' : exp.name, | |
188 | 'sidebar': True, |
|
190 | 'sidebar': True, | |
|
191 | 'tag' : tag, | |||
189 | 'plots': [] |
|
192 | 'plots': [] | |
190 | } |
|
193 | } | |
191 |
|
194 |
General Comments 0
You need to be logged in to leave comments.
Login now