Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added styling to jQuery projects. #328

Merged
merged 10 commits into from Nov 7, 2018
2 changes: 2 additions & 0 deletions spec/acceptance/add-spec.ts
Expand Up @@ -113,6 +113,7 @@ describe("Add command", () => {
expect(fs.existsSync("./test-view")).toBeTruthy();
expect(fs.existsSync("./test-view/index.html")).toBeTruthy();
fs.unlinkSync("./test-view/index.html");
fs.unlinkSync("./test-view/style.css");
fs.rmdirSync("./test-view");

fs.unlinkSync("ignite-cli-views.js");
Expand Down Expand Up @@ -162,6 +163,7 @@ describe("Add command", () => {
expect(fs.readFileSync("./test-view/index.html").toString()).toEqual("test", "Shouldn't overwrite file contents");

fs.unlinkSync("./test-view/index.html");
fs.unlinkSync("./test-view/style.css");
fs.rmdirSync("./test-view");
fs.unlinkSync("ignite-cli-views.js");
fs.unlinkSync(ProjectConfig.configFile);
Expand Down
10 changes: 2 additions & 8 deletions templates/jquery/js/bar-chart/bar-chart/files/index.html
Expand Up @@ -5,14 +5,8 @@
<title>$(description)</title>

$(cssBlock)
<style type="text/css">
.chartElement {
padding-bottom: 20px;
}
.chartContainer {
display: flex;
}
</style>
<link rel="stylesheet" href="./style.css">

$(scriptBlock)
<script type="text/javascript" src="world-energy-production.js"></script>
<script type="text/javascript">
Expand Down
6 changes: 6 additions & 0 deletions templates/jquery/js/bar-chart/bar-chart/files/style.css
@@ -0,0 +1,6 @@
.chartElement {
padding-bottom: 20px;
}
.chartContainer {
display: flex;
}
10 changes: 2 additions & 8 deletions templates/jquery/js/column-chart/column-chart/files/index.html
Expand Up @@ -5,14 +5,8 @@
<title>$(description)</title>

$(cssBlock)
<style type="text/css">
.chartElement {
padding-bottom: 20px;
}
.chartContainer {
display: flex;
}
</style>
<link rel="stylesheet" href="./style.css">

$(scriptBlock)
<script type="text/javascript" src="world-energy-production.js"></script>
<script type="text/javascript">
Expand Down
6 changes: 6 additions & 0 deletions templates/jquery/js/column-chart/column-chart/files/style.css
@@ -0,0 +1,6 @@
.chartElement {
padding-bottom: 20px;
}
.chartContainer {
display: flex;
}
9 changes: 7 additions & 2 deletions templates/jquery/js/combo/combo/files/index.html
Expand Up @@ -4,8 +4,11 @@
<head>
<title>$(description)</title>

$(cssBlock) $(scriptBlock)
$(cssBlock)
<link rel="stylesheet" href="./style.css">

$(scriptBlock)

<script type="text/javascript">
var platforms = [
{ Name: "jQuery/HTML5/ASP.NET MVC Controls" },
Expand Down Expand Up @@ -38,7 +41,9 @@
<body>
<div class="content">
<h2>$(description). MultiSelection with checkboxes is enabled</h2>
<div id="combo"></div>
<div class="wrapper">
<div id="combo"></div>
</div>
</div>
</body>

Expand Down
5 changes: 5 additions & 0 deletions templates/jquery/js/combo/combo/files/style.css
@@ -0,0 +1,5 @@
.wrapper {
display: flex;
flex-flow: column;
align-items: center;
}
Expand Up @@ -4,7 +4,11 @@
<head>
<title>$(description)</title>

$(cssBlock) $(scriptBlock)
$(cssBlock)
<link rel="stylesheet" href="./style.css">

$(scriptBlock)

<script type="text/javascript" src="data.js"></script>
<script type="text/javascript">
$(function () {
Expand Down Expand Up @@ -33,7 +37,9 @@
<body>
<div class="content">
<h2>$(description)</h2>
<div id="chart"></div>
<div class="wrapper">
<div id="chart"></div>
</div>
</div>
</body>
</html>
@@ -0,0 +1,5 @@
.wrapper {
display: flex;
flex-flow: column;
align-items: center;
}
12 changes: 9 additions & 3 deletions templates/jquery/js/editors/files/index.html
Expand Up @@ -4,7 +4,11 @@
<head>
<title>$(description)</title>

$(cssBlock) $(scriptBlock)
$(cssBlock)
<link rel="stylesheet" href="./style.css">

$(scriptBlock)

<script type="text/javascript">
$(function () {
$("#editor").$(widget)();
Expand All @@ -14,8 +18,10 @@

<body>
<div class="content">
<h2>$(description)</h2>
<div id="editor"></div>
<h1>$(description)</h1>
<div class="wrapper">
<div id="editor"></div>
</div>
</div>
</body>

Expand Down
5 changes: 5 additions & 0 deletions templates/jquery/js/editors/files/style.css
@@ -0,0 +1,5 @@
.wrapper {
display: flex;
flex-flow: column;
align-items: center;
}
Expand Up @@ -5,20 +5,8 @@
<title>$(description)</title>

$(cssBlock)
<style type="text/css">
.chartContainer {
display: flex;
}
.chart {
flex: 1 1 auto;
}
.chartElement {
margin-right: 10px;
}
.chart-container h3 {
text-align: center
}
</style>
<link rel="stylesheet" href="./style.css">

$(scriptBlock)
<script type="text/javascript" src="financial-data.js"></script>
<script type="text/javascript">
Expand Down
@@ -0,0 +1,9 @@
.chartContainer h3 {
text-align: center;
}
.chartContainer {
padding-bottom: 2%;
}
span {
font-weight: 400;
}
10 changes: 2 additions & 8 deletions templates/jquery/js/funnel-chart/funnel-chart/files/index.html
Expand Up @@ -5,14 +5,8 @@
<title>$(description)</title>

$(cssBlock)
<style>
.chartContainer {
position: relative;
float: left;
margin-left: 20px;
margin-right: 50px;
}
</style>
<link rel="stylesheet" href="./style.css">

$(scriptBlock)
<script type="text/javascript" src="data.js"></script>
<script type="text/javascript">
Expand Down
6 changes: 6 additions & 0 deletions templates/jquery/js/funnel-chart/funnel-chart/files/style.css
@@ -0,0 +1,6 @@
.chartContainer {
position: relative;
float: left;
margin-left: 20px;
margin-right: 50px;
}
9 changes: 7 additions & 2 deletions templates/jquery/js/grid/grid-custom/files/index.html
Expand Up @@ -3,7 +3,10 @@

<head>
<title>$(description)</title>
$(cssBlock) $(scriptBlock)
$(cssBlock)
<link rel="stylesheet" href="./style.css">

$(scriptBlock)
<script src="data.js"></script>

<script type="text/javascript">
Expand Down Expand Up @@ -31,7 +34,9 @@
<body>
<div class="content">
<h2>$(description)</h2>
<table id="grid"></table>
<div class="wrapper">
<table id="grid"></table>
</div>
</div>
</body>

Expand Down
5 changes: 5 additions & 0 deletions templates/jquery/js/grid/grid-custom/files/style.css
@@ -0,0 +1,5 @@
.wrapper {
display: flex;
flex-flow: column;
align-items: center;
}
5 changes: 4 additions & 1 deletion templates/jquery/js/grid/grid-editing/files/index.html
Expand Up @@ -3,6 +3,7 @@
<head>
<title>$(description)</title>
$(cssBlock)
<link rel="stylesheet" href="./style.css">

$(scriptBlock)

Expand Down Expand Up @@ -38,7 +39,9 @@
<body>
<div class="content">
<h2>$(description)</h2>
<table id="grid"></table>
<div class="wrapper">
<table id="grid"></table>
</div>
</div>
</body>
</html>
5 changes: 5 additions & 0 deletions templates/jquery/js/grid/grid-editing/files/style.css
@@ -0,0 +1,5 @@
.wrapper {
display: flex;
flex-flow: column;
align-items: center;
}
97 changes: 27 additions & 70 deletions templates/jquery/js/grid/grid-export/files/index.html
Expand Up @@ -3,56 +3,11 @@

<head>
<title>$(description)</title>
<style>
#exportButton {
margin-bottom: 8px;
}

$(cssBlock)
<link rel="stylesheet" href="./style.css">

.optionContainer {
display: inline-block;
}

.item {
display: inline-block;
height: 30px;
}

.item~.item {
margin-left: 15px;
}

.item-label {
display: block;
float: right;
margin-left: 5px;
line-height: 21px;
}

.exporting-overlay {
position: absolute;
background-color: rgba(181, 181, 181, 0.9);
top: 0;
left: 0;
z-index: 100000;
text-align: center;
vertical-align: top;
padding-top: 100px;
}

.exporting-overlay:after {
content: "";
display: inline-block;
vertical-align: middle;
height: 100%;
}

.exporting-text {
font-size: 46px;
font-weight: bold;
vertical-align: top;
}
</style>
$(cssBlock) $(scriptBlock)
$(scriptBlock)

<!-- External files for exporting -->
<script src="https://www.igniteui.com/js/external/FileSaver.js"></script>
Expand All @@ -65,34 +20,36 @@
<div class="content">
<h2>$(description)</h2>
<div class="group-fields">
Export with features:
<br />
<div class="item">
<div id="sorting" class="optionContainer"></div>
<label class="item-label" for="sorting">Sorting</label>
</div>
<div class="item">
<div id="summaries" class="optionContainer"></div>
<label class="item-label" for="summaries">Summaries</label>
<div>
Export with features:
</div>
<div class="item">
<div id="colfixing" class="optionContainer"></div>
<label class="item-label" for="colfixing">Column Fixing</label>
</div>
<div class="item">
<div id="styling" class="optionContainer"></div>
<label class="item-label" for="styling">Grid Styling</label>
<div class="options">
<div class="item">
<div id="sorting" class="optionContainer"></div>
<label class="item-label" for="sorting">Sorting</label>
</div>
<div class="item">
<div id="summaries" class="optionContainer"></div>
<label class="item-label" for="summaries">Summaries</label>
</div>
<div class="item">
<div id="colfixing" class="optionContainer"></div>
<label class="item-label" for="colfixing">Column Fixing</label>
</div>
<div class="item">
<div id="styling" class="optionContainer"></div>
<label class="item-label" for="styling">Grid Styling</label>
</div>
</div>
</div>

<div class="optionContainer">
Columns to skip
<br />
<div>
Columns to skip
</div>
<div id="colstoskip"></div>
<input type="button" id="exportButton" />
</div>
<br/>
<input type="button" id="exportButton" />
<br />
<table id="grid1"></table>
</div>
<script>
Expand Down