add footer and header placeholders
This commit is contained in:
		
					parent
					
						
							
								bc36849178
							
						
					
				
			
			
				commit
				
					
						e7d7cf67b2
					
				
			
		
					 6 changed files with 90 additions and 61 deletions
				
			
		|  | @ -9,11 +9,17 @@ from cms.models.fields import PlaceholderField | |||
| class CMSIntegration(models.Model): | ||||
|     name = models.CharField( | ||||
|         max_length=100, unique=True, default='default', | ||||
|         help_text='An optional heading for the Section', | ||||
|         help_text=( | ||||
|             'A unique name for the Integration. This name will be used to ' | ||||
|             'fetch the Integration into pages' | ||||
|         ) | ||||
|     ) | ||||
|     footer_placeholder = PlaceholderField('datacenterlight_footer') | ||||
|     navbar_placeholder = PlaceholderField('datacenterlight_navbar') | ||||
| 
 | ||||
|     def __str__(self): | ||||
|         return self.name | ||||
| 
 | ||||
| 
 | ||||
| # Models for CMS Plugins | ||||
| 
 | ||||
|  |  | |||
							
								
								
									
										31
									
								
								datacenterlight/migrations/0016_cmsintegration.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								datacenterlight/migrations/0016_cmsintegration.py
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,31 @@ | |||
| # -*- coding: utf-8 -*- | ||||
| # Generated by Django 1.9.4 on 2018-03-27 15:31 | ||||
| from __future__ import unicode_literals | ||||
| 
 | ||||
| import cms.models.fields | ||||
| from django.db import migrations, models | ||||
| import django.db.models.deletion | ||||
| 
 | ||||
| 
 | ||||
| class Migration(migrations.Migration): | ||||
| 
 | ||||
|     dependencies = [ | ||||
|         ('datacenterlight', '0015_auto_20180323_0011'), | ||||
|         ('cms', '0014_auto_20160404_1908'), | ||||
|     ] | ||||
| 
 | ||||
|     operations = [ | ||||
|         migrations.CreateModel( | ||||
|             name='CMSIntegration', | ||||
|             fields=[ | ||||
|                 ('id', models.AutoField(auto_created=True, | ||||
|                                         primary_key=True, serialize=False, verbose_name='ID')), | ||||
|                 ('navbar_placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, | ||||
|                                                                           on_delete=django.db.models.deletion.CASCADE, slotname='datacenterlight_navbar', to='cms.Placeholder')), | ||||
|                 ('footer_placeholder', cms.models.fields.PlaceholderField(editable=False, null=True, | ||||
|                                                                           on_delete=django.db.models.deletion.CASCADE, slotname='datacenterlight_footer', to='cms.Placeholder')), | ||||
|                 ('name', models.CharField(default='default', | ||||
|                                           help_text='A unique name for the Integration. This name will be used to fetch the Integration into pages', max_length=100, unique=True)), | ||||
|             ], | ||||
|         ), | ||||
|     ] | ||||
|  | @ -84,8 +84,24 @@ a.list-group-item-danger.active:focus { | |||
|   } | ||||
| } | ||||
| 
 | ||||
| .navbar .dcl-link { | ||||
|   display: block; | ||||
|   padding: 15px; | ||||
|   color: #777; | ||||
| } | ||||
| 
 | ||||
