diff options
| author | Teddy Wing | 2013-04-07 04:56:54 -0400 |
|---|---|---|
| committer | Teddy Wing | 2013-04-07 04:56:54 -0400 |
| commit | f0d38f309a4e96175c993f6096bf2a19a9d24b6b (patch) | |
| tree | 3e58134898cc2e21b6ebdf69d0f0fbb82af0975d | |
| parent | 01998983cdfde417abbea4812a5ab7e02ef4547e (diff) | |
| download | clips-f0d38f309a4e96175c993f6096bf2a19a9d24b6b.tar.bz2 | |
Add preliminary styles to the site
| -rw-r--r-- | assets/stylesheets/global.css | 65 | ||||
| -rw-r--r-- | views/index.html.erb | 12 | ||||
| -rw-r--r-- | views/layout.html.erb | 7 |
3 files changed, 78 insertions, 6 deletions
diff --git a/assets/stylesheets/global.css b/assets/stylesheets/global.css new file mode 100644 index 0000000..630bc41 --- /dev/null +++ b/assets/stylesheets/global.css @@ -0,0 +1,65 @@ +/* Clips */ + +/* # Reset # */ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:none}table{border-collapse:collapse;border-spacing:0} + + +/* # General # */ +body { + background-color: #D8D5D5; + font-family: 'Josefin Sans', serif; +} + +a { color: #00A0A0; } +a:hover { color: #00ADAD; } + +/* Wrap */ +header, +div[role="main"], +footer { + width: 450px; + margin: 0 auto; +} + + +/* # Header # */ +header h1 { + margin-top: 0.1em; + font-family: 'Raleway Dots', 'Voltaire', sans-serif; + text-transform: uppercase; + font-size: 10em; + text-align: center; +} + + +/* # Content # */ +#details { + +} + +#clips li { + margin: 2.4em 0; + + height: 1em; + font-size: 1.2em; + white-space: nowrap; +} + +#clips li a { + padding: 0.8em 0.5em; + background-color: #C3C0C0; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + + width: 100%; + display: block; + overflow: hidden; + text-overflow: ellipsis; + + text-shadow: 0 -1px 1px #333; +} + +#clips li a:hover { + background-color: #CBC8C8; +} diff --git a/views/index.html.erb b/views/index.html.erb index 351c34a..c41c0ad 100644 --- a/views/index.html.erb +++ b/views/index.html.erb @@ -1,11 +1,15 @@ -<div> - <a href="javascript:(function(){var xhr=new XMLHttpRequest();var params='url='+window.location.href;xhr.open('POST','<%= @env['REQUEST_URI'] %>clips',true);xhr.onreadystatechange=function(){if(this.readyState==4){if(xhr.status==200){if(xhr.responseText.success){}}}};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);})()" onclick="alert('Drag this link onto your browser bookmarks bar.'); return false;">Clips</a> +<div id="details"> + Grab the bookmarklet: <a href="javascript:(function(){var xhr=new XMLHttpRequest();var params='url='+window.location.href;xhr.open('POST','<%= "#{@env['rack.url_scheme']}://#{@env['HTTP_HOST']}" %>/clips',true);xhr.onreadystatechange=function(){if(this.readyState==4){if(xhr.status==200){if(xhr.responseText.success){}}}};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send(params);})()" onclick="alert('Drag this link onto your browser bookmarks bar.'); return false;">Clips</a> </div> <% unless @clips.empty? %> - <ul> + <ul id="clips"> <% @clips.each do |c| %> - <li><%= c.url %></li> + <li> + <a href="<%= c.url %>"> + <%= c.url %> + </a> + </li> <% end %> </ul> <% else %> diff --git a/views/layout.html.erb b/views/layout.html.erb index 845929f..137c2c2 100644 --- a/views/layout.html.erb +++ b/views/layout.html.erb @@ -7,15 +7,18 @@ <meta name="description" content=""> <meta name="viewport" content="width=device-width"> - <link rel="stylesheet" href="css/style.css"> + <link href='http://fonts.googleapis.com/css?family=Josefin+Sans|Raleway+Dots|Voltaire' rel='stylesheet' type='text/css'> + <link rel="stylesheet" href="assets/stylesheets/global.css"> </head> <body> <header> - + <h1>Clips</h1> </header> + <div role="main"> <%= yield %> </div> + <footer> </footer> |
