Pen Settings

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

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

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

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <!DOCTYPE html>
<header>
	<link rel="stylesheet" type="text/css" href="css/tribute.css">
	
	<script src="scripts/quotes.js"></script>
</header>

<body>
<body>
	<div id="splash">
		<h1 id="headline">Alexander Vasilyevich Suvorov</h1>
	</div>
	<main>
		<div class="row">
			<div class="colLeft">
				<h1 class="h1left">Generalissimo:</h1>
			</div>
			<div class="colRight">
				<p>Alexander Vasilyevich Suvorov (Born 24 November 1729 or 1730 - 18 May 1800), Count Suvorov of Rymnik, Prince of Italy, Count of the Holy Roman Empire, national hero of Russia, was the last Generalissimo of the Russian Empire. Nineteenth century sources sometimes refer to him as "Suwarrow" or "Suwarow".</p>
				<p>Suvorov is one of the few generals in history who never lost a battle, being undefeated in over 60 large battles while frequently having numerical disadvantage. He was famed for his military manual The Science of Victory and noted for several of his sayings, including "What is difficult in training will become easy in a battle," "The bullet is a mad thing; only the bayonet knows what it is about," and "Perish yourself but rescue your comrade!" He taught his soldiers to attack instantly and decisively: "Attack with the cold steel! Push hard with the bayonet!". He joked with the men, calling common soldiers "brother," and shrewdly presented the results of detailed planning and careful strategy as the work of inspiration.</p>
			</div>
		</div>
		<hr/>
			<div id="randomQuotes">
				<div id="inject">The officers know that I myself am not ashamed to work at this. ...Suvorov was Major, and Adjutant, and everything down to Corporal; I myself looked into everything and could teach everybody. <br / > Quoted in W. Lyon Blease, 'Suvorof,' 1926</div>
			</div>
			<button class="button" id="randomQuoteButton" onclick="generator()">Random Quote</button>
			<a class="button" id="spreadItLikeThePlague" target="_blank" href="https://twitter.com/intent/tweet?hashtags=quotes&text=The%20officers%20know%20that%20I%20myself%20am%20not%20ashamed%20to%20work%20at%20this.%20...Suvorov%20was%20Major,%20and%20Adjutant,%20and%20everything%20down%20to%20Corporal">Tweet</a>
		<hr />
		<div class="row">
			<div class="colLeft">
				<h1 class="h1left">Titles:</h1>
			</div>
			<div class="colRight">
				<p>Suvorov's full name and titles (according to Russian pronunciation), ranks and awards are the following: Aleksandr Vasiliyevich Suvorov, Prince of Italy, Count of Rymnik, Count of the Holy Roman Empire, Prince of Sardinia, Generalissimo of Russia's Ground and Naval forces, Field Marshal of the Austrian and Sardinian armies; seriously wounded six times, he was the recipient of the Order of St. Andrew the First Called Apostle, Order of St. George the Bringer of Victory First Class, Order of St. Vladimir First Class, Order of St. Alexander Nevsky, Order of St. Anna First Class, Grand Cross of the Order of St. John of Jerusalem, (Austria) Order of Maria Teresa First Class, (Prussia) Order of the Black Eagle, Order of the Red Eagle, the Pour le Merite, (Sardinia) Order of the Revered Saints Maurice and Lazarus, (Bavaria) Order of St. Gubert, the Golden Lioness, (France) United Orders of the Carmelite Virgin Mary and St. Lazarus (on 20. April 1800), (Poland) Order of the White Eagle, the Order of Saint Stanislaus.</p>
			</div>
		</div>
		<hr />
		<div class="row">
			<div class="colLeft">
			<h1 class="h1left">Quick Facts:</h1>
			</div>
			<div class="colRight">
				<ul>
					<li>Suvorov was buried in Saint Petersburg in the Alexander Nevsky Lavra. His grave stone states simply: "Here lies Suvorov".</li>
					<li>Suvorov won more than 60 battles and never lost one.</li>
					<li>The Suvorov Museum opened in Saint Petersburg in 1900 to commemorate the centenary of the general's death.</li>
					<li>On July 29, 1942, the Presidium of the Supreme Soviet of the USSR established the Order of Suvorov, awarded for successful offensive actions against superior enemy forces.</li>
					<li>The town of Suvorovo in Varna Province, Bulgaria, was named after Suvorov, as was the Russian ship which discovered Suwarrow Island in the Pacific in 1814.</li>
					<li>Various currency notes of the Transnistrian ruble depict Suvorov.</li>
					<li>His prowess, military wisdom, and daring remain in high regard. Another of his many utterances, "Achieve victory not by numbers, but by knowing how" is well known in the Russian military.</li>
				</ul>
			</div>
		</div>
		<hr />
		<a href="https://en.wikipedia.org/wiki/Alexander_Suvorov">Read More On Wikipedia</a>
	</main>
	<footer>
		<p id="footer">Written by <a href="https://freecodecamp.com/thaniri">Marek Slabicki</a> for <a href="https://freecodecamp.com">Free Code Camp</a></p>
	</footer>
