Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
fix(website): fixed some element for responsive purposes & MISC
Browse files Browse the repository at this point in the history
  • Loading branch information
LukyVj committed Apr 29, 2016
1 parent 94759ad commit 75fb4e2
Show file tree
Hide file tree
Showing 9 changed files with 119 additions and 12 deletions.
6 changes: 4 additions & 2 deletions docs/source/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ subtitle: Turn any <code>&lt;input /&gt;</code> into an address search bar
%img{src: "http://res.cloudinary.com/hilnmyskv/image/upload/f_auto,q_100/v1461833483/Algolia_Places_-_demo_checkout_v2_1_zwg57n.gif", class: "gif"}
.row
.bloc-5
.bloc-5.no-mobile
%figure.media-object
%img{src: "http://res.cloudinary.com/hilnmyskv/image/upload/f_auto,q_100/v1461845398/Algolia_Places_-_demo_country_opfl1a.gif", class: "gif"}
.bloc-5
%h3.title Create the best City or Country selector
%p Stop scrolling through a list to pick a country and help your users select it faster.
.bloc-5.no-desktop
%figure.media-object
%img{src: "http://res.cloudinary.com/hilnmyskv/image/upload/f_auto,q_100/v1461845398/Algolia_Places_-_demo_country_opfl1a.gif", class: "gif"}
.row
.bloc-5
%h3.title Display a map
Expand Down
3 changes: 2 additions & 1 deletion docs/source/partials/navigation.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
%div.container
%div.fl-left
%a.logo-community{href: "https://community.algolia.com/", title: 'Algolia Community'}
<img src="https://res.cloudinary.com/hilnmyskv/image/upload/logo-community-inline-dark.svg" width="150" alt="Algolia Community" />
%img{src:"https://res.cloudinary.com/hilnmyskv/image/upload/logo-community-inline-dark.svg",width:"150",alt:"Algolia Community", class:"nav-icon no-mobile"}
%img{src:"https://res.cloudinary.com/hilnmyskv/image/upload/v1461180081/logo-community-sm.svg", alt:"Algolia Community", class:"community-badge no-desktop"}
%a.project-title{href: "./", title: "Home"} Places
%div.fl-right
Expand Down
4 changes: 4 additions & 0 deletions docs/source/stylesheets/components/_containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ section {

.bloc-5 {
padding: 1em;

@include small-mq {
width: 100%;
}
}

.row:nth-of-type(1) {
Expand Down
50 changes: 50 additions & 0 deletions docs/source/stylesheets/components/_documentation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
padding: 0;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
display: block;
margin: 0;

tr {
border-top: 1px solid #cccccc;
Expand Down Expand Up @@ -123,8 +126,55 @@
&+ h3 {
margin-top: 2em;
}


@include small-mq {
display: block;
float: left;
margin-bottom: 2em;

thead, tbody, th, td, tr {
display: block;
float: left;
width: 100%;
}
tbody {
border-bottom: 1px solid #cccccc;
}
tr {
border-left: 1px solid #cccccc;
border-right: 1px solid #cccccc;

th {
border: none;

&:nth-of-type(2) {
border-left: 1px solid #cccccc;
}
}
}
tr td {
border: none;
overflow: auto;


&:nth-of-type(2) {
border-left: 1px solid #cccccc;
}
}

th, td {
width: 50%;
float: left;
}

tr:nth-child(even) {
background: #f8f8f8
}
}
}


.anchor {
margin-left: .2em;
display: none;
Expand Down
14 changes: 14 additions & 0 deletions docs/source/stylesheets/components/_inputs.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
input {
outline: none;
border-radius: 4px;

@include appearance(none !important);
&::-webkit-search-decoration,
&::-webkit-search-cancel-button,
&::-webkit-search-results-button,
&::-webkit-search-results-decoration {
display: none !important;
}
}


// Style the input for the Demo page
.hero-section {

.algolia-places {
top: 50px;
font-family: 'Open Sans', helvetica Neue;
Expand Down Expand Up @@ -36,6 +48,8 @@ input {
padding-left: 16px;
padding-right: 48px;
border-radius: 4px;

@include appearance(none)
}

.ap-suggestion {
Expand Down
4 changes: 4 additions & 0 deletions docs/source/stylesheets/components/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
top: 7px;
width: 200px;
margin-right: 6px;

&.community-badge {
width: 34px;
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions docs/source/stylesheets/components/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ nav.sidebar {
top: 16px;
border: none;
padding-top: 0;
display: none;

select {
width: calc(100% - 32px);
Expand All @@ -69,6 +70,7 @@ nav.sidebar {
background: $brand-primary;
color: #fff;
top: 50px;
display: block;

select {
visibility: visible;
Expand Down
34 changes: 25 additions & 9 deletions docs/source/stylesheets/vendors/_helpers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,32 +76,48 @@ hr {
// - display-on-small : only display on smallish screen ( no mobile )

.no-desktop {
display: none !important;

@include hide();
@include small-mq {
display: none !important;
@include hide();
}

@include mobile-mq {
display: block !important;
@include unhide(block);
}


&.community-badge {
@include mobile-mq {
@include unhide(inline);
}
}

@media screen and (orientation: landscape) {
display: none !important;
@include hide();
}
}

.no-mobile {
display: block !important;
@include unhide(block);

&.nav-icon {
@include unhide(inline);

@include small-mq {
@include hide();
}
}

@include small-mq {
display: none !important;
@include hide();
}
}

.display-on-small {
display: none !important;
@include hide();

@media (max-width: 960px){
display: inline-block !important
display: inline-block !important;
visibility: visible;
}
}
14 changes: 14 additions & 0 deletions docs/source/stylesheets/vendors/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,20 @@
float: none;
}

@mixin hide() {
display: none !important;
visibility: hidden;
}

@mixin unhide($type) {
display: $type !important;
visibility: visible;
}
@mixin appearance ($value) {
-webkit-appearance: $value;
-moz-appearance: $value;
appearance: $value;
}

// Responsive Breakpoints
@mixin big-min-mq {
Expand Down

0 comments on commit 75fb4e2

Please sign in to comment.