Skip to content

Commit

Permalink
Merge branch 'stage' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
eliasliedholm committed Feb 14, 2017
2 parents ff6f3a4 + ba6655b commit bd31981
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 21 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Styla Widget 2.1.13
Styla Widget 2.1.14

=======

Expand Down Expand Up @@ -172,6 +172,9 @@ This project adheres to the [Contributor Covenant](http://contributor-covenant.o
Change log
==========

### 2.1.14
+ move after element content from css to js in order to fix minifying

### 2.1.13
+ story text is not limited anymore to the first text element only
+ fix minifying
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "stylaWidget",
"version": "2.1.13",
"version": "2.1.14",
"contributors": [
"Mouse Braun <mouse@styla.com>",
"Elias Liedholm <elias@styla.com>",
Expand Down
5 changes: 0 additions & 5 deletions src/baseStyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,3 @@
position: relative;
word-wrap: break-word;
}

#styla-widget .styla-widget__paragraph-after:after
{
content: "...";
}
20 changes: 12 additions & 8 deletions src/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,21 +237,25 @@ class Build
*/
buildStoryText( title, description = '{}' )
{
const create = this.create;
const textWrapper = create( 'div', classes.TEXT_WRAPPER );
const create = this.create;
const textWrapper = create( 'div', classes.TEXT_WRAPPER );

const headlineWrapper = this.buildHeadline( title );
const headlineWrapper = this.buildHeadline( title );
textWrapper.appendChild( headlineWrapper );

const paragraph = create( 'div', classes.PARAGRAPH );
description = this.getDescription( JSON.parse( description ) );
const paragraph = create( 'div', classes.PARAGRAPH );
description = this.getDescription( JSON.parse( description ) );

paragraph.innerHTML = description;
paragraph.innerHTML = paragraph.textContent; // What??
paragraph.innerHTML = description;

/* Magic: strips HTML from description */
paragraph.innerHTML = paragraph.textContent;

textWrapper.appendChild( paragraph );

const paragraphAfter = create( 'div', classes.PARAGRAPH_AFTER );
const paragraphAfter = create( 'div', classes.PARAGRAPH_AFTER );
paragraphAfter.innerHTML = '…';

textWrapper.appendChild( paragraphAfter );

return textWrapper;
Expand Down
8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ <h2>e.g. the Cards</h2>
</body>


<script src="./list.js"></script>
<script src="./tiles.js"></script>
<script src="./horizontal.js"></script>
<script src="./cards.js"></script>
<script src="./list.v2.min.js"></script>
<script src="./tiles.v2.min.js"></script>
<script src="./horizontal.v2.min.js"></script>
<script src="./cards.v2.min.js"></script>
<script>
new StylaWidget_Tiles( {
newTab : true,
Expand Down
18 changes: 17 additions & 1 deletion src/stage.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
height: 100vh;
}

.styla-widget__target
.styla-widget__target,
.styla-widget__target2
{
text-align: left;
background: #FFF;
Expand All @@ -36,6 +37,8 @@
<body>
<h1>Stage widget</h1>
<p>Displaying stories from <a href="http://oxid.stage.eu.magalog.net/magazine/">http://oxid.stage.eu.magalog.net/magazine/</a> </p>

<h2>Non minified version</h2>
<div class="styla-widget__target" style="width: 90%;"></div>
<script src="./cards.js"></script>
<script>
Expand All @@ -48,5 +51,18 @@ <h1>Stage widget</h1>
cta : 'Read more'
} );
</script>

<h2>Minified version</h2>
<div class="styla-widget__target2" style="width: 90%;"></div>
<script src="./tiles.v2.min.js"></script>
<script>
new StylaWidget_Tiles( {
newTab : true,
slug : 'ci-oxid4',
api : 'http://stage.magalog.net',
target : '.styla-widget__target2',
limit : 4,
} );
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/* globals module */
module.exports = '2.1.13';
module.exports = '2.1.14';

0 comments on commit bd31981

Please sign in to comment.