Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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

              
                <head>
<link rel="preconnect" href="https://fonts.gstatic.com"> 
<link href="https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600;700&family=Source+Sans+Pro:ital,wght@0,300;0,400;1,200;1,300;1,400&display=swap" rel="stylesheet">
</head>

<body>
  <div id="body-img" class="bg1">

  <div class="container">
    
    <div class="words-container">
  <h1 class="title">Write Like an Architect</h1>
      <hr>
  <p class="arch-text" id="arch-text-area">Maybe your ArchDaily submission is due in an hour but you've got nothing written yet. Maybe your firm's one overworked marketing assistant is on your ass to get the website copy updated so they can go home to their family. Or maybe you're just looking for "inspiration" for your next "amazing" project.<br><br> Use this tool to get yourself started.<br><br>(It's writing, how hard could it be?)</p>
  <button type="button" class="generate-btn">Let's See Some Words</button>
    </div>
      </div>
  </div>
</body>
              
            
!

CSS

              
                body {
  margin: 3vw 3vw;
  text-align: left; 
  font-size: 16px;
}



#body-img {
width: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

}

.bg1 {
  background-image: url(https://images.unsplash.com/photo-1575152046278-adb86343e2a8?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80);
}

.bg2 {
  background-image: url(https://images.unsplash.com/photo-1494216928456-ae75fd96603d?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80);
}

.bg3 {
  background-image: url(https://images.unsplash.com/photo-1502394202744-021cfbb17454?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1178&q=80);
}
.bg4 {
  background-image: url(https://images.unsplash.com/photo-1612875775405-a9eb2029a2e4?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=934&q=80)}
.bg5 {
  background-image: url(https://images.unsplash.com/photo-1609519591065-996d4de118c1?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80)}
.bg6 {
  background-image: url(https://images.unsplash.com/photo-1613144123668-d9c705841eba?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1000&q=80)}
.bg7 {
  background-image: url(https://images.unsplash.com/photo-1612703508477-00e02a9b170c?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=962&q=80)}
.bg8 {
  background-image: url(https://images.unsplash.com/photo-1611014667318-8fe8c9cb5829?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=976&q=80)}



.container {
  display: flex;
  flex-direction: row;
justify-content: center;
  width: 80vw;
  margin: 0 auto;
  min-height: 90vh;
  padding-bottom: 10vh;
  
}


.title {
  
  color: #333;
  font-size: 1.2rem;
  font-weight: bold;
  font-family: 'Shippori Mincho', serif;
  text-align: center;

}
.words-container {
  margin-top: 10vh;
  padding: 2vh 4vh;
  background: white;
  width: 80%;
  
}
p {
  min-height: 40vh;
  color: #333;
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 400;
  font-style: italic;
/*   padding: 4vw; */
  font-size: 1rem;

}
.generate-btn {
  border: none;
  padding: 1rem 1.5rem;
  margin: 0;
  width: 100%;
  text-decoration: none;
  background:  #84ab85
;
  color: #fff;
  font-family: sans-serif;
  font-size: .8rem;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  -moz-appearance: none;
}

}
.generate-btn:hover {
  background: #a9ccaa;
}

.generated-text {
  padding-top: 2vh;
  font-size: 1.3rem;
}

@media (min-width:48em){
  body {font-size: 24px;}
  .words-container {width:50%; padding:3vw;}
}
              
            
!

JS

              
                $(document).ready(function(){

textlistOne = ["Placed in", "Surrounded by", "Hovering above", "Placed within", "Inhabiting", "Standing near", "Realized in", "Inspired by", "Responding to", "Sited on", "Appearing in", "Constructed near", "Designed to echo", "Born from the conditions of", "Perched near", "Reimagined through"];

textlistTwo = ["a grove of tall junipers", "Japanese larch trees", "orchards and vineyards", "a garden of apple and cherry trees", "a steeply sloping site", "a wide expanse of prairie", "the wilderness outside a major city", "the rocks near the coast of a small island", "the woods at the bank of a river", "a quiet grassland", "a forested Arctic hillside", "the crumbling edges of a disused quarry", "the drab silence of a Phoenix suburb", "a wind-worn canyon wall", "a high desert plain", "endless backyards", "a quiet corner of greenery near downtown", "the bones of an old shipyard", "an unconvential waterfront context", "a steep cliff", "a small town", "a pine forest"];
 
textlistThree = ["the striking", "a cheerful", "this inconspicuous", "this elegant", "this alluring", "the one-of-a-kind", "this unique", "this surprising", "a lofty", "an alluring", "this lofty", "this cheerful", "this playful", "a playful", "this airy", "a simple", "this simple", "this formal", "this rustic", "a rustic", "this tiny", "this slender", "this inspiring", "a flexible", "this graceful", "this delicate", "this unassuming"];
 
textlistFour = ["wooden", "cedar-clad", "modern", "inconspicuous", "subtle", "striking", "monolithic", "contemporary", "charcoal-colored", "slate-clad", "wood-wrapped", "earth-toned", "low-slung", "elevated", "sunken", "half-hidden", "single-room", "sparsely furnished", "rammed-earth", "steel-clad", "space-efficient", "skewed", "semi-permanent", "weekend", "vacation"];
 
textlistFive = ["home", "treehouse", "project", "building", "house", "cabin", "retreat", "getaway", "aerie", "pavilion", "structure", "mass", "hideout", "observation platform", "vantage point", "series of spaces", "collection of rooms", "box"];
  
textlistSix = ["proves", "offers", "serves as", "provides", "creates", "acts as", "transforms into", "becomes"];
  
textlistSeven = ["a barely visible", "an ideal", "a remarkable", "a minimal and inspiring", "an evocative", "a memorable", "a playful", "a welcoming", "an ecologically aware", "a sensitive", "an independent", "a deceptively light", "a self-supporting", "a comfortable", "a snug", "a trendy", "a sustainable", "a resilient", "a glowing"];
  
textlistEight = ["mirror of its own surroundings", "retreat from city life", "gift from the owner to her children", "setting to partake in the ancient ritual of tea drinking", "link between outdoors and indoors", "expression of form and space", "space to reflect", "space to unwind", "space for contemplation", "space for celebration", "blurring of boundaries between architecture and nature", "retreat for creativity and reflection", "lookout for sleeping and dreaming", "venue for up and coming artists", "new way of vacationing responsibly", "beacon of a possible future for housing", "volume of light and warmth", "getaway from the hustle and bustle of everyday life", "place to have a beer or two", "base camp for your next adventure", "echo of a lost way of building", "live/work studio", "maker space", "collaboration hub", "writer's retreat", "artist's haven", "beacon in the dark", "potential example of housing typologies to come"];
  
classList = ['bg1','bg2','bg3','bg4','bg5','bg6','bg7','bg8'];

function generateName(){
  var textOne = Math.floor(Math.random() * (textlistOne.length));
  var textTwo = Math.floor(Math.random() * (textlistTwo.length));
  var textThree = Math.floor(Math.random() * (textlistThree.length));
  var textFour = Math.floor(Math.random() * (textlistFour.length));
  var textFive = Math.floor(Math.random() * (textlistFive.length));
  var textSix = Math.floor(Math.random() * (textlistSix.length));
  var textSeven = Math.floor(Math.random() * (textlistSeven.length));
  var textEight = Math.floor(Math.random() * (textlistEight.length));
  
  
  $('.arch-text').text('"' + textlistOne[textOne] + " " + textlistTwo[textTwo] + ", " + textlistThree[textThree] + " " + textlistFour[textFour] + " " + textlistFive[textFive] + " " + textlistSix[textSix] + " " + textlistSeven[textSeven] + " " + textlistEight[textEight] + "...")
  
}


  
function swapClass(){
var randomClass = Math.floor(Math.random() * (classList.length));
  var robotParagraph = document.getElementById("arch-text-area");
  
  document.getElementById("body-img").className = classList[randomClass];
  
   robotParagraph.classList.add("generated-text");
  
}
  
  
  
function doBoth(){
    
    
    swapClass();
    generateName();
    

  }
  
$('.generate-btn').click(doBoth);
  
});
              
            
!
999px

Console