Revision 9df24f38
b/cloudcms/migrations/0003_auto__add_field_application_footer_top__add_field_application_footer_b.py | ||
---|---|---|
1 |
# encoding: utf-8 |
|
2 |
import datetime |
|
3 |
from south.db import db |
|
4 |
from south.v2 import SchemaMigration |
|
5 |
from django.db import models |
|
6 |
|
|
7 |
class Migration(SchemaMigration): |
|
8 |
|
|
9 |
def forwards(self, orm): |
|
10 |
|
|
11 |
# Adding field 'Application.footer_top' |
|
12 |
db.add_column('cloudcms_application', 'footer_top', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False) |
|
13 |
|
|
14 |
# Adding field 'Application.footer_bottom' |
|
15 |
db.add_column('cloudcms_application', 'footer_bottom', self.gf('django.db.models.fields.TextField')(default='', blank=True), keep_default=False) |
|
16 |
|
|
17 |
|
|
18 |
def backwards(self, orm): |
|
19 |
|
|
20 |
# Deleting field 'Application.footer_top' |
|
21 |
db.delete_column('cloudcms_application', 'footer_top') |
|
22 |
|
|
23 |
# Deleting field 'Application.footer_bottom' |
|
24 |
db.delete_column('cloudcms_application', 'footer_bottom') |
|
25 |
|
|
26 |
|
|
27 |
models = { |
|
28 |
'cloudcms.application': { |
|
29 |
'Meta': {'object_name': 'Application'}, |
|
30 |
'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), |
|
31 |
'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
32 |
'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
|
33 |
'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
34 |
'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
|
35 |
'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}), |
|
36 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
37 |
'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}), |
|
38 |
'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}), |
|
39 |
'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}), |
|
40 |
'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}), |
|
41 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}), |
|
42 |
'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}) |
|
43 |
}, |
|
44 |
'medialibrary.category': { |
|
45 |
'Meta': {'object_name': 'Category'}, |
|
46 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
47 |
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}), |
|
48 |
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150', 'db_index': 'True'}), |
|
49 |
'title': ('django.db.models.fields.CharField', [], {'max_length': '200'}) |
|
50 |
}, |
|
51 |
'medialibrary.mediafile': { |
|
52 |
'Meta': {'object_name': 'MediaFile'}, |
|
53 |
'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}), |
|
54 |
'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}), |
|
55 |
'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}), |
|
56 |
'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}), |
|
57 |
'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}), |
|
58 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
59 |
'type': ('django.db.models.fields.CharField', [], {'max_length': '12'}) |
|
60 |
}, |
|
61 |
'sites.site': { |
|
62 |
'Meta': {'object_name': 'Site', 'db_table': "'django_site'"}, |
|
63 |
'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}), |
|
64 |
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), |
|
65 |
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'}) |
|
66 |
} |
|
67 |
} |
|
68 |
|
|
69 |
complete_apps = ['cloudcms'] |
b/cloudcms/models.py | ||
---|---|---|
60 | 60 |
show_twitter_feed_on_top = models.BooleanField(default=False) |
61 | 61 |
extra_styles = models.TextField(default="", blank=True) |
62 | 62 |
|
63 |
footer_top = models.TextField(default="", blank=True) |
|
64 |
footer_bottom = models.TextField(default="", blank=True) |
|
65 |
|
|
63 | 66 |
@classmethod |
64 | 67 |
def current(cls): |
65 | 68 |
return cls.objects.get(site__pk=settings.SITE_ID) |
b/cloudcms/static/cloudcms/css/styles.css | ||
---|---|---|
1288 | 1288 |
.row:after { |
1289 | 1289 |
clear: both; |
1290 | 1290 |
} |
1291 |
.footer:hover a { |
|
1292 |
color: #808080 !important; |
|
1291 |
.footer { |
|
1292 |
zoom: 1; |
|
1293 |
color: #b3b3b3; |
|
1293 | 1294 |
-webkit-transition: color 0.15s linear; |
1294 | 1295 |
transition: color 0.15s linear; |
1295 | 1296 |
-webkit-transition: color 0.15s linear; |
1296 | 1297 |
transition: color 0.15s linear; |
1297 | 1298 |
} |
1299 |
.footer:before, .footer:after { |
|
1300 |
display: table; |
|
1301 |
content: ""; |
|
1302 |
zoom: 1; |
|
1303 |
} |
|
1304 |
.footer:after { |
|
1305 |
clear: both; |
|
1306 |
} |
|
1298 | 1307 |
.footer a { |
1299 |
color: #b3b3b3; |
|
1300 | 1308 |
-webkit-transition: color 0.15s linear; |
1301 | 1309 |
transition: color 0.15s linear; |
1302 | 1310 |
-webkit-transition: color 0.15s linear; |
1303 | 1311 |
transition: color 0.15s linear; |
1312 |
} |
|
1313 |
.footer:hover { |
|
1314 |
color: #808080 !important; |
|
1315 |
} |
|
1316 |
.footer:hover a { |
|
1317 |
color: #808080 !important; |
|
1318 |
} |
|
1319 |
.footer a { |
|
1320 |
color: #b3b3b3; |
|
1304 | 1321 |
text-decoration: none; |
1305 | 1322 |
} |
1306 | 1323 |
.footer a:hover { |
1307 |
color: #000000;
|
|
1324 |
color: #000 !important;
|
|
1308 | 1325 |
} |
1309 | 1326 |
.footer li { |
1310 | 1327 |
margin-bottom: 11px; |
... | ... | |
1322 | 1339 |
width: 140px; |
1323 | 1340 |
margin-right: 0; |
1324 | 1341 |
} |
1342 |
.footer .top.row, .footer .last.row { |
|
1343 |
zoom: 1; |
|
1344 |
margin-left: -22px; |
|
1345 |
zoom: 1; |
|
1346 |
margin-left: -22px; |
|
1347 |
margin: 20px 0; |
|
1348 |
} |
|
1349 |
.footer .top.row:before, |
|
1350 |
.footer .last.row:before, |
|
1351 |
.footer .top.row:after, |
|
1352 |
.footer .last.row:after { |
|
1353 |
display: table; |
|
1354 |
content: ""; |
|
1355 |
zoom: 1; |
|
1356 |
} |
|
1357 |
.footer .top.row:after, .footer .last.row:after { |
|
1358 |
clear: both; |
|
1359 |
} |
|
1360 |
.footer .top.row:before, |
|
1361 |
.footer .last.row:before, |
|
1362 |
.footer .top.row:after, |
|
1363 |
.footer .last.row:after { |
|
1364 |
display: table; |
|
1365 |
content: ""; |
|
1366 |
zoom: 1; |
|
1367 |
} |
|
1368 |
.footer .top.row:after, .footer .last.row:after { |
|
1369 |
clear: both; |
|
1370 |
} |
|
1371 |
.footer .top.row .col, .footer .last.row .col { |
|
1372 |
display: inline; |
|
1373 |
float: left; |
|
1374 |
margin-left: 22px; |
|
1375 |
width: 306px; |
|
1376 |
} |
|
1377 |
.footer .top.row .col.first, .footer .last.row .col.first { |
|
1378 |
margin-left: 0 !important; |
|
1379 |
} |
|
1380 |
.footer .top.row .col.last, .footer .last.row .col.last { |
|
1381 |
display: inline; |
|
1382 |
float: left; |
|
1383 |
margin-left: 22px; |
|
1384 |
width: 142px; |
|
1385 |
} |
|
1386 |
.footer .top.row { |
|
1387 |
margin-top: 0; |
|
1388 |
} |
|
1389 |
.footer .last.row { |
|
1390 |
text-align: left; |
|
1391 |
font-size: 0.8em; |
|
1392 |
margin-bottom: 0; |
|
1393 |
} |
|
1325 | 1394 |
.footer .bottom.row .col { |
1326 | 1395 |
display: inline; |
1327 | 1396 |
float: left; |
b/cloudcms/static/cloudcms/less/styles.less | ||
---|---|---|
572 | 572 |
|
573 | 573 |
// footer |
574 | 574 |
.footer { |
575 |
.makeRow() |
|
576 |
|
|
575 |
.clearfix(); |
|
576 |
color: lighten(@gray, 20%); |
|
577 |
.transit(); |
|
578 |
|
|
579 |
a { .transit() } |
|
580 |
|
|
577 | 581 |
&:hover { |
582 |
color: @gray !important; |
|
578 | 583 |
a { |
579 | 584 |
color: @gray !important; |
580 |
.transit(); |
|
581 | 585 |
} |
582 | 586 |
} |
583 | 587 |
|
584 | 588 |
a { |
585 | 589 |
color: lighten(@gray, 20%); |
586 |
.transit(); |
|
587 | 590 |
text-decoration: none; |
588 | 591 |
|
589 | 592 |
&:hover { |
590 |
color: darken(@gray, 50%);
|
|
593 |
color: #000 !important;
|
|
591 | 594 |
} |
592 | 595 |
} |
593 | 596 |
|
... | ... | |
606 | 609 |
margin-right:0; |
607 | 610 |
} |
608 | 611 |
} |
612 |
|
|
613 |
.top.row, .last.row { |
|
614 |
.makeRow(); |
|
615 |
margin: 20px 0; |
|
616 |
|
|
617 |
.col { |
|
618 |
.makeColumn(4); |
|
619 |
|
|
620 |
&.first { |
|
621 |
margin-left: 0 !important; |
|
622 |
} |
|
623 |
&.last { |
|
624 |
.makeColumn(2); |
|
625 |
} |
|
626 |
} |
|
627 |
} |
|
628 |
.top.row { |
|
629 |
margin-top: 0; |
|
630 |
} |
|
631 |
|
|
632 |
.last.row { |
|
633 |
text-align: left; |
|
634 |
font-size: 0.8em; |
|
635 |
margin-bottom: 0; |
|
636 |
} |
|
609 | 637 |
|
610 | 638 |
.bottom.row { |
611 | 639 |
.col { |
b/cloudcms/templates/cms/footer.html | ||
---|---|---|
1 |
{% if APP.footer_top %} |
|
2 |
<div class="top row"> |
|
3 |
{{ APP.footer_top|safe }} |
|
4 |
</div> |
|
5 |
{% endif %} |
|
1 | 6 |
<div class="bottom row"> |
2 | 7 |
{% load feincms_tags feincms_page_tags %} |
3 | 8 |
{% feincms_navigation of feincms_page as sublevel level=2,depth=1 %} |
... | ... | |
15 | 20 |
</ul> |
16 | 21 |
{% endfor %} |
17 | 22 |
</div> |
23 |
{% if APP.footer_bottom %} |
|
24 |
<div class="last row"> |
|
25 |
{{ APP.footer_bottom|safe }} |
|
26 |
</div> |
|
27 |
{% endif %} |
Also available in: Unified diff