-
Notifications
You must be signed in to change notification settings - Fork 0
/
builder.min.js
2 lines (2 loc) · 2.1 KB
/
builder.min.js
1
2
/*-- Oshan Shrestha 2017 --*/
function startBuild(){var e=$("body"),t="I am a front-end "+build("a","web-developer","","web")+" and "+build("a",".NET developer","","net")+".";t+="<br>",t+="I live in Kathmandu and I have completed GCE A-levels.",element=build("div",build("div",build("h2","Hello!")+build("h1","I am Oshan.")+build("h3",t),"main"),"landing"),e.html(element),createAttributes(),addCSS()}function build(e,t,n,i){return element=(!n||""===n)&(!i||""===i)?sTag+e+endT+t+eTag+e+endT:i&&""!==i?n&&""!==n?sTag+e+" class ="+n+" id ="+i+endT+t+eTag+e+endT:sTag+e+" id ="+i+endT+t+eTag+e+endT:sTag+e+" class ="+n+endT+t+eTag+e+endT}function createAttributes(){$("#web")[0].setAttributeNode(document.createAttribute("href")),$("#web")[0].setAttributeNode(document.createAttribute("target")),document.getElementById("web").setAttribute("href","https://thisisoshan.github.io/"),$("#net")[0].setAttributeNode(document.createAttribute("href")),$("#web")[0].setAttributeNode(document.createAttribute("target")),document.getElementById("net").setAttribute("href","https://thisisoshan.github.io/v3/"),document.getElementById("net").setAttribute("target","_blank"),document.getElementById("web").setAttribute("target","_blank")}function addCSS(){$("body").css({margin:"0",padding:"0","text-align":"center","user-select":"none"}),$(".landing").css({height:"100%",width:"100%",display:"table",background:"url(img-4.jpg) no-repeat center scroll","background-size":"cover"}),$(".main").css({height:"100%",width:"100%",display:"table-cell","vertical-align":"middle",color:"#fff","font-family":"'Big John', sans-serif"}),$("h1").css({display:"block","font-size":"4rem","text-decoration":"underline",margin:"0"}),$("h3").css({"font-size":"1rem",display:"inline block","font-family":"'Slim Joe', sans-serif"}),$("h2").css({display:"block","font-size":"1.5rem",margin:"0"}),$("html, body").css({height:"100%",width:"100%"}),$("a").css({"padding-bottom":"2px","text-decoration":"none",color:"inherit","border-bottom":"1.75px dotted #fff"})}var element="",tagname="",src="",href="",classes="",content="",sTag="<",eTag="</",endT=">";$(window).on("load",startBuild);