Skip to content

Commit

Permalink
Massive commit
Browse files Browse the repository at this point in the history
*Everything* has changed, so bear with me while I dump it all into one commit.

## New:
- Syntax highlighting in code exports
- Autoprefixed CSS statements
- Justification, global alignment within parent ````div```` and overriding alignment per child ````div````

## Fixes & edits
- Actually do something with flex-size
- Move additional actions to dedicated sidebar. Click the ````div```` you want to edit first!
  • Loading branch information
Max Steenbergen committed Sep 9, 2014
1 parent 3b278d0 commit 612e50d
Show file tree
Hide file tree
Showing 5 changed files with 15,917 additions and 115 deletions.
14 changes: 6 additions & 8 deletions css/fibonacci.css
@@ -1,49 +1,47 @@
#flexcanvas{
width: 100%;
height: 600px !important;
}

.rowParent, .columnParent{
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
-webkit-flex-wrap: nowrap;
-ms-flex-wrap: nowrap;
flex-wrap: nowrap;
-webkit-box-pack: start;
-moz-box-pack: start;
-webkit-justify-content: flex-start;
-ms-flex-pack: start;
justify-content: flex-start;
-webkit-align-content: stretch;
-ms-flex-line-pack: stretch;
align-content: stretch;
-webkit-box-align: stretch;
-moz-box-align: stretch;
-webkit-align-items: stretch;
-ms-flex-align: stretch;
align-items: stretch;
}

.columnParent{
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
}

.flexChild{
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
-webkit-align-self: auto;
-ms-flex-item-align: auto;
align-self: auto;
}
}
63 changes: 45 additions & 18 deletions css/screen.css
Expand Up @@ -41,19 +41,25 @@ div{
outline: 1px solid hsla(200,100%,90%,0.2);
background-color: hsla(200,100%,1%,0.1);
}
div.selected{
background-color: hsla(0, 0%, 100%, 0.75);
}

#codeExportTextarea, #container{
#flexcanvas, #codeExportTextarea{
width: 100%;
height: 600px !important;
position: absolute;
top: 180px;
}

#flexcanvas div{
min-height: 10px;
min-width: 10px;
}
#codeExportTextarea{
box-sizing: border-box;
resize: none;
border: none;
background-color: hsla(200,100%,1%,0.4);
background-color: hsla(200,100%,1%,0.6);
padding: 50px;
font-family: Courier;
font-size: 16px;
Expand All @@ -78,6 +84,7 @@ div{
opacity: 0.6
}
#splitControls{
position: absolute;
outline: none;
background-color: transparent;
}
Expand All @@ -87,30 +94,45 @@ div{
cursor: pointer;
}

#optionsModal{
#optionsBar{
box-sizing: border-box;
width: 150px;
position: absolute;
z-index: 99999;
border: 1px solid hsla(100, 100%, 100%, 0.6);
-webkit-box-flex: 0 0 auto;
-webkit-flex: 0 0 auto;
-ms-flex: 0 0 auto;
flex: 0 0 auto;
width: 200px;
outline: 1px solid hsla(100, 100%, 100%, 0.6);
box-shadow: 0 0 10px rgba(0,0,0,0.3);
padding: 10px;
border-radius: 10px;
padding: 20px;
background-color: hsla(100, 100%, 100%, 0.5);
margin: 15px
text-align: left;
}

#optionsModal img{
#optionsBar img{
cursor: pointer;
margin: 5px;
margin-bottom: 15px;
}

::-webkit-input-placeholder { color:hsla(200,100%,90%,1); }
::-moz-placeholder { color:hsla(200,100%,90%,1); } /* firefox 19+ */
:-ms-input-placeholder { color:hsla(200,100%,90%,1); } /* ie */
input:-moz-placeholder { color:hsla(200,100%,90%,1); }

