Created
November 7, 2016 17:19
-
-
Save xDarkicex/13204e6d61a8174d352641c4e4fe923b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| doctype html | |
| html(lang="en") | |
| head | |
| block title | |
| title My Application | |
| meta(name="viewport" content="width=device-width, initial-scale=1") | |
| link(rel='stylesheet' type="text/css" href='/static/assets/stylesheets/application.css') | |
| link(rel='stylesheet' type="text/css" href='https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css') | |
| //- link(rel='stylesheet' type="text/css" href='https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css') | |
| link(rel='stylesheet' type="text/css" href='https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css') | |
| link(rel="icon" type="image/png" href="/static/assets/images/favicon.png") | |
| script(src='https://code.jquery.com/jquery-3.1.0.min.js' integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous") | |
| script(src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js') | |
| script(src='/static/assets/scripts/application.js') | |
| body | |
| header | |
| nav.navbar.navbar-default.navbar-fixed-top | |
| div.container-fluid | |
| div.navbar-header | |
| a.navbar-brand(href="/") | |
| button.btn.btn-default.navbar-toggle.collapsed(data-toggle='collapse', data-target='.navbar-collapse'): i.fa.fa-bars.fa-fw | |
| form.navbar-form.navbar-right.navbar-collapse.collapse(role="search", method="get", action="/posts/") | |
| div.form-group.shrinking#searching: input.form-control(type="text", name="search",autocomplete="off", placeholder="Search...") | |
| div.btn.btn-default(onclick="shrinker()"): i.fa-search.fa | |
| ul#nav-content.nav.navbar-nav.navbar-right.collapse.navbar-collapse | |
| li: a(href="/examples") Examples | |
| li: a(href="/about") About Me | |
| li: a(href="/posts") Blog | |
| //- p Header | |
| main | |
| block main-content | |
| p Your view is empty | |
| footer.well | |
| div.row | |
| div.col-sm-3 | |
| div.col-xs-6 | |
| h4 Resources | |
| ul.list-unstyled | |
| li: a(href="#") Privacy Policy | |
| li: a(href="#") Terms & Conditions | |
| div.col-sm-3 | |
| div.col-xs-6 | |
| h4 Social Media | |
| ul.list-unstyled | |
| li | |
| i.fa.fa-fw.fa-facebook-official | |
| a(href="https://www.facebook.com/gentry.miller.1") Facebook | |
| li | |
| i.fa.fa-fw.fa-twitter-square | |
| a(href="https://twitter.com/xDarkicex") Twitter | |
| li | |
| i.fa.fa-fw.fa-linkedin-square | |
| a(href="https://www.linkedin.com/in/gentry-rolofson-b0752032") Linkedin | |
| li | |
| i.fa.fa-fw.fa-github | |
| a(href="https://github.com/xDarkicex") Github | |
| li | |
| i.fa.fa-fw.fa-flickr | |
| a(href="https://www.flickr.com/photos/129128612@N03/") flickr | |
| div.col-sm-6 | |
| div | |
| h4 Contact Me | |
| div | |
| form(method="post", action="/contact", id="contactForm") | |
| div.form-group | |
| label(for="title") Name | |
| input.form-control(id="contactName" name="contactName" placeholder="Enter name..." autocomplete="off") | |
| div.form-group | |
| label(for="title") Email | |
| input.form-control(id="contactEmail" name="contactAddress" placeholder="Enter email..." autocomplete="off") | |
| div.form-group | |
| label(for="body") Body | |
| br | |
| textarea(name="contactBody" id="bodyArea" class="form-control" style="min-width: 100%") | |
| input.btn.btn-primary(type="submit") | |
| div | |
| div.row | |
| div.col-md-6 | |
| //- if current_user | |
| //- if current_user.Admin | |
| //- p= 'Hello '+ current_user.Name | |
| //- p.badge Admin | |
| //- br | |
| //- if !current_user.Admin | |
| //- p= 'Hello '+ current_user.Name | |
| //- p.badge User | |
| //- br | |
| //- a(href= '/signout') Sign Out | |
| //- else | |
| //- a(href= '/signin') Sign in | |
| div.row | |
| div.col-lg-12 | |
| p.text-muted.pull-right Copyright := Gentry.Rolofson(2016) | |
| //- if view | |
| //- script(src= '/static/assets/scripts/'+view+'.js') | |
| //- link(rel='stylesheet' type="text/css" href= '/static/assets/stylesheets/'+view+'.css') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //- extends ./app/views/layouts/application | |
| block main-content | |
| link(href='//cdn.jsdelivr.net/devicons/1.8.0/css/devicons.min.css', rel='stylesheet',type="text/css") | |
| div.jumbotron | |
| h1.display-1: b.lang | |
| span.devicons | |
| i.fa.fa-wa.fa-angle-double-down.fa-4x.animated.bounce#arrows | |
| div.container-fluid | |
| h1 Gentry Rolofson | |
| div#scrolled | |
| P console.log("Backend Powered by: Go version 1.7.1"); | |
| p console.log("Javascript Preprocessor: TypeScript"); | |
| p console.log("serverMux: httprouter"); | |
| p console.log("session: gorilla sessions"); | |
| p console.log("Template engine by: Joker/jade") | |
| p console.log("Frontend by: Bootstrap"); | |
| P console.log("Templated by: Pug.Js"); | |
| P console.log("Styled by: SCSS"); | |
| p console.log("Developed by: Gentry Rolofson"); | |
| p console.log("Don't let your dreams be memes"); | |
| div.header | |
| p.h3 Newest Blog Posts | |
| hr | |
| div#cards | |
| //- each post in blog | |
| //- div.card | |
| //- - var style = "height: 150px; background: url(/post/"+post.URL+"/images/"+post.BlogImage+")center center no-repeat; background-size: cover;"; | |
| //- div.card-img-top(style= style) | |
| //- div.card-block | |
| //- h4.card-title= post.Title | |
| //- p.card-text!= post.Body | |
| //- a.btn.btn-primary(href= ("/post/"+post.URL)) Read More |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| times["jade"] = time.Now() | |
| layout, err := jade.ParseFile("./app/views/layouts/application.pug") | |
| if err != nil { | |
| Logger.Printf("\nParseFile error: %v", err) | |
| } | |
| currentView, err := jade.ParseFile("./app/views/" + view + ".pug") | |
| if err != nil { | |
| Logger.Printf("\nParseFile error: %v", err) | |
| } | |
| times["jade"] = time.Since(times["jade"].(time.Time)) | |
| times["render-page"] = time.Now() | |
| gotpl, err := template.New("layout").Parse(layout) | |
| if err != nil { | |
| Logger.Printf("\nTemplate parse error: %v", err) | |
| } | |
| _, err = gotpl.New(view).Parse(currentView) | |
| if err != nil { | |
| Logger.Printf("\nIndex parse error: %v", err) | |
| } | |
| err = gotpl.Execute(a.Response, object) | |
| if err != nil { | |
| log.Printf("\nExecute error: %v", err) | |
| } | |
| times["render-page"] = time.Since(times["render-page"].(time.Time)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment