Skip to content

Commit

Permalink
Merge #83: Components and Images folders
Browse files Browse the repository at this point in the history
ac9407e move appropriate components into components folder in lib. Add images folder to static folder and replace links in image src (grmbyrn)

Pull request description:

  ## Changes Made:

  Moved relevant components from the `routes` folder to a new `components` folder within the `lib` directory for better organisation.

  Created an `images` folder in the `static` directory and updated references to images in the code to use relative paths instead of hardcoding image addresses in the `src`.

  ## Details:

  ### 1. Component Organization:
  Before: Components were scattered across the `routes` folder.
  After: Components are now organized in a dedicated `components` folder within the lib directory.
  ### 2. Image Handling:
  Before: Image addresses were hardcoded in the `src` attribute, making it less maintainable.
  After: Images are now stored in the `static/images` folder, and references have been updated to use relative paths, improving maintainability and allowing for easier changes.

  ## Additional Notes
  The changes aim to enhance project structure, making it more modular and maintainable.
  Please review the updated code to ensure there are no regressions or issues.

ACKs for top commit:
  josecelano:
    ACK ac9407e

Tree-SHA512: e1c197da4fa6d9da14c96cd80e8b5737edd6c9ea814871b0ea43d81da6dedea46b3965d514abe4bc410cd5cb3707dc6c5fbb250d97feb5a2dea59257e1b9a4bb
  • Loading branch information
josecelano committed Dec 4, 2023
2 parents 8156f5a + ac9407e commit 28d36be
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
</p>
</div>
<div class="contact-img">
<img
src="https://images.unsplash.com/photo-1517048676732-d65bc937f952?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80"
alt=""
/>
<img src="/images/dylan-gillis-KdeqA3aTnBY-unsplash.jpg" alt="" />
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>
<div class="contribute-image">
<img
src="https://images.unsplash.com/photo-1531537571171-a707bf2683da?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=774&q=80"
src="/images/mimi-thian-lp1AKIUV3yo-unsplash.jpg"
alt="person listening to another person"
/>
</div>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import * as config from '$lib/config';
import Toggle from './toggle.svelte';
import Toggle from '$lib/components/Toggle.svelte';
</script>

<nav>
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import 'open-props/style';
import 'open-props/normalize';
import 'open-props/buttons';
import Header from './header.svelte';
import Footer from './footer.svelte';
import Header from '$lib/components/Header.svelte';
import Footer from '$lib/components/Footer.svelte';
import '../app.css';
</script>

Expand Down
10 changes: 5 additions & 5 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import * as config from '$lib/config';
export let data;
import Hero from './hero.svelte';
import Contribute from './contribute.svelte';
import Contact from './contact.svelte';
import Hero from '$lib/components/Hero.svelte';
import Contribute from '$lib/components/Contribute.svelte';
import Contact from '$lib/components/Contact.svelte';
</script>

<svelte:head>
Expand All @@ -16,12 +16,12 @@
<section class="articles-section">
<div class="articles-image">
<img
src="https://images.unsplash.com/photo-1543269865-cbf427effbad?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80"
src="/images/brooke-cagle--uHVRvDr7pg-unsplash.jpg"
class="top-img"
alt="group of people talking"
/>
<img
src="https://images.unsplash.com/photo-1522071820081-009f0129c71c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=870&q=80"
src="/images/annie-spratt-QckxruozjRg-unsplash.jpg"
class="btm-img"
alt="group of people talking with laptops"
/>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/mimi-thian-lp1AKIUV3yo-unsplash.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 28d36be

Please sign in to comment.