ofcuteboys

The Tutorial Base Code

Dec 31st, 2013
3,923
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.26 KB | None | 0 0
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  3. <head>
  4. <title>{Title}</title>
  5. <link rel="shortcut icon" href="{Favicon}">
  6. <link rel="alternate" type="application/rss+xml" href="{RSS}">
  7. {block:Description}<meta name="description" content="{MetaDescription}"/>{/block:Description}
  8.  
  9. <!---base code by OFCUTEBOYS
  10.  
  11. This is my NOVICE BASE CODE
  12.  
  13. it is for use by beginner theme makers hoping to learn to write code. For this reason, there are extensive comments in the CSS and
  14. some comments in the HTML as well, to indicate what each thing does.
  15.  
  16. Anyone can use this to learn to code, ALMOST no prior knowledge of theme making is necessary. Basic HTML understanding would help you a lot, though! I won't explain every little thing, and this is not me offering to teach everyone to code. However, I am happy to help with any questions that you may have!
  17.  
  18. I hope this can make coding a bit less daunting for those of you who have always wanted to try. That was me a few months ago. It can be really overwhelming at first, but if you put the work in, you will really enjoy it.
  19.  
  20. This base code walks you through the styling and coding of a basic tumblr theme and encourages you to change variables and make it your own.
  21.  
  22. Please remember that this is a base code, and so you MAY remove the credit.
  23.  
  24. HOWEVER: you may only remove the credit in the event that you make significant edits to this code and personalize it. If you do not change it, you may not release it as your own theme.
  25.  
  26. YOU ALSO MAY NOT, UNDER ANY CIRCUMSTANCES, RELEASE THIS AS YOUR OWN BASE CODE.
  27.  
  28. enjoy learning to code! my ask is open if you get stuck.
  29.  
  30. FOR THOSE OF YOU WHO ARE MORE EXPERIENCED CODERS: I will be releasing my expert base code soon, but until then, here are a few people who have base codes:
  31. -alexgaeskarth
  32. -hoenarry
  33. -tinyvagina
  34. -hogwat
  35. --->
  36.  
  37.  
  38. <!---META NAMES: DEFINING THE VARIABLES THAT SHOW UP IN THE STYLE SCREEN--->
  39.  
  40. <meta name="color:background" content="#ffffff"/>
  41. <meta name="color:text" content="#000000"/>
  42. <meta name="color:link" content="#888888"/>
  43. <meta name="color:hover" content="#ffffff"/>
  44. <meta name="color:accent" content="#ffffff"/>
  45.  
  46.  
  47.  
  48. <!---if you want to add a second sidebar image, copy the meta name below and change image:sidebar to image:sidebar2--->
  49.  
  50. <meta name="image:sidebar" content="" />
  51.  
  52. <meta name="text:link1" content="link1"/>
  53. <meta name="text:link1url" content="link 1 url"/>
  54.  
  55. <meta name="text:link2" content="link2"/>
  56. <meta name="text:link2url" content="link 2 url"/>
  57.  
  58. <meta name="text:link3" content="link3"/>
  59. <meta name="text:link3url" content="link 3 url"/>
  60.  
  61. <meta name="text:link4" content="link4"/>
  62. <meta name="text:link4url" content="link 4 url"/>
  63.  
  64. <meta name="text:link5" content="link5"/>
  65. <meta name="text:link5url" content="link 5 url"/>
  66.  
  67.  
  68.  
  69. <!---if you're adding any javascripts, they go here--->
  70.  
  71. <!---If you want to add more links, copy/paste one of the meta names above and change the numbers--->
  72. <style type="text/css">
  73.  
  74. /*---THIS IS WHERE YOUR CSS OR STYLE SHEET BEGINS---*/
  75.  
  76.  
  77.  
  78. /*----STYLING OF THE OVERALL PAGE---*/
  79. body {
  80. background-color:{color:background};
  81. font-family:arial;
  82. font-size:12px;
  83. color:{color:text};
  84. }
  85.  
  86.  
  87.  
  88. /*---change the style of the links---*/
  89. a {
  90. color:{color:link}; /*---text color---*/
  91. text-decoration:none; /*---text decoration e.g. underline, line-through---*/
  92.  
  93. /*---This is what makes it change colors or any other variable over a duration of time---*/
  94. -webkit-transition-duration:.3s; /*---this line makes the transition work for Chrome---*/
  95. -moz-transition-duration:.3s; /*---this line makes it work for Mozilla---*/
  96. -o-transition-duration:.3s; /*---this line makes it work for opera---*/
  97. }
  98.  
  99.  
  100. /*---change what happens to the links when you hover over them--*/
  101. a:hover {
  102. color:{color:hover};
  103. -webkit-transition-duration:.3s;
  104. -moz-transition-duration:.3s;
  105. -o-transition-duration:.3s;
  106. }
  107.  
  108.  
  109. /*---change the style of header text, including Post Titles---*/
  110.  
  111. h1 {
  112. font-size:2em; /*---makes it 2x the size of all other text---*/
  113. font-weight:bold;
  114. letter-spacing:-2px; /*---makes the letters closer together---*/
  115. color:{color:accent};
  116. }
  117.  
  118.  
  119.  
  120. /*---the following variables make it so that the color of bold, italic, emphasized,big, and strong text is the "accent" color.
  121. you may take this out without doing damage to the theme---*/
  122. b {
  123. color:{color:accent};
  124. }
  125.  
  126. i {
  127. color:{color:accent};
  128. }
  129.  
  130. em {
  131. color:{color:accent};
  132. }
  133.  
  134. big {
  135. color:{color:accent};
  136. font-size:2em;
  137. }
  138.  
  139. strong {
  140. color:{color:accent};
  141. }
  142.  
  143.  
  144.  
  145. /*---styles blockquotes (which you put in using the <blockquote></blockquote> tags---*/
  146.  
  147. blockquote {
  148. padding-left:5px;
  149. border-left:2px solid {color:accent};;
  150. }
  151.  
  152. blockquote blockquote {
  153. padding-left:10px;
  154. border-left:2px solid {color:accent};
  155. }
  156.  
  157.  
  158. /*---The following style sheet refers to the title on the side of the blog. You may remove it if you wish---*/
  159.  
  160.  
  161. #fresh {
  162.  
  163. font-family:arial; /*---change the font---*/
  164. font-size:28px; /*---change the font size---*/
  165. color:black; /*--- change the font color ---*/
  166. letter-spacing:-3px; /*---change how close the letters are to each other (lower number=less space between letters)---*/
  167. text-transform:lowercase; /*---makes all text lowercase. can be changed to uppercase or none---*/
  168. font-weight:bold;
  169. -webkit-transition-duration:1s;
  170. -moz-transition-duration:1s;
  171. -o-transition-duration:1s;
  172. }
  173.  
  174. #fresh a {
  175. color:black;/*--- this is so that when your title is a link to your home page, it still is black text---*/
  176. -webkit-transition-duration:1s;
  177. -moz-transition-duration:1s;
  178. -o-transition-duration:1s;
  179. }
  180.  
  181. #fresh a:hover {
  182. color:{color:accent}; /*---this makes it so that when you hover over the title, the text turns the color of the accent color---*/
  183. -webkit-transition-duration:1s;
  184. -moz-transition-duration:1s;
  185. -o-transition-duration:1s;
  186. }
  187.  
  188. /*---You need the transitions under #fresh, #fresh a, and #fresh a:hover so that it glides when you hover and then
  189. glides back into place---*/
  190.  
  191.  
  192. /*---SIDEBAR---*/
  193. #sidebar {
  194. width:300px;/*---change the width of the sidebar---*/
  195. height:200px;/*---change the height of the sidebar---*/
  196. margin-left:200px;/*---move it left or right (lowering the number moves it left)---*/
  197. margin-top:120px; /*---move it up or down (lowering the number moves it up---*/
  198. position:fixed; /*---this is so that it stays in place when you scroll down---*/
  199. }
  200.  
  201. #sidebarimage /*---this is the block where the sidebar image goes---*/ {
  202. width:150px;
  203.  
  204.  
  205. }
  206.  
  207. #sidebarimage img {
  208. /*---this is the styling of the actual image---*/
  209. width:150px; /*---change the width: lower number makes it smaller---*/
  210. border:4px black solid; /*---change or remove the border around the sidebar image. The border can have any weight (change 4px
  211. to another number, higher=thicker), can be any color (change black), and can be different textures (change solid to dashed,
  212. double, or dotted)---*/
  213. }
  214.  
  215. #desc {
  216. /*---this is the styling of the description---*/
  217. width:155px; /*---change the width of the description---*/
  218. margin-top:15px; /*---defines the distance between the description and the links---*/
  219. color:black; /*---change the text color---*/
  220. text-align:justify; /*---change the text alignment---*/
  221. font-family:arial; /*---change the font---*/
  222. font-size:10px; /*---change the font size---*/
  223. font-weight:bold; /*---can be bold or normal---*/
  224. }
  225.  
  226.  
  227. #links {
  228. width:150px;
  229. word-spacing:2px; /*---change to separate words more or less: higher number=more separation---*/
  230. display:inline-block; /*---makes it so they are each their own button. if you add a border, for example, each word will have
  231. a border around it---*/
  232. font-family:arial;
  233. text-align:center; /*---change the text alignment---*/
  234. font-size:13px;
  235. padding:2px; /*---padding makes it so that the text is not smushed against the edges of the div. add more padding to put more
  236. space between text and the edge of the div---*/
  237. font-weight:bold;
  238. margin-top:10px; /*---change the distance between the links and the sidebar image---*/
  239. color:black;
  240. letter-spacing:-1px;/*--- change the space between the letters ---*/
  241. text-transform:lowercase; /*---makes all text lowercase. can also be "uppercase" or "none"---*/
  242. }
  243.  
  244.  
  245. #links a {
  246. color:{color:links}; /*---assigns the meta name color of links to the links in the sidebar---*/
  247. }
  248.  
  249.  
  250. #links a:hover {
  251. background-color:{color:accent}; /*---the space behind the word turns the color of the accent when hovered over---*/
  252. -webkit-transition-duration:.5s;
  253. -moz-transition-duration::.5s;
  254. -o-transition-duration:.5s;
  255. /*---change .5s to any number of seconds. Higher number=longer transition---*/
  256. }
  257.  
  258. #postcontainer {
  259.  
  260. /*---defines the area where the posts will go. use this to move posts up/down and left/right---*/
  261. margin-left:450px;
  262. margin-top:50px;
  263. width:550px;
  264. }
  265.  
  266. #post {
  267.  
  268. /*---this is the styling of each individual post---*/
  269. text-align:left;
  270. width:500px;
  271. padding:5px;
  272. }
  273.  
  274. .asker {
  275. /*---this is the styling of the NAME of the person who sent the message in ANSWER posts---*/
  276. background-color:{color:hover};
  277. border-bottom:4px solid {color:accent};
  278. width:100%;
  279. text-align:left;
  280. padding:5px;
  281. font-family:arial;
  282. font-size:16px;
  283. color:black;
  284. letter-spacing:-1px;
  285. text-transform:lowercase;
  286. font-weight:bold;
  287. }
  288.  
  289.  
  290. .asker a {
  291. border:none;
  292. }
  293. .question {
  294. background-color:{color:link};
  295. border-bottom:6px double {color:hover};
  296. color:white;
  297. width:100%; /*---sets the width of the question to 100% of the post width---*/
  298. padding:5px;
  299. font-family:arial;
  300. text-align:center;
  301. font-size:14px;
  302. min-height:20px;/*---makes it so that the question box is at least 20px large. it can be more if necessary, the
  303. computer will do that automatically---*/
  304. font-style:italic;
  305.  
  306. }
  307.  
  308. .reply {
  309. /*---styling for your response to the question---*/
  310. border-bottom:4px solid black;
  311. padding:5px;
  312. font-size:12px;
  313. font-weight:bold;
  314. }
  315.  
  316.  
  317.  
  318. /*---styling for the post information e.g. tags, date posted, notes---*/
  319. #info {
  320. margin-top:10px; /*---distance from bottom of post---*/
  321. font-size:9px;
  322. color:white; /*---color of text---*/
  323. background-color:black; /*---color of the whole block---*/
  324. padding-top:7px;
  325. padding-bottom:7px;
  326. text-align:center;
  327. width:100%;
  328. }
  329.  
  330. #info a {
  331. color:white;
  332. font-weight:bold;
  333. font-size:10px;
  334. }
  335.  
  336.  
  337. /*---makes it so that when you highlight text, the highlight is the color of your accent. anything that you put under ::selection
  338. will occur when text/images are selected---*/
  339. ::selection {
  340. background-color:{color:accent};
  341. }
  342.  
  343.  
  344.  
  345.  
  346. /*--STYLE YOUR CREDIT HERE--*/
  347. #cred {
  348. bottom:3px; /*---distance from the bottom of the page (higher number=higher up on the page---*/
  349. position:fixed; /*---doesn't move when you scroll---*/
  350. right:10px; /*---distance from the right of the page. Higher number=further left---*/
  351. float:right; /*---makes it so that no matter the size of the screen, the credit will always be in the right corner---*/
  352. font-family:arial;
  353. font-weight:bold;
  354. color:black;
  355. font-size:20px;
  356. letter-spacing:-2px;
  357. text-transform:lowercase;
  358. }
  359.  
  360. #cred a {
  361. color:black;
  362. }
  363.  
  364. #cred a:hover {
  365. color:{color:accent};
  366. }
  367.  
  368. /*---IF YOU WANT HOVER INFO, THIS IS THE CSS YOU USE INSTEAD OF THE #info ABOVE---
  369.  
  370. #info {
  371. font-size:9px;
  372. text-align:center;
  373. opacity:0;
  374. width:100%;
  375.  
  376. #post:hover #info {
  377. opacity:1;
  378. -webkit-transition-duration:1s;
  379. -o-transition-duration:1s;
  380. -moz-transition-duration:1s;
  381. }
  382.  
  383.  
  384. in order to use this code, first delete #info from above, then remove these comments---*/
  385.  
  386.  
  387. /*---styling the pagination---*/
  388. #pagi {
  389. margin-top:20px; /*---change its distance from the description---*/
  390. }
  391.  
  392. .jump_page {
  393. /*---style the box that allows you to jump pages---*/
  394. padding: 4px 8px; /*---don't mess with this please---*/
  395. border: 2px solid #888; /*---change the size/color/type of the border around the box---*/
  396. background-color: #fff; /*---change the background color of each box---*/
  397. color:#555; /*---change the text color---*/
  398. font-family:century gothic; /*---change the font---*/
  399. font-size:11px;
  400. text-decoration:none; /*---could be underline or line-through, for example---*/
  401. }
  402.  
  403. .current_page, .jump_page:hover {
  404.  
  405. /*---this is the styling of the box for the page that you're currently visiting---*/
  406. padding: 4px 8px;
  407. border: 2px solid #aaa; /*---change the border size/color/type---*/
  408. background-color: #ddd; /*---change the background color---*/
  409. color: #fff;/*---change the text color---*/
  410. font-family:century gothic; /*---change the font---*/
  411. font-size:11px;
  412. text-decoration:none;
  413. }
  414.  
  415. /*---styling for photosets---*/
  416. .photoset {
  417. border:5px #ccc double;/*---puts a border around a photoset. can be removed without damaging the theme---*/
  418. -webkit-transition-duration:1s;
  419. -moz-transition-duration:1s;
  420. -o-transition-duration:1s;
  421. }
  422.  
  423.  
  424. /*---SOMETHING NOT WORKING?
  425.  
  426. I'm more than happy to help you, but make sure to read these tips first:
  427.  
  428. -make sure you didn't forget a ; at the end of a section of css
  429. -make sure that the css goes variable:defined-thing; and not variable;defined-thing:
  430. -if you're using scripts, make sure that the "" marks are green and not white. the white ones do not work
  431. -if your transitions are slow on hover and then snap back into place, add a transition on the original element
  432. -if the posts are suddenly not in their container, you closed a div that you shouldn't have. Just delete one </div> until it works
  433.  
  434. if none of those things help you or you have a different question, you are free to ask me. I am always here to help!
  435.  
  436. ---*/
  437.  
  438.  
  439.  
  440.  
  441.  
  442. </style>
  443.  
  444. </head>
  445. <body>
  446.  
  447. <!---THIS IS WHERE YOU CODE THE ACTUAL CONTENT OF YOUR THEME--->
  448.  
  449.  
  450. <!---everything inside of div id="sidebar" is in your sidebar--->
  451.  
  452. <div id="sidebar">
  453. <div id="fresh"><a href="/">{Title}.</a></div> <!---the title--->
  454.  
  455. <div id="sidebarimage"> <!---the sidebar image container--->
  456.  
  457. <img src="{image:sidebar}"> <!---the sidebar image--->
  458.  
  459. </div> <!---closes the sidebar image container--->
  460.  
  461. <div id="links"> <!---the text below are your side links--->
  462. <a href="{text:link1url}">{text:link1}</a>
  463. <a href="{text:link2url}">{text:link2}</a>
  464. <a href="{text:link3url}">{text:link3}</a>
  465. <a href="{text:link4url}">{text:link4}</a>
  466. <a href="{text:link5url}">{text:link5}</a>
  467.  
  468.  
  469. </div><!---closes the links--->
  470. <div id="desc">{Description}</div><!---the description (open, description, close)--->
  471.  
  472.  
  473.  
  474. <!---PAGINATION--->
  475.  
  476. <div id="pagi">
  477. {block:Pagination}
  478. {block:PreviousPage}<a href="{PreviousPage}" class="jump_page">&laquo;</a>{/block:PreviousPage}
  479. {block:JumpPagination length="5"}
  480. {block:CurrentPage}<span class="current_page">{PageNumber}</span>{/block:CurrentPage}
  481. {block:JumpPage}<a class="jump_page" href="{URL}">{PageNumber}</a>{/block:JumpPage}{/block:JumpPagination}
  482. {block:NextPage}<a href="{NextPage}" class="jump_page">&raquo;</a>{/block:NextPage}
  483. {/block:Pagination}
  484. </div><!---closes div id="pagi"---></div><!---closes the sidebar--->
  485.  
  486. <!---THIS IS WHERE THE POSTS GO--->
  487.  
  488.  
  489. <div id="postcontainer">
  490. <!---the posts go in here--->
  491. {block:Posts}
  492. <div id="post">
  493. <!---TEXT POSTS--->
  494. {block:Text}{block:Title}<h1>{Title}</h1>{/block:Title}{Body}{/block:Text}
  495.  
  496. <!---PHOTO POSTS--->
  497.  
  498. {block:Photo}{LinkOpenTag}<center><img src="{PhotoURL-500}" width="500px"></center>{block:Caption}{Caption}{/block:Caption}{/block:Photo}
  499.  
  500. <!---PHOTOSETS--->
  501.  
  502. {block:Photoset}
  503. <div class="photoset">{Photoset-500}</div>{block:Caption}{Caption}{/block:Caption}{/block:Photoset}
  504.  
  505. <!---VIDEO POSTS--->
  506.  
  507. {block:Video}{Video-500}{block:Caption}{Caption}{/block:Caption}{/block:Video}
  508.  
  509. <!---AUDIO POSTS--->
  510.  
  511. {block:Audio}{AudioPlayerWhite}{block:Caption}{Caption}{/block:Caption}{/block:Audio}
  512.  
  513. <!---QUOTE POSTS--->
  514.  
  515. {block:Quote}{Quote}{block:Source}-{Source}{/block:Source}{/block:Quote}
  516.  
  517. <!---LINK POSTS--->
  518.  
  519. {block:Link}<h1><a href="{URL}" {Target}>{Name}</h1></a>{block:Description}{Description}{/block:Description}{/block:Link}
  520.  
  521. <!---ANSWER POSTS--->
  522.  
  523. {block:Answer}
  524. <div class="asker">
  525. {Asker} whispered . . .</div><div class="question">{Question}</div>
  526. <div class="reply">
  527. {Answer}</div>
  528. {/block:Answer}
  529.  
  530. <!---CHAT POSTS--->
  531.  
  532. {block:Chat}{block:Title}<h1>{Title}</h1>{/block:Title}{block:Lines}{block:Label}{Label}{/block:Label}{Line}{/block:Lines}{/block:Chat}
  533.  
  534. <div id="info">
  535. <!---POST INFO--->
  536. posted <a href="{Permalink}">{DayOfWeek} {MonthNumber}/{DayOfMonth}/{Year}</a> at {Time}
  537. with <a href="{Permalink}">{NoteCountWithLabel}</a>
  538. {block:RebloggedFrom}<a href="{ReblogParentURL}">via</a> & {/block:RebloggedFrom} {block:ContentSource}<a href="{SourceURL}"> source <a href="{SourceURL}"></a>{/block:ContentSource}{/block:RebloggedFrom}
  539. <br>
  540. {block:HasTags}filed: <i>{block:Tags}<a href="{TagURL}">{Tag}, </a>{/block:Tags}{/block:HasTags}</i>
  541. </div></div>
  542. {/block:Posts}</div>
  543.  
  544.  
  545. <!---theme maker credit, feel free to change it to your own if you've made significant edits!--->
  546. <div id="cred"><a href="http://ofcuteboys.tumblr.com/"><!---the link address of the credit (aka where you want the link to go)--->
  547. ofcuteboys<!---the text of the credit that shows up on your blog--->
  548. </a></div>
  549.  
  550.  
  551. </body>
  552. <!---if you wanted to add a pop up ask box, you would want to put that in here--->
  553. </html>
Advertisement
Add Comment
Please, Sign In to add comment