</body>
</html>
            
          
!
            
              body{
	padding:0px;
	margin:0px;
	font-family:"Verdana", sans-serif;
}

#splash{
	width:100%;
	height:540px;
	background-image: url("https://i.imgur.com/KFValQx.jpg");
	background-size:cover;
	background-position:center;
	background-repeat:none;
	margin-left: auto; 
	margin-right: auto;
}
#headline {
	padding-top:0px;
	margin-top:0px;
	display: block;
	width: 645px;
	margin-left: auto;
	margin-right: auto;
	padding-top: 220px;
	color: white;
	font-family: "Georgia", serif;
	font-size: 2.5em;
	text-shadow: -2.5px 0 black, 0 2.5px black, 2.5px 0 black, 0 -2.5px black;
}
.sprite{
	height:36px;
	width:36px;
	position:relative;
	bottom:28px;
}
#sprites ul{
	list-style-type:none;
	margin-left:15%;
	padding:0;
}

#sprites li{
	float:left;
	margin-bottom:20px;
}

nav{
	text-align:center;
	height:50px;
	background-color:#222222;
}

nav a{
	height:50px;
	padding:15px;
}

main{
	width:70%;
	margin-left:auto;
	margin-right:auto;
}

main p{
	padding-right:4px;
	border-radius: 5px;
}

main ul{
	list-style-type:none;
	border-radius: 5px;
	padding-right:4px;
}

main li{
	padding:2px;
}

main li:nth-of-type(even){
	background-color:#999;
	border-radius: 3px;
}

h1{
	font-family:"Georgia", serif;
}

.row{
	box-sizing: border-box;
	display: table;
}

.colLeft{
	float:left;
	width:35%;
}

.colRight{
	width:65%;
	float:right;
}

@media (max-width:1224px){
	.colLeft{
		margin-left:auto;
		width:100%;
		float:none;
	}

	.colRight{
		margin-right:auto;
		width:100%;
		float:none;
	}
}

#randomQuotes{
	background-color:#f9f9f9;
	height:200px;
	border:solid 5px #222222;
	border-radius: 5px;
}

.button{
	position:relative;
	left:20px;
	margin-top:10px;
	color:white;
	background-color:#286090;
	border:solid 1px transparent;
	border-radius:6px;
	padding:10px 16px;
	font-size:18px;
	line-height:1.33;
	cursor:pointer;
	-webkit-appearance: button;
	text-decoration:none;
}
	
.button:hover{
	background-color:#23527c;
}

#spreadItLikeThePlague{
	position:relative;
	top:1px;
}

#inject{
	width:66%;
	width:66%;
	position: relative;
	top: 50%;
	transform: translateY(-50%);
	margin-left:auto;
	margin-right:auto;
}

a{
	text-decoration:none;
	color:#286090;
}

a:hover{
	color:#122b40;
}

footer{
	width:100%;
	height:200px;
	bottom:0;
	left:0;
	background-color:#222222;
}

#footer{
	text-align:center;
	padding-top:95px;
	color:white;
}

#footer a{
	color:white;
}

footer a:hover{
	text-decoration:underline;
}
            
          
!
            
              var one = "One cannot think that blind bravery gives victory over the enemy. <br /> The Book of Military Quotations By Peter G. Tsouras - Page 55";