#optionsModal input{
width: 110px;
#optionsBar label{
font-family: Avenir;
font-size: 1.05em;
font-weight: bold;
color: hsla(200,100%,100%,0.8);
text-shadow: 0 -1px hsla(200,100%,0%,0.3);
}
#optionsBar select{
width: 160px;
margin-bottom: 15px;
}
#optionsBar input{
box-sizing: border-box;
width: 160px;
height: 30px;
-webkit-appearance: none;
appearance: none;
Expand All @@ -119,17 +141,16 @@ input:-moz-placeholder { color:hsla(200,100%,90%,1); }
border-right: 2px solid hsla(200,100%,90%,1);
padding-right: 5px;
background: none;
margin-top: 10px;
font-family: Avenir;
color: hsla(200,100%,10%,1);
font-size: 1em;
text-align: right;
outline: none;
}

#optionsModal button{
float: right;
margin: 5px;
#optionsBar button{
width: 160px;
margin-bottom: 15px;
font-family: Avenir;
font-size: 1.05em;
font-weight: bold;
Expand All @@ -150,6 +171,12 @@ input:-moz-placeholder { color:hsla(200,100%,90%,1); }
background-image: linear-gradient(0deg, #1A658D 0%, #6CBFDA 100%);
}

.disabled{
opacity: 0.4;
pointer-events: none;
}


footer{
box-sizing: border-box;
text-align: center;
Expand Down
54 changes: 51 additions & 3 deletions index.html
Expand Up @@ -12,9 +12,56 @@
<h1>Fibonacci</h1>
<h2>Flexbox Composer</h2>
</header>
<div id='container'>

<div id='flexcanvas' class='rowParent'>
<div id="optionsBar" class="disabled flexChild">
<img src="img/expand.png" id="growDivButton" alt="Expand div" title="Expand div"></img>
<img src="img/shrink.png" id="shrinkDivButton" alt="Shrink div" title="Shrink div"></img>
<img id="removeDivButton" src="img/trash.png" alt="Delete div" title="Delete div"></img>


<label for="justifyButton">Justification: </label>
<select id="justifyButton" alt="Set justification within parent" title="Set justification within parent">
<option val="flex-start">flex-start</option>
<option val="flex-end">flex-end</option>
<option val="center">center</option>
<option val="space-between">space-between</option>
<option val="space-around">space-around</option>
</select>

<label for="allAlignmentButton">Align within parent: </label>
<select id="allAlignmentButton" alt="Set alignment for all in parent" title="Set alignment for all in parent">
<option val="flex-start">flex-start</option>
<option val="flex-end">flex-end</option>
<option val="center">center</option>
<option val="baseline">baseline</option>
<option val="stretch">stretch</option>
</select>

<label for="singleAlignmentButton">Align single: </label>
<select id="singleAlignmentButton" alt="Set single alignment" title="Set single alignment">
<option val="auto">auto</option>
<option val="flex-start">flex-start</option>
<option val="flex-end">flex-end</option>
<option val="center">center</option>
<option val="baseline">baseline</option>
<option val="stretch">stretch</option>
</select>

<input id="widthInput" type="text" placeholder="Fixed width">
<button id="enterWidthButton" title="width">Enter width</button>
<input id="heightInput" type="text" placeholder="Fixed height">
<button id="enterHeightButton" title="height">Enter height</button>


<input class='disabled' id="parentDimensionSizeInput" placeholder="Parent's dimension" type="text">
<button class='disabled' id="enterParentDimensionButton">Enter</button><br>

</div>
<div id='container' class="flexChild">
</div>
<pre><code id='codeExportTextarea'></code></pre>
</div>
<pre><code id='codeExportTextarea'></code></pre>
<img id="triggerHTMLCode" src="img/HTMLFile.png" alt="Export HTML">
<img id="triggerCSSCode" src="img/CSSFile.png" alt="Export CSS">
<img id="triggerInfo" src="img/info.png" alt="Export CSS">
Expand All @@ -30,7 +77,8 @@ <h2>Flexbox Composer</h2>
<a href="https://github.com/maxsteenbergen/Fibonacci"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/652c5b9acfaddf3a9c326fa6bde407b87f7be0f4/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6f72616e67655f6666373630302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_orange_ff7600.png"></a>

<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="js/autoprefixer.js" type="text/javascript"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.2/highlight.min.js"></script>
<script src="js/fibonacci.js" type="text/javascript"></script>
</body>
</html>
</html>

0 comments on commit 612e50d

Please sign in to comment.