├── bdtheme ├── patches.txt ├── bd_theme │ └── __init__.py ├── config │ ├── __init__.py │ ├── desktop.py │ └── docs.py ├── modules.txt ├── public │ ├── css │ │ ├── temp.css │ │ ├── bdtheme-web.css │ │ ├── custom.css │ │ ├── skin-blue.css │ │ └── bdtheme.css │ ├── images │ │ ├── icons.png │ │ ├── boxed-bg.jpg │ │ ├── boxed-bg.png │ │ ├── bp-ico-32.png │ │ ├── bp-ico-192.png │ │ ├── logo_bdoop.png │ │ └── default-50x50.gif │ ├── build.json │ └── js │ │ ├── custom.js │ │ ├── template │ │ └── main-sidebar.html │ │ └── bdtheme.js ├── templates │ ├── __init__.py │ └── pages │ │ └── __init__.py ├── __init__.py └── hooks.py ├── license.txt ├── requirements.txt ├── README.md ├── .gitignore ├── MANIFEST.in └── setup.py /bdtheme/patches.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | License: MIT -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | frappe -------------------------------------------------------------------------------- /bdtheme/bd_theme/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bdtheme/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bdtheme/modules.txt: -------------------------------------------------------------------------------- 1 | bd theme -------------------------------------------------------------------------------- /bdtheme/public/css/temp.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bdtheme/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bdtheme/templates/pages/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bdtheme/public/css/bdtheme-web.css: -------------------------------------------------------------------------------- 1 | footer.web-footer{display:none} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## bd theme 2 | 3 | bd theme 4 | 5 | #### License 6 | 7 | MIT -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *.pyc 3 | *.egg-info 4 | *.swp 5 | tags 6 | bdtheme/docs/current -------------------------------------------------------------------------------- /bdtheme/public/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/icons.png -------------------------------------------------------------------------------- /bdtheme/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | __version__ = '0.0.1' 5 | 6 | -------------------------------------------------------------------------------- /bdtheme/public/images/boxed-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/boxed-bg.jpg -------------------------------------------------------------------------------- /bdtheme/public/images/boxed-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/boxed-bg.png -------------------------------------------------------------------------------- /bdtheme/public/images/bp-ico-32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/bp-ico-32.png -------------------------------------------------------------------------------- /bdtheme/public/images/bp-ico-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/bp-ico-192.png -------------------------------------------------------------------------------- /bdtheme/public/images/logo_bdoop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/logo_bdoop.png -------------------------------------------------------------------------------- /bdtheme/public/images/default-50x50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vinhnguyent090/bdtheme/HEAD/bdtheme/public/images/default-50x50.gif -------------------------------------------------------------------------------- /bdtheme/config/desktop.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from frappe import _ 4 | 5 | def get_data(): 6 | return [ 7 | { 8 | "module_name": "bd theme", 9 | "color": "grey", 10 | "icon": "octicon octicon-file-directory", 11 | "type": "module", 12 | "label": _("bd theme") 13 | } 14 | ] 15 | -------------------------------------------------------------------------------- /bdtheme/config/docs.py: -------------------------------------------------------------------------------- 1 | """ 2 | Configuration for docs 3 | """ 4 | 5 | # source_link = "https://github.com/[org_name]/bdtheme" 6 | # docs_base_url = "https://[org_name].github.io/bdtheme" 7 | # headline = "App that does everything" 8 | # sub_heading = "Yes, you got that right the first time, everything" 9 | 10 | def get_context(context): 11 | context.brand_html = "bd theme" 12 | -------------------------------------------------------------------------------- /bdtheme/public/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "css/bdtheme.min.css": [ 3 | "public/css/bdtheme.css", 4 | "public/css/skin-blue.css", 5 | "public/css/custom.css", 6 | "public/css/temp.css" 7 | ], 8 | "js/bdtheme.min.js": [ 9 | "public/js/bdtheme.js", 10 | "public/js/custom.js" 11 | ], 12 | "js/bdtheme-template.min.js": [ 13 | "public/js/template/main-sidebar.html" 14 | ] 15 | 16 | } -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in 2 | include requirements.txt 3 | include *.json 4 | include *.md 5 | include *.py 6 | include *.txt 7 | recursive-include bdtheme *.css 8 | recursive-include bdtheme *.csv 9 | recursive-include bdtheme *.html 10 | recursive-include bdtheme *.ico 11 | recursive-include bdtheme *.js 12 | recursive-include bdtheme *.json 13 | recursive-include bdtheme *.md 14 | recursive-include bdtheme *.png 15 | recursive-include bdtheme *.py 16 | recursive-include bdtheme *.svg 17 | recursive-include bdtheme *.txt 18 | recursive-exclude bdtheme *.pyc -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from setuptools import setup, find_packages 4 | import re, ast 5 | 6 | with open('requirements.txt') as f: 7 | install_requires = f.read().strip().split('\n') 8 | 9 | # get version from __version__ variable in bdtheme/__init__.py 10 | _version_re = re.compile(r'__version__\s+=\s+(.*)') 11 | 12 | with open('bdtheme/__init__.py', 'rb') as f: 13 | version = str(ast.literal_eval(_version_re.search( 14 | f.read().decode('utf-8')).group(1))) 15 | 16 | setup( 17 | name='bdtheme', 18 | version=version, 19 | description='bd theme', 20 | author='vinhbk2000', 21 | author_email='vinhbk2000@gmail.com', 22 | packages=find_packages(), 23 | zip_safe=False, 24 | include_package_data=True, 25 | install_requires=install_requires 26 | ) 27 | -------------------------------------------------------------------------------- /bdtheme/public/css/custom.css: -------------------------------------------------------------------------------- 1 | #page-desktop{ position: static} 2 | #body_div{ background: #FFFFFF} 3 | .main-section{ background: #222d32} 4 | .page-head{ position: static} 5 | .page-content{ margin-top:0} 6 | header .container{ width:100%; padding:0px 15px 0 0; min-height: 50px;} 7 | .navbar-brand{ padding: 0 15px 0 15px; line-height: 50px; height: 50px;} 8 | #navbar-breadcrumbs > li > a{ padding: 11px 15px 15px 0px} 9 | .navbar-form{ margin-top:10px;} 10 | .navbar .dropdown-toggle{padding:13px 15px} 11 | header .dropdown-help{display:none} 12 | .main-header .sidebar-toggle{text-decoration: none;} 13 | .page-container{margin-top:0;} 14 | /* 15 | .navbar-brand{height: 50px; line-height: 30px} 16 | .main-header .logo { height: 40px} 17 | .main-header .sidebar-toggle{ line-height: 40px;} 18 | .main-header .navbar{min-height: 40px;} 19 | */ 20 | #page-desktop{ background-color:#FFFFFF !important} 21 | .main-header .logo .logo-lg{ 22 | background: #367fa9 url(/assets/bdtheme/images/logo_bdoop.png) center no-repeat; 23 | background-size: auto 48px; 24 | text-indent:-99em; 25 | } 26 | .main-header .logo .logo-mini{ 27 | background: #367fa9 url(/assets/bdtheme/images/bp-ico-32.png) center no-repeat; 28 | background-size: auto 38px; 29 | text-indent:-99em; 30 | } 31 | .layout-side-section{ font-size: 13px;} 32 | .case-label{ color:#000; text-shadow:none; font-size: 95%; font-weight:normal} 33 | h6.uppercase, .h6.uppercase{ color: #666666;} 34 | .control-label, .grid-heading-row{ color: #666666;} 35 | 36 | @media (max-width: 767px) { 37 | .skin-blue .main-header .navbar .dropdown-menu li a { 38 | color: #333; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /bdtheme/public/js/custom.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | $('header').prepend(frappe.render_template("logo")); 3 | $('header .navbar .container').prepend(frappe.render_template("sidebar-toggle")); 4 | $('.main-section').append(frappe.render_template("main-sidebar")); 5 | 6 | $('header').addClass('main-header'); 7 | $('header .navbar').removeClass('navbar-fixed-top'); 8 | $('body').addClass('skin-blue sidebar-mini sidebar-collapse'); 9 | $('#body_div').addClass('content-wrapper'); 10 | 11 | bdtheme.set_user_background(); 12 | 13 | }); 14 | 15 | frappe.provide("bdtheme"); 16 | 17 | // add toolbar icon 18 | $(document).bind('toolbar_setup', function() { 19 | frappe.app.name = "bdoop Erp"; 20 | $('.navbar-home').html(frappe._('Home')); 21 | 22 | }); 23 | 24 | bdtheme.set_user_background = function(src, selector, style){ 25 | if(!selector) selector = "#page-desktop"; 26 | if(!style) style = "Fill Screen"; 27 | if(src) { 28 | if (window.cordova && src.indexOf("http") === -1) { 29 | src = frappe.base_url + src; 30 | } 31 | var background = repl('background: url("%(src)s") center center;', {src: src}); 32 | } else { 33 | var background = "background-color: #FFFFFF;"; 34 | } 35 | 36 | frappe.dom.set_style(repl('%(selector)s { \ 37 | %(background)s \ 38 | %(style)s \ 39 | }', { 40 | selector:selector, 41 | background:background, 42 | style: "" 43 | })); 44 | } 45 | 46 | frappe.templates["logo"] = '' 47 | + ' bd' 48 | +' bdoop' 49 | +' '; 50 | 51 | frappe.templates["sidebar-toggle"] = '' 52 | + 'Toggle navigation' 53 | + ''; -------------------------------------------------------------------------------- /bdtheme/hooks.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | from . import __version__ as app_version 4 | 5 | app_name = "bdtheme" 6 | app_title = "bd theme" 7 | app_publisher = "vinhbk2000" 8 | app_description = "bd theme" 9 | app_icon = "octicon octicon-file-directory" 10 | app_color = "grey" 11 | app_email = "vinhbk2000@gmail.com" 12 | app_license = "MIT" 13 | 14 | # Includes in
15 | # ------------------ 16 | 17 | # include js, css files in header of desk.html 18 | app_include_css = [ 19 | "/assets/bdtheme/css/bdtheme.css", 20 | "/assets/bdtheme/css/skin-blue.css", 21 | "/assets/bdtheme/css/custom.css", 22 | "/assets/bdtheme/css/temp.css", 23 | ] 24 | app_include_js = [ 25 | "/assets/bdtheme/js/bdtheme.js", 26 | "/assets/bdtheme/js/custom.js", 27 | "/assets/js/bdtheme-template.min.js", 28 | ] 29 | 30 | # include js, css files in header of web template 31 | web_include_css = "/assets/bdtheme/css/bdtheme-web.css" 32 | # web_include_js = "/assets/bdtheme/js/bdtheme.js" 33 | 34 | # include js in page 35 | # page_js = {"page" : "public/js/file.js"} 36 | 37 | # include js in doctype views 38 | # doctype_js = {"doctype" : "public/js/doctype.js"} 39 | # doctype_list_js = {"doctype" : "public/js/doctype_list.js"} 40 | # doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} 41 | 42 | # Home Pages 43 | # ---------- 44 | 45 | # application home page (will override Website Settings) 46 | # home_page = "login" 47 | 48 | # website user home page (by Role) 49 | # role_home_page = { 50 | # "Role": "home_page" 51 | # } 52 | 53 | # Website user home page (by function) 54 | # get_website_user_home_page = "bdtheme.utils.get_home_page" 55 | 56 | # Generators 57 | # ---------- 58 | 59 | # automatically create page for each record of this doctype 60 | # website_generators = ["Web Page"] 61 | 62 | # Installation 63 | # ------------ 64 | 65 | # before_install = "bdtheme.install.before_install" 66 | # after_install = "bdtheme.install.after_install" 67 | 68 | # Desk Notifications 69 | # ------------------ 70 | # See frappe.core.notifications.get_notification_config 71 | 72 | # notification_config = "bdtheme.notifications.get_notification_config" 73 | 74 | # Permissions 75 | # ----------- 76 | # Permissions evaluated in scripted ways 77 | 78 | # permission_query_conditions = { 79 | # "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", 80 | # } 81 | # 82 | # has_permission = { 83 | # "Event": "frappe.desk.doctype.event.event.has_permission", 84 | # } 85 | 86 | # Document Events 87 | # --------------- 88 | # Hook on document methods and events 89 | 90 | # doc_events = { 91 | # "*": { 92 | # "on_update": "method", 93 | # "on_cancel": "method", 94 | # "on_trash": "method" 95 | # } 96 | # } 97 | 98 | # Scheduled Tasks 99 | # --------------- 100 | 101 | # scheduler_events = { 102 | # "all": [ 103 | # "bdtheme.tasks.all" 104 | # ], 105 | # "daily": [ 106 | # "bdtheme.tasks.daily" 107 | # ], 108 | # "hourly": [ 109 | # "bdtheme.tasks.hourly" 110 | # ], 111 | # "weekly": [ 112 | # "bdtheme.tasks.weekly" 113 | # ] 114 | # "monthly": [ 115 | # "bdtheme.tasks.monthly" 116 | # ] 117 | # } 118 | 119 | # Testing 120 | # ------- 121 | 122 | # before_tests = "bdtheme.install.before_tests" 123 | 124 | # Overriding Whitelisted Methods 125 | # ------------------------------ 126 | # 127 | # override_whitelisted_methods = { 128 | # "frappe.desk.doctype.event.event.get_events": "bdtheme.event.get_events" 129 | # } 130 | 131 | -------------------------------------------------------------------------------- /bdtheme/public/css/skin-blue.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Skin: Blue 3 | * ---------- 4 | */ 5 | .skin-blue .main-header .navbar { 6 | background-color: #3c8dbc; 7 | } 8 | .skin-blue .main-header .navbar .nav > li > a { 9 | color: #ffffff; 10 | } 11 | .skin-blue .main-header .navbar .nav > li > a:hover, 12 | .skin-blue .main-header .navbar .nav > li > a:active, 13 | .skin-blue .main-header .navbar .nav > li > a:focus, 14 | .skin-blue .main-header .navbar .nav .open > a, 15 | .skin-blue .main-header .navbar .nav .open > a:hover, 16 | .skin-blue .main-header .navbar .nav .open > a:focus, 17 | .skin-blue .main-header .navbar .nav > .active > a { 18 | background: rgba(0, 0, 0, 0.1); 19 | color: #f6f6f6; 20 | } 21 | .skin-blue .main-header .navbar .sidebar-toggle { 22 | color: #ffffff; 23 | } 24 | .skin-blue .main-header .navbar .sidebar-toggle:hover { 25 | color: #f6f6f6; 26 | background: rgba(0, 0, 0, 0.1); 27 | } 28 | .skin-blue .main-header .navbar .sidebar-toggle { 29 | color: #fff; 30 | } 31 | .skin-blue .main-header .navbar .sidebar-toggle:hover { 32 | background-color: #367fa9; 33 | } 34 | @media (max-width: 767px) { 35 | .skin-blue .main-header .navbar .dropdown-menu li.divider { 36 | background-color: rgba(255, 255, 255, 0.1); 37 | } 38 | .skin-blue .main-header .navbar .dropdown-menu li a { 39 | color: #fff; 40 | } 41 | .skin-blue .main-header .navbar .dropdown-menu li a:hover { 42 | background: #367fa9; 43 | } 44 | } 45 | .skin-blue .main-header .logo { 46 | background-color: #367fa9; 47 | color: #ffffff; 48 | border-bottom: 0 solid transparent; 49 | } 50 | .skin-blue .main-header .logo:hover { 51 | background-color: #357ca5; 52 | } 53 | .skin-blue .main-header li.user-header { 54 | background-color: #3c8dbc; 55 | } 56 | .skin-blue .content-header { 57 | background: transparent; 58 | } 59 | .skin-blue .wrapper, 60 | .skin-blue .main-sidebar, 61 | .skin-blue .left-side { 62 | background-color: #222d32; 63 | } 64 | .skin-blue .user-panel > .info, 65 | .skin-blue .user-panel > .info > a { 66 | color: #fff; 67 | } 68 | .skin-blue .main-sidebar .sidebar-menu > li.header { 69 | color: #4b646f; 70 | background: #1a2226; 71 | } 72 | .skin-blue .main-sidebar .sidebar-menu > li > a { 73 | border-left: 3px solid transparent; 74 | } 75 | .skin-blue .main-sidebar .sidebar-menu > li:hover > a, 76 | .skin-blue .main-sidebar .sidebar-menu > li.active > a { 77 | color: #ffffff; 78 | background: #1e282c; 79 | border-left-color: #3c8dbc; 80 | } 81 | .skin-blue .main-sidebar .sidebar-menu > li > .treeview-menu { 82 | margin: 0 1px; 83 | background: #2c3b41; 84 | } 85 | .skin-blue .sidebar a { 86 | color: #b8c7ce; 87 | } 88 | .skin-blue .sidebar a:hover { 89 | text-decoration: none; 90 | } 91 | .skin-blue .treeview-menu > li > a { 92 | color: #8aa4af; 93 | } 94 | .skin-blue .treeview-menu > li.active > a, 95 | .skin-blue .treeview-menu > li > a:hover { 96 | color: #ffffff; 97 | } 98 | .skin-blue .sidebar-form { 99 | border-radius: 3px; 100 | border: 1px solid #374850; 101 | margin: 10px 10px; 102 | } 103 | .skin-blue .sidebar-form input[type="text"], 104 | .skin-blue .sidebar-form .btn { 105 | box-shadow: none; 106 | background-color: #374850; 107 | border: 1px solid transparent; 108 | height: 35px; 109 | } 110 | .skin-blue .sidebar-form input[type="text"] { 111 | color: #666; 112 | border-top-left-radius: 2px; 113 | border-top-right-radius: 0; 114 | border-bottom-right-radius: 0; 115 | border-bottom-left-radius: 2px; 116 | } 117 | .skin-blue .sidebar-form input[type="text"]:focus, 118 | .skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { 119 | background-color: #fff; 120 | color: #666; 121 | } 122 | .skin-blue .sidebar-form input[type="text"]:focus + .input-group-btn .btn { 123 | border-left-color: #fff; 124 | } 125 | .skin-blue .sidebar-form .btn { 126 | color: #999; 127 | border-top-left-radius: 0; 128 | border-top-right-radius: 2px; 129 | border-bottom-right-radius: 2px; 130 | border-bottom-left-radius: 0; 131 | } 132 | .skin-blue.layout-top-nav .main-header > .logo { 133 | background-color: #3c8dbc; 134 | color: #ffffff; 135 | border-bottom: 0 solid transparent; 136 | } 137 | .skin-blue.layout-top-nav .main-header > .logo:hover { 138 | background-color: #3b8ab8; 139 | } 140 | -------------------------------------------------------------------------------- /bdtheme/public/js/template/main-sidebar.html: -------------------------------------------------------------------------------- 1 | 147 |