From e330f45adcc8539d0f35a7e6c942b77aaa89f6c9 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Wed, 5 May 2021 12:53:24 +0530 Subject: [PATCH 1/4] style: fixed the footer --- community/install.py | 13 +++++++++ community/public/css/style.less | 20 +++++++++++++ community/public/images/fossunited-logo.svg | 29 +++++++++++++++++++ .../includes/footer/footer_info.html | 14 +++++++++ .../footer/footer_logo_extension.html | 12 ++++++++ 5 files changed, 88 insertions(+) create mode 100644 community/public/images/fossunited-logo.svg create mode 100644 community/templates/includes/footer/footer_info.html create mode 100644 community/templates/includes/footer/footer_logo_extension.html diff --git a/community/install.py b/community/install.py index ad627c67..6593b3ea 100644 --- a/community/install.py +++ b/community/install.py @@ -6,6 +6,7 @@ import frappe def after_install(): set_app_name() disable_signup() + add_footer_items() def set_app_name(): app_name = os.getenv("FRAPPE_APP_NAME") @@ -14,3 +15,15 @@ def set_app_name(): def disable_signup(): frappe.db.set_value("Website Settings", None, "disable_signup", 1) + +def add_footer_items(): + items = [ + {"label": "About", "url": "/about"}, + {"label": "Blog", "url": "/blog"}, + {"label": "Github", "url": "https://github.com/fossunited/community"} + ] + doc = frappe.get_doc("Website Settings", None) + doc.update({ + "footer_items": items + }) + doc.save() diff --git a/community/public/css/style.less b/community/public/css/style.less index 2676fb0a..ffafb8c3 100644 --- a/community/public/css/style.less +++ b/community/public/css/style.less @@ -102,3 +102,23 @@ section.lightgray { width: 40%; display: inline-block; } + +.footer-grouped-links { + display: none; +} + +.footer-info { + border-top: 0px; + margin-top: 0px; + + .footer-col-right { + padding-top: 1.8rem; + } +} + +.web-footer { + border-top: 1px solid #E2E6E9; + padding: 0px; + padding: 2rem 0px; + margin-top: 2rem; +} diff --git a/community/public/images/fossunited-logo.svg b/community/public/images/fossunited-logo.svg new file mode 100644 index 00000000..d5e8198d --- /dev/null +++ b/community/public/images/fossunited-logo.svg @@ -0,0 +1,29 @@ + + + + Group 2 + Created with Sketch. + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/community/templates/includes/footer/footer_info.html b/community/templates/includes/footer/footer_info.html new file mode 100644 index 00000000..26b1cc8a --- /dev/null +++ b/community/templates/includes/footer/footer_info.html @@ -0,0 +1,14 @@ + + diff --git a/community/templates/includes/footer/footer_logo_extension.html b/community/templates/includes/footer/footer_logo_extension.html new file mode 100644 index 00000000..073ef7ec --- /dev/null +++ b/community/templates/includes/footer/footer_logo_extension.html @@ -0,0 +1,12 @@ + From 041bed7e9d69eb1e46e0a70e4461c730049fe77b Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Wed, 5 May 2021 12:56:27 +0530 Subject: [PATCH 2/4] Added sketches to the nav-bar on install --- community/install.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/community/install.py b/community/install.py index 6593b3ea..f46a8a39 100644 --- a/community/install.py +++ b/community/install.py @@ -6,6 +6,7 @@ import frappe def after_install(): set_app_name() disable_signup() + add_header_items() add_footer_items() def set_app_name(): @@ -16,6 +17,16 @@ def set_app_name(): def disable_signup(): frappe.db.set_value("Website Settings", None, "disable_signup", 1) +def add_header_items(): + items = [ + {"label": "Sketches", "url": "/sketches"}, + ] + doc = frappe.get_doc("Website Settings", None) + doc.update({ + "top_bar_items": items + }) + doc.save() + def add_footer_items(): items = [ {"label": "About", "url": "/about"}, From da771d783062b86b469140db0dcb6b87946ef29a Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Wed, 5 May 2021 14:17:52 +0530 Subject: [PATCH 3/4] [actions] added action to ache bench --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1a302de..d33397d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,10 +38,25 @@ jobs: with: node-version: '12' check-latest: true + - name: setup cache for bench + uses: actions/cache@v2 + with: + path: ~/bench-cache + key: ${{ runner.os }} - name: install bench - run: pip3 install frappe-bench + run: | + pip3 install frappe-bench + which bench - name: bench init - run: bench init ~/frappe-bench --skip-redis-config-generation + run: | + if [ -d ~/bench-cache/bench.tgz ] + then + (cd && tar xzf ~/bench-cache/bench.tgz) + else + bench init ~/frappe-bench --skip-redis-config-generation + mkdir -p ~/bench-cache + (cd && tar czf ~/bench-cache/bench.tgz frappe-bench) + fi - name: add community app to bench working-directory: /home/runner/frappe-bench run: bench get-app community $GITHUB_WORKSPACE @@ -50,7 +65,7 @@ jobs: run: bench new-site --mariadb-root-password root --admin-password admin frappe.local - name: install community app working-directory: /home/runner/frappe-bench - run: bench --site frappe.local install-app community + run: bench --verbose --site frappe.local install-app community - name: allow tests working-directory: /home/runner/frappe-bench run: bench --site frappe.local set-config allow_tests true From c2be23a90234d37676e50bc6d12d5a19a57a5426 Mon Sep 17 00:00:00 2001 From: Anand Chitipothu Date: Wed, 5 May 2021 15:48:43 +0530 Subject: [PATCH 4/4] fix: fixed the pickle error on installing community --- community/hooks.py | 4 ++-- community/install.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/community/hooks.py b/community/hooks.py index ea17ba2f..bc97e3a2 100644 --- a/community/hooks.py +++ b/community/hooks.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version -import os +from .install import APP_LOGO_URL app_name = "community" app_title = "Community" @@ -12,7 +12,7 @@ app_color = "grey" app_email = "jannat@erpnext.com" app_license = "AGPL" -app_logo_url = os.getenv("APP_LOGO_URL") or "/files/logo.png" +app_logo_url = APP_LOGO_URL # Includes in # ------------------ diff --git a/community/install.py b/community/install.py index f46a8a39..54fabede 100644 --- a/community/install.py +++ b/community/install.py @@ -3,6 +3,8 @@ import os import frappe +APP_LOGO_URL = os.getenv("APP_LOGO_URL") or "/files/logo.png" + def after_install(): set_app_name() disable_signup()