diff --git a/app.rb b/app.rb index df3b038..4ef0974 100644 --- a/app.rb +++ b/app.rb @@ -94,7 +94,7 @@ class Extension < ActiveRecord::Base post '/extensions' do unless params[:project_url].empty? - #%r{github\.com[:/](.+?)/(.+?)(?:\.git|)$}i.match(params[:project_url]) + #%r{github\.com[:/](.+?)/(.+?)(?:\.git|)$}i.match(params[:project_url]) begin project_url = %r{github\.com[:/](.+?)/(.+?)(?:\.git)$}i.match(params[:project_url]) username = project_url[1] @@ -163,7 +163,7 @@ class Extension < ActiveRecord::Base def truncate w words = w.split() - return words[0..40].join(' ') + (words.length > 40 ? '...' : '') + return words[0..30].join(' ') + (words.length > 40 ? '...' : '') end def sort_column diff --git a/app/css/main.css b/app/css/main.css index 7815116..c367d0b 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -1 +1 @@ -#featured,.extension-list,.pagination{padding:0 20px 0px}@media all and (min-width: 1024px){#featured,.extension-list,.pagination{padding:0 5% 0px}}@media all and (min-width: 1500px){#featured,.extension-list,.pagination{padding:0 15% 0px}}.sache-bar-actions,.featured-cards,.ghub-info{list-style:none;margin:0;padding:0;overflow:hidden}.page-title,.card-title,.card-description,.add-project-title{margin-top:0}h1,h2,h3,h4,h5,h6,.title-link,.actions .button{font-family:"ff-tisa-web-pro", serif}body,.response-bar .response-text{font-family:"ff-tisa-sans-web-pro", sans-serif}*,* *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{height:100%}body{font-size:1em}.img-404{text-align:center}.container{min-height:100%}.main-content{padding-bottom:280px;overflow:auto}@media all and (min-width: 520px){.main-content{padding-bottom:250px}}@media all and (min-width: 768px){.main-content{padding-bottom:200px}}footer{height:280px;margin-top:-280px}@media all and (min-width: 520px){footer{height:250px;margin-top:-250px}}@media all and (min-width: 768px){footer{height:200px;margin-top:-200px}}.button{background-color:#ad3972;display:inline-block;margin-bottom:1.25em;font-size:0.875em;font-weight:bold;color:#fff;line-height:2.1875em;border:none;-moz-border-radius-topright:2px;-webkit-border-top-right-radius:2px;border-top-right-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}.button:hover{background-color:#9a3366}.button:active{outline:none}a{text-decoration:none;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}p{font-weight:400}.note{font-size:0.75em;margin-bottom:1.875em}.instruction-list .note a{color:rgba(255,255,255,0.6)}.instruction-list .note a:hover{color:#fff}.footer-wrap .note{color:#bbb;margin-bottom:0;margin-top:0}pre{background-color:#c0407f;padding:0.875em;overflow:auto;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}pre code{display:block;color:#f2d9e6;white-space:pre}h1,h2,h3,h4,h5,h6{font-weight:normal}h3{color:#706c69;font-size:1em;font-weight:bold;text-align:center;margin-bottom:1.875em}.sache-bar{background:#c6538c url("../img/wave-pattern.png") 0 0 repeat-x;padding:0;overflow:hidden;height:7.5em}@media all and (min-width: 768px){.sache-bar{height:3.75em;padding:0 0.9375em}}.logo{margin:0;color:#fff;text-align:center}.logo img{height:35px;margin-top:10px}@media all and (min-width: 768px){.logo{float:left;text-align:left;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}}.sache-bar-actions{height:3.875em;background-color:#c0407f}.sache-bar-actions li{float:left;color:rgba(255,255,255,0.6);overflow:hidden;height:100%;width:50%;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}.sache-bar-actions li a{color:transparent;display:inline-block;height:100%;line-height:60px;-webkit-transition:opacity 200ms linear;-moz-transition:opacity 200ms linear;-o-transition:opacity 200ms linear;transition:opacity 200ms linear}.sache-bar-actions li a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}@media all and (min-width: 768px){.sache-bar-actions li a{color:#fff;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}}@media all and (min-width: 768px){.sache-bar-actions li{width:auto}}@media all and (min-width: 768px){.sache-bar-actions{float:right;background-color:transparent}}.sache-add-extension{border-left:solid 1px rgba(255,255,255,0.1)}.sache-add-extension a{background:url("../img/icons.svg") 50% -102px no-repeat;position:relative;width:100%;padding-left:4.375em;padding-right:1.5625em}@media all and (min-width: 768px){.sache-add-extension a{background-position:40px -104px !important;width:auto}}.sache-search form{height:99%}.sache-search input{background:#c0407f url("../img/icons.svg") 50% -58px no-repeat;border:0;height:100%;color:#fff;width:100%;text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.sache-search input::-webkit-input-placeholder{color:transparent}.sache-search input:-moz-placeholder{color:transparent}.sache-search input::-moz-placeholder{color:transparent}.sache-search input:-ms-input-placeholder{color:transparent}@media all and (min-width: 768px){.sache-search input{background-color:#c6538c}}.sache-search input.activated{left:0;background-color:#d98cb2}.sache-search input:focus{outline:none;background-image:none !important;background-color:#c0407f;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sache-search input:focus::-webkit-input-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus::-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-ms-input-placeholder{color:rgba(255,255,255,0.5)}@media all and (min-width: 768px){.sache-search input:focus{width:250px}.sache-search input:focus:before{display:none}}@media all and (min-width: 768px){.sache-search input{background-position:20px -57px !important;width:150px;margin-left:10px;padding:5px 5px 4px 49px;text-align:left;color:#fff;-webkit-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-moz-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-o-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.sache-search input::-webkit-input-placeholder{color:#fff}.sache-search input:-moz-placeholder{color:#fff}.sache-search input::-moz-placeholder{color:#fff}.sache-search input:-ms-input-placeholder{color:#fff}}header{background:#f8f8fa url("../img/circle-pattern.png") 50% 45% no-repeat;margin-bottom:1.875em;padding:1.25em 20px 1.625em;text-align:center}@media all and (min-width: 768px){header{padding:3.125em 5% 3.75em}}@media all and (min-width: 1500px){header{padding:5em 15% 5.875em}}.page-title{margin-bottom:0.25em;font-size:2em;line-height:1.3;color:#706c69}@media all and (min-width: 768px){.page-title{font-size:2.5em}}@media all and (min-width: 1024px){.page-title{font-size:2.875em}}.title-wrapper .page-title{display:inline;margin-left:5px}@media all and (min-width: 1024px){.title-wrapper .page-title{margin-left:10px}}.title-wrapper .to-home{display:inline;font-size:2.25em;font-weight:300;color:#d9d7d6;margin-right:5px}@media all and (min-width: 768px){.title-wrapper .to-home{font-size:2.625em}}@media all and (min-width: 1024px){.title-wrapper .to-home{font-size:3.125em;margin-right:10px}}.title-wrapper .to-home:hover{color:#a8a4a2}.page-description{font-size:0.875em;color:#706c69;margin-bottom:0;line-height:1.5}@media all and (min-width: 768px){.page-description{font-size:1em}}@media all and (min-width: 1024px){.page-description{font-size:1.125em}}.page-description a{color:#7ca4ab;-webkit-transition:all 200ms linear;-moz-transition:all 200ms linear;-o-transition:all 200ms linear;transition:all 200ms linear}.page-description a:hover{color:#c6538c}.cta-button{background-color:#e3e3eb;padding:10px 30px 11px 30px;font-weight:bold;font-size:16px;margin-top:10px;display:inline-block;color:#96928f !important;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.cta-button:hover{background-color:#d4d4e0;color:#706c69 !important}#featured{margin-bottom:50px}@media all and (min-width: 768px){.featured-cards{display:table;height:100%}}.feature-card{margin:0 0 1.25em;width:100%}@media all and (min-width: 768px){.feature-card{padding:0 1em 0;width:33.333%;height:100%;display:table-cell;position:relative}.feature-card:first-child{padding-left:0}.feature-card:last-child{padding-right:0}}.feature-card>span{display:block;position:relative;border:solid 1px #ddd;height:100%;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.card-title{font-size:1.375em;line-height:1.5;padding:20px 20px 0}.title-link{display:block;width:100%;color:#c6538c;cursor:pointer}.title-link:hover,.title-link:active{color:#862d59}table .title-link{font-size:0.875em;margin-bottom:12px}@media all and (min-width: 768px){table .title-link{margin-top:-6px;margin-bottom:0px}}.card-description-wrapper{overflow:hidden;padding-bottom:1em;padding:0 20px 20px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}@media all and (min-width: 768px){.card-description-wrapper{margin-bottom:90px}}@media all and (min-width: 1024px){.card-description-wrapper{margin-bottom:50px}}.card-description{font-size:1em;line-height:1.6;margin-bottom:1em;color:#706c69}table .card-description{font-size:0.875em;line-height:1.6}.ghub-info{color:#888;background-color:#fbfbfc;-moz-border-radius-bottomleft:2px;-webkit-border-bottom-left-radius:2px;border-bottom-left-radius:2px;-moz-border-radius-bottomright:2px;-webkit-border-bottom-right-radius:2px;border-bottom-right-radius:2px}.ghub-info li{background-color:#fbfbfc;float:left;border-top:solid 1px #eee;width:100%;text-align:center;color:#888 !important;padding:12px 0;font-size:0.875em}@media all and (min-width: 520px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info li{width:100%}}@media all and (min-width: 1024px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info{position:absolute;bottom:0;width:100%}}.author-filter{display:inline-block;color:#888}.author-filter:hover,.author-filter:active{color:#222}.author{position:relative;cursor:pointer;border-right:solid 1px #eee}.author:before{content:" ";background:url("../img/icons.svg") 0 -42px no-repeat;display:inline-block;width:14px;height:14px;margin-right:3px;position:relative;top:2px}.author a:hover{color:#c6538c}table .author{border-right:none;font-size:13px}.ghub-stars{float:right;position:relative}table .ghub-stars{float:none;font-size:13px}.ghub-stars:before{content:" ";background:url("../img/icons.svg") 0 0 no-repeat;display:inline-block;width:14px;height:14px;margin-right:2px;position:relative;top:2px}@media all and (min-width: 768px){.ghub-stars:before{margin-right:5px}}.tags{padding-bottom:0;margin-bottom:5px;color:#7ca4ab}.tag:after{content:",";display:inline-block;color:#333;margin-left:-3px}.tag:last-child:after{content:""}table .tag-list{line-height:1.45;margin-bottom:12px}@media all and (min-width: 768px){table .tag-list{margin-bottom:0}}.tag{color:#7ca4ab;font-size:0.875em;-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.tag:hover{color:#c6538c}.extension-list h3{margin-top:80px}.extension-list h3 small{color:#d4d2d1;display:block}@media all and (min-width: 768px){.extension-list h3 small{display:inline;margin-left:10px}}.extension-list table{width:100%;margin:0 0 100px;padding:0 15px}.extension-list table thead{font-weight:bold}@media all and (max-width: 767px){.extension-list table thead{display:none}}.extension-list table thead th{text-align:left}.extension-list table thead td,.extension-list table thead th{line-height:43px;color:#a5a19c;padding:0 10px}.extension-list table thead td:first-child,.extension-list table thead th:first-child{padding-left:0}.extension-list table tbody td{padding:20px 10px}@media all and (min-width: 768px){.extension-list table tbody td:first-child{padding-left:0}}@media all and (max-width: 767px){.extension-list table tbody td{padding:0}}.extension-list table tr{border-bottom:solid 1px #ddd;color:#888}@media all and (max-width: 767px){.extension-list table tr{display:block;border:solid 1px #ddd;padding:20px;margin-bottom:20px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}}.extension-list table td{vertical-align:top}@media all and (max-width: 767px){.extension-list table td{display:block}}.sortable a{display:block;width:100%;position:relative;cursor:pointer}.sortable a:hover{color:#8d8881}.sortable a:after{display:block;content:"";width:11px;height:15px;position:absolute;right:8px;top:15px;background:url("../img/arrows.svg") #fff -36px -2px no-repeat;background-size:50px auto;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);opacity:0.4}.sortable a.current.asc:after{background-position:-2px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sortable a.current.desc:after{background-position:-20px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.banners{margin-top:60px}.img-container{width:50%;float:left}@media all and (max-width: 700px){.img-container{width:100%;float:none;padding:0 20px;text-align:center}}.img-container .pink{float:right}@media all and (max-width: 700px){.img-container .pink{float:none}}.img-container .grey{float:left}@media all and (max-width: 700px){.img-container .grey{float:none}}.banner-code{clear:both;width:300px;border:solid 1px #d4d2d1;color:#a39f9c;padding-left:8px;margin-top:20px;line-height:1.3;height:100px;margin-bottom:60px}@media all and (max-width: 700px){.banner-code{width:100%}}.banner-code:focus{outline:none;border-color:#706c69}.pink+.banner-code{float:right}@media all and (max-width: 700px){.pink+.banner-code{float:none}}.grey+.banner-code{float:left;clear:left;border-left:none}@media all and (max-width: 700px){.grey+.banner-code{float:none;border-left:solid 1px #d4d2d1}}.previous_page,.next_page{display:none;height:22px;color:#fff;position:absolute;top:50%;background-color:#d98cb2;background-image:url("../img/icons.svg");background-repeat:no-repeat;padding:13px !important;margin:0 !important;font-size:0.8125em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}@media all and (min-width: 520px){.previous_page,.next_page{display:inline}}.previous_page:hover,.next_page:hover{background-color:#d379a6}.disabled.previous_page,.disabled.next_page{background-color:#dfa0bf;background-image:none !important;color:rgba(255,255,255,0.5);cursor:default;padding-left:0 !important;padding-right:0 !important}.pagination a,.pagination .current{color:#fff;margin:0 3px;font-size:0.8125em;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.pagination{background-color:#dfa0bf;border-bottom:solid 2px #d379a6;padding-top:12px;padding-bottom:12px;text-align:center;color:#fff;position:relative;z-index:1}.pagination a{background-color:#d98cb2;padding:3px 10px}.pagination a:hover{background-color:#d379a6}.pagination .current{background-color:#e6b3cc;cursor:default;padding:3px 10px;font-style:normal}.previous_page{left:20px;background-position:7px -161px}@media all and (min-width: 1024px){.previous_page{left:5%}}@media all and (min-width: 1500px){.previous_page{left:15%}}.next_page{right:20px;background-position:6px -192px}@media all and (min-width: 1024px){.next_page{right:5%}}@media all and (min-width: 1500px){.next_page{right:15%}}.modal-tarp{display:none;width:100%;height:100%;background-color:rgba(0,0,0,0.8);position:fixed;top:0;left:0;z-index:999;overflow:scroll}.add-project{background:#c6538c;padding:1.875em;margin:0 auto;width:100%;max-width:100%;position:relative;top:0;left:50%;margin-left:-50%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:all 200ms ease-in-out;-webkit-transition-delay:200ms;-moz-transition:all 200ms ease-in-out 200ms;-o-transition:all 200ms ease-in-out 200ms;transition:all 200ms ease-in-out 200ms;-webkit-transform:scale(1.1, 1.1);-moz-transform:scale(1.1, 1.1);-ms-transform:scale(1.1, 1.1);-o-transform:scale(1.1, 1.1);transform:scale(1.1, 1.1)}@media all and (min-width: 768px){.add-project{top:100px;width:80%;margin-left:-40%;position:absolute;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}}@media all and (min-width: 1024px){.add-project{width:60%;margin-left:-30%}}.add-project.modal-open{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1;-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);-ms-transform:scale(1, 1);-o-transform:scale(1, 1);transform:scale(1, 1)}.add-project-title{font-size:1.25em;line-height:1.2;padding-right:20px;color:#fff}.instruction-list{padding-left:20px;color:#fff}.instruction-list li p code{background-color:#c0407f;color:#f2d9e6;padding:2px 5px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.field{width:100%}@media all and (min-width: 520px){.field{float:left;width:80%}}form.processing .button{text-indent:-9999px;background-image:url("../img/spinner.gif");background-repeat:no-repeat;background-position:50% 50%;background-size:15%;cursor:default}form.processing .button:hover{background-color:#ad3972}.actions .button{line-height:35px;height:40px;font-size:1em;font-weight:normal;width:100%;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}@media all and (min-width: 520px){.actions .button{width:20%;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}.add-url{border:none;color:#333;line-height:40px;height:40px;width:100%;font-size:1em;padding-left:5px;margin-bottom:10px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}@media all and (min-width: 520px){.add-url{margin-bottom:0px;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}}.add-url:focus{outline:none}.cancel-button{position:absolute;top:12px;right:20px;font-size:1.875em;color:rgba(255,255,255,0.6);-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.cancel-button:hover,.cancel-button:active{color:#fff}.response-bar{width:100%;padding:20px;font-size:1.125em;position:relative;top:-100px;-webkit-transition:top 200ms 50ms;-webkit-transition-delay:cubic-bezier(0.36, -0.27, 0.49, 1.29);-moz-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);-o-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29)}.response-bar .response-text{max-width:900px;margin:0 auto;text-align:center}.response-bar.error{background:#a20237;color:#fff}.response-bar.success{background:#3b620c;color:#fff}.response-bar.show{top:0}footer{background:#f8f8fa url("../img/circle-pattern.png") 50% 44% no-repeat;text-align:center;padding-left:20px;padding-right:20px}@media all and (min-width: 1024px){footer{padding-left:5%;padding-right:5%}}@media all and (min-width: 1500px){footer{padding-left:15%;padding-right:15%}}footer a{color:inherit}footer a:hover,footer a:active{color:#c6538c}@media all and (min-width: 520px){footer .note{width:340px;margin:0 auto}}.footer-wrap{position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.footer-title{font-size:1.75em;margin:0}.authors{color:#888;margin:0;margin-top:0.25em;margin-bottom:0.625em} +#featured,.extension-list{padding:0 20px 0px}@media all and (min-width: 1024px){#featured,.extension-list{padding:0 5% 0px}}@media all and (min-width: 1500px){#featured,.extension-list{padding:0 15% 0px}}.sache-bar-actions,.featured-cards,.ghub-info{list-style:none;margin:0;padding:0;overflow:hidden}.page-title,.card-title,.card-description,.add-project-title{margin-top:0}h1,h2,h3,h4,h5,h6,.title-link,.actions .button{font-family:"ff-tisa-web-pro", serif}body,.response-bar .response-text{font-family:"ff-tisa-sans-web-pro", sans-serif}*,* *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html,body{height:100%}body{background:#f8f8fa url("../img/circle-pattern.png") 50% 45% no-repeat;font-size:1em}.img-404{text-align:center}.container{min-height:100%}.main-content{padding-bottom:280px;overflow:auto}@media all and (min-width: 520px){.main-content{padding-bottom:250px}}@media all and (min-width: 768px){.main-content{padding-bottom:200px}}footer{height:280px;margin-top:-280px}@media all and (min-width: 520px){footer{height:250px;margin-top:-250px}}@media all and (min-width: 768px){footer{height:200px;margin-top:-200px}}.button{background-color:#ad3972;display:inline-block;margin-bottom:1.25em;font-size:0.875em;font-weight:bold;color:#fff;line-height:2.1875em;border:none;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}.button:hover{background-color:#9a3366}.button:active{outline:none}a{text-decoration:none;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}p{font-weight:400}.note{font-size:0.75em;margin-bottom:1.875em}.instruction-list .note a{color:rgba(255,255,255,0.6)}.instruction-list .note a:hover{color:#fff}.footer-wrap .note{color:#bbb;margin-bottom:0;margin-top:0}pre{background-color:#c0407f;padding:0.875em;overflow:auto;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}pre code{display:block;color:#f2d9e6;white-space:pre}h1,h2,h3,h4,h5,h6{font-weight:normal}h3{color:#706c69;font-size:1em;font-weight:bold;text-align:center;margin-bottom:1.875em}.sache-bar{background:#c6538c url("../img/wave-pattern.png") 0 0 repeat-x;padding:0;overflow:hidden;height:7.5em}@media all and (min-width: 768px){.sache-bar{height:3.75em;width:100%;padding:0 0.9375em;position:fixed;z-index:99}}.logo{margin:0;color:#fff;text-align:center}.logo img{height:35px;margin-top:10px}@media all and (min-width: 768px){.logo{float:left;text-align:left;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}}.sache-bar-actions{height:3.875em;background-color:#c0407f}.sache-bar-actions li{float:left;color:rgba(255,255,255,0.6);overflow:hidden;height:100%;width:50%;-webkit-transition:color 200ms linear;-moz-transition:color 200ms linear;-o-transition:color 200ms linear;transition:color 200ms linear}.sache-bar-actions li a{color:transparent;display:inline-block;height:100%;line-height:60px;-webkit-transition:opacity 200ms linear;-moz-transition:opacity 200ms linear;-o-transition:opacity 200ms linear;transition:opacity 200ms linear}.sache-bar-actions li a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}@media all and (min-width: 768px){.sache-bar-actions li a{color:#fff;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}}@media all and (min-width: 768px){.sache-bar-actions li{width:auto}}@media all and (min-width: 768px){.sache-bar-actions{float:right;background-color:transparent}}.sache-add-extension{border-left:solid 1px rgba(255,255,255,0.1)}.sache-add-extension a{background:url("../img/icons.svg") 50% -102px no-repeat;position:relative;width:100%;padding-left:4.375em;padding-right:1.5625em}@media all and (min-width: 768px){.sache-add-extension a{background-position:40px -104px !important;width:auto}}.sache-search form{height:99%}.sache-search input{background:#c0407f url("../img/icons.svg") 50% -58px no-repeat;border:0;height:100%;color:#fff;width:100%;text-align:center;position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.sache-search input::-webkit-input-placeholder{color:transparent}.sache-search input:-moz-placeholder{color:transparent}.sache-search input::-moz-placeholder{color:transparent}.sache-search input:-ms-input-placeholder{color:transparent}@media all and (min-width: 768px){.sache-search input{background-color:#c6538c}}.sache-search input.activated{left:0;background-color:#d98cb2}.sache-search input:focus{outline:none;background-image:none !important;background-color:#c0407f;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sache-search input:focus::-webkit-input-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus::-moz-placeholder{color:rgba(255,255,255,0.5)}.sache-search input:focus:-ms-input-placeholder{color:rgba(255,255,255,0.5)}@media all and (min-width: 768px){.sache-search input:focus{width:250px}.sache-search input:focus:before{display:none}}@media all and (min-width: 768px){.sache-search input{background-position:20px -57px !important;width:150px;margin-left:10px;padding:5px 5px 4px 49px;text-align:left;color:#fff;-webkit-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-moz-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;-o-transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;transition:width 350ms cubic-bezier(0.36, -0.27, 0.49, 1.29),background-color 200ms linear;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5}.sache-search input::-webkit-input-placeholder{color:#fff}.sache-search input:-moz-placeholder{color:#fff}.sache-search input::-moz-placeholder{color:#fff}.sache-search input:-ms-input-placeholder{color:#fff}}header{margin-bottom:1.875em;padding:1.25em 20px 1.625em;position:relative;text-align:center}@media all and (min-width: 768px){header{padding:6.875em 20px 3.75em;text-align:left}}@media all and (min-width: 1024px){header{padding:6.875em 5% 3.75em}}@media all and (min-width: 1500px){header{padding:8.75em 15% 5.875em}}header.secondary{padding-bottom:0}.page-title{margin-bottom:0;font-size:2em;line-height:1.3;color:#706c69}@media all and (min-width: 768px){.page-title{font-size:1.875em}}@media all and (min-width: 1024px){.page-title{font-size:2.5em}}.title-wrapper .page-title{display:inline;margin-left:5px}@media all and (min-width: 1024px){.title-wrapper .page-title{margin-left:10px}}.title-wrapper .to-home{display:inline;font-size:2.25em;font-weight:300;color:#d9d7d6;margin-right:5px;position:relative;top:3px}@media all and (min-width: 768px){.title-wrapper .to-home{font-size:2.625em}}@media all and (min-width: 1024px){.title-wrapper .to-home{font-size:3.125em;margin-right:10px}}.title-wrapper .to-home:hover{color:#a8a4a2}.page-description{font-size:0.9375em;color:#706c69;margin-bottom:10px;margin-top:10px;line-height:1.5}@media all and (min-width: 768px){.page-description{font-size:1em}}@media all and (min-width: 1024px){.page-description{font-size:1.125em}}.page-description a{color:#7ca4ab;-webkit-transition:all 200ms linear;-moz-transition:all 200ms linear;-o-transition:all 200ms linear;transition:all 200ms linear}.page-description a:hover{color:#c6538c}@media all and (min-width: 768px){.title-cta{float:left}}.cta-button{background-color:#e3e3eb;padding:10px 30px 11px 30px;font-weight:bold;font-size:16px;margin-top:12px;display:inline-block;color:#96928f !important;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.cta-button:hover{background-color:#d4d4e0;color:#706c69 !important}@media all and (min-width: 768px){.cta-button{float:right}}@media all and (min-width: 1024px){.cta-button{margin-top:18px}}#featured{margin-top:30px;margin-bottom:50px}@media all and (min-width: 768px){#featured{margin-top:80px}}@media all and (min-width: 1500px){#featured{margin-top:50px}}@media all and (min-width: 768px){.featured-cards{display:table;height:100%}}.feature-card{margin:0 0 1.25em;width:100%}@media all and (min-width: 768px){.feature-card{width:33.333%;height:100%;display:table-cell;position:relative}.feature-card:first-child>span{border-right:none;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.feature-card:last-child>span{border-left:none;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}}.feature-card>span{background-color:#fff;display:block;position:relative;border:solid 1px #ddd;height:100%}.card-title{font-size:1.375em;line-height:1.5;padding:20px 25px 0}table .card-title{padding-left:25px}.title-link{display:block;width:100%;color:#c6538c;cursor:pointer}.title-link:hover,.title-link:active{color:#862d59}table .title-link{font-size:0.875em;margin-bottom:12px}@media all and (min-width: 768px){table .title-link{margin-top:-6px;margin-bottom:0px}}.card-description-wrapper{overflow:hidden;padding-bottom:1em;padding:0 25px 25px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}@media all and (min-width: 768px){.card-description-wrapper{margin-bottom:90px}}@media all and (min-width: 1024px){.card-description-wrapper{margin-bottom:50px}}.card-description{font-size:1em;line-height:1.6;margin-bottom:1em;color:#706c69}table .card-description{font-size:0.875em;line-height:1.6}.ghub-info{color:#888;background-color:#fbfbfc;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.ghub-info li{background-color:#fbfbfc;float:left;border-top:solid 1px #eee;width:100%;text-align:center;color:#888 !important;padding:12px 0;font-size:0.875em}@media all and (min-width: 520px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info li{width:100%}}@media all and (min-width: 1024px){.ghub-info li{width:50%}}@media all and (min-width: 768px){.ghub-info{position:absolute;bottom:0;width:100%}}.author-filter{display:inline-block;color:#888}.author-filter:hover,.author-filter:active{color:#222}.author{position:relative;cursor:pointer;border-right:none}@media all and (min-width: 520px){.author{border-right:solid 1px #eee}}@media all and (min-width: 768px){.author{border-right:none}}@media all and (min-width: 1024px){.author{border-right:solid 1px #eee}}.author:before{content:" ";background:url("../img/icons.svg") 0 -42px no-repeat;display:inline-block;width:14px;height:14px;margin-right:3px;position:relative;top:2px}.author a:hover{color:#c6538c}table .author{border-right:none;font-size:13px}.ghub-stars{float:right;position:relative}table .ghub-stars{float:none;font-size:13px}.ghub-stars:before{content:" ";background:url("../img/icons.svg") 0 0 no-repeat;display:inline-block;width:14px;height:14px;margin-right:2px;position:relative;top:2px}@media all and (min-width: 768px){.ghub-stars:before{margin-right:5px}}.tags{padding-bottom:0;margin-bottom:5px;color:#7ca4ab}.tag:after{content:",";display:inline-block;color:#333;margin-left:-3px}.tag:last-child:after{content:""}table .tag-list{line-height:1.45;margin-bottom:12px}@media all and (min-width: 768px){table .tag-list{margin-bottom:0}}.tag{color:#7ca4ab;font-size:0.875em;-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.tag:hover{color:#c6538c}.extension-list h3{margin-top:30px}@media all and (min-width: 768px){.extension-list h3{margin-top:80px}}.extension-list h3 small{color:#d4d2d1;display:block}@media all and (min-width: 768px){.extension-list h3 small{display:inline;margin-left:10px}}.extension-list table{width:100%;margin:0;padding:0 15px}@media all and (min-width: 768px){.extension-list table{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-box-shadow:0 0 0 1px #ddd;-moz-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd;background-color:#fff}}.extension-list table thead{background-color:#e3e3eb;font-weight:bold;border-bottom:solid 1px #ddd;border-radius:5px !important}@media all and (max-width: 767px){.extension-list table thead{display:none}}.extension-list table thead tr th:first-child{padding-left:25px;-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px}.extension-list table thead tr th:last-child{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px}.extension-list table thead th{text-align:left}.extension-list table thead td,.extension-list table thead th{line-height:43px;color:#a5a19c;padding:0 10px}.extension-list table thead td:first-child,.extension-list table thead th:first-child{padding-left:0}.extension-list table tbody td{padding:20px 10px}@media all and (min-width: 768px){.extension-list table tbody td:first-child{padding-left:25px}}@media all and (max-width: 767px){.extension-list table tbody td{padding:0}}.extension-list table tbody tr:last-child td:first-child{-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.extension-list table tbody tr:last-child td:last-child{-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.extension-list table tbody tr:nth-child(even){background-color:#fcfcfc}.extension-list table tr{border-bottom:solid 1px #eee;color:#888}@media all and (max-width: 767px){.extension-list table tr{display:block;border:solid 1px #ddd;padding:20px;margin-bottom:20px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}}@media all and (min-width: 768px){.extension-list table tr:last-child{border-bottom:none}}.extension-list table td{vertical-align:top}@media all and (max-width: 767px){.extension-list table td{display:block}}.sortable a{display:block;width:100%;position:relative;cursor:pointer}.sortable a:hover{color:#8d8881}.sortable a:after{display:block;content:"";width:11px;height:15px;position:absolute;right:8px;top:15px;background:url("../img/arrows.svg") -36px -2px no-repeat;background-size:50px auto;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=40);opacity:0.4}.sortable a.current.asc:after{background-position:-2px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.sortable a.current.desc:after{background-position:-20px -1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1}.banners{margin-top:60px}.img-container{width:50%;float:left}@media all and (max-width: 700px){.img-container{width:100%;float:none;padding:0 20px;text-align:center}}.img-container .pink{float:right}@media all and (max-width: 700px){.img-container .pink{float:none}}.img-container .grey{float:left}@media all and (max-width: 700px){.img-container .grey{float:none}}.banner-code{clear:both;width:300px;border:solid 1px #d4d2d1;color:#a39f9c;padding-left:8px;margin-top:20px;line-height:1.3;height:100px;margin-bottom:60px}@media all and (max-width: 700px){.banner-code{width:100%}}.banner-code:focus{outline:none;border-color:#706c69}.pink+.banner-code{float:right}@media all and (max-width: 700px){.pink+.banner-code{float:none}}.grey+.banner-code{float:left;clear:left;border-left:none}@media all and (max-width: 700px){.grey+.banner-code{float:none;border-left:solid 1px #d4d2d1}}.previous_page,.next_page{display:none;height:22px;color:#fff;position:absolute;top:50%;background-color:#d98cb2;background-image:url("../img/icons.svg");background-repeat:no-repeat;padding:13px !important;margin:0 !important;font-size:0.8125em;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);z-index:2;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px;-webkit-transition:background-color 200ms linear;-moz-transition:background-color 200ms linear;-o-transition:background-color 200ms linear;transition:background-color 200ms linear}@media all and (min-width: 520px){.previous_page,.next_page{display:inline}}.previous_page:hover,.next_page:hover{background-color:#d379a6}.disabled.previous_page,.disabled.next_page{background-color:#dfa0bf;background-image:none !important;color:rgba(255,255,255,0.5);cursor:default;padding-left:0 !important;padding-right:0 !important}.pagination a,.pagination .current{color:#fff;margin:0 3px;font-size:0.8125em;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}.pagination{background-color:#dfa0bf;border:solid 1px #d379a6;padding-top:12px;padding-bottom:12px;text-align:center;color:#fff;position:relative;z-index:1;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}@media all and (min-width: 768px){.pagination{-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0}}.pagination a{background-color:#d98cb2;padding:3px 10px}.pagination a:hover{background-color:#d379a6}.pagination .current{background-color:#e6b3cc;cursor:default;padding:3px 10px;font-style:normal}.previous_page{left:20px;background-position:7px -161px}.next_page{right:20px;background-position:6px -192px}.modal-tarp{display:none;width:100%;height:100%;background-color:rgba(0,0,0,0.8);position:fixed;top:0;left:0;z-index:999;overflow:scroll}.add-project{background:#c6538c;padding:1.875em;margin:0 auto;width:100%;max-width:100%;position:relative;top:0;left:50%;margin-left:-50%;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;-webkit-transition:all 200ms ease-in-out;-webkit-transition-delay:200ms;-moz-transition:all 200ms ease-in-out 200ms;-o-transition:all 200ms ease-in-out 200ms;transition:all 200ms ease-in-out 200ms;-webkit-transform:scale(1.1, 1.1);-moz-transform:scale(1.1, 1.1);-ms-transform:scale(1.1, 1.1);-o-transform:scale(1.1, 1.1);transform:scale(1.1, 1.1)}@media all and (min-width: 768px){.add-project{top:100px;width:80%;margin-left:-40%;position:absolute;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}}@media all and (min-width: 1024px){.add-project{width:60%;margin-left:-30%}}.add-project.modal-open{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);opacity:1;-webkit-transform:scale(1, 1);-moz-transform:scale(1, 1);-ms-transform:scale(1, 1);-o-transform:scale(1, 1);transform:scale(1, 1)}.add-project-title{font-size:1.25em;line-height:1.2;padding-right:20px;color:#fff}.instruction-list{padding-left:20px;color:#fff}.instruction-list li p code{background-color:#c0407f;color:#f2d9e6;padding:2px 5px;-webkit-border-radius:2px;-moz-border-radius:2px;-ms-border-radius:2px;-o-border-radius:2px;border-radius:2px}.field{width:100%}@media all and (min-width: 520px){.field{float:left;width:80%}}form.processing .button{text-indent:-9999px;background-image:url("../img/spinner.gif");background-repeat:no-repeat;background-position:50% 50%;background-size:15%;cursor:default}form.processing .button:hover{background-color:#ad3972}.actions .button{line-height:35px;height:40px;font-size:1em;font-weight:normal;width:100%;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}@media all and (min-width: 520px){.actions .button{width:20%;-moz-border-radius-topleft:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}.add-url{border:none;color:#333;line-height:40px;height:40px;width:100%;font-size:1em;padding-left:5px;margin-bottom:10px;-webkit-border-radius:4px;-moz-border-radius:4px;-ms-border-radius:4px;-o-border-radius:4px;border-radius:4px}@media all and (min-width: 520px){.add-url{margin-bottom:0px;-moz-border-radius-topright:0;-webkit-border-top-right-radius:0;border-top-right-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0}}.add-url:focus{outline:none}.cancel-button{position:absolute;top:12px;right:20px;font-size:1.875em;color:rgba(255,255,255,0.6);-webkit-transition:color 200ms;-moz-transition:color 200ms;-o-transition:color 200ms;transition:color 200ms}.cancel-button:hover,.cancel-button:active{color:#fff}.response-bar{width:100%;padding:20px;font-size:1.125em;position:relative;top:-100px;-webkit-transition:top 200ms 50ms;-webkit-transition-delay:cubic-bezier(0.36, -0.27, 0.49, 1.29);-moz-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);-o-transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29);transition:top 200ms 50ms cubic-bezier(0.36, -0.27, 0.49, 1.29)}.response-bar .response-text{max-width:900px;margin:0 auto;text-align:center}.response-bar.error{background:#a20237;color:#fff}.response-bar.success{background:#3b620c;color:#fff}.response-bar.show{top:0}footer{background:#f8f8fa url("../img/circle-pattern.png") 50% 44% no-repeat;text-align:center;padding-left:20px;padding-right:20px}@media all and (min-width: 1024px){footer{padding-left:5%;padding-right:5%}}@media all and (min-width: 1500px){footer{padding-left:15%;padding-right:15%}}footer a{color:inherit}footer a:hover,footer a:active{color:#c6538c}@media all and (min-width: 520px){footer .note{width:340px;margin:0 auto}}.footer-wrap{position:relative;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%)}.footer-title{font-size:1.75em;margin:0}.authors{color:#888;margin:0;margin-top:0.25em;margin-bottom:0.625em} diff --git a/app/js/main.js b/app/js/main.js index c77f6fd..58386ca 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -53,6 +53,8 @@ $(function() { $sachesearch = $('.sache-search input'), fadeSpeed = 200; + + // Close modaal method var closeModal = function() { $modalTarp.fadeOut(fadeSpeed); $projectModal.removeClass('modal-open'); @@ -96,11 +98,12 @@ $(function() { } }); + // Sortability $("#main").on('click', 'th a', function() { var el = $(this), data = {sort: el.data('sort'), direction: el.data('direction')}; - + $.ajax({ url: '/', data: data, @@ -109,6 +112,6 @@ $(function() { $("#main").html(table); } }); - }) + }); }); diff --git a/sass/_extensions.scss b/sass/_extensions.scss index 3885ffe..906e7f4 100644 --- a/sass/_extensions.scss +++ b/sass/_extensions.scss @@ -2,8 +2,17 @@ // Feature cards #featured { + margin-top: 30px; margin-bottom: 50px; @extend %container; + + @include mq(medium) { + margin-top: 80px; + } + + @include mq(xlarge) { + margin-top: 50px; + } } .featured-cards { @@ -20,33 +29,43 @@ width: 100%; @include mq(medium) { - padding: 0 px2em(16px) 0; width: 33.333%; height: 100%; display: table-cell; position: relative; &:first-child { - padding-left: 0; + > span { + border-right: none; + @include border-left-radius($border-radius); + } } &:last-child { - padding-right: 0; + > span { + border-left: none; + @include border-right-radius($border-radius); + } } } - > span { + // The actual card + > span { + background-color: #fff; display: block; position: relative; border: $border-style; height: 100%; - @include border-radius($border-radius); } } .card-title { font-size: px2em(22px); line-height: 1.5; - padding: 20px 20px 0; + padding: 20px 25px 0; @extend %reset-margin-top; + + table & { + padding-left: 25px; + } } .title-link { @@ -62,7 +81,6 @@ } table & { - // margin-top: -4px; font-size: px2em(14px); margin-bottom: 12px; @@ -76,7 +94,7 @@ .card-description-wrapper { overflow: hidden; padding-bottom: px2em(16px); - padding: 0 20px 20px; + padding: 0 25px 25px; @include box-sizing(content-box); @include mq(medium) { @@ -150,7 +168,19 @@ .author { position: relative; cursor: pointer; - border-right: solid 1px #eee; + border-right: none; + + @include mq(small) { + border-right: solid 1px #eee; + } + + @include mq(medium) { + border-right: none; + } + + @include mq(large) { + border-right: solid 1px #eee; + } &:before { content: " "; @@ -168,7 +198,6 @@ } table & { - // line-height: 1.5; border-right: none; font-size: 13px; } @@ -247,7 +276,11 @@ @extend %container; h3 { - margin-top: 80px; + margin-top: 30px; + + @include mq(medium) { + margin-top: 80px; + } small { color: lighten($text-color, 40%); @@ -262,16 +295,36 @@ table { width: 100%; - margin: 0 0 100px; + margin: 0; padding: 0 15px; + @include mq(medium) { + @include border-top-radius($border-radius); + @include box-shadow(0 0 0 1px #ddd); + background-color: #fff; + } + thead { + background-color: darken(#F8F8FA, 7%); font-weight: bold; + border-bottom: $border-style; + border-radius: 5px !important; @include mq-max($mq-medium - 1) { display: none; } + tr { + th:first-child { + padding-left: 25px; + @include border-top-left-radius($border-radius); + } + th:last-child { + @include border-top-right-radius($border-radius); + } + } + th { + text-align: left; } @@ -290,17 +343,31 @@ padding: 20px 10px; @include mq(medium) { &:first-child { - padding-left: 0 + padding-left: 25px; } } @include mq-max($mq-medium - 1) { padding: 0; } } + tr { + &:last-child { + td:first-child { + @include border-bottom-left-radius($border-radius); + } + td:last-child { + @include border-bottom-right-radius($border-radius); + } + } + + &:nth-child(even) { + background-color: #fcfcfc; + } + } } tr { - border-bottom: $border-style; + border-bottom: solid 1px #eee; color: #888; @include mq-max($mq-medium - 1) { display: block; @@ -309,6 +376,11 @@ margin-bottom: 20px; @include border-radius($border-radius); } + &:last-child { + @include mq(medium) { + border-bottom: none; + } + } } td { @@ -340,7 +412,7 @@ position: absolute; right: 8px; top: 15px; - background: url('../img/arrows.svg') #fff -36px -2px no-repeat; + background: url('../img/arrows.svg') -36px -2px no-repeat; background-size: 50px auto; @include opacity(0.4); } diff --git a/sass/_globals.scss b/sass/_globals.scss index 990aa7f..8c237da 100644 --- a/sass/_globals.scss +++ b/sass/_globals.scss @@ -11,6 +11,7 @@ body { } body { + background: #f8f8fa url('../img/circle-pattern.png') 50% 45% no-repeat; font-size: px2em(16px); } diff --git a/sass/_header_title.scss b/sass/_header_title.scss index 23d75dc..8393eac 100644 --- a/sass/_header_title.scss +++ b/sass/_header_title.scss @@ -2,33 +2,42 @@ // Title header area header { - background: #f8f8fa url('../img/circle-pattern.png') 50% 45% no-repeat; margin-bottom: px2em(30px); padding: px2em(20px) $container-padding-default px2em(26px); + position: relative; text-align: center; @include mq(medium) { - padding: px2em(50px) $container-padding-large px2em(60px); + padding: px2em(110px) $container-padding-default px2em(60px); + text-align: left; + } + + @include mq(large) { + padding: px2em(110px) $container-padding-large px2em(60px); } @include mq(xlarge) { - padding: px2em(80px) $container-padding-xlarge px2em(94px); + padding: px2em(140px) $container-padding-xlarge px2em(94px); + } + + &.secondary { + padding-bottom: 0; } } .page-title { - margin-bottom: px2em(4px); + margin-bottom: 0; font-size: px2em(32px); line-height: 1.3; color: $text-color; @extend %reset-margin-top; @include mq(medium) { - font-size: px2em(40px); + font-size: px2em(30px); } @include mq(large) { - font-size: px2em(46px); + font-size: px2em(40px); } } @@ -47,6 +56,8 @@ header { font-weight: 300; color: lighten($text-color, 42%); margin-right: 5px; + position: relative; + top: 3px; @include mq(medium) { font-size: px2em(42px); @@ -64,9 +75,10 @@ header { } .page-description { - font-size: px2em(14px); + font-size: px2em(15px); color: $text-color; - margin-bottom: 0; + margin-bottom: 10px; + margin-top: 10px; line-height: 1.5; @include mq(medium) { @@ -87,12 +99,18 @@ header { } } +.title-cta { + @include mq(medium) { + float: left; + } +} + .cta-button { background-color: darken(#F8F8FA, 7%); padding: 10px 30px 11px 30px; font-weight: bold; font-size: 16px; - margin-top: 10px; + margin-top: 12px; display: inline-block; color: lighten($text-color, 15%) !important; @include border-radius(2px); @@ -100,4 +118,12 @@ header { background-color: darken(#F8F8FA, 12%); color: $text-color !important; } + + @include mq(medium) { + float: right; + } + + @include mq(large) { + margin-top: 18px; + } } \ No newline at end of file diff --git a/sass/_helpers.scss b/sass/_helpers.scss index 87b3e15..ece4d41 100644 --- a/sass/_helpers.scss +++ b/sass/_helpers.scss @@ -8,7 +8,7 @@ $sass-pink: #c6538c; $link-blue: #7ca4ab; $text-color: #706c69; $sache-bar-height: 60px; -$border-radius: 2px; +$border-radius: 4px; $footer-height: 200px; $mq-small: 520px; $mq-medium: 768px; diff --git a/sass/_pagination.scss b/sass/_pagination.scss index 6f40d39..f09fb57 100644 --- a/sass/_pagination.scss +++ b/sass/_pagination.scss @@ -44,14 +44,18 @@ .pagination { background-color: lighten($sass-pink, 20%); - border-bottom: solid 2px lighten($sass-pink, 10%); + border: solid 1px lighten($sass-pink, 10%); padding-top: 12px; padding-bottom: 12px; text-align: center; color: #fff; position: relative; z-index: 1; - @extend %container; + @include border-radius($border-radius); + + @include mq(medium) { + @include border-top-radius(0); + } a { background-color: lighten($sass-pink, 15%); @@ -76,27 +80,10 @@ background-position: 7px -161px; @extend %next-prev; - @include mq(large) { - left: $container-padding-large; - } - - @include mq(xlarge) { - left: $container-padding-xlarge; - } } .next_page { right: $container-padding-default; - background-position: 6px -192px; - @extend %next-prev; - - @include mq(large) { - right: $container-padding-large; - } - - @include mq(xlarge) { - right: $container-padding-xlarge; - } } \ No newline at end of file diff --git a/sass/_sache_bar.scss b/sass/_sache_bar.scss index 08082bb..2a7d532 100644 --- a/sass/_sache_bar.scss +++ b/sass/_sache_bar.scss @@ -9,7 +9,10 @@ @include mq(medium) { height: px2em($sache-bar-height); + width: 100%; padding: 0 px2em(15px); + position: fixed; + z-index: 99; } } diff --git a/views/_extension.haml b/views/_extension.haml index d9a6782..a48b0d5 100644 --- a/views/_extension.haml +++ b/views/_extension.haml @@ -1,39 +1,32 @@ -#main - .extensions - .extension-list - %h3 - All Extensions - %small - = page_entries_info @extensions, {:html => false} - %table - %thead - %tr - %th{:width => "250", :class => 'sortable'} - = sortable "name", "Name" - %th{:width => "300"} - Description - %th{:width => "200"} - Tags - %th{:width => "150", :class => 'sortable'} - = sortable "author", "Author" - %th{:width => "100", :class => 'stars sortable'} - = sortable "stars", "Stars" - %tbody - - @extensions.each do |e| - %tr{:class => "id-#{e.id}"} - %td{:class => "card-title"} - %a{:href => "https://www.github.com/#{e.author}/#{e.project_name}", :class => "title-link"} - = e.name - %td{:class => "card-description"} - = e.description - %td.tag-list - - e.tags.each do |tag| - %a{:href => "/tag/#{tag}", :class => "tag"} - = tag +%table + %thead + %tr + %th{:width => "250", :class => 'sortable'} + = sortable "name", "Name" + %th{:width => "300"} + Description + %th{:width => "200"} + Tags + %th{:width => "150", :class => 'sortable'} + = sortable "author", "Author" + %th{:width => "100", :class => 'stars sortable'} + = sortable "stars", "Stars" + %tbody + - @extensions.each do |e| + %tr{:class => "id-#{e.id}"} + %td{:class => "card-title"} + %a{:href => "https://www.github.com/#{e.author}/#{e.project_name}", :class => "title-link"} + = e.name + %td{:class => "card-description"} + = e.description + %td.tag-list + - e.tags.each do |tag| + %a{:href => "/tag/#{tag}", :class => "tag"} + = tag - %td{:class => "author"} - %a{:href => "/user/#{e.author}", :class => "author-filter"} - = e.author - %td{:class => "ghub-stars"} - = e.stars - = will_paginate @extensions, :previous_label => "", :next_label => "" + %td{:class => "author"} + %a{:href => "/user/#{e.author}", :class => "author-filter"} + = e.author + %td{:class => "ghub-stars"} + = e.stars += will_paginate @extensions, :previous_label => "", :next_label => "" diff --git a/views/_featured.haml b/views/_featured.haml index b1bc611..30ae4a0 100644 --- a/views/_featured.haml +++ b/views/_featured.haml @@ -1,14 +1,14 @@ #featured - %h3 Featured Extensions + / %h3 Featured Extensions %ul{:class => "featured-cards"} -if @featured - @featured.each do |e| %li{:class => "feature-card"} %span %h1{:class => "card-title"} - %a{:href => "https://www.github.com/#{e.author}/#{e.project_name}", :class => "title-link"} + %a{:href => "https://www.github.com/#{e.author}/#{e.project_name}", :class => "title-link"} =e.name .card-description-wrapper %p{:class => "card-description", :title => e.description} @@ -18,11 +18,10 @@ %a{:href => "/tag/#{tag}", :class => "tag"} = tag - + %ul{:class => "ghub-info"} %li{:class => "author"} %a{:href => "/user/#{e.author}", :class => "author-filter"} = e.author %li{:class => "ghub-stars"} = e.stars - \ No newline at end of file diff --git a/views/_sache_bar.haml b/views/_sache_bar.haml index 72ac167..780a206 100644 --- a/views/_sache_bar.haml +++ b/views/_sache_bar.haml @@ -1,4 +1,3 @@ - %section{:class => "sache-bar"} %h1{:class => "logo"} %a{:href => "/"} diff --git a/views/index.haml b/views/index.haml index 0cfedaa..79ef121 100644 --- a/views/index.haml +++ b/views/index.haml @@ -27,9 +27,10 @@ / = flash[:error] + = haml :_sache_bar + .container .main-content - = haml :_sache_bar %header .title-cta %h2{:class => "page-title"} Discover Sass & Compass Extensions @@ -39,14 +40,20 @@ or %a{:href => "http://www.compass-style.org"} Compass project. - %p{:class => "page-description"} - %a{:href => "#", :data => {:add_project => ""}, :class => "cta-button"} Add Your Own + %a{:href => "#", :data => {:add_project => ""}, :class => "cta-button"} Add Your Own - if !params[:page] or params[:page] == "1" = haml :_featured - = haml :_extension + #main + .extensions + .extension-list + %h3 + All Extensions + %small + = page_entries_info @extensions, {:html => false} + = haml :_extension = haml :_footer diff --git a/views/search.haml b/views/search.haml index 12d00c0..e96b275 100644 --- a/views/search.haml +++ b/views/search.haml @@ -24,13 +24,22 @@ .container .main-content = haml :_sache_bar - %header + %header{:class => "secondary"} .title-wrapper %a{:href => "/", :class => "to-home"} × %h2{:class => "page-title"} = params[:query] - = haml :_extension + #main + .extensions + .extension-list + %h3 + Extensions + %small + = page_entries_info @extensions, {:html => false} + + = haml :_extension + = haml :_footer diff --git a/views/tag.haml b/views/tag.haml index c944843..47ce0bc 100644 --- a/views/tag.haml +++ b/views/tag.haml @@ -25,13 +25,22 @@ .container .main-content = haml :_sache_bar - %header + %header{:class => "secondary"} .title-wrapper %a{:href => "/", :class => "to-home"} × %h2{:class => "page-title"} = params[:tag] - = haml :_extension + #main + .extensions + .extension-list + %h3 + Extensions + %small + = page_entries_info @extensions, {:html => false} + + = haml :_extension + = haml :_footer diff --git a/views/user.haml b/views/user.haml index e307c1c..c042f13 100644 --- a/views/user.haml +++ b/views/user.haml @@ -25,13 +25,21 @@ .container .main-content = haml :_sache_bar - %header + %header{:class => "secondary"} .title-wrapper %a{:href => "/", :class => "to-home"} × %h2{:class => "page-title"} = params[:user] - = haml :_extension + #main + .extensions + .extension-list + %h3 + Extensions + %small + = page_entries_info @extensions, {:html => false} + + = haml :_extension = haml :_footer