diff --git a/.copier-answers.yml b/.copier-answers.yml index 1bf1241..2691985 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -18,9 +18,9 @@ org_name: OpenG2P org_slug: OpenG2P rebel_module_groups: [] repo_description: This repo contains openg2p auth related modules. -repo_name: OpenG2P Auth -repo_slug: openg2p-auth -repo_website: https://github.com/OpenG2P/openg2p-importer +repo_name: OpenG2P Registration Portal +repo_slug: openg2p-registration-portal +repo_website: https://github.com/OpenG2P/openg2p-registration-portal use_pyproject_toml: true use_ruff: true diff --git a/g2p_portal_base/README.rst b/g2p_portal_base/README.rst new file mode 100644 index 0000000..1687fa2 --- /dev/null +++ b/g2p_portal_base/README.rst @@ -0,0 +1,62 @@ +============================= +G2P Registration Portal: Base +============================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:b237d3d791f88a90d51a124702fbe5e62c63e36a293e907569cdc9a8f2d577d7 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png + :target: https://odoo-community.org/page/development-status + :alt: Alpha +.. |badge2| image:: https://img.shields.io/badge/github-OpenG2P%2Fopeng2p--registration--portal-lightgray.png?logo=github + :target: https://github.com/OpenG2P/openg2p-registration-portal/tree/17.0-develop/g2p_portal_base + :alt: OpenG2P/openg2p-registration-portal + +|badge1| |badge2| + +OpenG2P Registration Portal Base + +.. IMPORTANT:: + This is an alpha version, the data model and design can change at any time without warning. + Only for development or testing purpose, do not use in production. + `More details on development status `_ + +**Table of contents** + +.. contents:: + :local: + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* OpenG2P + +Contributors +~~~~~~~~~~~~ + +`Manoj Kumar ` + +Maintainers +~~~~~~~~~~~ + +This module is part of the `OpenG2P/openg2p-registration-portal `_ project on GitHub. + +You are welcome to contribute. diff --git a/g2p_portal_base/__init__.py b/g2p_portal_base/__init__.py new file mode 100644 index 0000000..bb5acb3 --- /dev/null +++ b/g2p_portal_base/__init__.py @@ -0,0 +1,3 @@ +# Part of OpenG2P. See LICENSE file for full copyright and licensing details. +from . import models +from . import controllers diff --git a/g2p_portal_base/__manifest__.py b/g2p_portal_base/__manifest__.py new file mode 100644 index 0000000..6bc1873 --- /dev/null +++ b/g2p_portal_base/__manifest__.py @@ -0,0 +1,32 @@ +{ + "name": "G2P Registration Portal: Base", + "category": "OpenG2P", + "version": "17.0.1.0.0", + "sequence": 1, + "author": "OpenG2P", + "website": "https://openg2p.org", + "license": "Other OSI approved licence", + "development_status": "Alpha", + "depends": ["account", "website"], + "data": [ + "views/about_us.xml", + "views/base.xml", + "views/home.xml", + "views/contact_us.xml", + "views/login.xml", + "views/profile.xml", + "views/other.xml", + "views/menu_view.xml", + "views/registration_portal_extend_view.xml", + ], + "assets": { + "web.assets_frontend": [], + "web.assets_common": [], + "website.assets_wysiwyg": [], + }, + "demo": [], + "images": [], + "application": True, + "installable": True, + "auto_install": False, +} diff --git a/g2p_portal_base/controllers/__init__.py b/g2p_portal_base/controllers/__init__.py new file mode 100644 index 0000000..12a7e52 --- /dev/null +++ b/g2p_portal_base/controllers/__init__.py @@ -0,0 +1 @@ +from . import main diff --git a/g2p_portal_base/controllers/main.py b/g2p_portal_base/controllers/main.py new file mode 100644 index 0000000..80d4d4c --- /dev/null +++ b/g2p_portal_base/controllers/main.py @@ -0,0 +1,72 @@ +import logging +from argparse import _AppendAction + +from werkzeug.exceptions import Forbidden, Unauthorized + +from odoo import _, http +from odoo.http import request + +from odoo.addons.web.controllers.home import Home + +_logger = logging.getLogger(__name__) + + +class registrationBaseContorller(http.Controller): + @http.route(["/registration"], type="http", auth="public", website=True) + def portal_root(self, **kwargs): + if request.session and request.session.uid: + return request.redirect("/registration/home") + else: + return request.redirect("/registration/login") + + @http.route(["/registration/login"], type="http", auth="public", website=True) + def registration_login(self, **kwargs): + redirect_uri = request.params.get("redirect") or "/registration/home" + if request.session and request.session.uid: + return request.redirect(redirect_uri) + + context = {} + + if request.httprequest.method == "POST": + res = Home().web_login(**kwargs) + if request.params["login_success"]: + return res + else: + context["error"] = "Invalid Credentials" + + return request.render("g2p_portal_base.login_page", qcontext=context) + + @http.route(["/registration/home"], type="http", auth="user", website=True) + def portal_home(self, **kwargs): + self.check_roles("registration") + return request.render("g2p_portal_base.home_page") + + @http.route(["/registration/myprofile"], type="http", auth="public", website=True) + def portal_profile(self, **kwargs): + if request.session and request.session.uid: + current_partner = request.env.user.partner_id + return request.render( + "g2p_portal_base.profile_page", + { + "current_partner": current_partner, + }, + ) + + @http.route(["/registration/aboutus"], type="http", auth="public", website=True) + def portal_about_us(self, **kwargs): + return request.render("g2p_portal_base.about_us_page") + + @http.route(["/registration/contactus"], type="http", auth="public", website=True) + def portal_contact_us(self, **kwargs): + return request.render("g2p_portal_base.contact_us_page") + + @http.route(["/registration/otherpage"], type="http", auth="public", website=True) + def portal_other_page(self, **kwargs): + return request.render("g2p_portal_base.other_page") + + def check_roles(self, role_to_check): + if role_to_check == "registration": + if not request.session or not request.env.user: + raise Unauthorized(_("User is not logged in")) + if not request.env.user.partner_id.supplier_rank > 0: + raise Forbidden(_AppendAction("User is not allowed to access the portal")) diff --git a/g2p_portal_base/i18n/g2p_portal_base.pot b/g2p_portal_base/i18n/g2p_portal_base.pot new file mode 100644 index 0000000..4adaf8a --- /dev/null +++ b/g2p_portal_base/i18n/g2p_portal_base.pot @@ -0,0 +1,200 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * g2p_portal_base +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "" +"Email" +" Address" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "" +"Mobile Number" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "" +"Name" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "English" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "Filipino" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "Français" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.about_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "About Us" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.about_us_page +msgid "About Us | Registration Portal" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.contact_us_page +msgid "Contact Us" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.contact_us_page +msgid "Contact Us| Registration Portal" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Email or Phone" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Enter email or phone" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Enter password" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Facing any challenges?" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Help" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.about_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.contact_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.other_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "Home" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.home_page +msgid "Home | Registration Portal" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Login" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "Logout" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "My Profile" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.profile_page +msgid "My Profile | Registration Portal" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.other_page +msgid "Other" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "Others" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.other_page +msgid "Other| Registration Portal" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.about_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.contact_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.other_page +msgid "" +"Our experts are working hard to make this page available. Meanwhile, we " +"request you to please visit after some time." +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.about_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.contact_us_page +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.other_page +msgid "Page Under Construction!" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Password" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.login_page +msgid "Reset Password" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "Search here" +msgstr "" + +#. module: g2p_portal_base +#: model:ir.ui.menu,name:g2p_portal_base.menu_account_supplier +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.res_partner_view_search_g2p_inherit +msgid "Registration" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "User" +msgstr "" + +#. module: g2p_portal_base +#. odoo-python +#: code:addons/g2p_portal_base/controllers/main.py:0 +#, python-format +msgid "User is not logged in" +msgstr "" + +#. module: g2p_portal_base +#: model_terms:ir.ui.view,arch_db:g2p_portal_base.base +msgid "© 2023 National Social Benefits Portal. All rights reserved." +msgstr "" diff --git a/g2p_portal_base/models/__init__.py b/g2p_portal_base/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/g2p_portal_base/pyproject.toml b/g2p_portal_base/pyproject.toml new file mode 100644 index 0000000..4231d0c --- /dev/null +++ b/g2p_portal_base/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/g2p_portal_base/readme/CONTRIBUTORS.rst b/g2p_portal_base/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000..0361a26 --- /dev/null +++ b/g2p_portal_base/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +`Manoj Kumar ` diff --git a/g2p_portal_base/readme/DESCRIPTION.rst b/g2p_portal_base/readme/DESCRIPTION.rst new file mode 100644 index 0000000..5593963 --- /dev/null +++ b/g2p_portal_base/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +OpenG2P Registration Portal Base diff --git a/g2p_portal_base/static/description/icon.png b/g2p_portal_base/static/description/icon.png new file mode 100644 index 0000000..5ecb429 Binary files /dev/null and b/g2p_portal_base/static/description/icon.png differ diff --git a/g2p_portal_base/static/description/index.html b/g2p_portal_base/static/description/index.html new file mode 100644 index 0000000..6366ddc --- /dev/null +++ b/g2p_portal_base/static/description/index.html @@ -0,0 +1,420 @@ + + + + + +G2P Registration Portal: Base + + + +
+