| .navbar .dcl-link:focus, | ||||
| .navbar .dcl-link:active, | ||||
| .navbar .dcl-link:hover { | ||||
|   text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .navbar .dropdown-menu .dcl-link { | ||||
|   padding: 1px 10px; | ||||
| } | ||||
| 
 | ||||
| p.copyright { | ||||
|   margin: 15px 0 0; | ||||
|   margin: 15px 0; | ||||
| } | ||||
| 
 | ||||
| footer { | ||||
|  | @ -95,4 +111,23 @@ footer { | |||
| 
 | ||||
| footer a { | ||||
|   color: #777; | ||||
| } | ||||
| 
 | ||||
| footer .dcl-link-separator { | ||||
|   position: relative; | ||||
|   padding-left: 10px; | ||||
| } | ||||
| 
 | ||||
| footer .dcl-link-separator::before { | ||||
|   content: ""; | ||||
|   position: absolute; | ||||
|   display: inline-block; | ||||
|   top: 9px; | ||||
|   bottom: 0; | ||||
|   left: -2px; | ||||
|   right: 0; | ||||
|   width: 2px; | ||||
|   height: 2px; | ||||
|   border-radius: 100%; | ||||
|   background: #777; | ||||
| } | ||||
|  | @ -15,8 +15,8 @@ | |||
| } | ||||
| 
 | ||||
| @media(min-width: 768px) { | ||||
|   .navbar-default .navbar-nav>li>a, | ||||
|   .navbar-right .highlights-dropdown .dropdown-menu>li>a { | ||||
|   .navbar-default .navbar-nav>li a, | ||||
|   .navbar-right .highlights-dropdown .dropdown-menu>li a { | ||||
|     font-weight: 300; | ||||
|   } | ||||
|   .navbar-right .highlights-dropdown .dropdown-menu { | ||||
|  | @ -26,7 +26,7 @@ | |||
|   } | ||||
| } | ||||
| 
 | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li>a { | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li a { | ||||
|   font-size: 13px; | ||||
|   font-family: 'Lato', sans-serif; | ||||
|   padding: 1px 10px 1px 18px !important; | ||||
|  | @ -34,9 +34,9 @@ | |||
|   color: #333; | ||||
| } | ||||
| 
 | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li>a:hover, | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li>a:focus, | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li>a:active { | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li a:hover, | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li a:focus, | ||||
| .navbar-right .highlights-dropdown .dropdown-menu>li a:active { | ||||
|   background: transparent; | ||||
|   text-decoration: underline !important; | ||||
| } | ||||
|  | @ -144,9 +144,9 @@ | |||
| } | ||||
| 
 | ||||
| @media (max-width: 767px) { | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active>a, | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus, | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover { | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active a, | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active a:focus, | ||||
|   .navbar-default .navbar-nav .open .dropdown-menu>.active a:hover { | ||||
|     background-color: transparent; | ||||
|   } | ||||
| } | ||||
|  | @ -163,7 +163,7 @@ | |||
| } | ||||
| 
 | ||||
| .content-dashboard { | ||||
|   min-height: calc(100vh - 60px); | ||||
|   min-height: calc(100vh - 86px); | ||||
|   width: 100%; | ||||
|   margin: 0 auto; | ||||
|   max-width: 1120px; | ||||
|  |  | |||
|  | @ -99,15 +99,13 @@ textarea { | |||
|   } | ||||
| } | ||||
| 
 | ||||
| .navbar-transparent .navbar-nav>li a, | ||||
| .navbar-transparent .navbar-nav>.open>a, | ||||
| .navbar-transparent .navbar-nav>.open>a:focus, | ||||
| .navbar-transparent .navbar-nav>.open>a:hover { | ||||
|   color: #fff; | ||||
| } | ||||
| 
 | ||||
| .navbar-transparent .navbar-nav>li a { | ||||
|   color: #fff; | ||||
| } | ||||
| 
 | ||||
| .navbar-transparent .navbar-nav>li a:focus, | ||||
| .navbar-transparent .navbar-nav>li a:active, | ||||
|  | @ -123,22 +121,6 @@ textarea { | |||
|   background: transparent; | ||||
| } | ||||
| 
 | ||||
| .navbar .dcl-link { | ||||
|   display: block; | ||||
|   padding: 15px; | ||||
|   color: #777; | ||||
| } | ||||
| 
 | ||||
| .navbar .dcl-link:focus, | ||||
| .navbar .dcl-link:active, | ||||
| .navbar .dcl-link:hover { | ||||
|   text-decoration: none; | ||||
| } | ||||
| 
 | ||||
| .navbar .dropdown-menu .dcl-link { | ||||
|   padding: 1px 10px; | ||||
| } | ||||
| 
 | ||||
| .navbar-transparent .navbar-nav>li>.on-hover-border { | ||||
|   transition: all 0.3s linear; | ||||
|   box-shadow: none; | ||||
|  | @ -1233,24 +1215,6 @@ footer { | |||
|   transform: rotate(45deg); | ||||
| } | ||||
| 
 | ||||
| footer .dcl-link-separator { | ||||
|   position: relative; | ||||
|   padding-left: 10px; | ||||
| } | ||||
| 
 | ||||
| footer .dcl-link-separator::before { | ||||
|   content: ""; | ||||
|   position: absolute; | ||||
|   display: inline-block; | ||||
|   top: 9px; | ||||
|   bottom: 0; | ||||
|   left: -2px; | ||||
|   right: 0; | ||||
|   width: 2px; | ||||
|   height: 2px; | ||||
|   border-radius: 100%; | ||||
|   background: #777; | ||||
| } | ||||
| 
 | ||||
| /* new styles for whydcl section cms plugin (to replace older style) */ | ||||
| 
 | ||||
|  |  | |||
|  | @ -23,6 +23,9 @@ | |||
|     <!-- Custom CSS --> | ||||
|     <link href="{% static 'datacenterlight/css/common.css' %}" rel="stylesheet"> | ||||
|     <link href="{% static 'datacenterlight/css/hosting.css' %}" rel="stylesheet"> | ||||
|     {% if request.toolbar.edit_mode %} | ||||
|         <link href="{% static 'datacenterlight/css/cms.css' %}" rel="stylesheet"> | ||||
|     {% endif %} | ||||
|     {% block css_extra %} | ||||
|     {% endblock css_extra %} | ||||
| 
 | ||||
|  | @ -55,18 +58,8 @@ | |||
|         {% endblock %} | ||||
|     </div> | ||||
| 
 | ||||
|     <!-- Footer --> | ||||
|     {% if request.user.is_authenticated %} | ||||
|         <footer class="footer-vm"> | ||||
|             <div class="container"> | ||||
|                 <p class="copyright text-muted small">Copyright © ungleich GmbH {% now "Y" %}. {% trans "All Rights Reserved" %}</p> | ||||
|             </div> | ||||
|         </footer> | ||||
|     {% else %} | ||||
|         <div class="footer-vm"> | ||||
|             {% include "datacenterlight/includes/_footer.html" %} | ||||
|         </div> | ||||
|     {% endif %} | ||||
|     {% render_placeholder cms_integration.footer_placeholder %} | ||||
| 
 | ||||
| 
 | ||||
|     <!-- Moment --> | ||||
|     <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue