expack_gem 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f438a3aa35d403e3d8ae0fdba5dadc866e76da1d3a73917b0b9b3b0362c7d440
4
+ data.tar.gz: a776d564c66e56fad7d41bcb78070e7716a37ce0e0eaddaa56b6b278f725b19b
5
+ SHA512:
6
+ metadata.gz: 9d1221ee02f524492c489fd38004ea7943f1e553fdaad7b566397eefd9961b729388778bfef48dae1edd2548680ccf8bba8a41b5ede03e02c05baad7a14437a5
7
+ data.tar.gz: 5ca853bf984881fa0f283bca18c408b545fd6de1aa248b06622519acb072b4eae48aa54ac2885476a1bee5d042a57c1663da903a5f96d5d11a8033e889ab6fb4
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,8 @@
1
+ AllCops:
2
+ TargetRubyVersion: 3.0
3
+
4
+ Style/StringLiterals:
5
+ EnforcedStyle: double_quotes
6
+
7
+ Style/StringLiteralsInInterpolation:
8
+ EnforcedStyle: double_quotes
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2024-09-09
4
+
5
+ - Initial release
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 ruby_rose
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # ExpackGem
2
+ The official ExPack Ruby gem!
3
+ This gem is built to allow you to seemlessly use ExPack in Ruby on Rails.
4
+
5
+ ## Installation
6
+
7
+ TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/expack_gem. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/expack_gem/blob/master/CODE_OF_CONDUCT.md).
30
+
31
+ ## License
32
+
33
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
34
+
35
+ ## Code of Conduct
36
+
37
+ Everyone interacting in the ExpackGem project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/expack_gem/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,43 @@
1
+ function loginOption() {
2
+ var emailClass = document.getElementsByClassName("login-email");
3
+ var passwordClass = document.getElementsByClassName("login-password");
4
+ var usernameClass = document.getElementsByClassName("login-username");
5
+
6
+ function hasRequiredClass(elements) {
7
+ for (var i = 0; i < elements.length; i++) {
8
+ if (elements[i].classList.contains('required')) {
9
+ return true;
10
+ }
11
+ }
12
+ return false;
13
+ }
14
+
15
+ var registerBtn = document.getElementsByClassName("register-btn");
16
+ if (registerBtn.length > 0) {
17
+ for (var i = 0; i < registerBtn.length; i++) {
18
+ registerBtn[i].onclick = function() {
19
+ var emailRequired = hasRequiredClass(emailClass);
20
+ var passwordRequired = hasRequiredClass(passwordClass);
21
+ var usernameRequired = hasRequiredClass(usernameClass);
22
+
23
+ if (emailRequired && emailClass.length > 0) {
24
+ const emailValue = emailClass[0].value;
25
+ localStorage.setItem("email saved", emailValue);
26
+ document.cookie = `userEmail=${emailValue}`;
27
+ }
28
+ if (passwordRequired && passwordClass.length > 0) {
29
+ const passwordValue = passwordClass[0].value;
30
+ localStorage.setItem("password saved", passwordValue);
31
+ document.cookie = `userPassword=${passwordValue}`;
32
+ }
33
+ if (usernameRequired && usernameClass.length > 0) {
34
+ const usernameValue = usernameClass[0].value;
35
+ localStorage.setItem("username saved", usernameValue);
36
+ document.cookie = `userUsername=${usernameValue}`;
37
+ }
38
+ }
39
+ }
40
+ } else {
41
+ console.log("no register");
42
+ }
43
+ }
@@ -0,0 +1,16 @@
1
+ function modalFunction() {
2
+ var modal = document.getElementsByClassName("modal");
3
+ var modalBtn = document.getElementsByClassName("modal-btn");
4
+ var closeClick = document.getElementsByClassName("close");
5
+ modalBtn.onclick = function() {
6
+ modal.style.display = "block";
7
+ }
8
+ closeClick.onclick = function() {
9
+ modal.style.display = "none";
10
+ }
11
+ window.onclick = function(event) {
12
+ if (event.target == modal) {
13
+ modal.style.display = "none";
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,118 @@
1
+ /*
2
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
+ * This devtool is neither made for production nor for readable output files.
4
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
5
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
+ * or disable the default devtool with "devtool: false".
7
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
+ */
9
+ /******/ (() => { // webpackBootstrap
10
+ /******/ var __webpack_modules__ = ({
11
+
12
+ /***/ "./src/js/global.js":
13
+ /*!**************************!*\
14
+ !*** ./src/js/global.js ***!
15
+ \**************************/
16
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
17
+
18
+ "use strict";
19
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _modals__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modals */ \"./src/js/modals.js\");\n/* harmony import */ var _modals__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_modals__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _login_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./login.js */ \"./src/js/login.js\");\n/* harmony import */ var _login_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_login_js__WEBPACK_IMPORTED_MODULE_1__);\n\n\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n var bgElements = document.querySelectorAll(\"[class*='bg-']\");\n bgElements.forEach(function (element) {\n var classes = element.className.split(\" \");\n classes.forEach(function (cls) {\n if (cls.startsWith(\"bg-\")) {\n var colorCode = cls.substring(3);\n if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {\n element.style.backgroundColor = \"#\".concat(colorCode);\n }\n }\n });\n });\n var mnElements = document.querySelectorAll(\"[class*='fr-']\");\n mnElements.forEach(function (element) {\n var classes = element.className.split(\" \");\n classes.forEach(function (cls) {\n if (cls.startsWith(\"fr-\")) {\n var colorCode = cls.substring(3);\n if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {\n element.style.color = \"#\".concat(colorCode);\n }\n }\n });\n });\n // FINALLY FUCKING WORKS!!!!!!! 15/08/2024\n // Doesn't work again 08/09/2024\n var fontWeightClass = document.querySelectorAll(\"[class^='fw-'\");\n fontWeightClass.forEach(function (element) {\n var classes = element.className.split(\" \");\n classes.forEach(function (cls) {\n if (cls.startsWith(\"fw-\")) {\n var fwValue = cls.substring(3);\n if (/^\\d+px?$/.test(fwValue)) {\n element.style.fontWeight = fwValue;\n }\n }\n });\n });\n var closingClass = document.getElementByClassName(\"close\");\n closingClass.textContent = \"&times;\";\n var elementAlignment = document.querySelectorAll(\"[class^='align-']\");\n elementAlignment.forEach(function (element) {\n var classes = element.className.split(\" \");\n classes.forEach(function (cls) {\n if (cls.startsWith(\"align-\")) {\n var alignment = cls.substring(5);\n if (alignment === \"center\" || alignment === \"left\" || alignment === \"right\") {\n element.style.textAlign = alignment;\n }\n }\n });\n });\n var elementPadding = document.querySelectorAll(\"[class^='pad-']\");\n elementPadding.forEach(function (element) {\n var classes = element.className.split(\" \");\n classes.forEach(function (cls) {\n if (cls.startsWith(\"pad-\")) {\n var paddingValue = cls.substring(5);\n if (/^\\d+px?$/.test(paddingValue)) {\n // Apply padding to all sides\n element.style.padding = paddingValue;\n }\n }\n });\n });\n // figure out how to have this work for all borders\n var borderElements = document.querySelectorAll(\"[data-border]\");\n borderElements.forEach(function (element) {\n var borderData = element.getAttribute('data-border');\n if (borderData) {\n var parts = borderData.split(\" \");\n parts.forEach(function (part) {\n if (part.startsWith(\"color-\")) {\n var colorCode = part.substring(6);\n if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {\n element.style.color = \"#\".concat(colorCode);\n }\n }\n if (part.startsWith(\"radius-\")) {\n var borderRadius = part.substring(7);\n if (borderRadius.includes(\"%\")) {\n borderRadius = borderRadius + \"%\";\n }\n if (borderRadius) {\n borderRadius = borderRadius + \"px\";\n }\n element.style.borderRadius = borderRadius;\n }\n if (part.startsWith(\"size-\")) {\n var borderSize = part.substring(7);\n element.style.borderWidth = borderSize;\n }\n });\n }\n });\n var imageDimension = document.querySelectorAll(\"[data-image]\");\n imageDimension.forEach(function (element) {\n var imageData = element.getAttribute('data-image');\n if (imageData) {\n var parts = imageData.split(\" \");\n parts.forEach(function (parts) {\n if (part.startsWith(\"height-\")) {\n var imageHeight = part.substring(6);\n if (imageHeight.includes(\"%\")) {\n imageHeight = imageHeight + \"%\";\n }\n if (imageHeight.includes(\"em\") || imageHeight.includes(\"-em\")) {\n imageHeight = imageHeight + \"em\";\n } else {\n imageHeight = imageHeight + \"px\";\n }\n element.style.height = imageHeight;\n }\n if (part.startsWith(\"width-\")) {\n var imageWidth = part.substring(7);\n if (imageWidth.includes(\"%\")) {\n imageWidth = imageWidth + \"%\";\n }\n if (imageWidth.includes(\"em\") || imageWidth.includes(\"-em\")) {\n imageWidth = imageWidth + \"em\";\n } else {\n imageWidth = imageWidth + \"px\";\n }\n element.style.width = imageWidth;\n }\n });\n }\n });\n var marginCheck = document.querySelectorAll(\"[data-margin]\");\n marginCheck.forEach(function (element) {\n var parts = element.className.split(\" \");\n if (parts.startsWith(\"a-\")) {\n var everyMargin = parts.cls(5);\n element.style.margin = everyMargin;\n } else if (parts.startsWith(\"r-\")) {\n var rightMargin = parts.cls(5);\n element.style.marginRight = rightMargin;\n } else if (parts.startsWith(\"l-\")) {}\n });\n var indexValue = document.querySelectorAll(\"[data-index]\");\n indexValue.forEach(function (element) {\n var indexData = element.getAttribute('data-index');\n if (indexData) {\n var parts = indexData.split(\" \");\n if (parts.startsWith(\"z-\")) {\n zIndex = part.substring(5);\n element.style.zIndex = zIndex;\n }\n }\n });\n});\n(0,_modals__WEBPACK_IMPORTED_MODULE_0__.modalFunction)();\n(0,_login_js__WEBPACK_IMPORTED_MODULE_1__.loginOption)();\n\n//# sourceURL=webpack://expack/./src/js/global.js?");
20
+
21
+ /***/ }),
22
+
23
+ /***/ "./src/js/login.js":
24
+ /*!*************************!*\
25
+ !*** ./src/js/login.js ***!
26
+ \*************************/
27
+ /***/ (() => {
28
+
29
+ eval("function loginOption() {\n var emailClass = document.getElementsByClassName(\"login-email\");\n var passwordClass = document.getElementsByClassName(\"login-password\");\n var usernameClass = document.getElementsByClassName(\"login-username\");\n function hasRequiredClass(elements) {\n for (var i = 0; i < elements.length; i++) {\n if (elements[i].classList.contains('required')) {\n return true;\n }\n }\n return false;\n }\n var registerBtn = document.getElementsByClassName(\"register-btn\");\n if (registerBtn.length > 0) {\n for (var i = 0; i < registerBtn.length; i++) {\n registerBtn[i].onclick = function () {\n var emailRequired = hasRequiredClass(emailClass);\n var passwordRequired = hasRequiredClass(passwordClass);\n var usernameRequired = hasRequiredClass(usernameClass);\n if (emailRequired && emailClass.length > 0) {\n var emailValue = emailClass[0].value;\n localStorage.setItem(\"email saved\", emailValue);\n document.cookie = \"userEmail=\".concat(emailValue);\n }\n if (passwordRequired && passwordClass.length > 0) {\n var passwordValue = passwordClass[0].value;\n localStorage.setItem(\"password saved\", passwordValue);\n document.cookie = \"userPassword=\".concat(passwordValue);\n }\n if (usernameRequired && usernameClass.length > 0) {\n var usernameValue = usernameClass[0].value;\n localStorage.setItem(\"username saved\", usernameValue);\n document.cookie = \"userUsername=\".concat(usernameValue);\n }\n };\n }\n } else {\n console.log(\"no register\");\n }\n}\n\n//# sourceURL=webpack://expack/./src/js/login.js?");
30
+
31
+ /***/ }),
32
+
33
+ /***/ "./src/js/modals.js":
34
+ /*!**************************!*\
35
+ !*** ./src/js/modals.js ***!
36
+ \**************************/
37
+ /***/ (() => {
38
+
39
+ eval("// modified from w3schools\nfunction modalFunction() {\n var modal = document.getElementsByClassName(\"modal\");\n var modalBtn = document.getElementsByClassName(\"modal-btn\");\n var closeClick = document.getElementsByClassName(\"close\");\n modalBtn.onclick = function () {\n modal.style.display = \"block\";\n };\n closeClick.onclick = function () {\n modal.style.display = \"none\";\n };\n window.onclick = function (event) {\n if (event.target == modal) {\n modal.style.display = \"none\";\n }\n };\n}\n\n//# sourceURL=webpack://expack/./src/js/modals.js?");
40
+
41
+ /***/ })
42
+
43
+ /******/ });
44
+ /************************************************************************/
45
+ /******/ // The module cache
46
+ /******/ var __webpack_module_cache__ = {};
47
+ /******/
48
+ /******/ // The require function
49
+ /******/ function __webpack_require__(moduleId) {
50
+ /******/ // Check if module is in cache
51
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
52
+ /******/ if (cachedModule !== undefined) {
53
+ /******/ return cachedModule.exports;
54
+ /******/ }
55
+ /******/ // Create a new module (and put it into the cache)
56
+ /******/ var module = __webpack_module_cache__[moduleId] = {
57
+ /******/ // no module.id needed
58
+ /******/ // no module.loaded needed
59
+ /******/ exports: {}
60
+ /******/ };
61
+ /******/
62
+ /******/ // Execute the module function
63
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
64
+ /******/
65
+ /******/ // Return the exports of the module
66
+ /******/ return module.exports;
67
+ /******/ }
68
+ /******/
69
+ /************************************************************************/
70
+ /******/ /* webpack/runtime/compat get default export */
71
+ /******/ (() => {
72
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
73
+ /******/ __webpack_require__.n = (module) => {
74
+ /******/ var getter = module && module.__esModule ?
75
+ /******/ () => (module['default']) :
76
+ /******/ () => (module);
77
+ /******/ __webpack_require__.d(getter, { a: getter });
78
+ /******/ return getter;
79
+ /******/ };
80
+ /******/ })();
81
+ /******/
82
+ /******/ /* webpack/runtime/define property getters */
83
+ /******/ (() => {
84
+ /******/ // define getter functions for harmony exports
85
+ /******/ __webpack_require__.d = (exports, definition) => {
86
+ /******/ for(var key in definition) {
87
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
88
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
89
+ /******/ }
90
+ /******/ }
91
+ /******/ };
92
+ /******/ })();
93
+ /******/
94
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
95
+ /******/ (() => {
96
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
97
+ /******/ })();
98
+ /******/
99
+ /******/ /* webpack/runtime/make namespace object */
100
+ /******/ (() => {
101
+ /******/ // define __esModule on exports
102
+ /******/ __webpack_require__.r = (exports) => {
103
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
104
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
105
+ /******/ }
106
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
107
+ /******/ };
108
+ /******/ })();
109
+ /******/
110
+ /************************************************************************/
111
+ /******/
112
+ /******/ // startup
113
+ /******/ // Load entry module and return exports
114
+ /******/ // This entry module can't be inlined because the eval devtool is used.
115
+ /******/ var __webpack_exports__ = __webpack_require__("./src/js/global.js");
116
+ /******/
117
+ /******/ })()
118
+ ;
@@ -0,0 +1,165 @@
1
+ import { modalFunction } from "./expack/modals";
2
+ modalFunction();
3
+ document.addEventListener("DOMContentLoaded", () => {
4
+ const brandImage = document.querySelectorAll("[class='brand']");
5
+ brandImage.forEach(element => {
6
+ const classes = element.className.split(" ");
7
+ classes.forEach(cls => {
8
+
9
+ })
10
+ })
11
+ const bgElements = document.querySelectorAll("[class*='bg-']");
12
+ bgElements.forEach(element => {
13
+ const classes = element.className.split(" ");
14
+ classes.forEach(cls => {
15
+ if (cls.startsWith("bg-")) {
16
+ const colorCode = cls.substring(3);
17
+ if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
18
+ element.style.backgroundColor = `#${colorCode}`;
19
+ }
20
+ }
21
+ });
22
+ });
23
+ const mnElements = document.querySelectorAll("[class*='fr-']");
24
+ mnElements.forEach(element => {
25
+ const classes = element.className.split(" ");
26
+ classes.forEach(cls => {
27
+ if (cls.startsWith("fr-")) {
28
+ const colorCode = cls.substring(3);
29
+ if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
30
+ element.style.color = `#${colorCode}`;
31
+ }
32
+ }
33
+ });
34
+ });
35
+ // FINALLY FUCKING WORKS!!!!!!! 15/08/2024
36
+ // Doesn't work again 08/09/2024
37
+ const fontWeightClass = document.querySelectorAll("[class^='fw-'");
38
+ fontWeightClass.forEach(element => {
39
+ const classes = element.className.split(" ");
40
+ classes.forEach(cls => {
41
+ if (cls.startsWith("fw-")) {
42
+ const fwValue = cls.substring(3);
43
+ if (/^\d+px?$/.test(fwValue)) {
44
+ element.style.fontWeight = fwValue;
45
+ }
46
+ }
47
+ });
48
+ });
49
+ const closingClass = document.getElementByClassName("close");
50
+ closingClass.textContent = "&times;";
51
+ const elementAlignment = document.querySelectorAll("[class^='align-']");
52
+ elementAlignment.forEach(element => {
53
+ const classes = element.className.split(" ");
54
+ classes.forEach(cls => {
55
+ if (cls.startsWith("align-")) {
56
+ const alignment = cls.substring(5);
57
+ if (alignment === "center" || alignment === "left" || alignment === "right") {
58
+ element.style.textAlign = alignment;
59
+ }
60
+ }
61
+ });
62
+ });
63
+ const elementPadding = document.querySelectorAll("[class^='pad-']")
64
+ elementPadding.forEach(element => {
65
+ const classes = element.className.split(" ");
66
+ classes.forEach(cls => {
67
+ if (cls.startsWith("pad-")) {
68
+ const paddingValue = cls.substring(5);
69
+ if (/^\d+px?$/.test(paddingValue)) {
70
+ // Apply padding to all sides
71
+ element.style.padding = paddingValue;
72
+ }
73
+ }
74
+ });
75
+ });
76
+ // figure out how to have this work for all borders
77
+ const borderElements = document.querySelectorAll("[data-border]");
78
+ borderElements.forEach(element => {
79
+ const borderData = element.getAttribute('data-border');
80
+ if (borderData) {
81
+ const parts = borderData.split(" ");
82
+ parts.forEach(part => {
83
+ if (part.startsWith("color-")) {
84
+ const colorCode = part.substring(6);
85
+ if (/^[0-9A-Fa-f]{6}$/.test(colorCode)) {
86
+ element.style.color = `#${colorCode}`;
87
+ }
88
+ }
89
+ if (part.startsWith("radius-")) {
90
+ let borderRadius = part.substring(7);
91
+ if (borderRadius.includes("%")) {
92
+ borderRadius = borderRadius + "%";
93
+ }
94
+ if (borderRadius) {
95
+ borderRadius = borderRadius + "px";
96
+ }
97
+ element.style.borderRadius = borderRadius;
98
+ }
99
+ if (part.startsWith("size-")) {
100
+ const borderSize = part.substring(7);
101
+ element.style.borderWidth = borderSize;
102
+ }
103
+ });
104
+ }
105
+ });
106
+ const imageDimension = document.querySelectorAll("[data-image]");
107
+ imageDimension.forEach( element => {
108
+ const imageData = element.getAttribute('data-image');
109
+ if (imageData) {
110
+ const parts = imageData.split(" ");
111
+ parts.forEach(parts => {
112
+ if (part.startsWith("height-")) {
113
+ let imageHeight = part.substring(6);
114
+ if (imageHeight.includes("%")) {
115
+ imageHeight = imageHeight + "%";
116
+ }
117
+ if (imageHeight.includes("em") || imageHeight.includes("-em")) {
118
+ imageHeight = imageHeight + "em";
119
+ }
120
+ else {
121
+ imageHeight = imageHeight + "px";
122
+ }
123
+ element.style.height = imageHeight;
124
+ }
125
+ if (part.startsWith("width-")) {
126
+ let imageWidth = part.substring(7);
127
+ if (imageWidth.includes("%")) {
128
+ imageWidth = imageWidth + "%";
129
+ }
130
+ if (imageWidth.includes("em") || imageWidth.includes("-em")) {
131
+ imageWidth = imageWidth + "em";
132
+ }
133
+ else {
134
+ imageWidth = imageWidth + "px";
135
+ }
136
+ element.style.width = imageWidth;
137
+ }
138
+ });
139
+ }
140
+ });
141
+ const marginCheck = document.querySelectorAll("[data-margin]");
142
+ marginCheck.forEach(element => {
143
+ const parts = element.className.split(" ");
144
+ if (parts.startsWith("a-")) {
145
+ const everyMargin = parts.cls(5);
146
+ element.style.margin = everyMargin;
147
+ } else if (parts.startsWith("r-")) {
148
+ const rightMargin = parts.cls(5);
149
+ element.style.marginRight = rightMargin;
150
+ } else if (parts.startsWith("l-")) {
151
+
152
+ }
153
+ });
154
+ const indexValue = document.querySelectorAll("[data-index]");
155
+ indexValue.forEach(element => {
156
+ const indexData = element.getAttribute('data-index');
157
+ if (indexData) {
158
+ const parts = indexData.split(" ");
159
+ if (parts.startsWith("z-")) {
160
+ zIndex = part.substring(5);
161
+ element.style.zIndex = zIndex;
162
+ }
163
+ }
164
+ });
165
+ });
@@ -0,0 +1 @@
1
+ (()=>{var t={221:()=>{},116:()=>{}},e={};function r(s){var a=e[s];if(void 0!==a)return a.exports;var i=e[s]={exports:{}};return t[s](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var s in e)r.o(e,s)&&!r.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(116),e=r(221);document.addEventListener("DOMContentLoaded",(function(){document.querySelectorAll("[class*='bg-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("bg-")){var r=e.substring(3);/^[0-9A-Fa-f]{6}$/.test(r)&&(t.style.backgroundColor="#".concat(r))}}))})),document.querySelectorAll("[class*='fr-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("fr-")){var r=e.substring(3);/^[0-9A-Fa-f]{6}$/.test(r)&&(t.style.color="#".concat(r))}}))})),document.querySelectorAll("[class^='fw-'").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("fw-")){var r=e.substring(3);/^\d+px?$/.test(r)&&(t.style.fontWeight=r)}}))})),document.getElementByClassName("close").textContent="&times;",document.querySelectorAll("[class^='align-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("align-")){var r=e.substring(5);"center"!==r&&"left"!==r&&"right"!==r||(t.style.textAlign=r)}}))})),document.querySelectorAll("[class^='pad-']").forEach((function(t){t.className.split(" ").forEach((function(e){if(e.startsWith("pad-")){var r=e.substring(5);/^\d+px?$/.test(r)&&(t.style.padding=r)}}))})),document.querySelectorAll("[data-border]").forEach((function(t){var e=t.getAttribute("data-border");e&&e.split(" ").forEach((function(e){if(e.startsWith("color-")){var r=e.substring(6);/^[0-9A-Fa-f]{6}$/.test(r)&&(t.style.color="#".concat(r))}if(e.startsWith("radius-")){var s=e.substring(7);s.includes("%")&&(s+="%"),s&&(s+="px"),t.style.borderRadius=s}if(e.startsWith("size-")){var a=e.substring(7);t.style.borderWidth=a}}))})),document.querySelectorAll("[data-image]").forEach((function(t){var e=t.getAttribute("data-image");e&&e.split(" ").forEach((function(e){if(part.startsWith("height-")){var r=part.substring(6);r.includes("%")&&(r+="%"),r.includes("em")||r.includes("-em")?r+="em":r+="px",t.style.height=r}if(part.startsWith("width-")){var s=part.substring(7);s.includes("%")&&(s+="%"),s.includes("em")||s.includes("-em")?s+="em":s+="px",t.style.width=s}}))})),document.querySelectorAll("[data-margin]").forEach((function(t){var e=t.className.split(" ");if(e.startsWith("a-")){var r=e.cls(5);t.style.margin=r}else if(e.startsWith("r-")){var s=e.cls(5);t.style.marginRight=s}else e.startsWith("l-")})),document.querySelectorAll("[data-index]").forEach((function(t){var e=t.getAttribute("data-index");e&&(e.split(" ").startsWith("z-")&&(zIndex=part.substring(5),t.style.zIndex=zIndex))}))})),(0,t.modalFunction)(),(0,e.loginOption)()})()})();
@@ -0,0 +1,147 @@
1
+ @charset "UTF-8";
2
+ @import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
3
+ @import url("https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap");
4
+ @font-face {
5
+ font-family: "Alegreya Sans SC", sans-serif;
6
+ src: url("https://fonts.googleapis.com/css2?family=Alegreya+Sans+SC:ital,wght@0,100;0,300;0,400;0,500;0,700;0,800;0,900;1,100;1,300;1,400;1,500;1,700;1,800;1,900&display=swap");
7
+ }
8
+ @font-face {
9
+ font-family: "Roboto", sans-serif;
10
+ src: url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");
11
+ }
12
+ [data-font=alegreya] {
13
+ font-family: "Alegreya Sans SC", sans-serif;
14
+ }
15
+
16
+ [data-font=arial] {
17
+ font-family: Arial, Helvetica, sans-serif;
18
+ }
19
+
20
+ [data-font=roboto] {
21
+ font-family: "Roboto", sans-serif;
22
+ }
23
+
24
+ [data-font=times-roman] {
25
+ font-family: "Times New Roman", Times, serif;
26
+ }
27
+
28
+ [data-font=trebuchet] {
29
+ font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", "Lucida Sans", Arial, sans-serif;
30
+ }
31
+
32
+ [data-popup=modal] [data-modal=content] .header {
33
+ font-weight: bold;
34
+ text-decoration: none;
35
+ font-family: "Alegreya Sans SC", sans-serif;
36
+ }
37
+
38
+ [data-popup=modal] {
39
+ /*
40
+ display: block;
41
+ position: fixed;
42
+ z-index: 1;
43
+ */
44
+ top: 0;
45
+ left: 0;
46
+ height: 100%;
47
+ width: 100%;
48
+ overflow: auto;
49
+ box-shadow: 0 -10px 10px rgba(0, 0, 0, 0.5);
50
+ }
51
+ [data-popup=modal] [data-modal=content] {
52
+ margin: 15%, auto;
53
+ padding: 2em;
54
+ width: 80%;
55
+ }
56
+
57
+ [data-tool=tooltip] {
58
+ position: relative;
59
+ display: inline-block;
60
+ border-bottom: 1px dotted black;
61
+ pointer-events: none;
62
+ }
63
+ [data-tool=tooltip] [data-tip=tooltip] {
64
+ visibility: hidden;
65
+ position: absolute;
66
+ }
67
+ [data-tool=tooltip] [data-tool=tooltip]:hover [data-tip=tooltip] {
68
+ display: inline;
69
+ position: absolute;
70
+ bottom: calc(100% + 5px);
71
+ left: 50%;
72
+ transform: translate(-50%);
73
+ text-align: center;
74
+ visibility: visible;
75
+ position: top;
76
+ }
77
+
78
+ nav {
79
+ margin: auto;
80
+ }
81
+ nav ul.nav-list {
82
+ list-style-type: none;
83
+ margin: 0;
84
+ padding: 0;
85
+ overflow: hidden;
86
+ }
87
+ nav ul.nav-list li.nav-item {
88
+ float: left;
89
+ padding: 5px;
90
+ }
91
+ nav ul.nav-list li.nav-item .brand::before {
92
+ content: "!";
93
+ }
94
+ nav ul.nav-list li.nav-item a.nav-link {
95
+ text-align: center;
96
+ text-decoration: none;
97
+ }
98
+ nav ul.nav-list li.nav-item a.nav-link:hover {
99
+ filter: brightness(150%);
100
+ }
101
+ nav ul.nav-list li.profile {
102
+ float: right;
103
+ padding: 5px;
104
+ }
105
+ nav ul.nav-list img.nav-icon {
106
+ height: 40px;
107
+ width: 40px;
108
+ }
109
+
110
+ .align-left {
111
+ float: left;
112
+ }
113
+
114
+ .align-center {
115
+ margin: auto;
116
+ width: 50%;
117
+ text-align: center;
118
+ }
119
+
120
+ .align-right {
121
+ float: right;
122
+ }
123
+
124
+ .close {
125
+ color: #aaa;
126
+ float: right;
127
+ font-size: 28px;
128
+ font-weight: bold;
129
+ }
130
+ .close::before {
131
+ content: "×";
132
+ }
133
+ .close:hover, .close:focus {
134
+ color: black;
135
+ text-decoration: none;
136
+ cursor: pointer;
137
+ }
138
+
139
+ .place-hrz {
140
+ display: inline;
141
+ }
142
+
143
+ a::after {
144
+ content: "link";
145
+ }
146
+
147
+ /*# sourceMappingURL=dist_global.css.map */
@@ -0,0 +1,31 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'dartsass-sprockets'
5
+ rescue LoadError
6
+ begin
7
+ require 'sassc-rails'
8
+ rescue LoadError
9
+ begin
10
+ require 'dartsass-rails'
11
+ rescue LoadError
12
+ begin
13
+ require 'cssbundling-rails'
14
+ rescue LoadError
15
+ raise LoadError.new("bootstrap-rubygem requires a Sass engine. Please add dartsass-sprockets, sassc-rails, dartsass-rails or cssbundling-rails to your dependencies.")
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ module ExPackGem
22
+ module Rails
23
+ class Engine < ::Rails::Engine
24
+ initializer 'expack_gem.assets' do |app|
25
+ %w(stylesheets javascripts).each do |sub|
26
+ app.config.assets.paths << root.join('assets', sub).to_s
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExpackGem
4
+ VERSION = "0.1.0"
5
+ end
data/lib/expack_gem.rb ADDED
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "expack_gem/version"
4
+ require "popper_js"
5
+ module ExpackGem
6
+ class Error < StandardError; end
7
+ class << self
8
+ def load!
9
+ if rails?
10
+ register_rails_engine
11
+ elsif hanami?
12
+ register_hanami
13
+ elsif sprockets?
14
+ register_sprocket
15
+ elsif defined?(::Sass) && ::Sass.respond_to?(:load_paths)
16
+ # The deprecated `sass` gem:
17
+ ::Sass.load_paths << stylesheets_path
18
+ elsif defined?(Sass::Rails) && Sass::Rails.respond_to?(:add_sass_load_path)
19
+ # The `sass-rails` gem is present
20
+ Sass::Rails.add_sass_load_path(stylesheets_path)
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,4 @@
1
+ module ExpackGem
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: expack_gem
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - ruby_rose
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2024-09-13 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - 46199301+MicroRay620@users.noreply.github.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rspec"
21
+ - ".rubocop.yml"
22
+ - CHANGELOG.md
23
+ - CODE_OF_CONDUCT.md
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - assets/javascript/expack.bundle.js
28
+ - assets/javascript/expack.js
29
+ - assets/javascript/expack.min.js
30
+ - assets/javascript/expack/login.js
31
+ - assets/javascript/expack/modals.js
32
+ - assets/stylesheet/expack.css
33
+ - lib/expack_gem.rb
34
+ - lib/expack_gem/engine.rb
35
+ - lib/expack_gem/version.rb
36
+ - sig/expack_gem.rbs
37
+ homepage: https://github.com/ExpackTeam/expack_gem
38
+ licenses:
39
+ - MIT
40
+ metadata:
41
+ allowed_push_host: https://rubygems.org
42
+ homepage_uri: https://github.com/ExpackTeam/expack_gem
43
+ source_code_uri: https://github.com/ExpackTeam/expack_gem
44
+ changelog_uri: https://github.com/ExPackTeam/expack_gem/blob/master/CHANGELOG.md
45
+ post_install_message:
46
+ rdoc_options: []
47
+ require_paths:
48
+ - lib
49
+ required_ruby_version: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 3.0.0
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ requirements: []
60
+ rubygems_version: 3.5.18
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: The official ruby gem for ExPack web library.
64
+ test_files: []