G2P Registration Portal: Base

+ + +

Alpha OpenG2P/openg2p-registration-portal

+

OpenG2P Registration Portal Base

+
+

Important

+

This is an alpha version, the data model and design can change at any time without warning. +Only for development or testing purpose, do not use in production. +More details on development status

+
+

Table of contents

+ +
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • OpenG2P
  • +
+
+
+

Contributors

+

Manoj Kumar <mkumar6@ch.iitr.ac.in>

+
+
+

Maintainers

+

This module is part of the OpenG2P/openg2p-registration-portal project on GitHub.

+

You are welcome to contribute.

+
+
+
+ + diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Bold.woff b/g2p_portal_base/static/src/css/fonts/Inter-Bold.woff new file mode 100644 index 0000000..eaf3d4b Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Bold.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-BoldItalic.woff b/g2p_portal_base/static/src/css/fonts/Inter-BoldItalic.woff new file mode 100644 index 0000000..3275076 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-BoldItalic.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-ExtraLight.woff b/g2p_portal_base/static/src/css/fonts/Inter-ExtraLight.woff new file mode 100644 index 0000000..d0de5f3 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-ExtraLight.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Italic.woff b/g2p_portal_base/static/src/css/fonts/Inter-Italic.woff new file mode 100644 index 0000000..a806b38 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Italic.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Light.woff b/g2p_portal_base/static/src/css/fonts/Inter-Light.woff new file mode 100644 index 0000000..c496464 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Light.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Medium.woff b/g2p_portal_base/static/src/css/fonts/Inter-Medium.woff new file mode 100644 index 0000000..d546843 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Medium.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Regular.woff b/g2p_portal_base/static/src/css/fonts/Inter-Regular.woff new file mode 100644 index 0000000..62d3a61 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Regular.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-SemiBold.woff b/g2p_portal_base/static/src/css/fonts/Inter-SemiBold.woff new file mode 100644 index 0000000..a815f43 Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-SemiBold.woff differ diff --git a/g2p_portal_base/static/src/css/fonts/Inter-Thin.woff b/g2p_portal_base/static/src/css/fonts/Inter-Thin.woff new file mode 100644 index 0000000..62bc58c Binary files /dev/null and b/g2p_portal_base/static/src/css/fonts/Inter-Thin.woff differ diff --git a/g2p_portal_base/static/src/css/portal.css b/g2p_portal_base/static/src/css/portal.css new file mode 100644 index 0000000..abea6c7 --- /dev/null +++ b/g2p_portal_base/static/src/css/portal.css @@ -0,0 +1,799 @@ +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-Regular.woff") format("woff"); + font-weight: 400; +} + +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-Bold.woff") format("woff"); + font-weight: bold; +} + +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-BoldItalic.woff") format("woff"); + font-weight: bold; + font-style: italic; +} + +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-Italic.woff") format("woff"); + font-style: italic; + font-weight: 400; +} +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-Medium.woff") format("woff"); + font-style: medium; + font-weight: 500; +} + +@font-face { + font-family: "Inter"; + src: url("fonts/Inter-SemiBold.woff") format("woff"); + font-style: bolder; + font-weight: 600; +} + +header#top { + width: 100%; + margin: auto; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 4px 5px #0000000d; + opacity: 1; +} + +header#top .header-container { + /* width: auto; */ + margin: auto; +} + +.header-container .nav { + margin: auto; + /* width: auto; */ +} + +main { + width: 100%; + margin: auto; +} + +.container-adjuster { + width: 1180px; + margin: auto; +} + +footer#bottom { + width: 100%; + margin: auto; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 4px 5px #0000000d; + opacity: 1; +} +footer#bottom .footer-container { + /* width: auto; */ + margin: auto; +} + +footer#bottom .footer-container .nav { + /* width: auto; */ + margin: auto; +} + +.ssp-login-body { + background: transparent linear-gradient(0deg, #f5f7ff 0%, #f2f7ff 100%) 0% 0% no-repeat padding-box; + opacity: 1; + position: fixed; + left: 0px; + bottom: 0px; + top: 0px; + right: 0px; + font-size: 14px; + font-weight: 400; + font-family: Inter; + overflow-y: auto; +} + +.ssp-login-box { + margin: auto; + top: 75px; + width: 444px; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 15px #0000000d; + border-radius: 20px; + padding: 10px; + position: relative; +} + +.ssp-login-box .card { + width: 100% !important; + background: none; + box-shadow: none; + border-radius: 0px; + padding: 0px; +} + +.ssp-login-box .bg-100 { + background: none !important; + padding: 0px; +} + +.login-bottom-text { + margin: auto; + top: 90px; + width: 444px; + padding: 10px; + position: relative; + text-align: center; +} + +.ssp-login-box .card-body { + padding: 0px; +} + +.ssp-login-box .logo-box { + align-items: center; +} + +.ssp-login-box .logo { + width: 67%; + height: 67%; + opacity: 1; + margin-left: 15%; + margin-right: 15%; + margin-top: 20px; +} + +.ssp-login-box .field-login label, +.ssp-login-box .field-password label { + font-weight: bolder; + font-family: Inter; + margin-bottom: 4px; +} + +.ssp-login-box .btn-primary { + color: #ffffff; + background-color: #704880; + border-color: #704880; + border-radius: 6px; + opacity: 1; + width: 100%; + min-height: 54px; + max-height: 54px; +} + +.ssp-login-box .btn-primary :hover { + color: #ffffff; + background-color: #704880; + border-color: #704880; + opacity: 1; +} + +.ssp-login-box .btn-primary :active { + color: #ffffff; + background-color: #704880; + border-color: #704880; + opacity: 1; +} + +.ssp-login-box .card { + max-width: 100%; + width: 100%; +} + +.ssp-login-box .btn-primary:not(:disabled):not(.o_wysiwyg_loader):not(.disabled):active { + color: #ffffff; + background-color: #704880; + border-color: #704880; + opacity: 1; +} + +.ssp-login-box .reset-password { + float: right; +} + +.ssp-login-body a { + color: #704880; +} + +.ssp-login-box .form-control { + border-color: #e3e3e3; + border-radius: 6px; + margin-bottom: 8px; +} + +.ssp-login-box .list-group-item { + border: none; + font-weight: 600; + color: #000000; +} + +.ssp-login-box .oe_login_form { + margin: 20px; + max-width: 100%; +} + +/* Header Styles */ +.header-container { + top: 0px; + left: 0px; + /* width: 1366px; */ + height: 90px; + /* background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 4px 5px #0000000d; */ + opacity: 1; +} +.header-container .nav { + /* Layout Properties */ + top: 0px; + left: 0px; + /* margin-left: 139px; + margin-right: 152px; */ + width: 1180px; + height: 90px; + border: none; + background: #ffffff 0% 0% no-repeat padding-box; + display: flex; + justify-content: space-between; + align-items: center; + opacity: 1; +} +.header-container .nav .main-logo { + width: 272px; + height: 58px; + /* UI Properties */ + margin-top: 16px; + margin-bottom: 15.77px; + + opacity: 1; +} +.header-container .nav .nav-user { + display: flex; + width: 473px; +} +.nav-user .search-box { + left: 741px; + width: 273px; + height: 40px; + + background: #ffffff 0% 0% no-repeat padding-box; + border: 1px solid #c6c6c6; + padding-left: 10px; + border-radius: 6px; + margin-top: 25px; + margin-bottom: 25px; + opacity: 1; + display: flex; + justify-content: start; + align-items: center; +} +.nav-user .search-box .search-text { + border: none; + margin-left: 10px; +} +.nav-user .search-box .search-text:focus { + outline: none; +} + +.main-container .alert { + position: absolute; + top: 90px; + margin-left: 0px; + width: 1366px; + height: 55px; + padding-top: 18px; + padding-bottom: 18px; + display: flex; + background: #494daf 0% 0% no-repeat padding-box; + box-shadow: 0px 3px 6px #0000000d; + opacity: 1; +} +.closebtn { + margin-left: 740px; + width: 14px; + height: 14px; + margin-right: 110px; + color: #ffffff; + opacity: 1; +} + +.welcome-title { + margin-left: 120px; + height: 19px; + text-align: left; + font: normal 15px/19px Inter; + letter-spacing: 0px; + color: #ffffff; + opacity: 1; +} +::-webkit-input-placeholder { + /* Edge */ + color: #b9b9b9; +} + +:-ms-input-placeholder { + /* Internet Explorer 10-11 */ + color: #b9b9b9; +} + +::placeholder { + color: #b9b9b9; +} + +.nav-user .language-box { + left: 1026px; + height: 40px; + margin-top: 25px; + margin-bottom: 25px; + margin-left: 12px; + border-radius: 6px; + opacity: 1; +} +.nav-user .language-box:focus { + outline: none; +} +.nav-user .language-box .button { + height: 40px; + /* UI Properties */ + display: inline; + background: #ffffff 0% 0% no-repeat padding-box; + border: 1px solid #c6c6c6; + border-radius: 6px; + opacity: 1; +} +.nav-user .language-box .button:focus { + outline: none; +} +.nav-user .language-box .button span { + height: 15px; + width: 41px; + text-align: left; + font: normal 12px Inter; + letter-spacing: 0px; + color: #4d4c4c; + opacity: 1; +} +.nav-user .language-box .button .flag { + width: 18px; + height: 12px; + background: transparent 0% 0% no-repeat padding-box; + opacity: 1; +} + +.nav-user .user { + width: 50px; + height: 50px; + margin-top: 20px; + margin-bottom: 20px; + opacity: 1; +} + +.nav-user .user .user-block { + top: 73px; + text-align: left; + width: 184px; + height: 116px; + background: #ffffff 0% 0% no-repeat padding-box; + border: 1px solid #d8d8d8; + opacity: 1; +} + +.user-image { + top: 20px; + width: 50px; + height: 50px; + opacity: 1; +} + +.dropdown ul { + list-style: none; +} + +.dropdown ul .link { + top: 92px; + width: 57px; + height: 15px; + margin: 10px; + /* UI Properties */ + text-align: left; + font: normal 15px Inter; + letter-spacing: 0px; + color: #4d4c4c; + opacity: 1; +} + +.dropdown-menu span { + text-align: left; + font: normal 15px inter; +} +.dropdown-menu ul li a:hover { + text-decoration: none; +} +a:hover { + text-decoration: none; +} + +/* Footer Styles */ +.footer-container { + left: 0px; + width: 100%; + height: 190px; + background: #ffffff 0% 0% no-repeat padding-box; + opacity: 1; +} +.footer-container .nav { + top: 0px; + left: 0px; + margin-left: 139px; + margin-right: 139px; + width: 1180px; + border: none; + background: #ffffff 0% 0% no-repeat padding-box; + display: flex; + justify-content: space-between; + opacity: 1; +} +.footer-container .nav .main-logo { + width: 272px; + height: 58px; + margin-top: 36px; + opacity: 1; +} +.footer-container .nav .list-container { + display: flex; + justify-content: space-between; + margin-top: 57px; +} +.list-container .nav-item { + list-style: none; +} +.list-container .nav-item .link { + font: normal 13px Inter; + letter-spacing: 0px; + color: #484848; + opacity: 1; +} +.footer-container .copyright { + /* UI Properties */ + margin-top: 25px; + margin-left: 40%; + margin-bottom: 25px; + height: 17px; + text-align: left; + font: normal 14px/17px Inter; + letter-spacing: 0px; + color: #b9b9b9; + opacity: 1; +} + +.current-partner-container { + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 2px 5px #0000001a; + border-radius: 10px; + padding: 20px; +} + +.current-partner-container .row { + padding: 20px; +} + +.current-partner-container .beneficiary-value { + font: normal normal 600 13px/16px Inter; + letter-spacing: 0px; + text-transform: uppercase; +} + +/* Main content styles */ +.main-container { + background: #f5f9fc 0% 0% no-repeat padding-box; + /* width: 1366px; */ + height: 100%; + display: block; + padding-top: 30px; + padding-bottom: 30px; + opacity: 1; +} + +.search-clear-icon { + display: none; + cursor: pointer; +} + +.css-serial { + border-top: 1px solid #ddd; +} + +.icon-image { + padding: 30px; + background: #6064c71a 0% 0% no-repeat padding-box; + border-radius: 10px; + opacity: 1; + width: 24px; + height: 24px; + margin: 10px; + opacity: 1; +} + +.icon-image img { + width: 22px; + height: 22px; + margin-top: -10px; + margin-left: -10px; + margin-bottom: 20px; + margin-right: 20px; +} + +li div a { + width: 78px; + height: 17px; + text-align: left; + font: normal 600 14px/17px Inter; + letter-spacing: 0px; + color: #484848; + opacity: 1; +} +li div p { + height: 16px; + text-align: left; + font: normal 13px Inter; + letter-spacing: 0px; + color: #484848; + opacity: 1; +} + +.badge-button { + width: 44px; + height: 19px; + background: #186ade 0% 0% no-repeat padding-box; + color: #ffffff; + border: none; + border-radius: 4px; + opacity: 1; +} +.badge-button span { + width: 26px; + height: 14px; + text-align: left; + font: normal 600 11px/14px Inter; + letter-spacing: 0px; + color: #ffffff; + opacity: 1; +} + +.all-title { + margin-bottom: 0px; + height: 26px; + text-align: left; + font: normal 600 22px/26px Inter; + letter-spacing: 0px; + color: #484848; + opacity: 1; +} +.breadcrumb-list { + /* margin-left: 9%; */ + margin-right: 10%; + margin-bottom: 33px; + left: 139px; + height: 17px; + opacity: 1; + padding-left: 0px; +} +.breadcrumb-list .breadcrumb-item a { + width: 40px; + height: 17px; + + text-align: left; + font: normal 600 14px/17px Inter; + letter-spacing: 0px; + color: #494daf; + opacity: 1; +} +.invisible { + display: none; +} +#chartContainer { + width: 220px; + height: 220px; + margin: auto; +} +.breadcrumb-item + .breadcrumb-item::before { + content: " \003E "; + color: #000000 0% 0% no-repeat padding-box; +} + +.page-item.active .page-link { + color: #ffffff; + border-radius: 6px; + background-color: #494daf; + border-color: #494daf; +} + +#search-clear { + display: none; + cursor: pointer; + margin-left: 5px; + padding-right: 25px; +} +#seacrh-text-clear { + display: none; + cursor: pointer; + margin-left: 5px; + padding-right: 25px; +} + +.aboutus-container { + top: 201px; + margin-bottom: 20px; + padding: 36px 20px 20px 20px; + width: 1088px; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 2px 5px #0000001a; + border-radius: 10px; + opacity: 1; +} + +.aboutus-container .aboutus-header { + display: flex; + justify-content: space-between; +} +.aboutus-header .logo1 { + width: 274px; + height: 57px; + background: transparent 0% 0% no-repeat padding-box; + opacity: 1; +} +.aboutus-header .logo2 { + width: 156px; + height: 82px; + background: transparent 0% 0% no-repeat padding-box; + border-radius: 10px; + opacity: 1; +} +.aboutus-container .header-section { + width: 100%; + height: 118px; + background: #f8f8f8 0% 0% no-repeat padding-box; + padding: 25px 22px 29px 22px; + border-radius: 10px; + margin-bottom: 44px; + opacity: 1; +} +.header-section h1 { + width: 270px; + height: 20px; + margin-left: 37%; + font: normal 17px/20px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} +.header-section p { + width: 100%; + height: 34px; + font: normal 14px/17px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} +.aboutus-container .section1 { + width: 100%; + height: 183px; + margin-bottom: 44px; + opacity: 1; +} +.section1 h1 { + width: 247px; + height: 20px; + text-align: left; + font: normal 17px/20px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} +.section1 p { + width: 100%; + height: 153px; + font: normal 14px/17px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} + +.aboutus-container .section2 { + width: 100%; + height: 270px; + display: flex; + justify-content: space-between; + opacity: 1; +} +.section2 div { + width: 50%; + margin-top: 91px; + margin-bottom: 98px; +} + +.section2 div h1 { + width: 80%; + height: 20px; + text-align: left; + font: normal 17px/20px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} +.section2 div p { + width: 80%; + height: 51px; + text-align: left; + font: normal 14px/17px Inter; + letter-spacing: 0px; + color: #333333; + opacity: 1; +} + +.section2 div logo3 { + width: 516px; + height: 270px; + background: transparent 0% 0% no-repeat padding-box; + border: 1px solid #e3e3e3; + border-radius: 10px; + opacity: 1; +} + +.profile-container { + margin-right: 10%; + margin-bottom: 30px; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + width: 1088px; + height: 528px; + background: #ffffff 0% 0% no-repeat padding-box; + box-shadow: 0px 2px 5px #0000001a; + border-radius: 10px; + opacity: 1; +} +.profile-container div { + margin-left: 23%; + margin-right: 23%; + margin-top: 50px; + height: 76px; + opacity: 1; +} +.profile-container div h1 { + margin-left: 23%; + margin-right: 23%; + height: 29px; + text-align: center; + font: normal 24px/29px Inter; + letter-spacing: 0px; + color: #2c2c2c; + opacity: 1; +} + +.profile-container div p { + height: 37px; + text-align: center; + font: normal 14px/20px Inter; + letter-spacing: 0px; + color: #7b7b7b; + opacity: 1; +} + +.next-button { + border: 1px solid black; + padding: 5px 10px; +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.btn-primary { + border-color: #704880 !important; +} diff --git a/g2p_portal_base/static/src/img/close_icon@2x.png b/g2p_portal_base/static/src/img/close_icon@2x.png new file mode 100644 index 0000000..0190715 Binary files /dev/null and b/g2p_portal_base/static/src/img/close_icon@2x.png differ diff --git a/g2p_portal_base/static/src/img/flag_en.png b/g2p_portal_base/static/src/img/flag_en.png new file mode 100644 index 0000000..5fc1b1a Binary files /dev/null and b/g2p_portal_base/static/src/img/flag_en.png differ diff --git a/g2p_portal_base/static/src/img/flag_fr.png b/g2p_portal_base/static/src/img/flag_fr.png new file mode 100644 index 0000000..d23d639 Binary files /dev/null and b/g2p_portal_base/static/src/img/flag_fr.png differ diff --git a/g2p_portal_base/static/src/img/flag_ph.png b/g2p_portal_base/static/src/img/flag_ph.png new file mode 100644 index 0000000..585210d Binary files /dev/null and b/g2p_portal_base/static/src/img/flag_ph.png differ diff --git a/g2p_portal_base/static/src/img/logo.png b/g2p_portal_base/static/src/img/logo.png new file mode 100644 index 0000000..390c2ef Binary files /dev/null and b/g2p_portal_base/static/src/img/logo.png differ diff --git a/g2p_portal_base/static/src/img/logo@2x.png b/g2p_portal_base/static/src/img/logo@2x.png new file mode 100644 index 0000000..b4f01a6 Binary files /dev/null and b/g2p_portal_base/static/src/img/logo@2x.png differ diff --git a/g2p_portal_base/static/src/img/page_under_construction.png b/g2p_portal_base/static/src/img/page_under_construction.png new file mode 100644 index 0000000..ddc1f99 Binary files /dev/null and b/g2p_portal_base/static/src/img/page_under_construction.png differ diff --git a/g2p_portal_base/static/src/img/person_filled_FILL0_wght400_GRAD0_opsz48.png b/g2p_portal_base/static/src/img/person_filled_FILL0_wght400_GRAD0_opsz48.png new file mode 100644 index 0000000..7c096bf Binary files /dev/null and b/g2p_portal_base/static/src/img/person_filled_FILL0_wght400_GRAD0_opsz48.png differ diff --git a/g2p_portal_base/static/src/js/language_selector.js b/g2p_portal_base/static/src/js/language_selector.js new file mode 100644 index 0000000..7ae952a --- /dev/null +++ b/g2p_portal_base/static/src/js/language_selector.js @@ -0,0 +1,52 @@ +// Select the language dropdown button +const dropdownButton = document.querySelector(".language-dropdown button"); + +// Add an event listener to the dropdown button that will toggle the dropdown menu +dropdownButton.addEventListener("click", function () { + this.classList.toggle("active"); +}); + +// Add an event listener to the document that will close the dropdown menu if the user clicks outside the menu +document.addEventListener("click", function (event) { + if ( + !event.target.matches(".language-dropdown button") && + !event.target.matches(".language-dropdown .dropdown-menu *") + ) { + dropdownButton.classList.remove("active"); + } +}); + +// Add an event listener to the dropdown menu items that will update the text of the button with the selected language +const dropdownItems = document.querySelectorAll(".dropdown-item"); +dropdownItems.forEach(function (item) { + item.addEventListener("click", function () { + const languageText = this.querySelector("span").textContent; + console.log(languageText); + const languageFlag = this.querySelector("img").src; + const button = document.querySelector(".language-dropdown button"); + const buttonSpan = button.querySelector("span"); + const buttonFlag = button.querySelector("img"); + buttonSpan.textContent = languageText; + buttonFlag.src = languageFlag; + buttonFlag.alt = languageText; + localStorage.setItem("selectedLanguage", languageText); + }); +}); + +// Check if a language has already been selected and update the button text and image accordingly +if (localStorage.getItem("selectedLanguage")) { + const selectedLanguage = localStorage.getItem("selectedLanguage"); + + dropdownItems.forEach(function (item) { + const languageText = item.querySelector("span"); + if (languageText && languageText.textContent === selectedLanguage) { + const languageFlag = item.querySelector("img").src; + const button = document.querySelector(".language-dropdown button"); + const buttonSpan = button.querySelector("span"); + const buttonFlag = button.querySelector("img"); + buttonSpan.textContent = selectedLanguage; + buttonFlag.src = languageFlag; + buttonFlag.alt = selectedLanguage; + } + }); +} diff --git a/g2p_portal_base/views/about_us.xml b/g2p_portal_base/views/about_us.xml new file mode 100644 index 0000000..d7d5d84 --- /dev/null +++ b/g2p_portal_base/views/about_us.xml @@ -0,0 +1,29 @@ + + + + diff --git a/g2p_portal_base/views/base.xml b/g2p_portal_base/views/base.xml new file mode 100644 index 0000000..6849691 --- /dev/null +++ b/g2p_portal_base/views/base.xml @@ -0,0 +1,145 @@ + + + +