Add show non transparent navbar always option
This commit is contained in:
		
					parent
					
						
							
								0c82525b7f
							
						
					
				
			
			
				commit
				
					
						3b6e5d448b
					
				
			
		
					 4 changed files with 27 additions and 2 deletions
				
			
		|  | @ -184,6 +184,11 @@ class DCLNavbarPluginModel(CMSPlugin): | |||
|         default=True, | ||||
|         help_text='Uncheck this if you do not want to show login/dashboard.' | ||||
|     ) | ||||
|     show_non_transparent_navbar_always = models.BooleanField( | ||||
|         default=False, | ||||
|         help_text='Check this if you want to show non transparent navbar only.' | ||||
|                   '(Useful when we want to setup a simple page)' | ||||
|     ) | ||||
| 
 | ||||
|     def get_logo_dark(self): | ||||
|         # used only if atleast one logo exists | ||||
|  |  | |||
|  | @ -0,0 +1,20 @@ | |||
| # -*- coding: utf-8 -*- | ||||
| # Generated by Django 1.9.4 on 2019-12-24 03:34 | ||||
| from __future__ import unicode_literals | ||||
| 
 | ||||
| from django.db import migrations, models | ||||
| 
 | ||||
| 
 | ||||
| class Migration(migrations.Migration): | ||||
| 
 | ||||
|     dependencies = [ | ||||
|         ('datacenterlight', '0029_auto_20190420_1022'), | ||||
|     ] | ||||
| 
 | ||||
|     operations = [ | ||||
|         migrations.AddField( | ||||
|             model_name='dclnavbarpluginmodel', | ||||
|             name='show_non_transparent_navbar_always', | ||||
|             field=models.BooleanField(default=False, help_text='Check this if you want to show non transparent navbar only.(Useful when we want to setup a simple page)'), | ||||
|         ), | ||||
|     ] | ||||
|  | @ -1,7 +1,7 @@ | |||
| {% load static i18n custom_tags cms_tags %} | ||||
| {% get_current_language as LANGUAGE_CODE %} | ||||
| 
 | ||||
| <nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent"> | ||||
| <nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}"> | ||||
|   <!-- Brand and toggle get grouped for better mobile display --> | ||||
|   <div class="navbar-header"> | ||||
|     <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#dcl-topnav"> | ||||
|  |  | |||
|  | @ -1,7 +1,7 @@ | |||
| {% load staticfiles i18n custom_tags %} | ||||
| {% get_current_language as LANGUAGE_CODE %} | ||||
| 
 | ||||
| <nav class="navbar navbar-default navbar-fixed-top topnav navbar-transparent"> | ||||
| <nav class="navbar navbar-default navbar-fixed-top topnav {% if instance.show_non_transparent_navbar_always is False %}navbar-transparent{% endif %}"> | ||||
|     <!-- Brand and toggle get grouped for better mobile display --> | ||||
|     <div class="navbar-header"> | ||||
|         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue