Skip to content

Commit 01c9f30

Browse files
committed
Initial commit
0 parents  commit 01c9f30

11 files changed

Lines changed: 1518 additions & 0 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
.DS_Store

IconTemplate.png

529 Bytes
Loading

IconTemplate@2x.png

920 Bytes
Loading

LICENSE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
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:
2+
3+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
4+
5+
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.

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Giphy Menu Search
2+
3+
This is a minimal Electron application for searching gifs using giphy.
4+
5+
![Demo](http://g.recordit.co/pNIMuJOKgr.gif)
6+
7+
## To Use
8+
9+
Clone this repository:
10+
```bash
11+
git clone https://github.com/MatthewRDodds/giphy-search
12+
```
13+
14+
Add your Giphy API key in `app.js`:
15+
```js
16+
const apiKey = 'YOUR_KEY'
17+
```
18+
19+
Run the app locally:
20+
```bash
21+
cd giphy-search
22+
# Install dependencies
23+
npm install
24+
# Run the app
25+
npm start
26+
```

index.html

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Gif Search</title>
5+
<link rel="stylesheet" href="main.css">
6+
</head>
7+
8+
<body class="app-wrapper">
9+
<div class="row">
10+
<input type="text" id="search">
11+
</div>
12+
13+
<div class="row results">
14+
</div>
15+
16+
<div class="copy">
17+
<div class="text">Copied</div>
18+
</div>
19+
20+
<script type="text/javascript">
21+
require('./renderer.js')
22+
</script>
23+
</body>
24+
</html>

main.css

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
body {
2+
margin: 0;
3+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
4+
font-size: 1rem;
5+
font-weight: 400;
6+
line-height: 1.5;
7+
color: #212529;
8+
text-align: left;
9+
background-color: #fff;
10+
width: 400px;
11+
height: 575px;
12+
margin-right: auto;
13+
margin-left: auto;
14+
background: #212121;
15+
}
16+
17+
.row {
18+
display: flex;
19+
-ms-flex-wrap: wrap;
20+
flex-wrap: wrap;
21+
}
22+
23+
#search {
24+
display: block;
25+
width: 100%;
26+
padding: 0.375rem 0.75rem;
27+
font-size: 1rem;
28+
line-height: 1.5;
29+
background-clip: padding-box;
30+
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
31+
background: #212121;
32+
color: #ecf0f1;
33+
border-radius: 0;
34+
margin: 6px;
35+
}
36+
37+
#search:focus {
38+
outline-width: 0;
39+
}
40+
41+
.copy {
42+
position: fixed;
43+
visibility: hidden;
44+
opacity: 0;
45+
transition: visibility 1s, opacity 0.5s linear;
46+
width: 100%;
47+
height: 100%;
48+
top: 0;
49+
padding-top: 115px;
50+
left: 0;
51+
right: 0;
52+
bottom: 0;
53+
background-color: rgba(0,0,0,0.5);
54+
z-index: 2;
55+
text-align: center;
56+
}
57+
58+
.copy .text {
59+
color: white;
60+
font-size: 80px;
61+
}
62+
63+
.copy.show {
64+
visibility: visible;
65+
opacity: 1;
66+
transition: visibility 0.2s, opacity 0.3s linear;
67+
}
68+
69+
.results {
70+
margin-left: 3px;
71+
margin-right: 3px;
72+
background: #212121;
73+
}
74+
75+
img {
76+
height: 110px;
77+
width: calc((100% - 6px) / 3);
78+
}
79+
80+
img:hover {
81+
cursor: pointer;
82+
opacity: .5;
83+
}

main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var menubar = require('menubar')
2+
var mb = menubar({ height: 575 })

0 commit comments

Comments
 (0)