Advertisement
adeptus

neocities layout

Nov 22nd, 2022 (edited)
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.73 KB | None | 0 0
  1. <div id="container">
  2. <div id="headerArea">
  3. <div id="header" style="height: 50px; margin-bottom: 0px;"></div>
  4.  
  5. </div>
  6.  
  7. <div id="flex">
  8. <aside id="leftSidebar" style="margin-right: 0px;">
  9. <h2>Updates</h2>
  10. <div class="box">
  11. <p>I have recently updated this tool as of August 2022!</p>
  12. <ul style="padding-left:10px;">
  13. <li>Rewrote the JS to generate cleaner code</li>
  14. <li>Rewrote the CSS in a way that hopefully makes much more sense to edit</li>
  15. <li>Added a couple of new features!</li>
  16. <li>Old version is still available <a href="old.html" target="_blank">here</a></li>
  17. </ul>
  18. </div>
  19. <h2>Hi there!</h2>
  20. <p>Do you have a suggestion for a feature? Some criticism about the tool or something that confused you? Let me know! sadgrl[at]riseup.net</p>
  21. <h3>Other Tools</h3>
  22. <ul>
  23. <li><a href="https://sadgrlonline.github.io/html-cheatsheet/" target="_blank">HTML Cheatsheet</a>
  24. </li><li><a href="https://sadgrl.online/webmastery/webmaster-links.html" target="_blank">Webmaster Links</a></li>
  25. <li><a href="https://sadgrl.online/webmastery/downloads/tiledbgs.html" target="_blank">Tiled BGs</a></li>
  26. <li><a href="https://sadgrl.online/webmastery/downloads/fonts.html" target="_blank">Fonts</a></li>
  27. <li><a href="https://sadgrl.online/projects/ideas/" target="_blank">Site Ideas</a></li>
  28. </ul>
  29. </aside>
  30. <main>
  31. <h1>Welcome to my Layout Maker!</h1>
  32. <p><strong>Please read this first!</strong></p>
  33. <p>This tool generates a layout that is responsive, which means it looks great on phones! Use dropdowns above to customize your layout's general features. Click the button to generate your HTML and CSS, and paste it into a file on Neocities.</p>
  34. <p>Then you can replace all of the text with your own. For more customization, the CSS code has comments to explain what each part changes. Please read through the code - even if you have no idea what it means.</p>
  35. <p>If you're feeling up for a challenge, I put together <a href="https://learn.sadgrl.online/understanding-tweaking-my-layout-maker/" target="_blank">a guide</a> which goes over the structure of how this layout is built, along with some specific tips on how to edit it in certain ways.</p>
  36. <p>Check the links in the sidebar for more resources to build your own website!</p>
  37.  
  38. <p> - Cat Ipsum - </p>
  39. <p>Rub my belly hiss swipe at owner's legs sniff catnip and act crazy growl at dogs in my sleep sit on the laptop for hiss at vacuum cleaner i like to spend my days sleeping and eating fishes that my human fished for me.</p>
  40.  
  41. <p>Head nudges eat my own ears. Hey! you there, with the hands why can't i catch that stupid red dot, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff, or roll over and sun my belly curl up and sleep on the freshly laundered towels.</p>
  42.  
  43.  
  44. </main>
  45.  
  46. </div>
  47.  
  48. </div>
  49. <!-- THIS IS THE CSS !-->
  50. <style>
  51. /* user styles */
  52.  
  53. /* styles are what change the color and sizes of stuff on your site. */
  54.  
  55. /* these are variables that are being used in the code
  56. these tended to confuse some people, so I only kept
  57. the images as variables */
  58.  
  59. :root {
  60. --header-image: url('https://sadhost.neocities.org/images/layouts/wp.jpeg');
  61. --body-bg-image: url('https://sadhost.neocities.org/images/tiles/purplesky.gif');
  62.  
  63. /* colors */
  64. --content: #43256E;
  65. }
  66.  
  67. /* if you have the URL of a font, you can set it below */
  68. /* feel free to delete this if it's not your vibe */
  69.  
  70. /* this seems like a lot for just one font and I would have to agree
  71. but I wanted to include an example of how to include a custom font.
  72. If you download a font file you can upload it onto your Neocities
  73. and then link it! Many fonts have separate files for each style
  74. (bold, italic, etc. T_T) which is why there are so many!
  75.  
  76. */
  77.  
  78. @font-face {
  79. font-family: Nunito;
  80. src: url('https://sadhost.neocities.org/fonts/Nunito-Regular.ttf');
  81. }
  82.  
  83. @font-face {
  84. font-family: Nunito;
  85. src: url('https://sadhost.neocities.org/fonts/Nunito-Bold.ttf');
  86. font-weight: bold;
  87. }
  88.  
  89. @font-face {
  90. font-family: Nunito;
  91. src: url('https://sadhost.neocities.org/fonts/Nunito-Italic.ttf');
  92. font-style: italic;
  93. }
  94.  
  95. @font-face {
  96. font-family: Nunito;
  97. src: url('https://sadhost.neocities.org/fonts/Nunito-BoldItalic.ttf');
  98. font-style: italic;
  99. font-weight: bold;
  100. }
  101.  
  102. body {
  103. font-family: 'Nunito', sans-serif;
  104. margin: 0;
  105. background-color: #08031A;
  106. /* you can delete the line below if you'd prefer to not use an image */
  107. background-size: 65px;
  108. color: #fceaff;
  109. background-image: var(--body-bg-image);
  110. }
  111.  
  112. * {
  113. box-sizing: border-box;
  114. }
  115.  
  116. /* below this line is CSS for the layout */
  117.  
  118. /* this is a CSS comment
  119. to uncomment a line of CSS, remove the * and the /
  120. before and after the text */
  121.  
  122.  
  123. /* the "container" is what wraps your entire website */
  124. /* if you want something (like the header) to be Wider than
  125. the other elements, you will need to move that div outside
  126. of the container */
  127. #container {
  128. max-width: 900px;
  129. /* this is the width of your layout! */
  130. /* if you change the above value, scroll to the bottom
  131. and change the media query according to the comment! */
  132. margin: 0 auto;
  133. /* this centers the entire page */
  134. }
  135.  
  136. /* the area below is for all links on your page
  137. EXCEPT for the navigation */
  138. #container a {
  139. color: #ED64F5;
  140. font-weight: bold;
  141. /* if you want to remove the underline
  142. you can add a line below here that says:
  143. text-decoration:none; */
  144. }
  145.  
  146. #header {
  147. width: 100%;
  148. background-color: #5e4e8c;
  149. /* header color here! */
  150. height: 150px;
  151. /* this is only for a background image! */
  152. /* if you want to put images IN the header,
  153. you can add them directly to the <div id="header"></div> element! */
  154. background-image: var(--header-image);
  155. background-size: 100%;
  156. }
  157.  
  158. /* navigation section!! */
  159. #navbar {
  160. height: 40px;
  161. background-color: #13092D;
  162. /* navbar color */
  163. width: 100%;
  164. }
  165.  
  166. #navbar ul {
  167. display: flex;
  168. padding: 0;
  169. margin: 0;
  170. list-style-type: none;
  171. justify-content: space-evenly;
  172. }
  173.  
  174. #navbar li {
  175. padding-top: 10px;
  176. }
  177.  
  178. /* navigation links*/
  179. #navbar li a {
  180. color: #ED64F5;
  181. /* navbar text color */
  182. font-weight: 800;
  183. text-decoration: none;
  184. /* this removes the underline */
  185. }
  186.  
  187. /* navigation link when a link is hovered over */
  188. #navbar li a:hover {
  189. color: #a49cba;
  190. text-decoration: underline;
  191. }
  192.  
  193. #flex {
  194. display: flex;
  195. }
  196.  
  197. /* this colors BOTH sidebars
  198. if you want to style them separately,
  199. create styles for #leftSidebar and #rightSidebar */
  200. aside {
  201. background-color: #241445;
  202. width: 200px;
  203. padding: 20px;
  204. font-size: smaller;
  205. /* this makes the sidebar text slightly smaller */
  206. }
  207.  
  208.  
  209. /* this is the color of the main content area,
  210. between the sidebars! */
  211. main {
  212. background-color: #43256E;
  213. flex: 1;
  214. padding: 20px;
  215. order: 2;
  216. }
  217.  
  218. /* what's this "order" stuff about??
  219. allow me to explain!
  220. if you're using both sidebars, the "order" value
  221. tells the CSS the order in which to display them.
  222. left sidebar is 1, content is 2, and right sidebar is 3! */
  223.  
  224. */ #leftSidebar {
  225. order: 1;
  226. }
  227.  
  228. #rightSidebar {
  229. order: 3;
  230. }
  231.  
  232. footer {
  233. background-color: #13092D;
  234. /* background color for footer */
  235. width: 100%;
  236. height: 40px;
  237. padding: 10px;
  238. text-align: center;
  239. /* this centers the footer text */
  240. }
  241.  
  242. h1,
  243. h2,
  244. h3 {
  245. color: #ED64F5;
  246. }
  247.  
  248. h1 {
  249. font-size: 25px;
  250. }
  251.  
  252. strong {
  253. /* this styles bold text */
  254. color: #ED64F5;
  255. }
  256.  
  257. /* this is just a cool box, it's the darker colored one */
  258. .box {
  259. background-color: #13092D;
  260. border: 1px solid #ED64F5;
  261. padding: 10px;
  262. }
  263.  
  264. /* CSS for extras */
  265.  
  266. #topBar {
  267. width: 100%;
  268. height: 30px;
  269. padding: 10px;
  270. font-size: smaller;
  271. background-color: #13092D;
  272. }
  273.  
  274.  
  275. /* BELOW THIS POINT IS MEDIA QUERY */
  276.  
  277. /* so you wanna change the width of your page?
  278. by default, the container width is 900px.
  279. in order to keep things responsive, take your new height,
  280. and then subtrack it by 100. use this new number as the
  281. "max-width" value below
  282. */
  283.  
  284. @media only screen and (max-width: 800px) {
  285. #flex {
  286. flex-wrap: wrap;
  287. }
  288.  
  289. aside {
  290. width: 100%;
  291. }
  292.  
  293. /* the order of the items is adjusted here for responsiveness!
  294. since the sidebars would be too small on a mobile device.
  295. feel free to play around with the order!
  296. */
  297. main {
  298. order: 1;
  299. }
  300.  
  301. #leftSidebar {
  302. order: 2;
  303. }
  304.  
  305. #rightSidebar {
  306. order: 3;
  307. }
  308.  
  309. #navbar ul {
  310. flex-wrap: wrap;
  311. }
  312. }
  313. </style>
  314.  
  315.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement