Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewRDodds committed Feb 17, 2018
0 parents commit 01c9f30
Show file tree
Hide file tree
Showing 11 changed files with 1,518 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.DS_Store
Binary file added IconTemplate.png
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 IconTemplate@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
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.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Giphy Menu Search

This is a minimal Electron application for searching gifs using giphy.

![Demo](http://g.recordit.co/pNIMuJOKgr.gif)

## To Use

Clone this repository:
```bash
git clone https://github.com/MatthewRDodds/giphy-search
```

Add your Giphy API key in `app.js`:
```js
const apiKey = 'YOUR_KEY'
```

Run the app locally:
```bash
cd giphy-search
# Install dependencies
npm install
# Run the app
npm start
```
24 changes: 24 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<title>Gif Search</title>
<link rel="stylesheet" href="main.css">
</head>

<body class="app-wrapper">
<div class="row">
<input type="text" id="search">
</div>

<div class="row results">
</div>

<div class="copy">
<div class="text">Copied</div>
</div>

<script type="text/javascript">
require('./renderer.js')
</script>
</body>
</html>
83 changes: 83 additions & 0 deletions main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212529;
text-align: left;
background-color: #fff;
width: 400px;
height: 575px;
margin-right: auto;
margin-left: auto;
background: #212121;
}

.row {
display: flex;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}

#search {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
background-clip: padding-box;
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
background: #212121;
color: #ecf0f1;
border-radius: 0;
margin: 6px;
}

#search:focus {
outline-width: 0;
}

.copy {
position: fixed;
visibility: hidden;
opacity: 0;
transition: visibility 1s, opacity 0.5s linear;
width: 100%;
height: 100%;
top: 0;
padding-top: 115px;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0,0,0,0.5);
z-index: 2;
text-align: center;
}

.copy .text {
color: white;
font-size: 80px;
}

.copy.show {
visibility: visible;
opacity: 1;
transition: visibility 0.2s, opacity 0.3s linear;
}

.results {
margin-left: 3px;
margin-right: 3px;
background: #212121;
}

img {
height: 110px;
width: calc((100% - 6px) / 3);
}

img:hover {
cursor: pointer;
opacity: .5;
}
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
var menubar = require('menubar')
var mb = menubar({ height: 575 })
Loading

0 comments on commit 01c9f30

Please sign in to comment.