var two = "Train hard, fight easy. <br / > Philip Longworth: The Art of Victory, New York, 1965";
var three = "Win with ability, not with numbers. <br / > Quoted in Danchenko and Vydrin, Military Pedagogy, 1973";
var four = "No battle can be won in the study, and theory without practice is dead. <br / > Quoted in K. Ossipov, 'Suvorov', 1945";
var five = "The officers know that I myself am not ashamed to work at this. ...Suvorov was Major, and Adjutant, and everything down to Corporal; I myself looked into everything and could teach everybody. <br / > Quoted in W. Lyon Blease, 'Suvorof,' 1926";
var six = "To me death is better than the defensive. <br / > Quoted in W. Lyon Blease, 'Suvorof,' 1926";
var seven = "Drill your soldiers well, and give them a pattern yourself. <br / > Quoted in W. Lyon Blease, 'Suvorof,' 1926";
var eight = "Exercises cultivated self-reliance - the foundation of courage. <br / > Quoted in Ossipov, 'Suvorov,' 1945";
var nine = "Accustom yourself to tireless activity... <br / > 'The Book of Military Quotations' - Page 23 by Peter G. Tsouras - Reference - 2005";
var ten = "Fortune seized at the right moment gives victory. <br / > 'Political Affairs' - Page 1005 by Earl Browder";

function generator(){
	var randomNumber = Math.floor((Math.random() * 10) + 1);
	colorGenerator();
	
	if(randomNumber == 1){
		document.getElementById("inject").innerHTML = one;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=One%20cannot%20think%20that%20blind%20bravery%20gives%20victory%20over%20the%20enemy.");
	}
	else if(randomNumber == 2){		
		document.getElementById("inject").innerHTML = two;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Train%20hard,%20fight%20easy.");
	}
	else if(randomNumber == 3){		
		document.getElementById("inject").innerHTML = three;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Win%20with%20ability,%20not%20with%20numbers.");
	}
	else if(randomNumber == 4){		
		document.getElementById("inject").innerHTML = four;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=No%20battle%20can%20be%20won%20in%20the%20study,%20and%20theory%20without%20practice%20is%20dead.");
	}
	else if(randomNumber == 5){		
		document.getElementById("inject").innerHTML = five;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=The%20officers%20know%20that%20I%20myself%20am%20not%20ashamed%20to%20work%20at%20this.%20...Suvorov%20was%20Major,%20and%20Adjutant,%20and%20everything%20down%20to%20Corporal");
	}
	else if(randomNumber == 6){		
		document.getElementById("inject").innerHTML = six;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=To%20me%20death%20is%20better%20than%20the%20defensive.");
	}
	else if(randomNumber == 7){		
		document.getElementById("inject").innerHTML = seven;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Drill%20your%20soldiers%20well,%20and%20give%20them%20a%20pattern%20yourself.");
	}
	else if(randomNumber == 8){		
		document.getElementById("inject").innerHTML = eight;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Exercises%20cultivated%20self-reliance%20-%20the%20foundation%20of%20courage.");
	}
	else if(randomNumber == 9){		
		document.getElementById("inject").innerHTML = nine;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Accustom%20yourself%20to%20tireless%20activity...");
	}
	else{		
		document.getElementById("inject").innerHTML = ten;
		document.getElementById("spreadItLikeThePlague").setAttribute("href", "https://twitter.com/intent/tweet?hashtags=quotes&text=Fortune%20seized%20at%20the%20right%20moment%20gives%20victory.");
	}
};

function colorGenerator(){
	var randomNumber = Math.floor((Math.random() * 10) + 1); 
	if (randomNumber < 3){
		document.getElementById("randomQuotes").style.backgroundColor = "#d9534f";
	}
	else if (randomNumber >= 3 && randomNumber <= 4){
		document.getElementById("randomQuotes").style.backgroundColor = "#f9f9f9";
	}
	else if (randomNumber >= 5 && randomNumber <= 6){
		document.getElementById("randomQuotes").style.backgroundColor = "#5bc0de";
	}
	else if (randomNumber >= 7 && randomNumber <= 8){
		document.getElementById("randomQuotes").style.backgroundColor = "#5cb85c";
	}
	else{
		document.getElementById("randomQuotes").style.backgroundColor = "#428bca";
	}
};
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console