From c0787b137c805f2d487be757c251413d31a71df1 Mon Sep 17 00:00:00 2001 From: Mr MRF <79112136+Mr-MRF-Dev@users.noreply.github.com> Date: Tue, 23 Jul 2024 09:53:12 +0330 Subject: [PATCH 1/4] Create Cheat sheet folder :bee: --- Cheat-Sheet/css-sass.md | 1 + Cheat-Sheet/ui-ux.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 Cheat-Sheet/css-sass.md create mode 100644 Cheat-Sheet/ui-ux.md diff --git a/Cheat-Sheet/css-sass.md b/Cheat-Sheet/css-sass.md new file mode 100644 index 0000000..c82dd76 --- /dev/null +++ b/Cheat-Sheet/css-sass.md @@ -0,0 +1 @@ +# css / sass diff --git a/Cheat-Sheet/ui-ux.md b/Cheat-Sheet/ui-ux.md new file mode 100644 index 0000000..5363010 --- /dev/null +++ b/Cheat-Sheet/ui-ux.md @@ -0,0 +1 @@ +# ui / ux From 5bcc3b0ea7a5b50295962f881864f76be0594ec9 Mon Sep 17 00:00:00 2001 From: Mr MRF <79112136+Mr-MRF-Dev@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:41:20 +0330 Subject: [PATCH 2/4] upload my project :passport_control: --- MRF-Project/css.css | 70 +++++++++++++++++++++++++++++++++++++++++ MRF-Project/css.css.map | 1 + MRF-Project/css.sass | 53 +++++++++++++++++++++++++++++++ MRF-Project/index.html | 30 ++++++++++++++++++ MRF-Project/main.js | 39 +++++++++++++++++++++++ 5 files changed, 193 insertions(+) create mode 100644 MRF-Project/css.css create mode 100644 MRF-Project/css.css.map create mode 100644 MRF-Project/css.sass create mode 100644 MRF-Project/index.html create mode 100644 MRF-Project/main.js diff --git a/MRF-Project/css.css b/MRF-Project/css.css new file mode 100644 index 0000000..cf40e9c --- /dev/null +++ b/MRF-Project/css.css @@ -0,0 +1,70 @@ +body { + display: flex; +} + +aside { + width: 20%; + box-sizing: border-box; + margin: 10px; + padding: 20px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + border-radius: 5px; + background-color: #f2f2f2; +} + +#main { + width: 80%; + box-sizing: border-box; + margin: 10px; + padding: 20px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + border-radius: 5px; + background-color: #fff; +} + +header { + margin: 10px; + padding: 20px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + border-radius: 5px; + background-color: #f2f2f2; +} + +footer { + margin: 10px; + padding: 20px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + border-radius: 5px; + background-color: #f2f2f2; +} + +#container { + display: flex; + align-items: stretch; + justify-content: space-between; + flex-wrap: wrap; +} +#container .card { + margin: 10px; + padding: 20px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1); + border-radius: 5px; + background-color: #fff; + width: 22%; + box-sizing: border-box; + display: flex; + flex-direction: column; + align-items: center; +} +#container .card h3 { + margin-top: 10px; + font-size: 1.5rem; +} +#container .card img { + width: 80%; + margin-top: 10px; +} +#container .card p { + margin-top: 10px; + font-size: 0.9rem; +}/*# sourceMappingURL=css.css.map */ \ No newline at end of file diff --git a/MRF-Project/css.css.map b/MRF-Project/css.css.map new file mode 100644 index 0000000..ae9b578 --- /dev/null +++ b/MRF-Project/css.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["css.sass","css.css"],"names":[],"mappings":"AAYA;EACI,aAAA;ACXJ;;ADaA;EAbI,UAAA;EACA,sBAAA;EAGA,YAAA;EACA,aAAA;EACA,sCAAA;EACA,kBAAA;EACA,yBAAA;ACEJ;;ADOA;EAjBI,UAAA;EACA,sBAAA;EAGA,YAAA;EACA,aAAA;EACA,sCAAA;EACA,kBAAA;EACA,sBAAA;ACYJ;;ADCA;EAjBI,YAAA;EACA,aAAA;EACA,sCAAA;EACA,kBAAA;EACA,yBAAA;ACoBJ;;ADJA;EApBI,YAAA;EACA,aAAA;EACA,sCAAA;EACA,kBAAA;EACA,yBAAA;AC4BJ;;ADTA;EACI,aAAA;EACA,oBAAA;EACA,8BAAA;EACA,eAAA;ACYJ;ADVI;EA7BA,YAAA;EACA,aAAA;EACA,sCAAA;EACA,kBAAA;EACA,sBAAA;EARA,UAAA;EACA,sBAAA;EAmCI,aAAA;EACA,sBAAA;EACA,mBAAA;ACiBR;ADfQ;EACI,gBAAA;EACA,iBAAA;ACiBZ;ADfQ;EACI,UAAA;EACA,gBAAA;ACiBZ;ADfQ;EACI,gBAAA;EACA,iBAAA;ACiBZ","file":"css.css"} \ No newline at end of file diff --git a/MRF-Project/css.sass b/MRF-Project/css.sass new file mode 100644 index 0000000..32f13bd --- /dev/null +++ b/MRF-Project/css.sass @@ -0,0 +1,53 @@ + +@mixin boxSizing($w) + width: #{$w} + box-sizing: border-box + +@mixin sectionStyle($bg_color:#fff) + margin: 10px + padding: 20px + box-shadow: 0 0 3px rgba(0, 0, 0, 0.1) + border-radius: 5px + background-color: #{$bg_color} + +body + display: flex + +aside + @include boxSizing(20%) + @include sectionStyle(#f2f2f2) + +#main + @include boxSizing(80%) + @include sectionStyle() + +header + @include sectionStyle(#f2f2f2) + +footer + @include sectionStyle(#f2f2f2) + +#container + display: flex + align-items: stretch + justify-content: space-between + flex-wrap: wrap + + .card + @include sectionStyle() + @include boxSizing(22%) + display: flex + flex-direction: column + align-items: center + + h3 + margin-top: 10px + font-size: 1.5rem + + img + width: 80% + margin-top: 10px + + p + margin-top: 10px + font-size: 0.9rem diff --git a/MRF-Project/index.html b/MRF-Project/index.html new file mode 100644 index 0000000..9643570 --- /dev/null +++ b/MRF-Project/index.html @@ -0,0 +1,30 @@ + + + + + + + + +
+
+ Lorem ipsum, dolor sit amet consectetur adipisicing elit. Nisi quisquam + culpa eius reiciendis, quaerat et voluptas atque quos eligendi in + officia dolore cumque ipsam sapiente corrupti placeat a. Repellendus, + magnam? +
+
+ +
+ + diff --git a/MRF-Project/main.js b/MRF-Project/main.js new file mode 100644 index 0000000..1b34699 --- /dev/null +++ b/MRF-Project/main.js @@ -0,0 +1,39 @@ +function addNewBook(book_obj) { + const h3_tag = document.createElement("h3"); + h3_tag.textContent = book_obj?.name; + + const img_tag = document.createElement("img"); + img_tag.src = book_obj?.image; + img_tag.alt = book_obj?.name; + + const p_tag = document.createElement("p"); + p_tag.innerHTML = `author: ${book_obj?.author}
+ publishData: ${book_obj?.publishData}
+ genre: ${book_obj?.genre.join(", ")}`; + + const div_tag = document.createElement("div"); + div_tag.classList.add("card"); + + div_tag.appendChild(h3_tag); + div_tag.appendChild(img_tag); + div_tag.appendChild(p_tag); + + document.getElementById("container").appendChild(div_tag); +} + +const book_api_url = + "https://raw.githubusercontent.com/Star-Academy/codestar-documents/master/static/datasets/books.json"; + +fetch(book_api_url) + .then((response) => response.json()) + .then((data) => { + data.forEach((book_obj) => { + addNewBook(book_obj); + }); + + console.log(data); + }) + .catch((error) => { + alert("There was a problem fetching the data."); + console.error(error); + }); From 844143f82c4173d92b5e0d33e00cd06480fbd916 Mon Sep 17 00:00:00 2001 From: Mr MRF <79112136+Mr-MRF-Dev@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:45:21 +0330 Subject: [PATCH 3/4] Create index.html --- index.html | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..b1912c2 --- /dev/null +++ b/index.html @@ -0,0 +1,11 @@ + + + + + + Team 09 + + + MRF Project + + \ No newline at end of file From 53571014db4e9ac8ae1a82d8750195ef56cbc92d Mon Sep 17 00:00:00 2001 From: Mr MRF <79112136+Mr-MRF-Dev@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:50:03 +0330 Subject: [PATCH 4/4] Added static page --- .github/workflows/static.yml | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/static.yml diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..f2c9e97 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4