-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd0cefc
commit 371b3d0
Showing
32 changed files
with
418 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ target/ | |
*.class | ||
*~ | ||
|
||
*.css.map |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2018 | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
# ucsb-cs56-anon-search-engine-2 | ||
# ucsb-cs56-anon-search-engine | ||
|
||
# FALL 2018 | ||
|
||
|
||
Members: | ||
|
||
Joshua Andrews, joshandrews43 | ||
|
||
Kevin Mata, Mata17 | ||
|
||
Michael Zhou, MichaelZyh | ||
|
||
Kevin Villanueva, VillanuevaK | ||
|
||
Thomas Parker, tparker48 | ||
|
||
Kyle Stanfield, kylejstanfield | ||
|
||
Matt Moss, matthewmoss | ||
|
||
Summary: | ||
A web app that allows users to interact with well known search engines anonymously, which maintains their privacy and prevents search engines from collecting their data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Images go in this folder |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>org.springframework</groupId> | ||
<artifactId>gs-spring-boot</artifactId> | ||
<version>0.1.0</version> | ||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>2.0.5.RELEASE</version> | ||
</parent> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-freemarker</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<properties> | ||
<java.version>1.8</java.version> | ||
</properties> | ||
|
||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.heroku.sdk</groupId> | ||
<artifactId>heroku-maven-plugin</artifactId> | ||
<version>2.0.3</version> | ||
<configuration> | ||
<jdkVersion>1.8</jdkVersion> | ||
<!-- Use your own application name --> | ||
<!-- at Heroku CLI, use heroku apps to list, or use Heroku Dashboard --> | ||
<appName>ucsb-cs56-f18-anonsearchengine</appName> | ||
<processTypes> | ||
<!-- Tell Heroku how to launch your application --> | ||
<!-- You might have to remove the ./ in front --> | ||
<web>java $JAVA_OPTS -jar target/gs-spring-boot-0.1.0.jar edu.ucsb.cs56.pconrad.springboot.HelloController --server.port=$PORT</web> | ||
|
||
</processTypes> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions
11
src/main/java/edu/ucsb/cs56/pconrad/springboot/hello/Application.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package edu.ucsb.cs56.pconrad.springboot.hello; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class Application { | ||
public static void main(String[] args) { | ||
SpringApplication.run(Application.class, args); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/edu/ucsb/cs56/pconrad/springboot/hello/HelloController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package edu.ucsb.cs56.pconrad.springboot.hello; | ||
|
||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
|
||
@Controller | ||
public class HelloController { | ||
|
||
@RequestMapping("/") | ||
public String index() { | ||
return "index"; | ||
} | ||
|
||
@RequestMapping("/search") | ||
public String page1() { | ||
return "search"; | ||
} | ||
|
||
@RequestMapping("/chooseSearchEngines") | ||
public String page2() { | ||
return "chooseSearchEngines"; | ||
} | ||
|
||
@RequestMapping("/page3") | ||
public String page3() { | ||
return "page3"; | ||
} | ||
|
||
|
||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
.flex-column { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.flex-row { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.flex-center { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.clickable { | ||
cursor: pointer; | ||
} | ||
|
||
#title-text { | ||
align-items: center; | ||
margin-top: 40px; | ||
margin-bottom: 200px; | ||
} | ||
|
||
#search-section { | ||
margin-bottom: 100px; | ||
display: flex; | ||
justify-content: center; | ||
|
||
#searchbar { | ||
width: 33%; | ||
height: 46px; | ||
display: flex; | ||
align-items: center; | ||
padding: 0 10px 0 10px; | ||
border-radius: 5px; | ||
outline: 0; | ||
margin-right: 20px; | ||
} | ||
|
||
#search-button { | ||
border-radius: 5px; | ||
width: 100px; | ||
background-color: lightgray; | ||
} | ||
} | ||
|
||
.selected { | ||
border: 3px solid blue; | ||
} | ||
|
||
#engine-buttons { | ||
justify-content: space-around; | ||
|
||
.logo-container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 5px; | ||
padding: 3px; | ||
|
||
.logo { | ||
max-width: 150px; | ||
max-height: 150px; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
//index.js | ||
|
||
$(document).ready(function() { | ||
$('.logo-container').click(function(event) { | ||
$('.selected').removeClass("selected"); | ||
$(this).addClass("selected"); | ||
}); | ||
|
||
$('#searchbar').keypress(function(e){ | ||
if(e.which == 13){ //Enter key pressed | ||
performSearch(); | ||
} | ||
}); | ||
|
||
$('#search-button').on('click', performSearch); | ||
}); | ||
|
||
|
||
|
||
function performSearch() { | ||
console.log("Performing Search:"); | ||
const engine = getEngineType(); | ||
const query = document.getElementById('searchbar').value; | ||
|
||
|
||
//make backend call here. | ||
} | ||
|
||
function getEngineType() { | ||
const engine = $('.selected').attr('id'); | ||
|
||
if (engine == "duckduckgo-search-button") | ||
return "DuckDuckGo"; | ||
else if (engine == "google-search-button") | ||
return "Google"; | ||
else | ||
return "Bing"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Choose Search Engines</title> | ||
<#include "head.ftl" /> | ||
</head> | ||
<body> | ||
<#include "navbar.ftl" /> | ||
<h1>Choose your search engines:</h1> | ||
<h5>Below, the user will be able to check the following search engines as check boxes, and then when they use the search feature, | ||
only the selected search engines will be used.</h5> | ||
<p>Google</p> | ||
<br /> | ||
<p>Bing</p> | ||
<br /> | ||
<p>Yahoo</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<!-- Latest compiled and minified CSS --> | ||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> | ||
|
||
<link rel="stylesheet" href="/css/index.css" /> | ||
|
||
<!-- jQuery library --> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | ||
|
||
<!-- Import JS for index.ftl --> | ||
<script src="/js/index.js"></script> | ||
|
||
<!-- Popper JS --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> | ||
|
||
<!-- Latest compiled JavaScript --> | ||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Welcome to Anonymous Searcher!</title> | ||
<#include "head.ftl" /> | ||
</head> | ||
<body> | ||
<div class="body-container"> | ||
<div id="title-text" class="flex-column"> | ||
<h1 id="title">Anonymous Search Engine</h1> | ||
<h5 id="subtitle">Search the web anonymously by making the network requests through a third party that obscures your requests.</h5> | ||
</div> | ||
<div id="search-section" class="flex-row"> | ||
<input type="text" id="searchbar" placeholder="Enter Search Here"></input> | ||
<button id="search-button">Search</button> | ||
</div> | ||
<div id="engine-buttons" class="flex-row"> | ||
<div id="google-search-button" class="logo-container clickable selected"><img class="logo" src="/assets/google_logo.png"></div> | ||
<div id="duckduckgo-search-button" class="logo-container clickable"><img class="logo" src="/assets/ddg_logo.png"></div> | ||
<div id="bing-search-button" class="logo-container clickable"><img class="logo" src="/assets/bing_logo.png"></div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.