├── .gitignore
├── README.md
├── css
└── style.css
├── favicons
├── apple-touch-icon-114x114.png
├── apple-touch-icon-120x120.png
├── apple-touch-icon-144x144.png
├── apple-touch-icon-152x152.png
├── apple-touch-icon-180x180.png
├── apple-touch-icon-57x57.png
├── apple-touch-icon-60x60.png
├── apple-touch-icon-72x72.png
├── apple-touch-icon-76x76.png
├── apple-touch-icon-precomposed.png
├── apple-touch-icon.png
├── browserconfig.xml
├── favicon-160x160.png
├── favicon-16x16.png
├── favicon-192x192.png
├── favicon-32x32.png
├── favicon-96x96.png
├── favicon.ico
├── mstile-144x144.png
├── mstile-150x150.png
├── mstile-310x150.png
├── mstile-310x310.png
└── mstile-70x70.png
├── fonts
├── sans
│ ├── sourcesanspro-regular-webfont.eot
│ ├── sourcesanspro-regular-webfont.svg
│ ├── sourcesanspro-regular-webfont.ttf
│ ├── sourcesanspro-regular-webfont.woff
│ └── sourcesanspro-regular-webfont.woff2
├── serif
│ ├── sourceserifpro-regular-webfont.eot
│ ├── sourceserifpro-regular-webfont.svg
│ ├── sourceserifpro-regular-webfont.ttf
│ ├── sourceserifpro-regular-webfont.woff
│ └── sourceserifpro-regular-webfont.woff2
├── slight.eot
├── slight.svg
├── slight.ttf
└── slight.woff
├── index.html
└── js
├── FileSaver.js
├── jquery-1.11.1.min.js
├── jquery.animate-colors.js
└── main.js
/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled source #
2 | ###################
3 | *.com
4 | *.class
5 | *.dll
6 | *.exe
7 | *.o
8 | *.so
9 |
10 | # Packages #
11 | ############
12 | # it's better to unpack these files and commit the raw source
13 | # git has its own built in compression methods
14 | *.7z
15 | *.dmg
16 | *.gz
17 | *.iso
18 | *.jar
19 | *.rar
20 | *.tar
21 | *.zip
22 |
23 | # Logs and databases #
24 | ######################
25 | *.log
26 | *.sql
27 | *.sqlite
28 |
29 | # OS generated files #
30 | ######################
31 | .DS_Store
32 | .DS_Store?
33 | ._*
34 | .Spotlight-V100
35 | .Trashes
36 | ehthumbs.db
37 | Thumbs.db
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Slight
2 | Slight's an in-browser document editor. It saves content using local storage, so it can be recalled the next time Slight is opened. It's got a minimal interface, so you can focus solely on your writing.
3 |
4 | Check it out at: [mackeyguenther.github.io/slight](http://mackeyguenther.github.io/slight/)
5 |
6 | Slight uses the Source font family by Adobe, available *completely free* for web use from [here](https://edgewebfonts.adobe.com).
7 |
8 | ## Acknowledgements
9 | + [This](http://stackoverflow.com/questions/2176861/javascript-get-clipboard-data-on-paste-event-cross-browser) StackOverflow discussion
10 | + [Fontastic.me](http://fontastic.me) - my favorite icon font tool in all of the interwebs
11 | + [This](http://www.bitstorm.org/jquery/color-animation/) jQuery color animation plugin by Edwin Martin
12 | + [FileSaver.js](https://github.com/eligrey/FileSaver.js) by Eli Grey
13 | + [This](http://css-tricks.com/snippets/javascript/htmlentities-for-javascript/) htmlEntities for JavaScript on CSS-Tricks
14 |
--------------------------------------------------------------------------------
/css/style.css:
--------------------------------------------------------------------------------
1 | /*
2 | * Basic styles
3 | **/
4 |
5 | @font-face {
6 | font-family: "slight";
7 | src: url("../fonts/slight.eot");
8 | src: url("../fonts/slight.eot?#iefix") format("embedded-opentype"),
9 | url("../fonts/slight.ttf") format("truetype"),
10 | url("../fonts/slight.svg#slight") format("svg"),
11 | url("../fonts/slight.woff") format("woff");
12 | font-weight: normal;
13 | font-style: normal;
14 | }
15 |
16 | @font-face {
17 | font-family:"source-serif-pro";
18 | src: url("../fonts/serif/sourceserifpro-regular-webfont.eot");
19 | src: url("../fonts/serif/sourceserifpro-regular-webfont.eot?#iefix") format("embedded-opentype"),
20 | url("../fonts/serif/sourceserifpro-regular-webfont.woff2") format("woff2"),
21 | url("../fonts/serif/sourceserifpro-regular-webfont.woff") format("woff"),
22 | url("../fonts/serif/sourceserifpro-regular-webfont.ttf") format("truetype"),
23 | url("../serif/serif/sourceserifpro-regular-webfont.svg#source_serif_proregular") format("svg");
24 | font-weight:normal;
25 | font-style:normal;
26 | }
27 |
28 | @font-face {
29 | font-family:"source-sans-pro";
30 | src: url("../fonts/sans/sourcesanspro-regular-webfont.eot");
31 | src: url("../fonts/sans/sourcesanspro-regular-webfont.eot?#iefix") format("embedded-opentype"),
32 | url("../fonts/sans/sourcesanspro-regular-webfont.woff2") format("woff2"),
33 | url("../fonts/sans/sourcesanspro-regular-webfont.woff") format("woff"),
34 | url("../fonts/sans/sourcesanspro-regular-webfont.ttf") format("truetype"),
35 | url("../fonts/sans/sourcesanspro-regular-webfont.svg#source_sans_proregular") format("svg");
36 | font-weight:normal;
37 | font-style:normal;
38 | }
39 |
40 | body {
41 | transition: all 300ms ease-in-out;
42 | -webkit-transition: all 300ms ease-in-out;
43 | }
44 | p, h1 {
45 | outline: none;
46 | }
47 |
48 | p {
49 | padding-bottom: 32px;
50 | }
51 |
52 | button {
53 | margin: 0;
54 | background-color: transparent;
55 | border: 0;
56 | }
57 |
58 | img {
59 | display: block;
60 | max-width: 550px;
61 | margin: 0 auto;
62 | }
63 |
64 |
65 |
66 | /*
67 | * Content
68 | **/
69 |
70 | body {
71 | }
72 |
73 | /* fonts */
74 | body,
75 | body[data-font="serif"]{
76 | font-family: source-serif-pro, serif;
77 | }
78 | body[data-font="sans-serif"]{
79 | font-family: source-sans-pro, serif;
80 | }
81 |
82 | /* colors */
83 | body,
84 | body[data-color="lighter"]{
85 | background-color: #fff;
86 | color: #000;
87 | }
88 | body[data-color="darker"]{
89 | background-color: #000;
90 | color: #fff;
91 | }
92 |
93 |
94 | #header {
95 | margin: 40px 0 25px 0;
96 | font-size: 22px;
97 | font-weight: 300;
98 | text-align: center;
99 | -webkit-transition: all 300ms ease-in-out;
100 | -moz-transition: all 300ms ease-in-out;
101 | -ms-transition: all 300ms ease-in-out;
102 | -o-transition: all 300ms ease-in-out;
103 | transition: all 300ms ease-in-out;
104 | }
105 |
106 | #bodytext {
107 | max-width: 550px;
108 | margin: 0 auto;
109 | font-size: 18px;
110 | line-height: 30px;
111 | font-weight: 300;
112 | text-align: left;
113 | text-indent: 50px;
114 | -webkit-transition: all 300ms ease-in-out;
115 | -moz-transition: all 300ms ease-in-out;
116 | -ms-transition: all 300ms ease-in-out;
117 | -o-transition: all 300ms ease-in-out;
118 | transition: all 300ms ease-in-out;
119 | }
120 |
121 |
122 |
123 | /*
124 | * Action buttons
125 | **/
126 |
127 | .action-btn {
128 | position: fixed;
129 | bottom: 16px;
130 | font-family:'slight';
131 | font-size: 28px;
132 | line-height: 1;
133 | -webkit-transition: all 300ms ease-in-out;
134 | -moz-transition: all 300ms ease-in-out;
135 | -ms-transition: all 300ms ease-in-out;
136 | -o-transition: all 300ms ease-in-out;
137 | transition: all 300ms ease-in-out;
138 | }
139 | .action-btn:hover {
140 | cursor: pointer;
141 | color: #747474;
142 | }
143 |
144 | .action-btn--toggle-font { left: 16px; }
145 | .action-btn--toggle-font:before { content: "a"; }
146 |
147 | .action-btn--download-content { left: 96px; }
148 | .action-btn--download-content:before { content: "d"; }
149 |
150 | .action-btn--toggle-contrast { left: 56px; }
151 | .action-btn--toggle-contrast:before { content: "b"; }
152 |
153 | .action-btn--open-github { left: 136px; }
154 | .action-btn--open-github:before { content: "g"; }
155 |
156 |
157 |
158 | /*
159 | * Media queries
160 | **/
161 |
162 | @media (max-width: 500px) {
163 | #bodytext {
164 | width: 300px;
165 | padding-top: 10px;
166 | font-size: 18px;
167 | }
168 | #header {
169 | margin-top: 25px;
170 | font-size: 26px;
171 | }
172 | }
173 |
174 | @media (max-width: 300px) {
175 | #bodytext {
176 | max-width: 100%;
177 | }
178 | #header {
179 | max-width: 100%;
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-114x114.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-114x114.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-120x120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-120x120.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-144x144.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-152x152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-152x152.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-180x180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-180x180.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-57x57.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-57x57.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-60x60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-60x60.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-72x72.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-72x72.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-76x76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-76x76.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon-precomposed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon-precomposed.png
--------------------------------------------------------------------------------
/favicons/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mackeyguenther/slight/91cca1e4c7a5a348f0d638c630e8f7a4306efba2/favicons/apple-touch-icon.png
--------------------------------------------------------------------------------
/favicons/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
t |