diff options
| -rw-r--r-- | .env-sample | 6 | ||||
| -rw-r--r-- | fortune/hoots | 43 | ||||
| -rw-r--r-- | fortune/keywords | 25 | ||||
| -rw-r--r-- | fortune/mail-verbs | 114 | ||||
| -rw-r--r-- | fortune/subjects | 92 | ||||
| -rw-r--r-- | fortune/titles | 404 | ||||
| -rw-r--r-- | lib/bucky.js | 46 | ||||
| -rw-r--r-- | lib/db/index.js | 29 | ||||
| -rw-r--r-- | lib/fortune.js | 28 | ||||
| -rw-r--r-- | lib/index.js | 47 | ||||
| -rw-r--r-- | lib/middleware.js | 1 | ||||
| -rw-r--r-- | public/assets/css/bucky.css | 24 | ||||
| -rw-r--r-- | views/pages/index.ejs | 12 | ||||
| -rw-r--r-- | views/pages/login.ejs | 21 | ||||
| -rw-r--r-- | views/partials/header.ejs | 4 | ||||
| -rw-r--r-- | views/partials/login.ejs | 18 |
16 files changed, 871 insertions, 43 deletions
diff --git a/.env-sample b/.env-sample new file mode 100644 index 0000000..4a57345 --- /dev/null +++ b/.env-sample @@ -0,0 +1,6 @@ +DB_HOST=localhost +DB_NAME= +DB_USER= +DB_PASS= +HOST_NAME=lvh.me + diff --git a/fortune/hoots b/fortune/hoots new file mode 100644 index 0000000..5b3c7db --- /dev/null +++ b/fortune/hoots @@ -0,0 +1,43 @@ +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +hoot +H00T +CRAP +hiss +loop +slap +jape +ping +hrmm +allo +yoyo +heyyy +whaa +yooo +hiii +purr +cool +yes! +oyez +word +damn +sing +melt +bark +sup?! +omggg +reee diff --git a/fortune/keywords b/fortune/keywords new file mode 100644 index 0000000..0ef4a8f --- /dev/null +++ b/fortune/keywords @@ -0,0 +1,25 @@ +assorted +bric-a-brac +capers +divers +excellent +fetes +gaffles +hearsay +intro +japes +kestrels +laughter +mumbly +noisome +operate +patter +quips +rattles +scamps +tender +ursine +volleys +whims +xerxes +yappin diff --git a/fortune/mail-verbs b/fortune/mail-verbs new file mode 100644 index 0000000..f369708 --- /dev/null +++ b/fortune/mail-verbs @@ -0,0 +1,114 @@ +wrote +pondered +had this to share +softly sobbed +whispered +mumbled +furiously typed +tapped out this missive +chuckled +quacked +snapped +cooed +blubbered +screamed +yakked +puzzled +cerebrated +hummed +gulped +shuddered +sang (albeit off-key) +babbled +angrily masturbated +chowdered +railed +puffed +framed the discourse thus +guffawed +gandered +calqued +squirted +belched +farted from a clarinet +glitter-painted +poked +prodded +smoldered +imperceptibly crossfaded +nailed it +calloued +scampered +unzipped +scoffed +imagined if... +suggested +insisted +had this to say... +celebrated +rejoiced +delighted +gamboled +wagered +unfurled +dredged this up +boffed +tinkled +pissed this in a snowdrift +burned this into the lawn +crocheted +charged +smiled +caught a whiff +looped it like this +was the first to sample +canoodled +carped +purred +pumped a fist +sweated this out +delivered the masterstroke +parried +jingled her keys +committed to bits +spurted +shot off +dared to dream +broke it down thusly +called out +hammered it home +raised eyebrows and turned heads +sassed +said it loud +made a limited run of t-shirts stating +coopted us all +thought this sounded brilliant +grepped and egrepped +squawked +went hoarse +semaphored +scryed +coughed +gibbered +palavered +got out the glue and fiskars +deftly soloed through the talkbox +whipped you at snooker +said something way funnier +flexed that cosmic wit +said it... in a song +lassoed a cold one +passed out on your lawn +crossed picket lines to say +minged up the div +forwarded this spam +accidentally rapped +copped it +snuffed it +ripped it up +dorked it up +flapped and squawked +rang off +pulled a tiny bell from a pocket and struck it with an equally tiny hammer +thought you were someone else +went deaf (so whisper) diff --git a/fortune/subjects b/fortune/subjects new file mode 100644 index 0000000..ce1c751 --- /dev/null +++ b/fortune/subjects @@ -0,0 +1,92 @@ +ATTN: duder patrol +honk honk honk honk honk +allo dere chuzzlewit +hey there my friend! +a word with you sir... +listen my friend! +attention good fellow +my good fellow! +hello there good fellow! +greetings +good fellow! +hiya!!!!!!!!!!!!!!!!!!!!!!!!!1 +CRUSH ALL BOXES +dingalingaling ice cream shop +still stuck in castro valley +the dream ticket? +yo why your drugs cost so much +you gotta tivo this +this week at the asian art museum +let's all join my confidential mailing list +how i lost my hand but found myself +check out these phat links and more +ask first before forwarding +bumpy weather over newark +this other bbs i really recommend... +You're Invited! +The Folly of the Wrong Religion: an email fable +Dear Internet... +ALERT THE BLOGOSPHERE: Day of Action! +underaged raves this weekend... +HELP: missing adobe suite disc 2 +URGENT: you're fired +biscuits and jam for elevensies? +TAKIN' THE PLUNGE!!!!!!!!!! +read this email first and delete the one i just sent +footbag championship rankings +101 uses for hotel soaps +help: st. albert still in can +hooray!!! i quit my dumb job +ATTN: run your own damn aids marathon +SIGHTING: a motley rabble of saucy buckys +1 2 3 4 i declare a SLUM WAR +NO NO YOU'RE DOING IT ALL WRONG +TONIGHT: coked up mashup slobz +now here's an amusing anecdote ... +two eggs, sunny side up, if you would +now it's all off kilter +Re: our ongoing email palaver +protein spill on the wedway +you are so busted +THIS SATURDAY: It's a happening! +my ongoing hard drive debacle +about your last post... +that last post rocked! +shocking ellipsis abuse +YOU'RE AT RISK +STOP HITTING RELOAD +you got anymore of that expired cipro? +HELP: your spice rub up my nose +Let's Collaborate! +best tack down the quartz lock, there +the blue krullers always contain strychnine +moohaHAHahahahaHAHAHAhahahaha +earthquake prevention guide +NASCAR BLOWOUT! +good lord you're shitting me +you're the best! +lil' bow wow's romantic entanglements +Oxford Bible Stall Presents... +~the pleasure of my company~ +This way to the Collaboratory... +100 layer limit, buddy +lentigo neath my pygal scute +god bless you, magic man +might this joint grace your next mixtape? +need help this weekend (NOT a surprise party) +LET'S PLAY GUITAR AND SMOKE WEED +New hypothetical skateboard moves.. +Needed -- your editorial guidance! +hove in the clewlines and buntlines-- +songbird, songbird, tweet me a tune +abort, retry, ignore, fail +with enough marmalade, we could rule this town +a fine idea, just give it a name! +i've been planning this a long time.. +now is the fatal hour +get on the horn! +FOR YOUR EYES ONLY +just 4 fun +tell me NOW! +have you heard the word? +it's all the talk downtown diff --git a/fortune/titles b/fortune/titles new file mode 100644 index 0000000..4c17138 --- /dev/null +++ b/fortune/titles @@ -0,0 +1,404 @@ +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +welcome to bucky +buckybuckybucky +bucky welcomes you, duder +bucky sez go! +bucky is already up +who's rapping at bucky's chamber door? +bucky's unkempt vermillion toupee +bucky's false tooth conceals a tiny camera +bucky's markov chain codes it up +bucky's at it again, folks +crepe-paper bucky on parade +special agent B.U.C.K.Y. +bucky versus the board of education +bucky's pluck and chuckle +bucky's dipswitch +bucky the apostate +bucky's last stand +bucky saves the day +bucky carries the torch +bucky's heathen embrace +of course, bucky +bucky's interminable scronk +buckysol triglyceride +bucky is praying with you +¡viva el bucky! +bucky's requiem +bucky's boss key +bucky's toot ensemble +buckminster memorial orchestra +bucky's on TOUR! +bucky's pouch of guilders +trapped in bucky's orbit! +bucky's tooth decay +bucky's layering up +is that a bucky i espy...? +bucky's big day +bucky's 12 inch dance remix +bucky on stage +insert BUCKY here +play twice before hooting +in the city of chuck bucky chuck +bucky's entire planet +just another bucky occasion +bucky's high altitude context +formidable, bucky +avast, ye buckaneers! +bucky's chitinous carapace +bucky's catering gig +bucky transcends spacetime +cave in to bucky +the lore of bucky +the philosopher's bucky +buckoelocanth beneath the boat +bucky's near miss +never without my bucky +bucky gives an earful +bucky bisects the lightcone +oh bucky oh bucky oh +pork blood & bucky +bucky's byzantine api +bucky's microbrew +bucky's short sell +bucky's methodical ambient +bucky's tracker index +bucky bakes on +bucky sez HELLAY! +bucky welcomes you +bucky's hollowpoint casings +bucky is high as a kite +bucky whittles on +what's next, bucky? +bucky's brackish landlady +drip dry, bucky +bucky's powdered donette stash +bucky's snack pack +bucky's varicose veins +bucky's cave-in thriller +bucky, is it forever true? +bucky's marsupial habits +but for a bucky... +bucky's polygraph results +bucky's pitch and yaw +bucky's catalogue of heresiarchs +bucky beats the system +bucky's bicameral parliament +bucky's conic section +bucky beneath the sea +bucky's vestigal gills +starring bucky! +fuel-efficient bucky bulbs +bucky's ruffled tarpaulin +buckminister polyhedra +bucky's paused at the best part +bucky becomes self-aware +bucky's flash hernia +i crown thee bucky +bucky's rhyming slang +pucker up, bucky +bucky's out for a smoke +slowly, bucky ages +bucky's fun to say +bumble, bucky +bucky vs. mr. yuck +did you eat all the peanut butter, bucky? +thinking of bucky +buckus buckus +sorgham, rose, and bucky +bucky's secret ingredient +ivory, bone & bucky +bucky's utmost grace +bucky's innate disposition +goggle-moggle, bucky +bucky's compass reels +besmeared with cold cream, bucky suns +bucky's vertiginous enfilade +bucky's hesychasm attachment +bucky's polar telomeres +bucky's escape from the red planet +keep your head, buckaroo! +bucky ho! +where are we going, bucky? +bucky's failed nation state +bucky relinquishes control +bucky's strange growth is gone +bucky's back in town +bucky gets over the trauma +the last bucky +bucky puts a period on it +bucky's last-minute bake sale +bucky's hollering and carrying on +bucky's lurid picture scroll +having a good time, bucky? +the day that bucky sailed to the moon +H.M.S. BUCKY +bucky's siesta beneath a yew +suddenly, a miniature bucky! +bucky goes a-courting +bucky live, direct to two-track +bucky will take care of that coffee cake +bucky's deadly orchestra hit +bucky, steady before the knife +how is bucky going to squeeze out of this one? +bucky must be sewn in +subtotal 300 BUCKS (plus tax and tip) +bucky's sql injection +the bucky's that be +bucky's disc of covers +bucky's disingenuous sleeve notes +bucky dies young +that bucky not made with hands +bucky's convivial cordial +how's it goin', buckster? +bucky collapses time +bucky japes causality +roast bucky, sauteed in spirits +i qi buc ng ky +adipose bucky on stairs +bucky contemplates his escape +bucky runs out of time +spilling from the holes in bucky's pockets +your bucky is our clearest glass +small arrows point at bucky's scalp +demonstratively bucky +bucky films his long shot +from now on it's all up to bucky +bucky scans the dial +bucky's lingering overtones +bucky frequencies redound +selkirk's paper-thin testament in bucky's vest +it's not up to you, bucky +bucky, on the sly +bucky is here for your soul +bucky is in favor of baryonic matter +bucky's top spin rate consumes the pith +bucky fractures bedrock +oh bucky, you'll be the death of me +bucky's hagiofern astrochasm +bucky's buckies buckied buckingly +bucky's selkie bride +bucky's phrygian landscape +bucky fails to account for angular momentum +a bucket of unguent upended over bucky +bucky lights out for the territories +a new career awaits you, bucky +bucky gets the gong +not a presbyter, but bucky +bucky's subtle influence repercusses +bucky looms over the mountains +bucky is happy to be of service +bucky folds his stripey sweater +bucky perplexes the experts +bucky, and it's all for you! +bucky's flaxseed phantasy +bucky bobs about town +bucky's japanese adventure +bucky's stuck in traffic +bucky floats above it all +bucky's blurry barcode +sweat as bucky skims the roster +bucky gets his own room +bucky's attic atelier +bucky's spectrum decoheres +bucky's just another lepton +bucky straightens those pinstripes +bucky crashed out on the couch +bucky's doin' this thing man +bucky remembers to floss +bucky mixes manhattans +bucky's subcutaneous capsicum barbs +a patch of bucky planted near the walk +bucky shuns the doubts of outliers +how hardy, fit now and buckying +a brilliant moon lit bucky's shadowplay +dark dread dispelled -- eh, bucky? +mere cold cannot challenge bucky's mettle +cold and wet, bucky skulks into shadows +bucky's blue-eyed doom +grazing in bucky's garden glen +bucky's eager reload +bucky's emblems of authority +bucky's coordinated freeze-out +a special night for bucky +bucky's thirty-year pin +bucky's regnal year +the true bucky at avignon +bucky's wishing dream buyer +bucky fences an oh zee +bucky is watching you reload +bucky thinks: progress! +bucky compels you to hoot +bucky's salacious innuendo scrawl +bucky drums his fingers +bucky's airshow disaster +did our grandmother know bucky? +bucky told me about you +long live the bucky dj +bucky awaiting your donations +bucky scours the free pile +bucky calls the law +bucky's locked out -- halp! +whew! that was a close one, bucky +you've done it, bucky +bucky, nipping at your cuffs +that old bucky ep's worth a listen +bucky's primal altered state +bucky feels connected to the past +nice kicks, buckorama +bucky pans and scans +buck u later! +bucky's archival tendencies +fstr bcky +keep listening, bucky's in there somewhere +climbing out of the bucky hole +why wouldn't you tell someone about bucky? +bucky's lining up an opportunity +got something bucky can put his mind to? +bucky hasn't heard that one in a while... +shout it from the hilltops, bucky! +buckyrave comin up.. +bucky evolves incessantly +pour one out for bucky +a confident promulgator of buckitude +bucky's confidence scheme +bucky's new way to hang over +bucky's hereditary toe snaps +bucky's almost-thirty vans +bucky's unorthodox fashion sense +bucky taps you on the shoulder +an old chum, here for you bucky +sshh i tied bucky's shoelaces together +drop the beat, bucky! +bucky munches frozen peas +bucky is still up at this hour +bucky scavenges the dormitory +bucky steps out for a smoke +bucky masters mood lighting +who knows where bucky came from... +which bucky did you come from? +bucky got here same time you did +pride cometh before a bucky +bucky's optimized for your monitor +bucky's spectacular spectacular! +you're too much fun, bucky confesses +bucky douses etheric transmissions +bucky builds a radio telescope +bucky bobbles in a nearby lagrangian +bucky's big bowl of kale +had enough peanut butter, bucky? +bucky, you adorable infovore +bucky's got the whole hour +you're awake before everyone, bucky +let me get the door for you, bucky +bucky doffs his cap to you +bucky ties your shoelaces together +something on your mind, bucky? +bucky sleeping in the chest of drawers +whoa! bucky, are you getting all this? +bucky takes in the yard situation +bucky stays home and pulls weeds +bucky's twelve thousand line braindump +bucky's updates you by the water cooler +bucky carrying an oversized speaker +bucky feels autumn's onset +two more reps, bucky +bucky's feeling fit +throw some more water on, bucky +got a good feeling about you, bucky +bucky's out for some recreational math +bucky is congruent to you +bucky's sweet new place +bucky's got a new video up +can i copy your notes, bucky? +whoa, bucky passed you a note +only the finest oysters for bucky +bucky masters chopsticks +bucky gets serious +bucky's an american classic +bucky's on the same page +bucky's brunch bonanza +call up bucky, let's hang out +bucky's last day in purgatory +onward to aleph, bucky ho! +let's hear bucky praise it +bucky's got great stage presence +bucky's new beginning +bucky belts it out +bucky buys another round +bucky's doing it every day +bucky's making it sound better +bucky gets in sync +bucky stares beyond the chessboard +bucky's chief squeeze +bucky's final paroxysm +bucky on two gelcaps +bucky is transforming +bucky making it happen +bucky dines out +bucky throws down +bucky begs the question +bucky demands more +bucky orders the best thing +bucky will have double +bucky demands satisfaction +bucky's dream comes alive +bucky's afternoon reverie +call 555-bcky +calling bucky to account +bucky goes slo-mo +bucky's perceptive transition dawns +bucky's origin story +bucky reveals the answer +bucky and the dream deferred +bucky intends to say more +blushing bucky bends backward +bucky pulls up the traps +bucky casts the line +bucky leaps from the high rock +bucky crisps up some smores +bucky cracks open a lobster tail diff --git a/lib/bucky.js b/lib/bucky.js new file mode 100644 index 0000000..6022bb2 --- /dev/null +++ b/lib/bucky.js @@ -0,0 +1,46 @@ +var db = require('./db') + +var bucky = module.exports = { + + /* INDEX */ + + ensureLatestThreads: function (req, res, next){ + db.getLatestThreads().then(function(threads){ + res.threads = threads + next() + }) + }, + ensureCommentCountsForThreads: function (req, res, next){ + var ids = res.threads.pluck("id") + db.getCommentCounts(ids).then(function(counts){ + console.log(counts) + next() + }) + }, + ensureFileCountsForThreads: function (req, res, next){ + db.getFileCounts(ids).then(function(counts){ + next() + }) + }, + + + /* DETAILS */ + + ensureThread: function (req, res, next){ + db.getThread(req.param.id).then(function(thread){ + if (thread) { + res.thread = thread + } + else { + res.sendCode(404) + } + }) + }, + ensureCommentsForThread: function (req, res, next){ + return db.getCommentsForThread(id).fetch() + }, + ensureFilesForThread: function (req, res, next){ + return db.getFilesForThread(id).fetch() + }, + +}
\ No newline at end of file diff --git a/lib/db/index.js b/lib/db/index.js index f539b90..3761417 100644 --- a/lib/db/index.js +++ b/lib/db/index.js @@ -35,7 +35,7 @@ var Message = db.Message = bookshelf.Model.extend({ hasTimestamps: false, }) -/* PICTURES */ +/* USERS */ db.createUser = function(data){ return new db.User(data).save() @@ -53,8 +53,27 @@ db.getUserByUsername = function(username) { var model = new User({'username': username}) return model.fetch() } -db.getThreads = function () { - return User.query(function(qb){ - qb.orderBy("id", "desc") + +/* THREADS */ + +db.getLatestThreads = function () { + return Thread.query(function(qb){ + qb.orderBy("id", "desc").limit(50) }).fetchAll() -}
\ No newline at end of file +} + +/* FILES */ +db.getFilesForThread = function (id){ + return File.query("where", "thread", "=", id).fetchAll() +} +db.getFileCounts = function(ids){ + return knex.column('thread', 'count(*)').select().from('comments').where('thread', 'in', ids).groupBy('thread') +} + +/* COMMENTS */ +db.getCommentsForThread = function (id){ + return Comment.query("where", "thread", "=", id).fetchAll() +} +db.getCommentCounts = function(){ + return knex.column('thread', 'count(*)').select().from('files').where('thread', 'in', ids).groupBy('thread') +} diff --git a/lib/fortune.js b/lib/fortune.js new file mode 100644 index 0000000..7adba5a --- /dev/null +++ b/lib/fortune.js @@ -0,0 +1,28 @@ +function choice (a){ return a[ Math.floor(Math.random()*a.length) ] } + +var fs = require("fs"), path = require("path") +var fortunes = {} +var dir = "fortune" + +fs.readdirSync(path.resolve(dir)).forEach(function(fn){ + + var file = dir + '/' + fn + var stat = fs.statSync(file) + + if (stat && ! stat.isDirectory()) { + fortunes[fn] = fs.readFileSync(file) + .toString() + .split("\n") + .filter(function(s){ return !! s }) + } + +}) + +module.exports = function(tag){ + if (tag in fortunes) { + return choice(fortunes[tag]) + } + else { + return "bucky" + } +}
\ No newline at end of file diff --git a/lib/index.js b/lib/index.js index 0489c77..20ccce5 100644 --- a/lib/index.js +++ b/lib/index.js @@ -17,6 +17,8 @@ var multer = require('multer') var db = require('./db') var auth = require('./auth') var middleware = require('./middleware') +var fortune = require('./fortune') +var bucky = require('./bucky') var app, server @@ -39,11 +41,11 @@ site.init = function(){ cookie: { domain: '.' + process.env.HOST_NAME, maxAge: 43200000000 }, store: sessionstore.createSessionStore({ type: 'mongodb', - host: 'localhost', // optional - port: 27017, // optional - dbName: 'sessionDb', // optional - collectionName: 'sessions',// optional - timeout: 10000 // optional + host: 'localhost', + port: 27017, + dbName: 'sessionDb', + collectionName: 'sessions', + timeout: 10000 }), resave: true, saveUninitialized: false, @@ -57,32 +59,47 @@ site.init = function(){ app.all('*', middleware.ensureLocals) server = http.createServer(app).listen(5000, function () { - console.log('Bucky listening at https://lvh.me:%s', server.address().port) + console.log('Bucky listening at http://5.k:%s', server.address().port) }) site.route() } site.route = function(){ - auth.init() app.get("/", middleware.ensureAuthenticated, function(req, res){ res.redirect('/index') }) app.get("/login", function(req, res){ - res.render("pages/login", {}) + res.render("pages/login", { title: "" }) }) app.get("/index", middleware.ensureAuthenticated, function(req, res){ - res.render("pages/index", {}) + res.render("pages/index", { title: fortune("titles") }) }) - app.post("/api/login", auth.loggedInLocal) - app.get("/api/index", function(req, res){ - }) - app.get("/api/thread", function(req, res){ - }) - app.post("/api/thread", function(req, res){ + app.get("/api/index", + bucky.ensureLatestThreads, + bucky.ensureCommentCountsForThreads, + bucky.ensureFileCountsForThreads, + function(req, res){ + res.json({ + threads: res.threads, + }) + } + ) + + app.get("/api/thread/:id", function(req, res){ + bucky.ensureThread, + bucky.ensureCommentsForThread, + bucky.ensureFilesForThread, + function(req, res){ + res.json({ + thread: res.thread, + comments: res.comments, + files: res.files, + }) + } }) app.post("/api/thread/:id", function(req, res){ }) diff --git a/lib/middleware.js b/lib/middleware.js index 840718e..b38cec3 100644 --- a/lib/middleware.js +++ b/lib/middleware.js @@ -10,6 +10,7 @@ var middleware = module.exports = { ensureLocals: function (req, res, next) { res.locals.csrfToken = req.csrfToken() + res.locals.title = "bucky" next() }, diff --git a/public/assets/css/bucky.css b/public/assets/css/bucky.css index 6d299b1..1f36a35 100644 --- a/public/assets/css/bucky.css +++ b/public/assets/css/bucky.css @@ -29,6 +29,24 @@ button { background-color: #d8ece0; } -#login { - -}
\ No newline at end of file + +.head a:link { color: #000;} +.head a:visited { color: #000;} +.head a:active { color: #000;} +.head a:hover { color: #558;} + +.bluebox { + background-color: #d8e0ec; + color: #000000; + text-align: center; + border: 2px solid #201010; + padding: 3px; + margin: 0; +} +hr { + border-color: #000; +} + +#sidebar { + width: 300px; +} diff --git a/views/pages/index.ejs b/views/pages/index.ejs index dea659f..9924a2b 100644 --- a/views/pages/index.ejs +++ b/views/pages/index.ejs @@ -1,2 +1,14 @@ <% include ../partials/header %> + +<hr> + +<div id="sidebar"> + <div class="bluebox"> + welcome to bucky + </div> +</div> + +<div id="content"> +</div> + <% include ../partials/footer %> diff --git a/views/pages/login.ejs b/views/pages/login.ejs index 722e1a3..7c56c2f 100644 --- a/views/pages/login.ejs +++ b/views/pages/login.ejs @@ -1,3 +1,22 @@ <% include ../partials/header %> -<% include ../partials/login %> + +<div id="login"> + <form> + <div> + <label for="username">username</label> + <input type="text" id="login-username" name="username"> + </div> + + <div> + <label for="password">password</label> + <input type="password" id="login-password" name="password"> + </div> + + <div> + <label for="login-submit"></label> + <button id="login-submit">LOGIN</button> + </div> + </form> +</div> + <% include ../partials/footer %> diff --git a/views/partials/header.ejs b/views/partials/header.ejs index 43c4465..3074c0a 100644 --- a/views/partials/header.ejs +++ b/views/partials/header.ejs @@ -5,4 +5,6 @@ <link rel="stylesheet" href="/assets/css/bucky.css"> <meta name="_csrf" value="<%= csrfToken %>"> </head> -<body>
\ No newline at end of file +<body> + +<h1><%= title %></h1> diff --git a/views/partials/login.ejs b/views/partials/login.ejs deleted file mode 100644 index b5e8c04..0000000 --- a/views/partials/login.ejs +++ /dev/null @@ -1,18 +0,0 @@ -<div id="login"> - <form> - <div> - <label for="username">username</label> - <input type="text" id="login-username" name="username"> - </div> - - <div> - <label for="password">password</label> - <input type="password" id="login-password" name="password"> - </div> - - <div> - <label for="login-submit"></label> - <button id="login-submit">LOGIN</button> - </div> - </form> -</div> |
