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 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 ad627c67..54fabede 100644 --- a/community/install.py +++ b/community/install.py @@ -3,9 +3,13 @@ import os import frappe +APP_LOGO_URL = os.getenv("APP_LOGO_URL") or "/files/logo.png" + def after_install(): set_app_name() disable_signup() + add_header_items() + add_footer_items() def set_app_name(): app_name = os.getenv("FRAPPE_APP_NAME") @@ -14,3 +18,25 @@ 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"}, + {"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 @@ +