diff --git a/gestioncof/cms/models.py b/gestioncof/cms/models.py index ef957b5c..69f56ae0 100644 --- a/gestioncof/cms/models.py +++ b/gestioncof/cms/models.py @@ -96,6 +96,7 @@ class COFActuEventPage(Page): date_start = models.DateTimeField("Date et heure de début") date_end = models.DateTimeField("Date et heure de fin", blank=True, default=None, null=True) all_day = models.BooleanField("Toute la journée", default=False, blank=True) + is_event = True content_panels = Page.content_panels + [ ImageChooserPanel('image'), @@ -108,11 +109,11 @@ class COFActuEventPage(Page): subpage_types = [] parent_page_types = ['COFActuIndexPage'] - + class Meta: verbose_name = "Actu liée à un évènement" verbose_name_plural = "Actus liées à des évènements" - + # Annuaires (Clubs, partenaires, bonnes adresses) class COFDirectoryPage(Page): introduction = RichTextField("Introduction") diff --git a/gestioncof/cms/static/cofcms/css/screen.css b/gestioncof/cms/static/cofcms/css/screen.css index a2497901..ed2eb06f 100644 --- a/gestioncof/cms/static/cofcms/css/screen.css +++ b/gestioncof/cms/static/cofcms/css/screen.css @@ -69,54 +69,143 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, } /* line 12, ../sass/screen.scss */ +*, *:after, *:before { + box-sizing: content-box; +} + +/* line 16, ../sass/screen.scss */ body { - background: #ff7869; + background: #ffcc6f; font: 17px "Source Sans Pro", "sans-serif"; } -/* line 17, ../sass/screen.scss */ +/* line 21, ../sass/screen.scss */ header { - background: #02c082; + background: #30355a; } -/* line 21, ../sass/screen.scss */ +/* line 25, ../sass/screen.scss */ h1, h2 { font-family: "Carter One"; } -/* line 25, ../sass/screen.scss */ +/* line 29, ../sass/screen.scss */ h1 { font-size: 2.3em; } -/* line 29, ../sass/screen.scss */ +/* line 33, ../sass/screen.scss */ +h2 { + font-size: 1.6em; +} + +/* line 37, ../sass/screen.scss */ a { - color: #fff; + color: #f9752b; text-decoration: none; } -/* line 36, ../sass/screen.scss */ -header nav ul { - display: flex; -} -/* line 38, ../sass/screen.scss */ -header nav ul li { - display: inline-block; -} -/* line 40, ../sass/screen.scss */ -header nav ul li > * { - display: block; - padding: 10px 15px; - font-weight: bold; -} -/* line 45, ../sass/screen.scss */ -header nav ul li > *:hover { - background: #018e60; -} -/* line 52, ../sass/screen.scss */ +/* line 43, ../sass/screen.scss */ header section { display: flex; width: 100%; justify-content: space-between; align-items: stretch; } +/* line 49, ../sass/screen.scss */ +header section.bottom-menu { + justify-content: space-around; + text-align: center; + background: #47395e; +} +/* line 55, ../sass/screen.scss */ +header h1 { + padding: 0 15px; +} +/* line 59, ../sass/screen.scss */ +header nav ul { + display: flex; +} +/* line 61, ../sass/screen.scss */ +header nav ul li { + display: inline-block; +} +/* line 63, ../sass/screen.scss */ +header nav ul li > * { + display: block; + padding: 10px 15px; + font-weight: bold; +} +/* line 68, ../sass/screen.scss */ +header nav ul li > *:hover { + background: #1e2139; +} + +/* line 77, ../sass/screen.scss */ +.container { + max-width: 1000px; + margin: 0 auto; + position: relative; +} +/* line 82, ../sass/screen.scss */ +.container .aside-wrap { + position: absolute; + top: 30px; + height: 100%; + width: 250px; +} +/* line 88, ../sass/screen.scss */ +.container .aside-wrap .aside { + position: fixed; + position: sticky; + top: 5px; + width: 100%; + background: #7a504c; + padding: 15px; + box-shadow: -4px 4px 1px rgba(0, 0, 0, 0.3); +} +/* line 97, ../sass/screen.scss */ +.container .aside-wrap .aside .calendar { + margin: 0 auto; + display: block; +} +/* line 104, ../sass/screen.scss */ +.container .content { + max-width: 700px; + margin-left: auto; + margin-right: 0; +} +/* line 111, ../sass/screen.scss */ +.container .content section article { + background: #fff; + padding: 30px; + box-shadow: -4px 4px 1px rgba(0, 0, 0, 0.3); +} +/* line 115, ../sass/screen.scss */ +.container .content section article a { + color: #30355a; +} +/* line 120, ../sass/screen.scss */ +.container .content section article + h2 { + margin-top: 15px; +} + +/* line 128, ../sass/screen.scss */ +.calendar td, .calendar th { + text-align: center; + vertical-align: center; + border: 2px solid transparent; + padding: 1px; +} +/* line 135, ../sass/screen.scss */ +.calendar th { + font-weight: bold; +} +/* line 140, ../sass/screen.scss */ +.calendar td.out { + opacity: 0.3; +} +/* line 143, ../sass/screen.scss */ +.calendar td.today { + border-bottom-color: #000; +} diff --git a/gestioncof/cms/static/cofcms/sass/_colors.scss b/gestioncof/cms/static/cofcms/sass/_colors.scss index a2bc8fc2..32e8088c 100644 --- a/gestioncof/cms/static/cofcms/sass/_colors.scss +++ b/gestioncof/cms/static/cofcms/sass/_colors.scss @@ -1,4 +1,6 @@ -$fond: #ff7869; -$bandeau: #02c082; -$aside: #ffe896; -$titre: #e23427; +$fond: #ffcc6f; +$bandeau: #30355a; +$sousbandeau: #47395e; +$aside: #7a504c; +$titre: #31597e; +$lien: #f9752b; diff --git a/gestioncof/cms/static/cofcms/sass/screen.scss b/gestioncof/cms/static/cofcms/sass/screen.scss index 76d2ef20..42373298 100644 --- a/gestioncof/cms/static/cofcms/sass/screen.scss +++ b/gestioncof/cms/static/cofcms/sass/screen.scss @@ -9,6 +9,10 @@ @import "_colors"; +*, *:after, *:before { + box-sizing: content-box; +} + body { background: $fond; font: 17px "Source Sans Pro", "sans-serif"; @@ -26,18 +30,37 @@ h1 { font-size: 2.3em; } +h2 { + font-size: 1.6em; +} + a { - color: #fff; + color: $lien; text-decoration: none; } header { + section { + display: flex; + width: 100%; + justify-content: space-between; + align-items: stretch; + + &.bottom-menu { + justify-content: space-around; + text-align: center; + background: $sousbandeau; + } + } + h1 { + padding: 0 15px; + } nav { ul { display: flex; li { display: inline-block; - > * { + & > * { display: block; padding: 10px 15px; font-weight: bold; @@ -49,10 +72,76 @@ header { } } } - section { - display: flex; - width: 100%; - justify-content: space-between; - align-items: stretch; +} + +.container { + max-width: 1000px; + margin: 0 auto; + position: relative; + + .aside-wrap { + position: absolute; + top: 30px; + height: 100%; + width: 250px; + + .aside { + position: fixed; + position: sticky; + top: 5px; + width: 100%; + background: $aside; + padding: 15px; + box-shadow: -4px 4px 1px rgba(#000, 0.3); + + .calendar { + margin: 0 auto; + display: block; + } + } + } + + .content { + max-width: 700px; + margin-left: auto; + margin-right: 0; + + + section { + article { + background: #fff; + padding: 30px; + box-shadow: -4px 4px 1px rgba(#000, 0.3); + a { + color: $bandeau; + } + } + + article + h2 { + margin-top: 15px; + } + } + } +} + +.calendar { + td, th { + text-align: center; + vertical-align: center; + border: 2px solid transparent; + padding: 1px; + } + + th { + font-weight: bold; + } + + td { + &.out { + opacity: 0.3; + } + &.today { + border-bottom-color: #000; + } } } diff --git a/gestioncof/cms/templates/cofcms/base.html b/gestioncof/cms/templates/cofcms/base.html index e6aea017..dbf0faa4 100644 --- a/gestioncof/cms/templates/cofcms/base.html +++ b/gestioncof/cms/templates/cofcms/base.html @@ -24,7 +24,11 @@