forked from rc/aircox
		
	update sections, work a bit on style
This commit is contained in:
		@ -20,7 +20,7 @@ def add_inline (base_model, post_model, prepend = False):
 | 
			
		||||
                    'fields': ['title', 'content', 'image', 'tags']
 | 
			
		||||
                }),
 | 
			
		||||
                (None, {
 | 
			
		||||
                    'fields': ['date', 'published', 'author', 'thread']
 | 
			
		||||
                    'fields': ['date', 'published', 'author', 'thread_pk', 'thread_type']
 | 
			
		||||
                })
 | 
			
		||||
        ]
 | 
			
		||||
 | 
			
		||||
@ -40,6 +40,8 @@ def add_inline (base_model, post_model, prepend = False):
 | 
			
		||||
add_inline(programs.Program, Program, True)
 | 
			
		||||
add_inline(programs.Episode, Episode, True)
 | 
			
		||||
 | 
			
		||||
admin.site.register(Program)
 | 
			
		||||
admin.site.register(Episode)
 | 
			
		||||
 | 
			
		||||
#class ArticleAdmin (DescriptionAdmin):
 | 
			
		||||
#    fieldsets = copy.deepcopy(DescriptionAdmin.fieldsets)
 | 
			
		||||
 | 
			
		||||
@ -6,6 +6,7 @@ import aircox_programs.models as programs
 | 
			
		||||
class Program (RelatedPost):
 | 
			
		||||
    class Relation:
 | 
			
		||||
        related_model = programs.Program
 | 
			
		||||
        bind_mapping = True
 | 
			
		||||
        mapping = {
 | 
			
		||||
            'title': 'name',
 | 
			
		||||
            'content': 'description',
 | 
			
		||||
@ -14,6 +15,7 @@ class Program (RelatedPost):
 | 
			
		||||
class Episode (RelatedPost):
 | 
			
		||||
    class Relation:
 | 
			
		||||
        related_model = programs.Episode
 | 
			
		||||
        bind_mapping = True
 | 
			
		||||
        mapping = {
 | 
			
		||||
            'title': 'name',
 | 
			
		||||
            'content': 'description',
 | 
			
		||||
 | 
			
		||||
@ -9,36 +9,87 @@ h1, h2, h3 {
 | 
			
		||||
    font-family: "Myriad Pro",Calibri,Helvetica,Arial,sans-serif
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
time {
 | 
			
		||||
    font-size: 0.9em;
 | 
			
		||||
    color: #616161;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
    text-decoration: none;
 | 
			
		||||
    color: #616161;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a:hover {
 | 
			
		||||
    color: #818181;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
nav.menu {
 | 
			
		||||
    padding: 0.5em;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
nav.menu_top {
 | 
			
		||||
    background-color: #212121;
 | 
			
		||||
    color: #007EDF;
 | 
			
		||||
    font-size: 1.1em;
 | 
			
		||||
}
 | 
			
		||||
    nav.menu_top {
 | 
			
		||||
        background-color: #212121;
 | 
			
		||||
        color: #007EDF;
 | 
			
		||||
        font-size: 1.1em;
 | 
			
		||||
        box-shadow: 0em 0.2em 0.5em 0.1em black
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    header {
 | 
			
		||||
    header.menu {
 | 
			
		||||
        padding: 0.2em;
 | 
			
		||||
        height: 9em;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    header img {
 | 
			
		||||
        height: 100%;
 | 
			
		||||
        float: left;
 | 
			
		||||
    }
 | 
			
		||||
        header.menu img {
 | 
			
		||||
            height: 100%;
 | 
			
		||||
            float: left;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    header .colony {
 | 
			
		||||
        position: fixed;
 | 
			
		||||
        top: 0em;
 | 
			
		||||
        right: 0;
 | 
			
		||||
        z-index: -1;
 | 
			
		||||
    }
 | 
			
		||||
        #colony img {
 | 
			
		||||
            height: auto;
 | 
			
		||||
            position: fixed;
 | 
			
		||||
            top: 1em;
 | 
			
		||||
            right: 0;
 | 
			
		||||
            z-index: -1;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
.page {
 | 
			
		||||
    width: 100%;
 | 
			
		||||
    padding: 1.5em 0em;
 | 
			
		||||
    background-color: rgba(255, 255, 255, 0.8);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    .page img {
 | 
			
		||||
        box-shadow: 0em 0em 0.2em 0.01em black;
 | 
			
		||||
        border-radius: 0.2em;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.post_list {
 | 
			
		||||
    background-color: #F2F2F2;
 | 
			
		||||
    box-shadow: inset 0.2em 0.2em 0.2em 0.01em black;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
    .post_list .post_item {
 | 
			
		||||
        min-height: 64px;
 | 
			
		||||
        padding: 0.2em;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .post_list .post_item:hover {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .post_list h3 {
 | 
			
		||||
        margin: 0.2em;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .post_list time {
 | 
			
		||||
        float: right;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    .post_list img {
 | 
			
		||||
        float: left;
 | 
			
		||||
        margin-right: 0.5em;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -18,7 +18,8 @@ class ProgramSet (ViewSet):
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    detail_sections = ViewSet.detail_sections + [
 | 
			
		||||
        ScheduleSection,
 | 
			
		||||
        ScheduleSection(),
 | 
			
		||||
        EpisodesSection(),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
class EpisodeSet (ViewSet):
 | 
			
		||||
@ -49,7 +50,7 @@ website = Website(
 | 
			
		||||
            position = 'header',
 | 
			
		||||
            sections = [
 | 
			
		||||
                Sections.Image(url = 'website/logo.png'),
 | 
			
		||||
                Sections.Image(url = 'website/colony.png', classes='colony'),
 | 
			
		||||
                Sections.Image(url = 'website/colony.png', attrs = { 'id': 'colony' }),
 | 
			
		||||
            ]
 | 
			
		||||
        ),
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -8,6 +8,9 @@ from django.utils.translation import ugettext as _, ugettext_lazy
 | 
			
		||||
import aircox_programs.models as programs
 | 
			
		||||
from aircox_cms.views import Sections
 | 
			
		||||
 | 
			
		||||
from website.models import *
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class PlayListSection (Sections.List):
 | 
			
		||||
    title = _('Playlist')
 | 
			
		||||
@ -34,4 +37,10 @@ class ScheduleSection (Sections.List):
 | 
			
		||||
        ]
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class EpisodesSection (Sections.Posts):
 | 
			
		||||
    title = _('Episodes')
 | 
			
		||||
 | 
			
		||||
    def get_object_list (self):
 | 
			
		||||
        return Episode.objects.filter(related__program = self.object.pk)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user