Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                
<h1>Surveyor Workflow Documents</h1>
<div id="btns">
    <div id="btnPrev">Previous</div><!-- Previous Button - Style as you wish! -->
    <div id="offsetDispl"></div><!-- Feed Count Display ie: 1 of 5  - Style as you wish! -->
    <div id="btnNext">Next</div><!-- Next Button - Style as you wish! -->
</div>

<div id="RSSview"></div> <!-- This Divider is where RSS Feeds Display, put this ID in the variable 'feedview' -->
<div id="hidden" style='display:none;'></div> <!-- This Divider Must Exist to retrieve initial feed count! -->

              
            
!

CSS

              
                @import url("https://fonts.googleapis.com/css?family=Syncopate");
h1 {
  -webkit-font-smoothing: antialiased;
  font-family: 'Syncopate', Helvetica, Arial;
	text-transform: uppercase;
	text-align: left;
	vertical-align: middle;
	font-size: 1.2em;
	line-height: 2em;
  background:#e6e6e6;background-image:url('https://dl.dropbox.com/u/49702/images/ribbon_bkg.png');background-repeat:no-repeat;overflow:visible;background-position:right top;height:55px;box-shadow:0 0 3px #444;  
}
#btns {position:relative; width: 500px; height:35px; line-height: 35px;margin-top: 20px;margin-bottom: 20px; }

#btns div { width:32px; height:35px;}

#btnPrev { display:none; position: absolute; top: 0px; left: 7px; cursor:pointer;}

#btnNext { display:none; position: absolute;top: 0px; right: 7px; cursor:pointer;}

#btns div#offsetDispl { width:500px;text-align: center;font-weight: bold;z-index: -1;border:1px solid #d3cad7;border-radius:5px; }

.RSSview {list-style:none;}
.rssBody { width: 500px; }
.rssBody a {font-weight:bold;}
.rssDate { font-size:1em;color:#aaa;}
.rssHeader {display:none; }
.rssRow { padding: 0.8em; }
ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}
.rssRow i { font-style: normal; }
.even { background-color: #f2f2f2; }
.rssBody ul > li { background-image:none; }
.rssBody li:first-child { border-top: 1px solid #ccc; }
.rssBody li:last-child { border-bottom: 1px solid #ccc; }
a {font-family: 'Syncopate', Helvetica, Arial;}
              
            
!

JS

              
                // Editable Values
var feedlink = 'http://feeds.feedburner.com/lsu-forum'; // Set Feed Location
var fpp = 4; // Choose how many feeds per page to display (fpp = Feeds Per Page)
var feedview = '#RSSview'; // Choose where to diplay the RSS Feed

// Initial Variables ( Do Not Edit )
var feeds = null; // Variable to hold total feed count
var totalpages = null; // Variable to hold total pages
var currentpage = null; // Variable to hold Current Page being Displayed
var lastpagefeeds = null; // Variable to hold Amount of Feeds on the Last Page
var firstof = null; // Variable to hold First Feed Display - Example: 3 of ? 
var lastof = null; // Variable to hold Last Feed Display - Example: ? of 10 
var feedoffset = 1; // Set Initial Feed Offset

///////////////////
// RSS Functions //
///////////////////

// Calulate Feed Count Display
function displayfeedcount(){
    // Set 'First Of ???'
    firstof = feedoffset;
    // Set '??? of Last'
    if(currentpage == Math.ceil(totalpages)){ lastof = feeds; }else{ lastof = (firstof + fpp) - 1;}
    $('#offsetDispl').html( firstof + ' of ' + lastof); // Display Feed Count ' First of Last'
}

// Load Initial Feeds on Page 1
function initialfeeds(){
    $(feedview).rssfeed( feedlink , { limit: fpp , offset: 0 }); // Load Initial Set of Feeds
    currentpage = 1; // Set Current Page to 1
    displayfeedcount(); // Trigger the Display of Feedcount - Example: '1 of 5'
}

// Calculate Total Pages
function calculatepages(){
    totalpages = feeds / fpp; // Total Page Calculation
    console.log( 'Total Pages: ' + totalpages); // Log - For Testing Purposes Only - Delete if Desired
    initialfeeds(); // Trigger Initial Display of Feeds
}

// Determine if the NextBtn should be shown on load
function showbuttons(){ 
    if ( feeds > fpp ){ $('#btnNext').show(); } // Evaluate 'Next Button' Visibility
}

// Determine Total Feed Count
function feedcount() {
    feeds = arguments[1]; // Set Feed Count to Variable 'feeds'
    console.log( 'Total Feeds: ' + feeds ); // Log - For Testing Purposes Only - Delete if Desired
    showbuttons(); // Trigger Initial Button Display
    calculatepages(); // Trigger Total Page Calculation
}
    
// Function to Show Next Page
function nextpage(){
    currentpage = currentpage + 1; // Set New Current Page
    feedoffset = feedoffset + fpp ; // Set New Feed Offset   
    console.log('Current Page is: ' + currentpage);  // Log - For Testing Purposes Only - Delete if Desired
    console.log('Feed Offset is: ' + feedoffset );  // Log - For Testing Purposes Only - Delete if Desired
    $(feedview).rssfeed( feedlink , { limit: fpp , offset: feedoffset }); // Load Next Set of Feeds
    if( currentpage >= totalpages ){ $('#btnNext').hide();} // Evaluate 'Next Button' Visibility
    if( currentpage > 1){ $('#btnPrev').fadeIn('250');} // Evaluate 'Previous Button' Visibility
    displayfeedcount(); // Display Feed Count ' ??? of ??? '   
}

// Function to Show Previous Page
function prevpage(){
    currentpage = currentpage - 1;  // Set New Current Page
    feedoffset  = feedoffset - fpp ; // Set New Feed Offset 
    console.log('Current Page is: ' + currentpage);  // Log - For Testing Purposes Only - Delete if Desired
    console.log('Feed Offset is: ' + feedoffset );  // Log - For Testing Purposes Only - Delete if Desired
    $(feedview).rssfeed( feedlink , { limit: fpp , offset: feedoffset });
    if( currentpage <= totalpages ){ $('#btnNext').fadeIn('250');} // Evaluate 'Next Button' Visibility
    if( currentpage <= 1){ $('#btnPrev').hide();} // Evaluate 'Previous Button' Visibility
    displayfeedcount(); // Display Feed Count ' ??? of ??? '
}

// Bind Previous and Next Button Clicks
$('#btnPrev').on('click', prevpage); // Bind the PrevPage Function
$('#btnNext').on('click', nextpage); // Bind the NextPage Function

// Retrieve Total Feeds
$('#hidden').rssfeed( feedlink , {}, feedcount); 
// Make sure this divider exists on the page body >>>  <div id="hidden" style='display:none;'></div>   
  



              
            
!
999px

Console