Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Simon Daron
panikweb
Commits
505ed00a
Commit
505ed00a
authored
Aug 22, 2013
by
Simon Daron
Browse files
New TPL structure
parent
48223d41
Changes
5
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
505ed00a
...
...
@@ -159,7 +159,8 @@ class Home(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Home
,
self
).
get_context_data
(
**
kwargs
)
context
[
'news'
]
=
NewsItem
.
objects
.
all
().
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[:
5
]
context
[
'newsImaged'
]
=
NewsItem
.
objects
.
all
().
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[:
3
]
context
[
'news'
]
=
NewsItem
.
objects
.
all
().
order_by
(
'-datetime'
)[:
60
]
context
[
'emissions'
]
=
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'title'
)
context
[
'player'
]
=
audioPlayer
()
return
context
...
...
panikweb_templates/static/css/specifics.css
View file @
505ed00a
...
...
@@ -404,7 +404,10 @@ button.tag {
/**** News ****/
.list.news
li
{
display
:
block
;
border-style
:
solid
;
border-width
:
1px
0
;
}
.news
.date
{
padding
:
1em
;}
.news
.title
{
margin-bottom
:
1em
;
}
...
...
panikweb_templates/templates/base.html
View file @
505ed00a
...
...
@@ -35,6 +35,9 @@
<div
id=
"Main"
>
{% block main %}{% endblock %}
</div>
<div
id=
"Links"
>
{% block links %}{% endblock %}
</div>
</div>
...
...
panikweb_templates/templates/home.html
View file @
505ed00a
{% extends "base.html" %}
{% extends "news.html" %}
{% block listen %}{% include "includes/player.html" %}{% endblock %}
{% block bodyID %}Home{% endblock %}
{% block main %}
<div
class=
"news mainLegend"
>
<div
class=
"wrapper"
>
<h1
class=
"squashed"
>
News
</h1>
</div>
</div>
<div
class=
"news"
>
<div
class=
"wrapper"
>
<ul
class=
"custom list news"
>
{% for NewsItem in news %}
<li
class=
"item num-{{forloop.counter}}"
>
{% if NewsItem.slug == news.0.slug %}
{% include "news/inline.html" with content=NewsItem class="special" logo="large"%}
{% elif NewsItem.slug == news.1.slug or NewsItem.slug == news.2.slug%}
{% include "news/inline.html" with content=NewsItem class="special" logo="medium"%}
{% else %}
{% include "news/inline.html" with content=NewsItem%}
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% block links %}
<div
class=
"mainLegend"
>
<div
class=
"wrapper"
>
<h1
class=
"squashed"
>
Emissions
</h1>
</div>
</div>
<div
class=
"wrapper"
>
<ul
class=
"custom list columns"
>
<ul
class=
"custom list columns
padded
"
>
{% for emission in emissions %}
<li
class=
"item"
>
<a
href=
"{% url 'emission-view' slug=emission.slug %}"
>
{{ emission.title }}
</a>
...
...
panikweb_templates/templates/listen.html
View file @
505ed00a
{% extends "base.html" %}
{% block bodyID %}Player{% endblock %}
{% block main %}
{% endblock %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment