Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub pages #473

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f808e0f
added group number to html
na5im Oct 20, 2022
cd798e4
Added group number
na5im Nov 12, 2022
7fa2cf0
get data
na5im Nov 26, 2022
b53abce
created a skeleton of the front end
na5im Nov 27, 2022
b8a926e
created skeleton for frontend
na5im Nov 29, 2022
2e80e06
Merge branch 'RR8-Nasim'
na5im Nov 29, 2022
072c2be
successfully connect to api
na5im Nov 29, 2022
d92a2e6
added map
na5im Nov 30, 2022
cb1f308
Merge branch 'RR8-Nasim'
na5im Nov 30, 2022
188aaf5
attempted .forEach
itshue Nov 30, 2022
b1c073c
fix data retrieval
na5im Dec 4, 2022
c24f1f8
fixed api request and organized file
na5im Dec 4, 2022
324ae87
Update .gitignore
na5im Dec 4, 2022
29ea99e
added districts and cities
na5im Dec 4, 2022
995df67
attempting to find district... may change method
na5im Dec 4, 2022
1650e38
successfully returns district
na5im Dec 4, 2022
844b5cf
removed duplicates from district array
na5im Dec 4, 2022
a1cde19
Merge branch 'lab10'
na5im Dec 4, 2022
91f4eeb
lab 10 work
itshue Dec 7, 2022
39534bd
Merge branch 'main' into Lab10
itshue Dec 7, 2022
f87e6ee
Merge pull request #3 from na5im/Lab10
itshue Dec 7, 2022
905ef15
fixed processLitters function and added markers
na5im Dec 7, 2022
dddfe70
Merge pull request #4 from na5im/lab10
na5im Dec 7, 2022
e2d6fb9
updated files
na5im Dec 7, 2022
c92b4a2
Merge branch 'main' of https://github.com/na5im/Group24-Final-Project
na5im Dec 7, 2022
77070c2
prettying up home page
itshue Dec 11, 2022
e76e9de
changed name and added about page.
na5im Dec 11, 2022
f07204c
added navbar to update folder
na5im Dec 12, 2022
f4e05e5
added previous work and updated to fit theme
na5im Dec 12, 2022
880efee
added other pages
na5im Dec 12, 2022
39cac38
moved files to github pages layout
na5im Dec 12, 2022
ee728e9
Merge pull request #5 from na5im/lab10
na5im Dec 12, 2022
f9fb622
fixed links to home page
na5im Dec 12, 2022
fda3273
made pages responsive
na5im Dec 13, 2022
6e194ba
Update README.md
na5im Dec 13, 2022
307fb1a
fixed typos and updated about page
na5im Dec 13, 2022
dd2262b
Merge branch 'main' of https://github.com/na5im/Group24-Final-Project
na5im Dec 13, 2022
0c1df7d
Create CNAME
na5im Dec 13, 2022
3fb7983
Delete CNAME
na5im Dec 13, 2022
42f0de1
update css
na5im Dec 13, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,6 @@ dist

# TernJS port file
.tern-port
.eslintrc.cjs
.eslintrc.cjs
.vscode/settings.json
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# This is your readme
You are required to fill it in with documentation similar to that found in the Sequelize example for the course as part of your final project.
# LitterMapper
[LitterMapper](https://na5im.github.io/) is a tool for tracking and visualizing litter in PG County, MD. It uses the [LitterTRAK API](https://data.princegeorgescountymd.gov/Environment/LitterTRAK/9tsa-iner) to access data on the location of data and uses [Leaflet](https://leafletjs.com/) to display this information on the map. LitterMapper can be accessed through any modern browser (Chrome, Safari, Firefox) on any modern device (iOS, Android, Windows, macOS, Linux).

### How to use Markdown
Markdown is a text notation system used in Discord, Whatsapp and similar to structure pages without writing HTML at all. You'll be using it for your documentation.
* [Markdown guide](https://www.markdownguide.org/cheat-sheet/)
## Technologies used
- LitterTRAK API
- Leaflet v1.9.3
- Bootstrap v4.6.1
- JQuery v3.4.1
- Bulma v0.9.4
64 changes: 64 additions & 0 deletions client/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>PG County LitterMapper</title>

<link rel="stylesheet" href="style.css">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.10.2/css/all.css" rel="stylesheet" crossorigin="anonymous">

<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.1/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.min.js"></script>

<script src="https://kit.fontawesome.com/7721abf666.js" crossorigin="anonymous"></script>
</head>
<body>
<nav class="navbar navbar-expand-custom navbar-mainbg">
<a class="navbar-brand navbar-logo" href="#"><i class="fa-sharp fa-solid fa-map-pin"></i>LitterMapper</a>
<button class="navbar-toggler" type="button" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<i class="fas fa-bars text-white"></i>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<div class="hori-selector"><div class="left"></div><div class="right"></div></div>
<li class="nav-item">
<a class="nav-link" href="../index.html"><i class="fa-sharp fa-solid fa-house-chimney"></i></i>Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="./table.html"><i class="fa-sharp fa-solid fa-table"></i>Cities Table</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="javascript:void(0);"><i class="far fa-copy"></i>About</a>
</li>
</ul>
</div>
</nav>

<div class="container">

<div class="about_box ">
<h1>About Our App</h1>
<p> Our web app, LitterMapper, was created to help residents of PG County stay informed about the litter in their district.
Using data from the LitterTRAK API, our app allows users to see the locations of litter on a map.
This can help residents take action to clean up their communities and keep PG County litter free.
</p>

<h2>Why We Created This App</h2>

<p>We created LitterMapper because we believe that clean, litter-free communities are important for the health and well-being of everyone who lives in PG County.
Litter not only affects the aesthetic of our neighborhoods, but it can also pose a serious threat to the environment and wildlife.
That's why we wanted to create a tool that would help residents stay informed about the litters in their district and take action to clean them up.</p>

<p>With LitterMapper, users can see the locations of litter on a map. This can help them plan clean-up efforts, coordinate with their neighbors, and make a real difference in their communities. We believe that by empowering residents with information, we can help create a cleaner, healthier, and more beautiful PG County.</p>

</div>

</div>

<script src="./navbar.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
</body>
</html>
12 changes: 0 additions & 12 deletions client/index.html

This file was deleted.

81 changes: 81 additions & 0 deletions client/navbar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// ---------Responsive-navbar-active-animation-----------
function test() {
const tabsNewAnim = $('#navbarSupportedContent');
const selectorNewAnim = $('#navbarSupportedContent').find('li').length;
const activeItemNewAnim = tabsNewAnim
.find('li')
.end()
.find('.active');

function setHoriSelectorPositionAndDimensions(activeItem) {
const activeWidthNewAnimHeight = activeItem.innerHeight();
const activeWidthNewAnimWidth = activeItem.innerWidth();
const itemPosNewAnimTop = activeItem.position();
const itemPosNewAnimLeft = activeItem.position();
console.log(activeItem, itemPosNewAnimTop, activeWidthNewAnimWidth);

$('.hori-selector').css({
top: `${itemPosNewAnimTop.top}px`,
left: `${itemPosNewAnimLeft.left}px`,
height: `${activeWidthNewAnimHeight}px`,
width: `${activeWidthNewAnimWidth}px`
});
}
// Show the li elements before calling the setHoriSelectorPositionAndDimensions function
$('#navbarSupportedContent ul li').show();

// Call the setHoriSelectorPositionAndDimensions function when the page is first loaded
setHoriSelectorPositionAndDimensions(activeItemNewAnim);

$('#navbarSupportedContent').on('click', 'li', function(e) {
$('#navbarSupportedContent ul li').removeClass('active');
$(this).addClass('active');

// Call the setHoriSelectorPositionAndDimensions function when an item is clicked
setHoriSelectorPositionAndDimensions($(this));
});
}

$(document).ready(() => {
setTimeout(() => { test(); }, 150); // adding 100 fixed the alignment of the hori-selector
});
$(window).on('resize', () => {
setTimeout(() => { test(); }, 500);
});
$('.navbar-toggler').click(() => {
$('.navbar-collapse').slideToggle(300);
setTimeout(() => { test(); });
});

// --------------add active class-on another-page move----------
jQuery(document).ready(($) => {
// Get current path and find target link
let path = window.location.pathname.split('/').pop();

// Account for home page with empty path
if (path === '') {
path = 'index.html';
}

const target = $(`#navbarSupportedContent ul li a[href="${path}"]`);
// Add active class to target link
target.parent().addClass('active');
});

// Add active class on another page linked
// ==========================================
// $(window).on('load',function () {
// var current = location.pathname;
// console.log(current);
// $('#navbarSupportedContent ul li a').each(function(){
// var $this = $(this);
// // if the current path is like this link, make it active
// if($this.attr('href').indexOf(current) !== -1){
// $this.parent().addClass('active');
// $this.parents('.menu-submenu').addClass('show-dropdown');
// $this.parents('.menu-submenu').parent().addClass('active');
// }else{
// $this.parent().removeClass('active');
// }
// })
// });
46 changes: 46 additions & 0 deletions client/old-version/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LitterMapper</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>

<div class="wrapper">
<header class="header">
<h1>LitterMapper</h1>
<nav>
<ul>
<li><a href="./index.html">Home</a></li>
<li><a href="./about.html">About</a></li>
</ul>
</nav>
</header>

<div class="container">

<div class="">
<h1>About Our App</h1>
<p> Our web app, LitterMapper, was created to help residents of PG County stay informed about the litter in their district.
Using data from the LitterTRAK API, our app allows users to see the locations of littlers on a map and learn more about them.
This can help residents take action to clean up their communities and keep PG County litter free.
</p>

<h2>Why We Created This App</h2>

<p>We created LitterMapper because we believe that clean, litter-free communities are important for the health and well-being of everyone who lives in PG County.
Litter not only affects the aesthetic of our neighborhoods, but it can also pose a serious threat to the environment and wildlife.
That's why we wanted to create a tool that would help residents stay informed about the littlers in their district and take action to clean them up.</p>

<p>With LitterMapper, users can see the locations of littlers on a map and learn more about them. This can help them plan clean-up efforts, coordinate with their neighbors, and make a real difference in their communities. We believe that by empowering residents with information, we can help create a cleaner, healthier, and more beautiful PG County.</p>

</div>

</div>
</div>

<script src="../script.js"></script>
</body>
</html>
Loading