Last active
April 19, 2018 13:26
-
-
Save chukwuemekachm/0d1e74cb4bb4c038bcfcd717530d8a50 to your computer and use it in GitHub Desktop.
Framework 31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 31.css is a css library created by CHIMA CHUKWUEMEKA [email protected] | |
* for the Book-A-Meal project in Andela Cycle 31 Nigeria 2018 | |
* | |
* Just like w3.css, 31.css implores the same terminologies in order to provide a responsive UI | |
* To use 31.css, call to-[property] you want to call as a class attribute value e.g | |
* to-table, to-btn e.t.c | |
*/ | |
* { | |
box-sizing: border-box; | |
} | |
body { | |
margin: 0; | |
} | |
h1, | |
h3, | |
h2, | |
h4, | |
h5, | |
hr, | |
h6, | |
p { | |
color: #737373!important; | |
} | |
span a { | |
color: #7a29a3; | |
} | |
html { | |
font-family: "Lucida Sans", sans-serif; | |
} | |
.to-row { | |
display: -webkit-flex; | |
-webkit-flex-direction: row; | |
display: flex; | |
flex-direction: row; | |
-webkit-justify-content: space-between; | |
justify-content: space-between; | |
-webkit-flex-wrap: wrap; | |
flex-wrap: wrap; | |
padding-top: 1em; | |
} | |
.to-col-1 { | |
width: 8.33%; | |
} | |
.to-col-2 { | |
width: 16.66%; | |
} | |
.to-col-3 { | |
width: 25%; | |
} | |
.to-col-4 { | |
width: 33.33%; | |
height: 200px; | |
} | |
.to-col-5 { | |
width: 41.66%; | |
} | |
.to-col-6 { | |
width: 50%; | |
} | |
.to-col-7 { | |
width: 58.33%; | |
} | |
.to-col-8 { | |
width: 66.66%; | |
} | |
.to-col-9 { | |
width: 75%; | |
} | |
.to-col-10 { | |
width: 83.33%; | |
} | |
.to-col-11 { | |
width: 91.66%; | |
} | |
.to-col-12 { | |
width: 100%; | |
} | |
/*[class*="to-col"] { | |
margin: auto; | |
}*/ | |
.to-card-2 { | |
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); | |
} | |
.to-card-1 { | |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); | |
} | |
.to-btn { | |
padding: .5em 3em; | |
width: auto; | |
background-color: #33b5e5; | |
color: #ffffff; | |
border: none; | |
cursor: pointer; | |
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24); | |
border-radius: 25px 25px; | |
} | |
.to-nav { | |
background-color: #9933cc; | |
color: #ffffff; | |
padding: .8em; | |
} | |
img { | |
max-width: 100%; | |
height: auto; | |
} | |
table.to { | |
border-collapse: collapse; | |
width: 100%; | |
} | |
.to th, | |
.to td { | |
text-align: left; | |
padding: 8px; | |
} | |
.to tr:nth-child(even) { | |
background-color: #f2f2f2 | |
} | |
.to th { | |
background-color: #9933cc; | |
color: white; | |
} | |
.to-aside { | |
margin: 0; | |
padding: 0; | |
width: 35%; | |
background-color: #f1f1f1; | |
height: 100%; | |
position: fixed; | |
overflow: auto; | |
background-image: url('../img/img3.jpg'); | |
background-size: 100% 100%; | |
opacity: .90; | |
} | |
ul.to-nav { | |
list-style-type: none; | |
margin: 0; | |
padding: 0; | |
overflow: hidden; | |
background-color: #33b5e5; | |
position: afix; | |
} | |
ul.to-nav li { | |
float: left; | |
} | |
ul.to-nav li a { | |
display: block; | |
color: white; | |
text-align: center; | |
padding: 18px 16px; | |
text-decoration: none; | |
} | |
ul.to-nav li a:hover:not(.active) { | |
background-color: #1a9ccb; | |
} | |
ul.to-nav li a.active { | |
background-color: #9933cc; | |
} | |
ul.to-nav li.right, | |
span a { | |
float: right; | |
font-size: .8em; | |
} | |
.to-input { | |
height: 2.2em; | |
border: 1px solid #cccccc; | |
width: 100%; | |
background-color: #F2F2F2; | |
display: block; | |
margin-bottom: 1em; | |
} | |
.to-label { | |
color: #BDBDBD; | |
text-transform: uppercase; | |
font-size: .9em; | |
margin-bottom: .5em; | |
} | |
.to-panel { | |
width: 80%; | |
margin: auto; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-justify-content: center; | |
justify-content: center; | |
-webkit-flex-direction: column; | |
flex-direction: column; | |
background-color: #F8F8F8; | |
text-align: center; | |
text-transform: uppercase; | |
} | |
.to-display { | |
width: 90%; | |
margin: auto; | |
display: -webkit-flex; | |
display: flex; | |
-webkit-justify-content: center; | |
justify-content: center; | |
-webkit-flex-direction: column; | |
flex-direction: column; | |
background-color: #fdfdfd; | |
text-align: left; | |
text-transform: capitalize; | |
padding: 1em; | |
} | |
#to-nav-hide { | |
display: none; | |
} | |
.to-panel img { | |
width: 80; | |
margin: auto; | |
opacity: .85; | |
} | |
.to-blue {background-color: #2196f3!important;} | |
.to-green {background-color: #4caf50!important;} | |
.to-purple {background-color: #9c27b0!important;} | |
.to-yellow {background-color: #ffeb3b!important;} | |
.to-black {background-color: #000000!important;} | |
.to-red {background-color: #f44336!important;} | |
.to-teal {background-color: #009688!important;} | |
.to-ash {background-color: #9e9e9e!important;} | |
.to-indigo {background-color: #3f51b5!important;} | |
.to-cyan {background-color: #00bcd4!important;} | |
.to-orange {background-color: #ff9800!important;} | |
.to-brown {background-color: #795548!important;} | |
.to-pink {background-color: #e91e63!important;} | |
.to-modal { | |
margin: 0; | |
padding: 0; | |
width: 100%; | |
background-color: rgba(64, 64, 64, 0.55); | |
height: 100%; | |
position: fixed; | |
top: 0em; | |
display: none; | |
overflow: auto; | |
} | |
.to-modal-section { | |
width: 50%; | |
height: auto; | |
height: 80px; | |
margin: auto; | |
margin-top: 1.8em; | |
border-radius: .5em; | |
background-color: #f2f2f2; | |
display: none; | |
} | |
/* | |
* | |
* MEDIA QUERY | |
* | |
*/ | |
@media only screen and (max-width: 769px) { | |
.to-row { | |
-webkit-flex-direction: column; | |
display: flex; | |
flex-direction: column; | |
} | |
[class*="to-col-"] { | |
width: 100%; | |
margin: auto!important; | |
-webkit-justify-content: center; | |
justify-content: center; | |
} | |
ul.to-nav li.right, | |
ul.to-nav li { | |
float: none; | |
} | |
.to-aside { | |
display: none; | |
} | |
.to-input { | |
width: 100%; | |
} | |
.to-panel { | |
margin-top: 1.2em; | |
width: 100%; | |
} | |
#to-nav-hide { | |
display: block; | |
} | |
#to-nav { | |
display: none; | |
} | |
.to-modal-section { | |
width: 80%; | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="to-modal" id="modal"> | |
<div class="to-modal-section" id="setup-menu"> | |
<span><a href="#" style="font-size: 2em; text-decoration: none; color: red; display: block;margin-right: .5em;" onclick="toggleModal('setup-menu')">×</a></span> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const toggleModal = (modal) => { | |
let displayModal = document.getElementById(modal).style.display; | |
if (displayModal === 'block') { | |
document.getElementById("modal").style.display = 'none'; | |
document.getElementById(modal).style.display = 'none'; | |
} else { | |
document.getElementById("modal").style.display = 'block'; | |
document.getElementById(modal).style.display = 'block'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment