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
radiopanik
panikweb
Commits
ac3ce90c
Commit
ac3ce90c
authored
Aug 31, 2013
by
Simon Daron
Browse files
News roll on Home
parent
01cf8be0
Changes
8
Hide whitespace changes
Inline
Side-by-side
panikweb/views.py
View file @
ac3ce90c
...
...
@@ -355,7 +355,7 @@ class Home(TemplateView):
def
get_context_data
(
self
,
**
kwargs
):
context
=
super
(
Home
,
self
).
get_context_data
(
**
kwargs
)
context
[
'sectionName'
]
=
"Home"
context
[
'news'
]
=
list
(
NewsItem
.
objects
.
all
().
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[:
10
])
context
[
'news'
]
=
list
(
NewsItem
.
objects
.
all
().
exclude
(
image__isnull
=
True
).
exclude
(
image__exact
=
''
).
order_by
(
'-datetime'
)[:
6
])
context
[
'emissions'
]
=
list
(
Emission
.
objects
.
filter
(
archived
=
False
).
order_by
(
'title'
))
schedules
=
Schedule
.
objects
.
select_related
().
order_by
(
'datetime'
)
days
=
[]
...
...
panikweb_templates/static/css/general.css
View file @
ac3ce90c
...
...
@@ -269,6 +269,12 @@ img.right, img.left{max-width:50%;}
.big
{
font-size
:
150%
;}
.huge
{
font-size
:
200%
;}
.absolute
{
position
:
absolute
;
}
.relative
{
position
:
relative
;
}
.spinning
{
position
:
relative
;
-webkit-animation
:
rotation
10s
infinite
linear
;
...
...
panikweb_templates/static/css/specifics.css
View file @
ac3ce90c
...
...
@@ -287,7 +287,7 @@ body{
-moz-box-shadow
:
0px
5px
5px
#000
;
-webkit-box-shadow
:
0px
5px
5px
#000
;
box-shadow
:
0px
5px
10px
#000
;
font-size
:
1
.3
em
;
font-size
:
1em
;
background-color
:
#ff6633
;
border-color
:
#fff
;}
#player-container
button
{
border-color
:
#fff
;
...
...
@@ -639,6 +639,43 @@ background-color:#ff6633; border-color:#fff;}
/****************************************************/
/**** Home ****/
#Home
.newsRoll
li
{
border
:
2px
solid
black
!important
;
}
@media
(
max-width
:
600px
){
#Home
.newsRoll
li
.largeScreens
{
display
:
none
;
}
}
#Home
.newsRoll
img
.logo
{
display
:
inline-block
;
width
:
100%
!important
;
border
:
none
;
margin
:
none
;
padding
:
none
;
}
#Home
.newsRoll
.absolute
{
background
:
black
;
color
:
white
;
bottom
:
0px
;
width
:
100%
;
opacity
:
0.8
;
}
#Home
.newsRoll
h5
{
font-size
:
0.8em
;
color
:
white
;
padding
:
1em
;
}
#Home
#Nav
li
a
{
margin
:
0
0
0
0
!important
;
padding
:
0
0
0
0
!important
;
}
#Home
#Nav
.wrapper
{
max-width
:
auto
!important
;
width
:
auto
!important
;
}
/*
@media screen and (max-width:800px){
#Home .newsRoll .logo{
max-width:100px;
...
...
@@ -649,6 +686,7 @@ background-color:#ff6633; border-color:#fff;}
max-width:50px;
}
}
*/
/****************************************************/
/**** PROGRAM ****/
...
...
panikweb_templates/templates/base.html
View file @
ac3ce90c
...
...
@@ -34,7 +34,7 @@
{% block meta %}
<div
id=
"metaNav"
>
{% metanav %}
</div>
{% endblock %}
<div
id=
"Commons"
>
<div
id=
"mainHeader"
class=
"center"
>
<h1><span
id=
"radioPanik"
class=
"inBlock"
>
Radio Panik
</span>
<span
id=
"frequence"
class=
"inBlock"
>
105.4 FM
</span></h1>
<a
href=
"{% url 'home' %}"
>
<h1><span
id=
"radioPanik"
class=
"inBlock"
>
Radio Panik
</span>
<span
id=
"frequence"
class=
"inBlock"
>
105.4 FM
</span></h1>
</a>
<!--{% block logo %}<img class="logo" src="{{ STATIC_URL }}/img/LogoPanik.jpg"/>{% endblock %}-->
</div>
<div
id=
"Listen"
class=
"{% block player-class %}{% endblock %}"
>
...
...
@@ -43,9 +43,7 @@
</div>
<div
id=
"Changing"
class=
"cf"
data-section=
"{{ sectionName }}"
>
<div
id=
"Nav"
>
<div
class=
"wrapper"
>
{% block nav %}{% endblock %}
</div>
</div>
<div
id=
"Main"
class=
"cf"
>
{% block main %}{% endblock %}
...
...
panikweb_templates/templates/emissions/nav.html
View file @
ac3ce90c
<nav>
<ul
class=
"inline"
>
<li><a
href=
"{% url 'emissions' %}"
class=
"{% if class != "
program
"
and
class
!=
"
grid
"
and
class
!=
"
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-microphone"
></span>
<span
class=
"iconLabel"
>
Emissions
</span>
</a></li>
<li><a
href=
"{% url 'program' %}"
class=
"{% if class = "
program
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-calendar"
></span>
<span
class=
"iconLabel"
>
Cette semaine
</span>
</a></li>
<li><a
href=
"{% url 'grid' %}"
class=
"{% if class = "
grid
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-th-large"
></span>
<span
class=
"iconLabel"
>
La grille
</span>
</a></li>
<li><a
href=
"{% url 'archives' %}"
class=
"{% if class = "
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-archive"
></span>
<span
class=
"iconLabel"
>
Archives
</span>
</a></li>
</ul>
</nav>
{% if categories %}
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".nonstop"
>
Non-stop
</button></li>
{% elif class = "emissions" %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% endif %}
{% for category in categories %}
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% else %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endif %}
{% endfor %}
<div
class=
"wrapper"
>
<nav>
<ul
class=
"inline"
>
<li><a
href=
"{% url 'emissions' %}"
class=
"{% if class != "
program
"
and
class
!=
"
grid
"
and
class
!=
"
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-microphone"
></span>
<span
class=
"iconLabel"
>
Emissions
</span>
</a></li>
<li><a
href=
"{% url 'program' %}"
class=
"{% if class = "
program
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-calendar"
></span>
<span
class=
"iconLabel"
>
Cette semaine
</span>
</a></li>
<li><a
href=
"{% url 'grid' %}"
class=
"{% if class = "
grid
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-th-large"
></span>
<span
class=
"iconLabel"
>
La grille
</span>
</a></li>
<li><a
href=
"{% url 'archives' %}"
class=
"{% if class = "
archives
"
%}
active
{%
endif
%}"
>
<span
class=
"icon-archive"
></span>
<span
class=
"iconLabel"
>
Archives
</span>
</a></li>
</ul>
</nav>
{% endif %}
{% if class = "week" %}
{% endif %}
{% if emission %}
<header
class=
"mainHeader"
>
<h2
class=
"squashed title"
>
<a
href=
"{% url 'emission-view' slug=emission.slug %}"
>
{{ emission.title }}
</a>
</h2>
</header>
{% if episodes %}
<div
class=
"wrapper half"
>
<nav
class=
"tabs"
data-tab-about=
"#Emission-container"
>
<ul
class=
"distributed"
>
<li>
<button
data-tab=
"#Emission-tabs-default"
class=
"active"
>
<span
class=
"iconLabel"
>
En bref
</span>
</button>
</li>
<li>
<button
data-tab=
"#Emission-tabs-episodes"
>
<span
class=
"iconLabel"
>
Episodes ({{ episodes.count }})
</span>
</button
>
</li>
</ul>
{% if episode %}
<hr
/>
<h4
class=
"active button padded "
data-tab=
"#Emission-tabs-current"
>
{{ episode.title }}
</h4>
{% if categories %}
<nav
id=
"gridNav"
class=
"checkable"
>
<ul
class=
"by{{ categories.count }}"
>
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".nonstop"
>
Non-stop
</button></li>
{% elif class = "emissions" %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".nocat"
>
?
</button></li>
{% endif %}
{% for category in categories %}
{% if class = "grid" %}
<li><button
class=
"check icon-check-empty"
data-about=
"#Main"
data-highlight=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% else %}
<li><button
class=
"check icon-check"
data-about=
"#Main"
data-toggle=
".{{ category|slugify }}"
>
{{ category }}
</button></li>
{% endif %}
{% endfor %}
</ul>
</nav>
</div>
{% endif %}
{% endif %}
{% if class = "week" %}
{% endif %}
{% if emission %}
<header
class=
"mainHeader"
>
<h2
class=
"squashed title"
>
<a
href=
"{% url 'emission-view' slug=emission.slug %}"
>
{{ emission.title }}
</a>
</h2>
</header>
{% if episodes %}
<div
class=
"wrapper half"
>
<nav
class=
"tabs"
data-tab-about=
"#Emission-container"
>
<ul
class=
"distributed"
>
<li>
<button
data-tab=
"#Emission-tabs-default"
class=
"active"
>
<span
class=
"iconLabel"
>
En bref
</span>
</button>
</li>
<li>
<button
data-tab=
"#Emission-tabs-episodes"
>
<span
class=
"iconLabel"
>
Episodes ({{ episodes.count }})
</span>
</button
>
</li>
</ul>
{% if episode %}
<hr
/>
<h4
class=
"active button padded "
data-tab=
"#Emission-tabs-current"
>
{{ episode.title }}
</h4>
{% endif %}
</nav>
</div>
{% endif %}
{% endif %}
</div>
panikweb_templates/templates/emissions/newsitem_detail.html
View file @
ac3ce90c
{% extends "
news
.html" %}
{% extends "
home
.html" %}
{% load thumbnails %}
{% load paniktags %}
{% block bodyID %}News{% endblock %}
...
...
panikweb_templates/templates/home.html
View file @
ac3ce90c
...
...
@@ -5,13 +5,16 @@
{% block title %}Home{% endblock %}
{% block nav %}
<div
class=
"news"
>
<div
class=
"
wrapper
newsRoll"
>
<ul
class=
"custom
inline ellipsis cen
te
r
"
>
<div
class=
"newsRoll
center
"
>
<ul
class=
"custom
distribu
te
d
"
>
{% for content in news %}
<li
class=
"
item
"
>
<a
class=
"
inB
lock news"
href=
"{% url 'news-view' slug=content.slug %}"
>
<li
class=
"
{% if forloop.counter > 3 %}largeScreens{% endif %}
"
>
<a
class=
"
b
lock news
relative
"
href=
"{% url 'news-view' slug=content.slug %}"
>
{% if content.image %}
<img
class=
"logo"
src=
"{{ content.image|thumbnail:'100x100' }}"
/>
<div
class=
"absolute"
>
<h5
class=
"title ellipsis"
>
{{content.title}}
</h5>
</div>
<img
class=
"logo"
src=
"{{ content.image|thumbnail:'320x240' }}"
/>
{% endif %}
</a>
</li>
...
...
panikweb_templates/templates/program.html
View file @
ac3ce90c
...
...
@@ -4,7 +4,8 @@
{% block title %}Programme{% endblock %}
{% block nav %}
{% emission_nav with klass="program" %}
<div
class=
"program"
>
<div
class=
"wrapper"
>
<div
class=
"program "
>
<nav
class=
"center"
>
<ul
class=
"custom distributed"
>
{% if week_previous %}
...
...
@@ -26,6 +27,7 @@
</nav>
</div>
{% weekview year=year week=week fragment="nav" %}
</div>
{% endblock %}
{% block main %}
{% weekview year=year week=week fragment="program" %}
...
...
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