From 52d5bc2079fdc8655479196db762dcdb2e621ce6 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 13:06:49 +0700 Subject: [PATCH 01/14] Sweeping --- build.xml | 71 + build/web/META-INF/MANIFEST.MF | 2 + .../WEB-INF/classes/.netbeans_automatic_build | 0 .../classes/.netbeans_update_resources | 0 build/web/WEB-INF/faces-config.xml | 7 + build/web/WEB-INF/sun-web.xml | 11 + build/web/WEB-INF/web.xml | 24 + build/web/gfv3ee6.dpf | 0 build/web/index.xhtml | 12 + build/web/resources/css/cssLayout.css | 61 + build/web/resources/css/default.css | 29 + build/web/resources/css/screen.css | 874 ++++++++++ build/web/template.xhtml | 42 + build/web/test1.xhtml | 22 + build/web/test2.xhtml | 16 + nbproject/ant-deploy.xml | 111 ++ nbproject/build-impl.xml | 1441 +++++++++++++++++ nbproject/faces-config.NavData | 0 nbproject/genfiles.properties | 8 + nbproject/private/private.properties | 7 + nbproject/private/private.xml | 7 + nbproject/project.properties | 90 + nbproject/project.xml | 18 + src/conf/MANIFEST.MF | 2 + web/WEB-INF/faces-config.xml | 7 + web/WEB-INF/web.xml | 24 + web/index.xhtml | 12 + web/resources/css/cssLayout.css | 61 + web/resources/css/default.css | 29 + web/resources/css/screen.css | 874 ++++++++++ web/template.xhtml | 42 + web/test1.xhtml | 22 + web/test2.xhtml | 16 + 33 files changed, 3942 insertions(+) create mode 100644 build.xml create mode 100644 build/web/META-INF/MANIFEST.MF create mode 100644 build/web/WEB-INF/classes/.netbeans_automatic_build create mode 100644 build/web/WEB-INF/classes/.netbeans_update_resources create mode 100644 build/web/WEB-INF/faces-config.xml create mode 100644 build/web/WEB-INF/sun-web.xml create mode 100644 build/web/WEB-INF/web.xml create mode 100644 build/web/gfv3ee6.dpf create mode 100644 build/web/index.xhtml create mode 100644 build/web/resources/css/cssLayout.css create mode 100644 build/web/resources/css/default.css create mode 100644 build/web/resources/css/screen.css create mode 100644 build/web/template.xhtml create mode 100644 build/web/test1.xhtml create mode 100644 build/web/test2.xhtml create mode 100644 nbproject/ant-deploy.xml create mode 100644 nbproject/build-impl.xml create mode 100644 nbproject/faces-config.NavData create mode 100644 nbproject/genfiles.properties create mode 100644 nbproject/private/private.properties create mode 100644 nbproject/private/private.xml create mode 100644 nbproject/project.properties create mode 100644 nbproject/project.xml create mode 100644 src/conf/MANIFEST.MF create mode 100644 web/WEB-INF/faces-config.xml create mode 100644 web/WEB-INF/web.xml create mode 100644 web/index.xhtml create mode 100644 web/resources/css/cssLayout.css create mode 100644 web/resources/css/default.css create mode 100644 web/resources/css/screen.css create mode 100644 web/template.xhtml create mode 100644 web/test1.xhtml create mode 100644 web/test2.xhtml diff --git a/build.xml b/build.xml new file mode 100644 index 00000000..b949aae0 --- /dev/null +++ b/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project SimpleBlog. + + + diff --git a/build/web/META-INF/MANIFEST.MF b/build/web/META-INF/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/build/web/META-INF/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/build/web/WEB-INF/classes/.netbeans_automatic_build b/build/web/WEB-INF/classes/.netbeans_automatic_build new file mode 100644 index 00000000..e69de29b diff --git a/build/web/WEB-INF/classes/.netbeans_update_resources b/build/web/WEB-INF/classes/.netbeans_update_resources new file mode 100644 index 00000000..e69de29b diff --git a/build/web/WEB-INF/faces-config.xml b/build/web/WEB-INF/faces-config.xml new file mode 100644 index 00000000..0393e360 --- /dev/null +++ b/build/web/WEB-INF/faces-config.xml @@ -0,0 +1,7 @@ + + + + diff --git a/build/web/WEB-INF/sun-web.xml b/build/web/WEB-INF/sun-web.xml new file mode 100644 index 00000000..1ac7af40 --- /dev/null +++ b/build/web/WEB-INF/sun-web.xml @@ -0,0 +1,11 @@ + + + + + + + Keep a copy of the generated servlet class' java code. + + + + diff --git a/build/web/WEB-INF/web.xml b/build/web/WEB-INF/web.xml new file mode 100644 index 00000000..c5e7c738 --- /dev/null +++ b/build/web/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/build/web/gfv3ee6.dpf b/build/web/gfv3ee6.dpf new file mode 100644 index 00000000..e69de29b diff --git a/build/web/index.xhtml b/build/web/index.xhtml new file mode 100644 index 00000000..c70ee58c --- /dev/null +++ b/build/web/index.xhtml @@ -0,0 +1,12 @@ + + + + + Facelet Title + + + Hello from Facelets + + + diff --git a/build/web/resources/css/cssLayout.css b/build/web/resources/css/cssLayout.css new file mode 100644 index 00000000..8ee7cebe --- /dev/null +++ b/build/web/resources/css/cssLayout.css @@ -0,0 +1,61 @@ + +#top { + position: relative; + background-color: #036fab; + color: white; + padding: 5px; + margin: 0px 0px 10px 0px; +} + +#bottom { + position: relative; + background-color: #c2dfef; + padding: 5px; + margin: 10px 0px 0px 0px; +} + +#left { + float: left; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +#right { + float: right; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +.center_content { + position: relative; + background-color: #dddddd; + padding: 5px; +} + +.left_content { + background-color: #dddddd; + padding: 5px; + margin-left: 170px; +} + +.right_content { + background-color: #dddddd; + padding: 5px; + margin: 0px 170px 0px 170px; +} + +#top a:link, #top a:visited { + color: white; + font-weight : bold; + text-decoration: none; +} + +#top a:link:hover, #top a:visited:hover { + color: black; + font-weight : bold; + text-decoration : underline; +} + + diff --git a/build/web/resources/css/default.css b/build/web/resources/css/default.css new file mode 100644 index 00000000..6cbc3d18 --- /dev/null +++ b/build/web/resources/css/default.css @@ -0,0 +1,29 @@ +body { + background-color: #ffffff; + font-size: 12px; + font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + color: #000000; + margin: 10px; +} + +h1 { + font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + border-bottom: 1px solid #AFAFAF; + font-size: 16px; + font-weight: bold; + margin: 0px; + padding: 0px; + color: #D20005; +} + +a:link, a:visited { + color: #045491; + font-weight : bold; + text-decoration: none; +} + +a:link:hover, a:visited:hover { + color: #045491; + font-weight : bold; + text-decoration : underline; +} diff --git a/build/web/resources/css/screen.css b/build/web/resources/css/screen.css new file mode 100644 index 00000000..7b5d3d67 --- /dev/null +++ b/build/web/resources/css/screen.css @@ -0,0 +1,874 @@ +/* Reset & Basics (Inspired by E. Meyers) +================================================== */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, address, cite, code, em, img, small, strong, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, embed, figure, figcaption, footer, header, hgroup, menu, nav, section, summary, time, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } +article, aside, details, figcaption, figure, footer, header, hgroup, menu, time, nav, section { + display: block; } +html, body, .wrapper { + min-height: 100%; +} + + +/* Body +================================================== */ +html, body { + height: 100%; +} +.wrapper { + min-height: 100%; +} +body { + overflow-x: hidden; + font: 17px/28px ff-meta-serif-web-pro, "Georgia", serif; + color: #333; + background: #fff; +} + + +/* Typography +================================================== */ +h1, h2, h3, h4, h5, h6 { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-weight: normal; + text-transform: uppercase; + font-weight: 700; + color: #000; + text-rendering: optimizeLegibility; +} + +h1 { + font-size: 50px; + padding-bottom: 30px; +} + +h2 { + font-size: 35px; + padding-bottom: 25px; +} + +h3 { + font-size: 40px; + padding-bottom: 20px; +} + +h4 { + font-size: 35px; + padding-bottom: 15px; +} + +h5 { + font-size: 30px; + padding-bottom: 10px; +} + +p { + margin: 0 0 28px 0; +} + +strong { + font-weight: bold; +} +em { + font-style: italic; +} +sup { + line-height: 0; +} + +small { + font-size: 70%; +} + +cite { + font-size: 80%; + font-style: italic; + } + +/* Teaser +================================================== */ + +header#teaser h1 { + text-transform: none !important; + color: #333; + font-size: 28px !important; + font-weight: 300 !important; +} + + +/* Links +================================================== */ +a { + color: #3403F7; + text-decoration: none; + -webkit-transition: color .2s ease-in-out; + -moz-transition: color .2s ease-in-out; + transition: color .2s ease-in-out; +} +a:hover { + color: #FF0000; +} + +/* Layout +================================================== */ +/* White container that is the "page" */ +.wrapper { + max-width: 1500px; + margin: 0 auto; + background: #fff; +} + +/* Containers to keep content to a set width */ +.nav, +.art-header-inner, +.footer, +.art-list, +.abt, +.fourohfour { + width: 980px; +} +.nav, +.art-body-inner, +.footer, +.art-list, +.abt, +.fourohfour { + position: relative; + margin: 0 auto; +} + +/* Nav +================================================== */ +.nav { + position: absolute; + top: 0; + left: 50%; + height: 70px; + padding-top: 40px; + margin-left: -490px; /* Half width of nav */ + border-bottom: 1px solid #333; + z-index: 2; +} +.nav.fixed { + position: fixed; +} +#logo { + float: left; + +} +.nav-primary { + float: right; +} +.nav-primary li { + display: inline-block; + margin-left: 10px; + font-weight: 500; +} +#logo h1, +.nav-primary li, +.nav-primary li a { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-weight: 700; + font-size: 13px; + line-height: 30px; + color: #000; + text-transform: uppercase; +} + +#logo h1 { + height: 30px; + margin-left: 0px; + letter-spacing: 1px; + font-family: 'Questrial', sans-serif; + font-size: 30px; +} + +#logo h1 span{ + color: #F40034 !important; +} + +.nav li:first-child { + margin-left: 0; /* Remove left margin from the first nav li */ +} + +/* Home Page +================================================== */ + +div#home {} + +#home > div.cover { + max-width: 980px; + margin: 0px auto; + /*padding-top: 110px;*/ +} + +div.cover { + +} + +div.cover > img { + width: 100%; + height: 100%; +} + + +/* Article +================================================== */ +.art { + margin-top: -131px; +} +/* Header */ +.art-header { + height: 900px; + /* Background image is defined in the post */ + background-position: top center; + background-attachment: fixed; + overflow: hidden; +} +/* Contains the time, title and subtitle for an article */ +.art-header-inner { + position: relative; + top: 300px; + left: 50%; + margin-left: -490px; +} +.art-time, +.art-title, +.art-subtitle { + text-align: center; + text-transform: uppercase; +} +.art-time { + font-size: 14px; + line-height: 1.8; + letter-spacing: 4px; +} +.art-title { + font-size: 100px; + line-height: .9; + letter-spacing: -2px; + width: 100%; +} +.art-subtitle { + margin-top: 4px; + font-size: 14px; + line-height: 1.3; + letter-spacing: 4px; +} + +/* If small header, make few adjustments */ +.small .art-title { + font-size: 70px; + line-height: 65px; +} +.small.art-header-inner { + top: 320px; +} + +/* Body */ +.art-body { + position: relative; + width: 100%; + background: #fff; + z-index: 100; + -webkit-box-shadow: 0 -3px 3px rgba(0,0,0,.2); + -moz-box-shadow: 0 -3px 3px rgba(0,0,0,.2); + box-shadow: 0 -3px 3px rgba(0,0,0,.2); +} +.art-body-inner { + font-family: Georgia,Cambria,"Times New Roman",Times,serif; + max-width: 640px; + padding: 80px 0 50px; + letter-spacing: 0.01rem; + font-weight: 400; + font-style: normal; + font-size: 21px; + line-height: 1.5; +} +.art-body-inner a:hover { + padding-bottom:2px; +} +.art-body-inner ul, +.art-body-inner ol { /* For lists in the article body */ + margin-bottom: 26px; +} +.art-body-inner ul li { + list-style: disc; +} + +.art-body-inner mark { + background-color: #fdffb6; + padding: 2px; + -webkit-box-shadow: #fdffb6 0 0 5px; + -moz-box-shadow: #fdffb6 0 0 5px; + box-shadow: #fdffb6 0 0 5px; +} + +.art-body-inner blockquote { + font-size: 16px; + background: #f9f9f9; + border-left: 10px solid #ccc; + margin: 1.5em 10px; + padding: 0.5em 10px; + quotes: "\201C""\201D""\2018""\2019"; +} + +.art-body-inner blockquote p:first-child:before { + color: #ccc; + content: "“"; + font-size: 4em; + line-height: 0.1em; + margin-right: 0.25em; + vertical-align: -0.4em; +} + +.art-body-inner blockquote p { + margin-bottom: 1.5em; +} + +.art-body-inner blockquote p:last-child { + margin-bottom: 0; +} + + +.dropcap { /* First character on articles */ + float: left; + margin: 47px 10px 20px 0; + font-size: 100px; + line-height: 0; +} +.art-subhead { /* Subheads are used to break up sections of an article */ + margin: 60px 0 15px; + font-size: 20px; + line-height: 28px; + letter-spacing: 3px; +} +.callout { /* Callouts are like large pullquotes */ + font-weight: bold; +} +.art-body-inner img { + max-width: 100%; + max-height: 600px; + margin-bottom: 26px; +} +.art-body-inner img.center { + display: block; + margin-left: auto; + margin-right: auto; +} +.art-body-inner .art-reference { + font-size: 80%; + color: #999; + margin-top: 50px; +} + +/* For simple, white background posts */ +.simple .art-body { + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + position: relative; + top: 40px; +} + + +/* List of Articles +================================================== */ +.art-list { + padding: 120px 0 0; +} +.art-list-body { + position: relative; + overflow: hidden; +} +.art-list-item { + padding: 40px 0; + list-style: none; + overflow: hidden; + border-bottom: 1px solid #ccc; +} +.art-list-item:last-child { + border-bottom: none; +} +.art-list-title { + font-size: 26px; + line-height: 26px; + font-weight: 700; +} +.art-list-item-title-and-time { + float: left; + width: 30%; + margin-bottom: 10px; +} +.art-list-time { + font-size: 12px; + line-height: 20px; + letter-spacing: 2px; + color: #999; +} +.art-list-title a { + color: #000; + cursor: pointer; +} +.art-list-title a:hover { + color: #3403F7; +} +.art-list-item p { + width: 65%; + float: left; + margin-left: 5%; + margin-bottom: 0; + font-size: 16px; + line-height: 24px; + text-align: justify; +} + +.art-list-item .editable { + position: relative; + left: 30%; + cursor: pointer; +} + + +/* Footer +================================================== */ +.footer { + padding: 30px 0 40px; + overflow: hidden; + border-top: 1px solid #ccc; +} +.footer, +.footer a { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-size: 13px; + text-transform: uppercase; + color: #777; +} +.footer a:hover { + color: #000; +} +.back-to-top, +.footer-nav, +.offsite-links { + width: 45%; + float: left; +} +.psi { + width:10%; + float:left; + text-align: center; +} +.footer-nav { + text-align: center; +} +.offsite-links { + text-align: right; +} +.footer .twitter-link:hover { + color: #0084B4; +} +.footer .instagram-link:hover { + color: #3F729B; +} +.footer .github-link:hover { + color: #c5376d; +} +.footer .caffein8-link:hover{ + color: black; +} +.footer .rss-link:hover { + color: #e85d24; +} +/* Remove prev & next links on loop */ +.art-list + .footer .footer-nav, +.abt + .footer .footer-nav { + text-indent: -9999px; + text-align: left; +} + + +/* White Reverse Theme +================================================== */ +/* Nav */ +.nav.white { + border-bottom-color: #fff; + border-bottom-color: rgba(255,255,255,.3); +} +.nav.white li a, +.nav.white li, +.nav.white #logo h1 { + color: #fff; + text-shadow: 0 0 8px rgba(0,0,0,.5); +} +.nav.white #logo h1 { + background-position: top center; +} + +nav.pagination{ + text-align: right; + padding-bottom: 25px; +} +/* Art header */ +.art-header.white { + background-color: #111; +} +.art-header.white .art-time, +.art-header.white .art-title, +.art-header.white .art-subtitle { + color: #fff; + text-shadow: 0 0 8px rgba(0,0,0,.5); +} + + +/* About page +================================================== */ +.abt { + padding: 200px 0 100px; + list-style: none; +} +.abt .abt-header { + font-size: 140px; + line-height: 1; + text-transform: none; +} +.abt .abt-subheader { + font-size: 24px; + font-style: italic; + text-transform: none; + color: #777; +} +.abt-body { + -moz-column-count: 2; + -moz-column-gap: 20px; + -webkit-column-count: 2; + -webkit-column-gap: 20px; + margin-bottom: 28px; +} +.abt-signoff { + line-height: 1.3; + font-style: italic; + color: #777; +} + +/* 404 page +================================================== */ +.fourohfour { + padding: 240px 0 100px; + text-align: center; +} + +/* Code +================================================== */ + +code, tt { +background: #ededee; +color: #3C4043; +font-size: 90%; +padding: 1px 3px; +} + +pre { + width: 92%; + overflow: auto; + margin: 2rem 0; + padding: 1rem 0.8rem 1rem 1.2rem; + color: #3f3b36; + border: 1px solid #ccc; + border-left: 1rem solid #ccc; + font: lighter 1.2rem/2rem monospace; + background: url(/assets/img/pre.png) repeat 0 -0.9rem; + background-size: 1px 4rem; +} + +pre code, tt { +font-size: inherit; +white-space: -moz-pre-wrap; +white-space: pre-wrap; +background: transparent; +border: none; +padding: 0; +} + + +.gist { + font-size: 14px; +} + + +/* Responsive +================================================== */ +@media only screen and (max-width: 1080px) { + /* Set all of the 980 containers to flexible width */ + .nav, + .art-body-inner, + .art-header-inner, + .footer, + .art-list, + .abt, + .fourohfour { + width: 90%; + } + .nav, + .art-header-inner { + margin-left: -45%; + } +} + +@media only screen and (max-width: 1024px) { + /* Everything becomes scrolling and non-fading */ + .nav, + .nav.fixed { + position: relative; + opacity: 1 !important; /* Important to override JS values */ + display: inline-block; + } + .art-header-inner { + position: relative; + top: 0 !important; /* Important to override JS values */ + margin-top: 240px !important; /* Important to override JS values */ + opacity: 1 !important; /* Important to override JS values */ + } + /* Articles no longer have fixed heights */ + .art-header { + height: auto; + padding-bottom: 100px; + background-size: cover !important; + background-attachment: scroll; + } + /* Remove bottom space out if articles doesn't have a background */ + .simple .art-header { + padding-bottom: 0; + } + .art-list { + padding-top: 0; + } + .abt { + padding: 40px 0; + } + .fourohfour { + padding: 80px 0 60px; + } +} + +@media only screen and (max-width: 780px) { + .art-body-inner ul, + .art-body-inner ol { + margin-left: 20px; + } + .art-title { + letter-spacing: 0; + } + .art-subtitle, + .art-time { + font-size: 12px; + } + .nav { + padding-top: 25px; + height: 55px; + } + .art-list-item-title-and-time, + .art-list-item p { + float: none; + width: auto; + margin-left: 0; + } + .abt-body { + -moz-column-count: 1; + -webkit-column-count: 1; + } +} + +@media only screen and (max-width: 500px) { + .nav-primary li { + margin-left: 10px; + } + .nav #logo h1 { + font-size: 16px; + letter-spacing: -1px; + } + .nav li a { + font-size: 12px; + } + .art-header { + padding-bottom: 50px; + } + .art-header-inner { + margin-top: 190px !important; + } + .art-body-inner { + padding-top: 30px; + } + body { + font-size: 15px; + line-height: 24px; + } + p { + margin-bottom: 24px; + } + .footer { + padding: 10px 0 20px; + } + .back-to-top, + .footer-nav { + width: 50%; + } + .back-to-top { + text-align: left; + } + .footer-nav { + text-align: right; + } + .offsite-links { + float: left; + width: 100%; + text-align: left; + } + .offsite-links a { + font-size: 12px; + } + .art-list + .footer .footer-nav { + display: none; + } + .abt .abt-header { + font-size: 80px; + } + .abt .abt-subheader { + font-size: 18px; + } +} + + +/* Misc +================================================== */ +::selection { + background: #000; + color: #fff; +} +::-moz-selection { + background: #000; + color: #fff; +} +img.left { + float: left; + margin-right: 20px; +} +img.right { + float: right; + margin-left: 20px; +} +/* Clearfixing pile */ +.nav:before, +.art-body-inner:before, +.footer:before, +.art-list:before { + content:""; + display:table; +} +.nav:after, +.art-body-inner:after, +.footer:after, +.art-list:after { + clear:both; +} +.nav, +.art-body-inner, +.footer, +.art-list { + zoom:1; /* For IE 6/7 (trigger hasLayout) */ +} + + +@-webkit-keyframes le-fade { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes le-fade { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.art-header-inner { + -webkit-animation: le-fade .5s 0 1 ease-out; + -moz-animation: le-fade .5s 0 1 ease-out; +} + +.art-list, +.nav, +.abt, +.art-body { + -webkit-animation: le-fade .5s 0s 1 ease-out; + -moz-animation: le-fade .5s 0s 1 ease-out; +} + +hr.featured-article { + padding: 0; + border: none; + border-top: medium double #bbb; + color: #bbb; + text-align: center; +} +hr.featured-article:after { + content: "✭ Featured Article ✭"; + display: inline-block; + position: relative; + top: -0.8em; + font-size: 1.2em; + padding: 0 0.6em; + background: white; +} + +/* FORM */ + +#contact-area { + width: 600px; + margin-top: 25px; +} + +#contact-area input, #contact-area textarea { + padding: 5px; + width: 471px; + font-family: Helvetica, sans-serif; + margin: 0px 0px 10px 0px; + border: 2px solid #ccc; +} + +#contact-area textarea { + height: 250px; +} + +#contact-area textarea:focus, #contact-area input:focus { + border: 2px solid #0084B4; +} + +#contact-area input.submit-button { + width: 100px; + +} + +#contact-area #errormsg{ + position:relative; + left:115px; + color: #FF0000; + font-size:medium; +} + +label { + float: left; + text-align: right; + margin-right: 15px; + width: 100px; + padding-top: 5px; +} \ No newline at end of file diff --git a/build/web/template.xhtml b/build/web/template.xhtml new file mode 100644 index 00000000..4dbf7b74 --- /dev/null +++ b/build/web/template.xhtml @@ -0,0 +1,42 @@ + + + + + + + + + + Facelets Template + + + + +
+ +
+ + +
+
+
+
+
+ Left +
+
+ Content +
+
+
+ Bottom +
+ +
+ + diff --git a/build/web/test1.xhtml b/build/web/test1.xhtml new file mode 100644 index 00000000..2c72f62b --- /dev/null +++ b/build/web/test1.xhtml @@ -0,0 +1,22 @@ + + + + + + tooooop + + + + leeeeft + + + + contentttttt + + + + bottoooooom + + + diff --git a/build/web/test2.xhtml b/build/web/test2.xhtml new file mode 100644 index 00000000..fa31a202 --- /dev/null +++ b/build/web/test2.xhtml @@ -0,0 +1,16 @@ + + + + + +
+ + +
+ +
+ +
diff --git a/nbproject/ant-deploy.xml b/nbproject/ant-deploy.xml new file mode 100644 index 00000000..2d5f8778 --- /dev/null +++ b/nbproject/ant-deploy.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml new file mode 100644 index 00000000..6d1463e1 --- /dev/null +++ b/nbproject/build-impl.xml @@ -0,0 +1,1441 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData new file mode 100644 index 00000000..e69de29b diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties new file mode 100644 index 00000000..7a2a3b05 --- /dev/null +++ b/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=2b590d60 +build.xml.script.CRC32=bedf25f1 +build.xml.stylesheet.CRC32=651128d4@1.68.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=2b590d60 +nbproject/build-impl.xml.script.CRC32=d897eee6 +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties new file mode 100644 index 00000000..51b6b944 --- /dev/null +++ b/nbproject/private/private.properties @@ -0,0 +1,7 @@ +deploy.ant.properties.file=/home/kevhnmay94/.netbeans/8.0.1/config/GlassFishEE6/Properties/gfv3394951402.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1 +j2ee.server.home=/home/kevhnmay94/glassfish-4.1/glassfish +j2ee.server.instance=[/home/kevhnmay94/glassfish-4.1/glassfish:/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1]deployer:gfv3ee6:localhost:4848 +j2ee.server.middleware=/home/kevhnmay94/glassfish-4.1 +user.properties.file=/home/kevhnmay94/.netbeans/8.0.1/build.properties diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 00000000..6807a2ba --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/nbproject/project.properties b/nbproject/project.properties new file mode 100644 index 00000000..18dbfaab --- /dev/null +++ b/nbproject/project.properties @@ -0,0 +1,90 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.persistence.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath= +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +no.dependencies=false +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=SimpleBlog.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/nbproject/project.xml b/nbproject/project.xml new file mode 100644 index 00000000..16794a10 --- /dev/null +++ b/nbproject/project.xml @@ -0,0 +1,18 @@ + + + org.netbeans.modules.web.project + + + SimpleBlog + 1.6.5 + + + + + + + + + + + diff --git a/src/conf/MANIFEST.MF b/src/conf/MANIFEST.MF new file mode 100644 index 00000000..59499bce --- /dev/null +++ b/src/conf/MANIFEST.MF @@ -0,0 +1,2 @@ +Manifest-Version: 1.0 + diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml new file mode 100644 index 00000000..0393e360 --- /dev/null +++ b/web/WEB-INF/faces-config.xml @@ -0,0 +1,7 @@ + + + + diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml new file mode 100644 index 00000000..c5e7c738 --- /dev/null +++ b/web/WEB-INF/web.xml @@ -0,0 +1,24 @@ + + + + javax.faces.PROJECT_STAGE + Development + + + Faces Servlet + javax.faces.webapp.FacesServlet + 1 + + + Faces Servlet + /faces/* + + + + 30 + + + + faces/index.xhtml + + diff --git a/web/index.xhtml b/web/index.xhtml new file mode 100644 index 00000000..c70ee58c --- /dev/null +++ b/web/index.xhtml @@ -0,0 +1,12 @@ + + + + + Facelet Title + + + Hello from Facelets + + + diff --git a/web/resources/css/cssLayout.css b/web/resources/css/cssLayout.css new file mode 100644 index 00000000..8ee7cebe --- /dev/null +++ b/web/resources/css/cssLayout.css @@ -0,0 +1,61 @@ + +#top { + position: relative; + background-color: #036fab; + color: white; + padding: 5px; + margin: 0px 0px 10px 0px; +} + +#bottom { + position: relative; + background-color: #c2dfef; + padding: 5px; + margin: 10px 0px 0px 0px; +} + +#left { + float: left; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +#right { + float: right; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +.center_content { + position: relative; + background-color: #dddddd; + padding: 5px; +} + +.left_content { + background-color: #dddddd; + padding: 5px; + margin-left: 170px; +} + +.right_content { + background-color: #dddddd; + padding: 5px; + margin: 0px 170px 0px 170px; +} + +#top a:link, #top a:visited { + color: white; + font-weight : bold; + text-decoration: none; +} + +#top a:link:hover, #top a:visited:hover { + color: black; + font-weight : bold; + text-decoration : underline; +} + + diff --git a/web/resources/css/default.css b/web/resources/css/default.css new file mode 100644 index 00000000..6cbc3d18 --- /dev/null +++ b/web/resources/css/default.css @@ -0,0 +1,29 @@ +body { + background-color: #ffffff; + font-size: 12px; + font-family: Verdana, "Verdana CE", Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + color: #000000; + margin: 10px; +} + +h1 { + font-family: Arial, "Arial CE", "Lucida Grande CE", lucida, "Helvetica CE", sans-serif; + border-bottom: 1px solid #AFAFAF; + font-size: 16px; + font-weight: bold; + margin: 0px; + padding: 0px; + color: #D20005; +} + +a:link, a:visited { + color: #045491; + font-weight : bold; + text-decoration: none; +} + +a:link:hover, a:visited:hover { + color: #045491; + font-weight : bold; + text-decoration : underline; +} diff --git a/web/resources/css/screen.css b/web/resources/css/screen.css new file mode 100644 index 00000000..7b5d3d67 --- /dev/null +++ b/web/resources/css/screen.css @@ -0,0 +1,874 @@ +/* Reset & Basics (Inspired by E. Meyers) +================================================== */ +html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, address, cite, code, em, img, small, strong, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, embed, figure, figcaption, footer, header, hgroup, menu, nav, section, summary, time, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } +article, aside, details, figcaption, figure, footer, header, hgroup, menu, time, nav, section { + display: block; } +html, body, .wrapper { + min-height: 100%; +} + + +/* Body +================================================== */ +html, body { + height: 100%; +} +.wrapper { + min-height: 100%; +} +body { + overflow-x: hidden; + font: 17px/28px ff-meta-serif-web-pro, "Georgia", serif; + color: #333; + background: #fff; +} + + +/* Typography +================================================== */ +h1, h2, h3, h4, h5, h6 { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-weight: normal; + text-transform: uppercase; + font-weight: 700; + color: #000; + text-rendering: optimizeLegibility; +} + +h1 { + font-size: 50px; + padding-bottom: 30px; +} + +h2 { + font-size: 35px; + padding-bottom: 25px; +} + +h3 { + font-size: 40px; + padding-bottom: 20px; +} + +h4 { + font-size: 35px; + padding-bottom: 15px; +} + +h5 { + font-size: 30px; + padding-bottom: 10px; +} + +p { + margin: 0 0 28px 0; +} + +strong { + font-weight: bold; +} +em { + font-style: italic; +} +sup { + line-height: 0; +} + +small { + font-size: 70%; +} + +cite { + font-size: 80%; + font-style: italic; + } + +/* Teaser +================================================== */ + +header#teaser h1 { + text-transform: none !important; + color: #333; + font-size: 28px !important; + font-weight: 300 !important; +} + + +/* Links +================================================== */ +a { + color: #3403F7; + text-decoration: none; + -webkit-transition: color .2s ease-in-out; + -moz-transition: color .2s ease-in-out; + transition: color .2s ease-in-out; +} +a:hover { + color: #FF0000; +} + +/* Layout +================================================== */ +/* White container that is the "page" */ +.wrapper { + max-width: 1500px; + margin: 0 auto; + background: #fff; +} + +/* Containers to keep content to a set width */ +.nav, +.art-header-inner, +.footer, +.art-list, +.abt, +.fourohfour { + width: 980px; +} +.nav, +.art-body-inner, +.footer, +.art-list, +.abt, +.fourohfour { + position: relative; + margin: 0 auto; +} + +/* Nav +================================================== */ +.nav { + position: absolute; + top: 0; + left: 50%; + height: 70px; + padding-top: 40px; + margin-left: -490px; /* Half width of nav */ + border-bottom: 1px solid #333; + z-index: 2; +} +.nav.fixed { + position: fixed; +} +#logo { + float: left; + +} +.nav-primary { + float: right; +} +.nav-primary li { + display: inline-block; + margin-left: 10px; + font-weight: 500; +} +#logo h1, +.nav-primary li, +.nav-primary li a { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-weight: 700; + font-size: 13px; + line-height: 30px; + color: #000; + text-transform: uppercase; +} + +#logo h1 { + height: 30px; + margin-left: 0px; + letter-spacing: 1px; + font-family: 'Questrial', sans-serif; + font-size: 30px; +} + +#logo h1 span{ + color: #F40034 !important; +} + +.nav li:first-child { + margin-left: 0; /* Remove left margin from the first nav li */ +} + +/* Home Page +================================================== */ + +div#home {} + +#home > div.cover { + max-width: 980px; + margin: 0px auto; + /*padding-top: 110px;*/ +} + +div.cover { + +} + +div.cover > img { + width: 100%; + height: 100%; +} + + +/* Article +================================================== */ +.art { + margin-top: -131px; +} +/* Header */ +.art-header { + height: 900px; + /* Background image is defined in the post */ + background-position: top center; + background-attachment: fixed; + overflow: hidden; +} +/* Contains the time, title and subtitle for an article */ +.art-header-inner { + position: relative; + top: 300px; + left: 50%; + margin-left: -490px; +} +.art-time, +.art-title, +.art-subtitle { + text-align: center; + text-transform: uppercase; +} +.art-time { + font-size: 14px; + line-height: 1.8; + letter-spacing: 4px; +} +.art-title { + font-size: 100px; + line-height: .9; + letter-spacing: -2px; + width: 100%; +} +.art-subtitle { + margin-top: 4px; + font-size: 14px; + line-height: 1.3; + letter-spacing: 4px; +} + +/* If small header, make few adjustments */ +.small .art-title { + font-size: 70px; + line-height: 65px; +} +.small.art-header-inner { + top: 320px; +} + +/* Body */ +.art-body { + position: relative; + width: 100%; + background: #fff; + z-index: 100; + -webkit-box-shadow: 0 -3px 3px rgba(0,0,0,.2); + -moz-box-shadow: 0 -3px 3px rgba(0,0,0,.2); + box-shadow: 0 -3px 3px rgba(0,0,0,.2); +} +.art-body-inner { + font-family: Georgia,Cambria,"Times New Roman",Times,serif; + max-width: 640px; + padding: 80px 0 50px; + letter-spacing: 0.01rem; + font-weight: 400; + font-style: normal; + font-size: 21px; + line-height: 1.5; +} +.art-body-inner a:hover { + padding-bottom:2px; +} +.art-body-inner ul, +.art-body-inner ol { /* For lists in the article body */ + margin-bottom: 26px; +} +.art-body-inner ul li { + list-style: disc; +} + +.art-body-inner mark { + background-color: #fdffb6; + padding: 2px; + -webkit-box-shadow: #fdffb6 0 0 5px; + -moz-box-shadow: #fdffb6 0 0 5px; + box-shadow: #fdffb6 0 0 5px; +} + +.art-body-inner blockquote { + font-size: 16px; + background: #f9f9f9; + border-left: 10px solid #ccc; + margin: 1.5em 10px; + padding: 0.5em 10px; + quotes: "\201C""\201D""\2018""\2019"; +} + +.art-body-inner blockquote p:first-child:before { + color: #ccc; + content: "“"; + font-size: 4em; + line-height: 0.1em; + margin-right: 0.25em; + vertical-align: -0.4em; +} + +.art-body-inner blockquote p { + margin-bottom: 1.5em; +} + +.art-body-inner blockquote p:last-child { + margin-bottom: 0; +} + + +.dropcap { /* First character on articles */ + float: left; + margin: 47px 10px 20px 0; + font-size: 100px; + line-height: 0; +} +.art-subhead { /* Subheads are used to break up sections of an article */ + margin: 60px 0 15px; + font-size: 20px; + line-height: 28px; + letter-spacing: 3px; +} +.callout { /* Callouts are like large pullquotes */ + font-weight: bold; +} +.art-body-inner img { + max-width: 100%; + max-height: 600px; + margin-bottom: 26px; +} +.art-body-inner img.center { + display: block; + margin-left: auto; + margin-right: auto; +} +.art-body-inner .art-reference { + font-size: 80%; + color: #999; + margin-top: 50px; +} + +/* For simple, white background posts */ +.simple .art-body { + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + position: relative; + top: 40px; +} + + +/* List of Articles +================================================== */ +.art-list { + padding: 120px 0 0; +} +.art-list-body { + position: relative; + overflow: hidden; +} +.art-list-item { + padding: 40px 0; + list-style: none; + overflow: hidden; + border-bottom: 1px solid #ccc; +} +.art-list-item:last-child { + border-bottom: none; +} +.art-list-title { + font-size: 26px; + line-height: 26px; + font-weight: 700; +} +.art-list-item-title-and-time { + float: left; + width: 30%; + margin-bottom: 10px; +} +.art-list-time { + font-size: 12px; + line-height: 20px; + letter-spacing: 2px; + color: #999; +} +.art-list-title a { + color: #000; + cursor: pointer; +} +.art-list-title a:hover { + color: #3403F7; +} +.art-list-item p { + width: 65%; + float: left; + margin-left: 5%; + margin-bottom: 0; + font-size: 16px; + line-height: 24px; + text-align: justify; +} + +.art-list-item .editable { + position: relative; + left: 30%; + cursor: pointer; +} + + +/* Footer +================================================== */ +.footer { + padding: 30px 0 40px; + overflow: hidden; + border-top: 1px solid #ccc; +} +.footer, +.footer a { + font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; + font-size: 13px; + text-transform: uppercase; + color: #777; +} +.footer a:hover { + color: #000; +} +.back-to-top, +.footer-nav, +.offsite-links { + width: 45%; + float: left; +} +.psi { + width:10%; + float:left; + text-align: center; +} +.footer-nav { + text-align: center; +} +.offsite-links { + text-align: right; +} +.footer .twitter-link:hover { + color: #0084B4; +} +.footer .instagram-link:hover { + color: #3F729B; +} +.footer .github-link:hover { + color: #c5376d; +} +.footer .caffein8-link:hover{ + color: black; +} +.footer .rss-link:hover { + color: #e85d24; +} +/* Remove prev & next links on loop */ +.art-list + .footer .footer-nav, +.abt + .footer .footer-nav { + text-indent: -9999px; + text-align: left; +} + + +/* White Reverse Theme +================================================== */ +/* Nav */ +.nav.white { + border-bottom-color: #fff; + border-bottom-color: rgba(255,255,255,.3); +} +.nav.white li a, +.nav.white li, +.nav.white #logo h1 { + color: #fff; + text-shadow: 0 0 8px rgba(0,0,0,.5); +} +.nav.white #logo h1 { + background-position: top center; +} + +nav.pagination{ + text-align: right; + padding-bottom: 25px; +} +/* Art header */ +.art-header.white { + background-color: #111; +} +.art-header.white .art-time, +.art-header.white .art-title, +.art-header.white .art-subtitle { + color: #fff; + text-shadow: 0 0 8px rgba(0,0,0,.5); +} + + +/* About page +================================================== */ +.abt { + padding: 200px 0 100px; + list-style: none; +} +.abt .abt-header { + font-size: 140px; + line-height: 1; + text-transform: none; +} +.abt .abt-subheader { + font-size: 24px; + font-style: italic; + text-transform: none; + color: #777; +} +.abt-body { + -moz-column-count: 2; + -moz-column-gap: 20px; + -webkit-column-count: 2; + -webkit-column-gap: 20px; + margin-bottom: 28px; +} +.abt-signoff { + line-height: 1.3; + font-style: italic; + color: #777; +} + +/* 404 page +================================================== */ +.fourohfour { + padding: 240px 0 100px; + text-align: center; +} + +/* Code +================================================== */ + +code, tt { +background: #ededee; +color: #3C4043; +font-size: 90%; +padding: 1px 3px; +} + +pre { + width: 92%; + overflow: auto; + margin: 2rem 0; + padding: 1rem 0.8rem 1rem 1.2rem; + color: #3f3b36; + border: 1px solid #ccc; + border-left: 1rem solid #ccc; + font: lighter 1.2rem/2rem monospace; + background: url(/assets/img/pre.png) repeat 0 -0.9rem; + background-size: 1px 4rem; +} + +pre code, tt { +font-size: inherit; +white-space: -moz-pre-wrap; +white-space: pre-wrap; +background: transparent; +border: none; +padding: 0; +} + + +.gist { + font-size: 14px; +} + + +/* Responsive +================================================== */ +@media only screen and (max-width: 1080px) { + /* Set all of the 980 containers to flexible width */ + .nav, + .art-body-inner, + .art-header-inner, + .footer, + .art-list, + .abt, + .fourohfour { + width: 90%; + } + .nav, + .art-header-inner { + margin-left: -45%; + } +} + +@media only screen and (max-width: 1024px) { + /* Everything becomes scrolling and non-fading */ + .nav, + .nav.fixed { + position: relative; + opacity: 1 !important; /* Important to override JS values */ + display: inline-block; + } + .art-header-inner { + position: relative; + top: 0 !important; /* Important to override JS values */ + margin-top: 240px !important; /* Important to override JS values */ + opacity: 1 !important; /* Important to override JS values */ + } + /* Articles no longer have fixed heights */ + .art-header { + height: auto; + padding-bottom: 100px; + background-size: cover !important; + background-attachment: scroll; + } + /* Remove bottom space out if articles doesn't have a background */ + .simple .art-header { + padding-bottom: 0; + } + .art-list { + padding-top: 0; + } + .abt { + padding: 40px 0; + } + .fourohfour { + padding: 80px 0 60px; + } +} + +@media only screen and (max-width: 780px) { + .art-body-inner ul, + .art-body-inner ol { + margin-left: 20px; + } + .art-title { + letter-spacing: 0; + } + .art-subtitle, + .art-time { + font-size: 12px; + } + .nav { + padding-top: 25px; + height: 55px; + } + .art-list-item-title-and-time, + .art-list-item p { + float: none; + width: auto; + margin-left: 0; + } + .abt-body { + -moz-column-count: 1; + -webkit-column-count: 1; + } +} + +@media only screen and (max-width: 500px) { + .nav-primary li { + margin-left: 10px; + } + .nav #logo h1 { + font-size: 16px; + letter-spacing: -1px; + } + .nav li a { + font-size: 12px; + } + .art-header { + padding-bottom: 50px; + } + .art-header-inner { + margin-top: 190px !important; + } + .art-body-inner { + padding-top: 30px; + } + body { + font-size: 15px; + line-height: 24px; + } + p { + margin-bottom: 24px; + } + .footer { + padding: 10px 0 20px; + } + .back-to-top, + .footer-nav { + width: 50%; + } + .back-to-top { + text-align: left; + } + .footer-nav { + text-align: right; + } + .offsite-links { + float: left; + width: 100%; + text-align: left; + } + .offsite-links a { + font-size: 12px; + } + .art-list + .footer .footer-nav { + display: none; + } + .abt .abt-header { + font-size: 80px; + } + .abt .abt-subheader { + font-size: 18px; + } +} + + +/* Misc +================================================== */ +::selection { + background: #000; + color: #fff; +} +::-moz-selection { + background: #000; + color: #fff; +} +img.left { + float: left; + margin-right: 20px; +} +img.right { + float: right; + margin-left: 20px; +} +/* Clearfixing pile */ +.nav:before, +.art-body-inner:before, +.footer:before, +.art-list:before { + content:""; + display:table; +} +.nav:after, +.art-body-inner:after, +.footer:after, +.art-list:after { + clear:both; +} +.nav, +.art-body-inner, +.footer, +.art-list { + zoom:1; /* For IE 6/7 (trigger hasLayout) */ +} + + +@-webkit-keyframes le-fade { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@-moz-keyframes le-fade { + 0% { + opacity: 0; + } + 100% { + opacity: 1; + } +} + +.art-header-inner { + -webkit-animation: le-fade .5s 0 1 ease-out; + -moz-animation: le-fade .5s 0 1 ease-out; +} + +.art-list, +.nav, +.abt, +.art-body { + -webkit-animation: le-fade .5s 0s 1 ease-out; + -moz-animation: le-fade .5s 0s 1 ease-out; +} + +hr.featured-article { + padding: 0; + border: none; + border-top: medium double #bbb; + color: #bbb; + text-align: center; +} +hr.featured-article:after { + content: "✭ Featured Article ✭"; + display: inline-block; + position: relative; + top: -0.8em; + font-size: 1.2em; + padding: 0 0.6em; + background: white; +} + +/* FORM */ + +#contact-area { + width: 600px; + margin-top: 25px; +} + +#contact-area input, #contact-area textarea { + padding: 5px; + width: 471px; + font-family: Helvetica, sans-serif; + margin: 0px 0px 10px 0px; + border: 2px solid #ccc; +} + +#contact-area textarea { + height: 250px; +} + +#contact-area textarea:focus, #contact-area input:focus { + border: 2px solid #0084B4; +} + +#contact-area input.submit-button { + width: 100px; + +} + +#contact-area #errormsg{ + position:relative; + left:115px; + color: #FF0000; + font-size:medium; +} + +label { + float: left; + text-align: right; + margin-right: 15px; + width: 100px; + padding-top: 5px; +} \ No newline at end of file diff --git a/web/template.xhtml b/web/template.xhtml new file mode 100644 index 00000000..4dbf7b74 --- /dev/null +++ b/web/template.xhtml @@ -0,0 +1,42 @@ + + + + + + + + + + Facelets Template + + + + +
+ +
+ + +
+
+
+
+
+ Left +
+
+ Content +
+
+
+ Bottom +
+ +
+ + diff --git a/web/test1.xhtml b/web/test1.xhtml new file mode 100644 index 00000000..2c72f62b --- /dev/null +++ b/web/test1.xhtml @@ -0,0 +1,22 @@ + + + + + + tooooop + + + + leeeeft + + + + contentttttt + + + + bottoooooom + + + diff --git a/web/test2.xhtml b/web/test2.xhtml new file mode 100644 index 00000000..fa31a202 --- /dev/null +++ b/web/test2.xhtml @@ -0,0 +1,16 @@ + + + + + +
+ + +
+ +
+ +
From 4af7cfb9967d28eac0062bb57045d54df017ca65 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 13:08:06 +0700 Subject: [PATCH 02/14] Sweeping --- assets/css/screen.css | 861 ----------------------------------------- assets/img/favicon.ico | Bin 799 -> 0 bytes assets/img/pre.png | Bin 78 -> 0 bytes index.html | 114 ------ new_post.html | 111 ------ post.html | 140 ------- 6 files changed, 1226 deletions(-) delete mode 100644 assets/css/screen.css delete mode 100644 assets/img/favicon.ico delete mode 100644 assets/img/pre.png delete mode 100644 index.html delete mode 100644 new_post.html delete mode 100644 post.html diff --git a/assets/css/screen.css b/assets/css/screen.css deleted file mode 100644 index 1d8fdf3b..00000000 --- a/assets/css/screen.css +++ /dev/null @@ -1,861 +0,0 @@ -@import url(http://fonts.googleapis.com/css?family=Open+Sans); -@import url(http://fonts.googleapis.com/css?family=Questrial); - -/* Reset & Basics (Inspired by E. Meyers) -================================================== */ -html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, address, cite, code, em, img, small, strong, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, embed, figure, figcaption, footer, header, hgroup, menu, nav, section, summary, time, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; } -article, aside, details, figcaption, figure, footer, header, hgroup, menu, time, nav, section { - display: block; } -html, body, .wrapper { - min-height: 100%; -} - - -/* Body -================================================== */ -html, body { - height: 100%; -} -.wrapper { - min-height: 100%; -} -body { - overflow-x: hidden; - font: 17px/28px ff-meta-serif-web-pro, "Georgia", serif; - color: #333; - background: #fff; -} - - -/* Typography -================================================== */ -h1, h2, h3, h4, h5, h6 { - font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; - font-weight: normal; - text-transform: uppercase; - font-weight: 700; - color: #000; - text-rendering: optimizeLegibility; -} - -h1 { - font-size: 50px; - padding-bottom: 30px; -} - -h2 { - font-size: 45px; - padding-bottom: 25px; -} - -h3 { - font-size: 40px; - padding-bottom: 20px; -} - -h4 { - font-size: 35px; - padding-bottom: 15px; -} - -h5 { - font-size: 30px; - padding-bottom: 10px; -} - -p { - margin: 0 0 28px 0; -} - -strong { - font-weight: bold; -} -em { - font-style: italic; -} -sup { - line-height: 0; -} - -small { - font-size: 70%; -} - -cite { - font-size: 80%; - font-style: italic; - } - -/* Teaser -================================================== */ - -header#teaser h1 { - text-transform: none !important; - color: #333; - font-size: 28px !important; - font-weight: 300 !important; -} - - -/* Links -================================================== */ -a { - color: #F40034; - text-decoration: none; - -webkit-transition: color .2s ease-in-out; - -moz-transition: color .2s ease-in-out; - transition: color .2s ease-in-out; -} -a:hover { - color: #F40034; -} - -/* Layout -================================================== */ -/* White container that is the "page" */ -.wrapper { - max-width: 1500px; - margin: 0 auto; - background: #fff; -} - -/* Containers to keep content to a set width */ -.nav, -.art-header-inner, -.footer, -.art-list, -.abt, -.fourohfour { - width: 980px; -} -.nav, -.art-body-inner, -.footer, -.art-list, -.abt, -.fourohfour { - position: relative; - margin: 0 auto; -} - -/* Nav -================================================== */ -.nav { - position: absolute; - top: 0; - left: 50%; - height: 70px; - padding-top: 40px; - margin-left: -490px; /* Half width of nav */ - border-bottom: 1px solid #333; - z-index: 2; -} -.nav.fixed { - position: fixed; -} -#logo { - float: left; -} -.nav-primary { - float: right; -} -.nav-primary li { - display: inline-block; - margin-left: 10px; - font-weight: 500; -} -#logo h1, -.nav-primary li, -.nav-primary li a { - font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; - font-weight: 700; - font-size: 13px; - line-height: 30px; - color: #000; - text-transform: uppercase; -} - -#logo h1 { - height: 30px; - margin-left: 0px; - letter-spacing: 1px; - font-family: 'Questrial', sans-serif; - font-size: 30px; -} - -#logo h1 span{ - color: #F40034 !important; -} - -.nav li:first-child { - margin-left: 0; /* Remove left margin from the first nav li */ -} - -/* Home Page -================================================== */ - -div#home {} - -#home > div.cover { - max-width: 980px; - margin: 0px auto; - /*padding-top: 110px;*/ -} - -div.cover { - -} - -div.cover > img { - width: 100%; - height: 100%; -} - - -/* Article -================================================== */ -.art { - margin-top: -131px; -} -/* Header */ -.art-header { - height: 900px; - /* Background image is defined in the post */ - background-position: top center; - background-attachment: fixed; - overflow: hidden; -} -/* Contains the time, title and subtitle for an article */ -.art-header-inner { - position: fixed; - top: 300px; - left: 50%; - margin-left: -490px; -} -.art-time, -.art-title, -.art-subtitle { - text-align: center; - text-transform: uppercase; -} -.art-time { - font-size: 14px; - line-height: 1.8; - letter-spacing: 4px; -} -.art-title { - font-size: 100px; - line-height: .9; - letter-spacing: -2px; - width: 100%; -} -.art-subtitle { - margin-top: 4px; - font-size: 14px; - line-height: 1.3; - letter-spacing: 4px; -} - -/* If small header, make few adjustments */ -.small .art-title { - font-size: 70px; - line-height: 65px; -} -.small.art-header-inner { - top: 320px; -} - -/* Body */ -.art-body { - position: relative; - width: 100%; - background: #fff; - z-index: 100; - -webkit-box-shadow: 0 -3px 3px rgba(0,0,0,.2); - -moz-box-shadow: 0 -3px 3px rgba(0,0,0,.2); - box-shadow: 0 -3px 3px rgba(0,0,0,.2); -} -.art-body-inner { - font-family: Georgia,Cambria,"Times New Roman",Times,serif; - max-width: 640px; - padding: 80px 0 50px; - letter-spacing: 0.01rem; - font-weight: 400; - font-style: normal; - font-size: 21px; - line-height: 1.5; -} -.art-body-inner a:hover { - border-bottom: 1px solid #F40034; - padding-bottom:2px; -} -.art-body-inner ul, -.art-body-inner ol { /* For lists in the article body */ - margin-bottom: 26px; -} -.art-body-inner ul li { - list-style: disc; -} - -.art-body-inner mark { - background-color: #fdffb6; - padding: 2px; - -webkit-box-shadow: #fdffb6 0 0 5px; - -moz-box-shadow: #fdffb6 0 0 5px; - box-shadow: #fdffb6 0 0 5px; -} - -.art-body-inner blockquote { - font-size: 16px; - background: #f9f9f9; - border-left: 10px solid #ccc; - margin: 1.5em 10px; - padding: 0.5em 10px; - quotes: "\201C""\201D""\2018""\2019"; -} - -.art-body-inner blockquote p:first-child:before { - color: #ccc; - content: "“"; - font-size: 4em; - line-height: 0.1em; - margin-right: 0.25em; - vertical-align: -0.4em; -} - -.art-body-inner blockquote p { - margin-bottom: 1.5em; -} - -.art-body-inner blockquote p:last-child { - margin-bottom: 0; -} - - -.dropcap { /* First character on articles */ - float: left; - margin: 47px 10px 20px 0; - font-size: 100px; - line-height: 0; -} -.art-subhead { /* Subheads are used to break up sections of an article */ - margin: 60px 0 15px; - font-size: 20px; - line-height: 28px; - letter-spacing: 3px; -} -.callout { /* Callouts are like large pullquotes */ - font-weight: bold; -} -.art-body-inner img { - max-width: 100%; - max-height: 600px; - margin-bottom: 26px; -} -.art-body-inner img.center { - display: block; - margin-left: auto; - margin-right: auto; -} -.art-body-inner .art-reference { - font-size: 80%; - color: #999; - margin-top: 50px; -} - -/* For simple, white background posts */ -.simple .art-body { - background: none; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; -} - - -/* List of Articles -================================================== */ -.art-list { - padding: 120px 0 0; -} -.art-list-body { - position: relative; - overflow: hidden; -} -.art-list-item { - padding: 40px 0; - list-style: none; - overflow: hidden; - border-bottom: 1px solid #ccc; -} -.art-list-item:last-child { - border-bottom: none; -} -.art-list-title { - font-size: 26px; - line-height: 26px; - font-weight: 700; -} -.art-list-item-title-and-time { - float: left; - width: 30%; - margin-bottom: 10px; -} -.art-list-time { - font-size: 12px; - line-height: 20px; - letter-spacing: 2px; - text-transform: uppercase; - color: #999; -} -.art-list-title a { - color: #000; -} -.art-list-title a:hover { - color: #F40034; -} -.art-list-item p { - width: 65%; - float: left; - margin-left: 5%; - margin-bottom: 0; - font-size: 16px; - line-height: 24px; -} - - -/* Footer -================================================== */ -.footer { - padding: 30px 0 40px; - overflow: hidden; - border-top: 1px solid #ccc; -} -.footer, -.footer a { - font-family: "proxima-nova", "helvetica neue", "helvetica", sans-serif; - font-size: 13px; - text-transform: uppercase; - color: #777; -} -.footer a:hover { - color: #000; -} -.back-to-top, -.footer-nav, -.offsite-links { - width: 45%; - float: left; -} -.psi { - width:10%; - float:left; - text-align: center; -} -.footer-nav { - text-align: center; -} -.offsite-links { - text-align: right; -} -.footer .twitter-link:hover { - color: #0084B4; -} -.footer .instagram-link:hover { - color: #3F729B; -} -.footer .github-link:hover { - color: #c5376d; -} -.footer .caffein8-link:hover{ - color: black; -} -.footer .rss-link:hover { - color: #e85d24; -} -/* Remove prev & next links on loop */ -.art-list + .footer .footer-nav, -.abt + .footer .footer-nav { - text-indent: -9999px; - text-align: left; -} - - -/* White Reverse Theme -================================================== */ -/* Nav */ -.nav.white { - border-bottom-color: #fff; - border-bottom-color: rgba(255,255,255,.3); -} -.nav.white li a, -.nav.white li, -.nav.white #logo h1 { - color: #fff; - text-shadow: 0 0 8px rgba(0,0,0,.5); -} -.nav.white #logo h1 { - background-position: top center; -} - -nav.pagination{ - text-align: right; - padding-bottom: 25px; -} -/* Art header */ -.art-header.white { - background-color: #111; -} -.art-header.white .art-time, -.art-header.white .art-title, -.art-header.white .art-subtitle { - color: #fff; - text-shadow: 0 0 8px rgba(0,0,0,.5); -} - - -/* About page -================================================== */ -.abt { - padding: 200px 0 100px; - list-style: none; -} -.abt .abt-header { - font-size: 140px; - line-height: 1; - text-transform: none; -} -.abt .abt-subheader { - font-size: 24px; - font-style: italic; - text-transform: none; - color: #777; -} -.abt-body { - -moz-column-count: 2; - -moz-column-gap: 20px; - -webkit-column-count: 2; - -webkit-column-gap: 20px; - margin-bottom: 28px; -} -.abt-signoff { - line-height: 1.3; - font-style: italic; - color: #777; -} - -/* 404 page -================================================== */ -.fourohfour { - padding: 240px 0 100px; - text-align: center; -} - -/* Code -================================================== */ - -code, tt { -background: #ededee; -color: #3C4043; -font-size: 90%; -padding: 1px 3px; -} - -pre { - width: 92%; - overflow: auto; - margin: 2rem 0; - padding: 1rem 0.8rem 1rem 1.2rem; - color: #3f3b36; - border: 1px solid #ccc; - border-left: 1rem solid #ccc; - font: lighter 1.2rem/2rem monospace; - background: url(/assets/img/pre.png) repeat 0 -0.9rem; - background-size: 1px 4rem; -} - -pre code, tt { -font-size: inherit; -white-space: -moz-pre-wrap; -white-space: pre-wrap; -background: transparent; -border: none; -padding: 0; -} - - -.gist { - font-size: 14px; -} - - -/* Responsive -================================================== */ -@media only screen and (max-width: 1080px) { - /* Set all of the 980 containers to flexible width */ - .nav, - .art-body-inner, - .art-header-inner, - .footer, - .art-list, - .abt, - .fourohfour { - width: 90%; - } - .nav, - .art-header-inner { - margin-left: -45%; - } -} - -@media only screen and (max-width: 1024px) { - /* Everything becomes scrolling and non-fading */ - .nav, - .nav.fixed { - position: relative; - opacity: 1 !important; /* Important to override JS values */ - display: inline-block; - } - .art-header-inner { - position: relative; - top: 0 !important; /* Important to override JS values */ - margin-top: 240px !important; /* Important to override JS values */ - opacity: 1 !important; /* Important to override JS values */ - } - /* Articles no longer have fixed heights */ - .art-header { - height: auto; - padding-bottom: 100px; - background-size: cover !important; - background-attachment: scroll; - } - /* Remove bottom space out if articles doesn't have a background */ - .simple .art-header { - padding-bottom: 0; - } - .art-list { - padding-top: 0; - } - .abt { - padding: 40px 0; - } - .fourohfour { - padding: 80px 0 60px; - } -} - -@media only screen and (max-width: 780px) { - .art-body-inner ul, - .art-body-inner ol { - margin-left: 20px; - } - .art-title { - letter-spacing: 0; - } - .art-subtitle, - .art-time { - font-size: 12px; - } - .nav { - padding-top: 25px; - height: 55px; - } - .art-list-item-title-and-time, - .art-list-item p { - float: none; - width: auto; - margin-left: 0; - } - .abt-body { - -moz-column-count: 1; - -webkit-column-count: 1; - } -} - -@media only screen and (max-width: 500px) { - .nav-primary li { - margin-left: 10px; - } - .nav #logo h1 { - font-size: 16px; - letter-spacing: -1px; - } - .nav li a { - font-size: 12px; - } - .art-header { - padding-bottom: 50px; - } - .art-header-inner { - margin-top: 190px !important; - } - .art-body-inner { - padding-top: 30px; - } - body { - font-size: 15px; - line-height: 24px; - } - p { - margin-bottom: 24px; - } - .footer { - padding: 10px 0 20px; - } - .back-to-top, - .footer-nav { - width: 50%; - } - .back-to-top { - text-align: left; - } - .footer-nav { - text-align: right; - } - .offsite-links { - float: left; - width: 100%; - text-align: left; - } - .offsite-links a { - font-size: 12px; - } - .art-list + .footer .footer-nav { - display: none; - } - .abt .abt-header { - font-size: 80px; - } - .abt .abt-subheader { - font-size: 18px; - } -} - - -/* Misc -================================================== */ -::selection { - background: #000; - color: #fff; -} -::-moz-selection { - background: #000; - color: #fff; -} -img.left { - float: left; - margin-right: 20px; -} -img.right { - float: right; - margin-left: 20px; -} -/* Clearfixing pile */ -.nav:before, -.art-body-inner:before, -.footer:before, -.art-list:before { - content:""; - display:table; -} -.nav:after, -.art-body-inner:after, -.footer:after, -.art-list:after { - clear:both; -} -.nav, -.art-body-inner, -.footer, -.art-list { - zoom:1; /* For IE 6/7 (trigger hasLayout) */ -} - - -@-webkit-keyframes le-fade { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} -@-moz-keyframes le-fade { - 0% { - opacity: 0; - } - 100% { - opacity: 1; - } -} - -.art-header-inner { - -webkit-animation: le-fade .5s 0 1 ease-out; - -moz-animation: le-fade .5s 0 1 ease-out; -} - -.art-list, -.nav, -.abt, -.art-body { - -webkit-animation: le-fade .5s 0s 1 ease-out; - -moz-animation: le-fade .5s 0s 1 ease-out; -} - -hr.featured-article { - padding: 0; - border: none; - border-top: medium double #bbb; - color: #bbb; - text-align: center; -} -hr.featured-article:after { - content: "✭ Featured Article ✭"; - display: inline-block; - position: relative; - top: -0.8em; - font-size: 1.2em; - padding: 0 0.6em; - background: white; -} - -/* FORM */ - -#contact-area { - width: 600px; - margin-top: 25px; -} - -#contact-area input, #contact-area textarea { - padding: 5px; - width: 471px; - font-family: Helvetica, sans-serif; - margin: 0px 0px 10px 0px; - border: 2px solid #ccc; -} - -#contact-area textarea { - height: 90px; -} - -#contact-area textarea:focus, #contact-area input:focus { - border: 2px solid #900; -} - -#contact-area input.submit-button { - width: 100px; - -} - -label { - float: left; - text-align: right; - margin-right: 15px; - width: 100px; - padding-top: 5px; -} \ No newline at end of file diff --git a/assets/img/favicon.ico b/assets/img/favicon.ico deleted file mode 100644 index 40b40ed345847af1db325abe295a4d7c33cc51d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 799 zcmZ?wbhEHbRA5kGc$UeqZ{NPZfB)9j)^6Us`Olv}|Ni~^`SWLYcXw)Ps)K`rqod=Z zMT^$0Ti4v&eCN)c-@kvqef!qi+dDKg^!@wyU%q@%RaG@NH($Pd`GN%tl9G}xUc6XR zQu6E9FLibGuV25udiCn{>(}4Ee~*cY`SIh2tE=m-UAqn)I`rbji{9SeckkZKojdp0 zvuEz^?gtJWP*G9YxN+mzvuFMM{GL2{qNu1iW5$g8_wN@K6&V>BZQHi(@#DvNd3lzW zmLEQRxPANf_U+p*UAlDo^y%p6==k{fH*el_bab?~wpLVBeE$47J3IUC-Mhxd#!Hqg z@$m34Gc(J{$+Z^ zfgzJY2V@Q?P8it#H)J+7x3spkcXW1jck-(-hw?JH@v`)EtEXqoo}E5zdY96i*(uFN zj0-Y3q?&aXr)xJUr*kZjNcUQi$uByGv)MHxowvt!Rt9@B(;SH=f#c~~U98q~HZ(=d zNo?X+@6f5SID?ZlQ)UiZror)R3hjJv=A>l?%&`{^ew41l*Dk;$_GoTkf%6J>Eil=TJ#E=(?aY;SM|LZ4G}!4c(8v)yZsj{E+;CCD xp^pWP3S4uv5|&mxacW8Syewc*%yzV+uO-MJ;ZQ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Simple Blog - - - - - -
- - - -
-
- -
-
- - - -
- - - - - - - - \ No newline at end of file diff --git a/new_post.html b/new_post.html deleted file mode 100644 index fc4e18ee..00000000 --- a/new_post.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Simple Blog | Tambah Post - - - - - -
- - - -
- - -

-

- -
-
-

Tambah Post

- -
-
- - - - - - -
- - - -
-
-
-
- -
- - - -
- - - - - - - - \ No newline at end of file diff --git a/post.html b/post.html deleted file mode 100644 index c0b6f9e6..00000000 --- a/post.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Simple Blog | Apa itu Simple Blog? - - - - - -
- - - -
- -
-
- -

Apa itu Simple Blog?

-

-
-
- -
-
-
-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis aliquam minus consequuntur amet nulla eius, neque beatae, nostrum possimus, officiis eaque consectetur. Sequi sunt maiores dolore, illum quidem eos explicabo! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam consequuntur consequatur molestiae saepe sed, incidunt sunt inventore minima voluptatum adipisci hic, est ipsa iste. Nobis, aperiam provident quae. Reprehenderit, iste.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores animi tenetur nam delectus eveniet iste non culpa laborum provident minima numquam excepturi rem commodi, officia accusamus eos voluptates obcaecati. Possimus?

- -
- -

Komentar

- -
-
- - - - - - -
- - - -
-
- -
    -
  • -
    -

    Jems

    -
    2 menit lalu
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

    -
  • - -
  • -
    -

    Kave

    -
    1 jam lalu
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

    -
  • -
-
-
- -
- - - -
- - - - - - - - \ No newline at end of file From 5b9c3117759e5049678add8eac2b27e2b1b9f42c Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 13:10:49 +0700 Subject: [PATCH 03/14] Added reference --- reference/addcomment.php | 94 ++++++++++++++++++++ reference/deletePost.php | 21 +++++ reference/editPost.php | 144 +++++++++++++++++++++++++++++++ reference/getdatabase.php | 79 +++++++++++++++++ reference/index.php | 127 +++++++++++++++++++++++++++ reference/insert_database.php | 52 +++++++++++ reference/new_post.html | 111 ++++++++++++++++++++++++ reference/post.php | 158 ++++++++++++++++++++++++++++++++++ 8 files changed, 786 insertions(+) create mode 100644 reference/addcomment.php create mode 100644 reference/deletePost.php create mode 100644 reference/editPost.php create mode 100644 reference/getdatabase.php create mode 100644 reference/index.php create mode 100644 reference/insert_database.php create mode 100644 reference/new_post.html create mode 100644 reference/post.php diff --git a/reference/addcomment.php b/reference/addcomment.php new file mode 100644 index 00000000..2a91581a --- /dev/null +++ b/reference/addcomment.php @@ -0,0 +1,94 @@ +diff($start); + + $format = array(); + if($interval->y !== 0) { + $format[] = "%y TAHUN"; + } + if($interval->m !== 0) { + $format[] = "%m BULAN"; + } + if($interval->d !== 0) { + $format[] = "%d HARI"; + } + if($interval->h !== 0) { + $format[] = "%h JAM"; + } + if($interval->i !== 0) { + $format[] = "%i MENIT"; + } + if($interval->s !== 0) { + if(!count($format)) { + return "BARU SAJA"; + } else { + $format[] = "%s DETIK"; + } + } + + if(count($format) > 1) { + $format = array_shift($format)." dan ".array_shift($format); + } else { + $format = array_pop($format); + } + + return $interval->format($format." YANG LALU"); +} + //creating connection to database + $link = mysqli_connect('localhost', 'kevhnmay94', "", 'simpleblog'); + $nama = mysqli_escape_string($link, $_POST['nama']); + $email = mysqli_escape_string($link, $_POST['email']); + $id = mysqli_escape_string($link, $_POST['pid']); + $komentar = mysqli_escape_string($link, $_POST['komentar']); + date_default_timezone_set('Asia/Jakarta'); + $tanggal = date("Y-m-d H:i:s"); + + $query = "INSERT INTO `comments`(`pid`, `name`, `date`, `comment`, `email`) + VALUES ($id,'$nama','$tanggal','$komentar','$email')"; + + //insert these data to database + if(!mysqli_query($link, $query)) + { + die('Error ' + mysqli_errno($link)); + } + + //tampilkan data ke screen + $query = "SELECT * FROM `comments` WHERE pid=$id ORDER BY date DESC"; + if(!($results = mysqli_query($link, $query))) + { + die('Error ' + mysqli_errno($link)); + } + + foreach($results as $result) + { + ?> +
  • +
    +

    + +
    +
    +

    +
  • + \ No newline at end of file diff --git a/reference/deletePost.php b/reference/deletePost.php new file mode 100644 index 00000000..d3756a9b --- /dev/null +++ b/reference/deletePost.php @@ -0,0 +1,21 @@ +entry has been deleted."; + + //close connection with database + mysqli_close($con); + header('Location: index.php'); +?> \ No newline at end of file diff --git a/reference/editPost.php b/reference/editPost.php new file mode 100644 index 00000000..2b4651d8 --- /dev/null +++ b/reference/editPost.php @@ -0,0 +1,144 @@ +' with '\n' + /* $query = "UPDATE `posts` SET `content`= REPLACE (`konten`, '
    ', '\n')"; + if(!mysqli_query($link, $query)) + { + die('Error : ' . mysqli_errno($link)); + } */ + + //retrieve data from database + $query = "SELECT * FROM `posts` WHERE `id` = $id"; + if(!($results = mysqli_query($link, $query))) + { + die('Error ' . mysqli_errno($link)); + } + $results = $results->fetch_assoc(); + + //reverse date format + $retrieved = $results['date']; + $date = DateTime::createFromFormat('Y-m-d', $retrieved); + + echo" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Simple Blog | Edit Post + + + + + +
    + + + + +
    + + +

    -

    + +
    +
    +

    Edit Post

    + +
    +
    + + + + + + + + format('d-m-Y') . "\" id=\"Tanggal\" required=\"\" placeholder=\"format: dd-mm-yyyy\"> +
    + +
    + + + +
    +
    +
    +
    + +
    + + + +
    + + + + + + + + + + "; + + mysqli_close($link); +?> diff --git a/reference/getdatabase.php b/reference/getdatabase.php new file mode 100644 index 00000000..10d76fa1 --- /dev/null +++ b/reference/getdatabase.php @@ -0,0 +1,79 @@ +diff($start); + + $format = array(); + if($interval->y !== 0) { + $format[] = "%y TAHUN"; + } + if($interval->m !== 0) { + $format[] = "%m BULAN"; + } + if($interval->d !== 0) { + $format[] = "%d HARI"; + } + if($interval->h !== 0) { + $format[] = "%h JAM"; + } + if($interval->i !== 0) { + $format[] = "%i MENIT"; + } + if($interval->s !== 0) { + if(!count($format)) { + return "BARU SAJA"; + } else { + $format[] = "%s DETIK"; + } + } + + if(count($format) > 1) { + $format = array_shift($format)." dan ".array_shift($format); + } else { + $format = array_pop($format); + } + + return $interval->format($format." YANG LALU"); +} + + //get data from info_comment + $link = mysqli_connect('localhost', 'kevhnmay94', "", 'simpleblog'); + $id = mysqli_real_escape_string($link, $_GET['id']); + $query = "SELECT * FROM `comments` WHERE pid = $id ORDER BY date DESC"; + + if(!($results = mysqli_query($link, $query))) + { + die('Error ' + mysqli_errno($link)); + } + + foreach ($results as $row) + { +?> +
  • +
    +

    + +
    +
    +

    +
  • + \ No newline at end of file diff --git a/reference/index.php b/reference/index.php new file mode 100644 index 00000000..cc86142d --- /dev/null +++ b/reference/index.php @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog + + + + + +
    + + + +
    +
    + +
    +
    + + + +
    + + + + + + + + diff --git a/reference/insert_database.php b/reference/insert_database.php new file mode 100644 index 00000000..a87ebf61 --- /dev/null +++ b/reference/insert_database.php @@ -0,0 +1,52 @@ +"; + echo "Tanggal : ",$tanggal, "
    "; + echo "Konten: ",$konten, "
    "; + + // Check connection + if (mysqli_connect_errno()) + { + echo "Failed to connect to MySQL
    "; + } + else + { + //Insert form values into database + if(!$update) + { + $query = "INSERT INTO `posts` (`id`, `title`, `date`, `content`) + VALUES (NULL, '$judul', '$tanggal', '$konten');"; + } + else + { + $query = "UPDATE `posts` + SET `title`='$judul',`date`='$tanggal',`content`='$konten' + WHERE id = $id"; + } + + if (!mysqli_query($con,$query)) + { + die('Error: ' . mysqli_error($con)); + } + + echo "1 record added"; + + } + + mysqli_close($con); + + //Redirect to index.php + header('Location: index.php'); + ?> \ No newline at end of file diff --git a/reference/new_post.html b/reference/new_post.html new file mode 100644 index 00000000..d267f466 --- /dev/null +++ b/reference/new_post.html @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Tambah Post + + + + + +
    + + + +
    + + +

    -

    + +
    +
    +

    Tambah Post

    + +
    +
    + + + + + +
    + +
    + + + +
    +
    +
    +
    + +
    + + + +
    + + + + + + + + + \ No newline at end of file diff --git a/reference/post.php b/reference/post.php new file mode 100644 index 00000000..8d068535 --- /dev/null +++ b/reference/post.php @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +fetch_assoc(); + $retrieved = $result['date']; + $date = DateTime::createFromFormat('Y-m-d', $retrieved); + + //retrieve data from database (info_comment) + $query1 = "SELECT * FROM `comments` WHERE pid = $id"; + if(!($results1 = mysqli_query($link, $query1))) + { + die('Error ' . mysqli_errno($link)); + } +?> + +Simple Blog | <?php echo $result['title']; ?> + + + + + +
    + + + +
    + +
    +
    + +

    +

    +
    +
    + +
    +
    +

    + + +

    Komentar

    + +
    +
    + id="pid"> + + + + + + +
    + +
    + + + +
    +
    +
      + +
      + +
      + +
    +
    +
    + +
    + + + +
    + + + + + + + + + + + \ No newline at end of file From 70055f6699da6238886857b7afc7653320567e18 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 14:20:31 +0700 Subject: [PATCH 04/14] Template modified --- build/web/index.xhtml | 17 +++++--------- build/web/newTemplate.xhtml | 33 +++++++++++++++++++++++++++ build/web/resources/css/cssLayout.css | 10 ++++---- build/web/template.xhtml | 28 +++++++++++++++++------ web/index.xhtml | 17 +++++--------- web/newTemplate.xhtml | 33 +++++++++++++++++++++++++++ web/resources/css/cssLayout.css | 10 ++++---- web/template.xhtml | 28 +++++++++++++++++------ 8 files changed, 130 insertions(+), 46 deletions(-) create mode 100644 build/web/newTemplate.xhtml create mode 100644 web/newTemplate.xhtml diff --git a/build/web/index.xhtml b/build/web/index.xhtml index c70ee58c..892d62a4 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -1,12 +1,7 @@ - - - - Facelet Title - - - Hello from Facelets - - - + + + + hueeek + diff --git a/build/web/newTemplate.xhtml b/build/web/newTemplate.xhtml new file mode 100644 index 00000000..daed1123 --- /dev/null +++ b/build/web/newTemplate.xhtml @@ -0,0 +1,33 @@ + + + + + + + + + Facelets Template + + + + +
    + Top +
    +
    +
    + Left +
    +
    + Content +
    +
    +
    + Bottom +
    + +
    + + diff --git a/build/web/resources/css/cssLayout.css b/build/web/resources/css/cssLayout.css index 8ee7cebe..a1871473 100644 --- a/build/web/resources/css/cssLayout.css +++ b/build/web/resources/css/cssLayout.css @@ -1,7 +1,7 @@ #top { position: relative; - background-color: #036fab; + //background-color: #036fab; color: white; padding: 5px; margin: 0px 0px 10px 0px; @@ -9,21 +9,21 @@ #bottom { position: relative; - background-color: #c2dfef; + //background-color: #c2dfef; padding: 5px; margin: 10px 0px 0px 0px; } #left { float: left; - background-color: #ece3a5; + //background-color: #ece3a5; padding: 5px; width: 150px; } #right { float: right; - background-color: #ece3a5; + //background-color: #ece3a5; padding: 5px; width: 150px; } @@ -35,7 +35,7 @@ } .left_content { - background-color: #dddddd; + //background-color: #dddddd; padding: 5px; margin-left: 170px; } diff --git a/build/web/template.xhtml b/build/web/template.xhtml index 4dbf7b74..64babc7a 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -14,17 +14,19 @@ -
    + + +
    Left @@ -33,9 +35,21 @@ Content
    -
    - Bottom -
    + +
    + + + +
    Ψ
    + + +
    +
    + diff --git a/web/index.xhtml b/web/index.xhtml index c70ee58c..892d62a4 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -1,12 +1,7 @@ - - - - Facelet Title - - - Hello from Facelets - - - + + + + hueeek + diff --git a/web/newTemplate.xhtml b/web/newTemplate.xhtml new file mode 100644 index 00000000..daed1123 --- /dev/null +++ b/web/newTemplate.xhtml @@ -0,0 +1,33 @@ + + + + + + + + + Facelets Template + + + + +
    + Top +
    +
    +
    + Left +
    +
    + Content +
    +
    +
    + Bottom +
    + +
    + + diff --git a/web/resources/css/cssLayout.css b/web/resources/css/cssLayout.css index 8ee7cebe..a1871473 100644 --- a/web/resources/css/cssLayout.css +++ b/web/resources/css/cssLayout.css @@ -1,7 +1,7 @@ #top { position: relative; - background-color: #036fab; + //background-color: #036fab; color: white; padding: 5px; margin: 0px 0px 10px 0px; @@ -9,21 +9,21 @@ #bottom { position: relative; - background-color: #c2dfef; + //background-color: #c2dfef; padding: 5px; margin: 10px 0px 0px 0px; } #left { float: left; - background-color: #ece3a5; + //background-color: #ece3a5; padding: 5px; width: 150px; } #right { float: right; - background-color: #ece3a5; + //background-color: #ece3a5; padding: 5px; width: 150px; } @@ -35,7 +35,7 @@ } .left_content { - background-color: #dddddd; + //background-color: #dddddd; padding: 5px; margin-left: 170px; } diff --git a/web/template.xhtml b/web/template.xhtml index 4dbf7b74..64babc7a 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -14,17 +14,19 @@ -
    + + +
    Left @@ -33,9 +35,21 @@ Content
    -
    - Bottom -
    + +
    + + + +
    Ψ
    + + +
    +
    + From f4fa5696ac360284eb0aca5766c985f37926bb73 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 14:50:16 +0700 Subject: [PATCH 05/14] Template modified (2) --- build/web/newTemplate.xhtml | 33 --------------------------------- build/web/template.xhtml | 13 +++++-------- web/newTemplate.xhtml | 33 --------------------------------- web/template.xhtml | 13 +++++-------- 4 files changed, 10 insertions(+), 82 deletions(-) delete mode 100644 build/web/newTemplate.xhtml delete mode 100644 web/newTemplate.xhtml diff --git a/build/web/newTemplate.xhtml b/build/web/newTemplate.xhtml deleted file mode 100644 index daed1123..00000000 --- a/build/web/newTemplate.xhtml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - Facelets Template - - - - -
    - Top -
    -
    -
    - Left -
    -
    - Content -
    -
    -
    - Bottom -
    - -
    - - diff --git a/build/web/template.xhtml b/build/web/template.xhtml index 64babc7a..615472d2 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -9,12 +9,11 @@ - Facelets Template + Simple Blog -
    @@ -24,22 +23,21 @@ +
    +
    -
    - Left +
    - Content +
    - -
    diff --git a/web/newTemplate.xhtml b/web/newTemplate.xhtml deleted file mode 100644 index daed1123..00000000 --- a/web/newTemplate.xhtml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - Facelets Template - - - - -
    - Top -
    -
    -
    - Left -
    -
    - Content -
    -
    -
    - Bottom -
    - -
    - - diff --git a/web/template.xhtml b/web/template.xhtml index 64babc7a..615472d2 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -9,12 +9,11 @@ - Facelets Template + Simple Blog -
    @@ -24,22 +23,21 @@ +
    +
    -
    - Left +
    - Content +
    - -
    From 770f39cdf76cdf7be03f60fcd7c6f311d0588d9e Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 16:05:04 +0700 Subject: [PATCH 06/14] Template modified (3), XHTML5 finally works! Also added new post and index page --- build/web/index.xhtml | 12 +++- build/web/new_post.xhtml | 35 ++++++++++ build/web/template.xhtml | 22 ++---- build/web/test1.xhtml | 4 -- reference/index.html | 115 +++++++++++++++++++++++++++++++ reference/post.html | 141 +++++++++++++++++++++++++++++++++++++++ web/index.xhtml | 12 +++- web/new_post.xhtml | 35 ++++++++++ web/template.xhtml | 22 ++---- web/test1.xhtml | 4 -- 10 files changed, 358 insertions(+), 44 deletions(-) create mode 100644 build/web/new_post.xhtml create mode 100644 reference/index.html create mode 100644 reference/post.html create mode 100644 web/new_post.xhtml diff --git a/build/web/index.xhtml b/build/web/index.xhtml index 892d62a4..c7a74e1b 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -3,5 +3,15 @@ - hueeek + +
    +
    + +
    +
    +
    diff --git a/build/web/new_post.xhtml b/build/web/new_post.xhtml new file mode 100644 index 00000000..0c73eb36 --- /dev/null +++ b/build/web/new_post.xhtml @@ -0,0 +1,35 @@ + + + + + +
    + + +

    -

    + +
    +
    +

    Tambah Post

    +
    +
    + + + + + +
    + +

    + + + +
    +
    +
    +
    +
    +
    + +
    diff --git a/build/web/template.xhtml b/build/web/template.xhtml index 615472d2..9920a410 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -1,4 +1,4 @@ - + - - - -
    -
    -
    -
    -
    - -
    -
    - -
    -
    + + - +
    diff --git a/build/web/test1.xhtml b/build/web/test1.xhtml index 2c72f62b..3ac44ba2 100644 --- a/build/web/test1.xhtml +++ b/build/web/test1.xhtml @@ -7,10 +7,6 @@ tooooop - - leeeeft - - contentttttt diff --git a/reference/index.html b/reference/index.html new file mode 100644 index 00000000..bd59c695 --- /dev/null +++ b/reference/index.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog + + + + + +
    + + + +
    +
    + +
    +
    + + + +
    + + + + + + + + + \ No newline at end of file diff --git a/reference/post.html b/reference/post.html new file mode 100644 index 00000000..04af634f --- /dev/null +++ b/reference/post.html @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Apa itu Simple Blog? + + + + + +
    + + + +
    + +
    +
    + +

    Apa itu Simple Blog?

    +

    +
    +
    + +
    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis aliquam minus consequuntur amet nulla eius, neque beatae, nostrum possimus, officiis eaque consectetur. Sequi sunt maiores dolore, illum quidem eos explicabo! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam consequuntur consequatur molestiae saepe sed, incidunt sunt inventore minima voluptatum adipisci hic, est ipsa iste. Nobis, aperiam provident quae. Reprehenderit, iste.

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores animi tenetur nam delectus eveniet iste non culpa laborum provident minima numquam excepturi rem commodi, officia accusamus eos voluptates obcaecati. Possimus?

    + +
    + +

    Komentar

    + +
    +
    + + + + + + +
    + + + +
    +
    + +
      +
    • +
      +

      Jems

      +
      2 menit lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • + +
    • +
      +

      Kave

      +
      1 jam lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • +
    +
    +
    + +
    + + + +
    + + + + + + + + + \ No newline at end of file diff --git a/web/index.xhtml b/web/index.xhtml index 892d62a4..c7a74e1b 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -3,5 +3,15 @@ - hueeek + +
    +
    + +
    +
    +
    diff --git a/web/new_post.xhtml b/web/new_post.xhtml new file mode 100644 index 00000000..0c73eb36 --- /dev/null +++ b/web/new_post.xhtml @@ -0,0 +1,35 @@ + + + + + +
    + + +

    -

    + +
    +
    +

    Tambah Post

    +
    +
    + + + + + +
    + +

    + + + +
    +
    +
    +
    +
    +
    + +
    diff --git a/web/template.xhtml b/web/template.xhtml index 615472d2..9920a410 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -1,4 +1,4 @@ - + - - - -
    -
    - -
    -
    - -
    -
    - -
    -
    + + - + diff --git a/web/test1.xhtml b/web/test1.xhtml index 2c72f62b..3ac44ba2 100644 --- a/web/test1.xhtml +++ b/web/test1.xhtml @@ -7,10 +7,6 @@ tooooop - - leeeeft - - contentttttt From 278bc353c47f18340dc840de2c3f168ad74d3a56 Mon Sep 17 00:00:00 2001 From: ClearingPath <13512093@std.stei.itb.ac.id> Date: Tue, 25 Nov 2014 16:31:15 +0700 Subject: [PATCH 07/14] new branch post --- nbproject/private/private.properties | 12 ++++++------ nbproject/project.properties | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 51b6b944..eb218137 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,7 +1,7 @@ -deploy.ant.properties.file=/home/kevhnmay94/.netbeans/8.0.1/config/GlassFishEE6/Properties/gfv3394951402.properties +deploy.ant.properties.file=C:\\Users\\Jonathan\\AppData\\Roaming\\NetBeans\\8.0\\config\\GlassFishEE6\\Properties\\gfv3-389264140.properties j2ee.platform.is.jsr109=true -j2ee.server.domain=/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1 -j2ee.server.home=/home/kevhnmay94/glassfish-4.1/glassfish -j2ee.server.instance=[/home/kevhnmay94/glassfish-4.1/glassfish:/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1]deployer:gfv3ee6:localhost:4848 -j2ee.server.middleware=/home/kevhnmay94/glassfish-4.1 -user.properties.file=/home/kevhnmay94/.netbeans/8.0.1/build.properties +j2ee.server.domain=C:/Users/Jonathan/AppData/Roaming/NetBeans/8.0/config/GF_4.0/domain1 +j2ee.server.home=C:/Program Files/glassfish-4.0/glassfish +j2ee.server.instance=[C:\\Program Files\\glassfish-4.0\\glassfish;C:\\Program Files\\glassfish-4.0\\glassfish\\domains\\domain1]deployer:gfv3ee6:localhost:4848 +j2ee.server.middleware=C:/Program Files/glassfish-4.0 +user.properties.file=C:\\Users\\Jonathan\\AppData\\Roaming\\NetBeans\\8.0\\build.properties diff --git a/nbproject/project.properties b/nbproject/project.properties index 18dbfaab..918161aa 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -34,11 +34,11 @@ j2ee.compile.on.save=true j2ee.copy.static.files.on.save=true j2ee.deploy.on.save=true j2ee.platform=1.7-web -j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.persistence.jar +j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar -j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar -j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api-osgi.jar j2ee.platform.wsit.classpath= j2ee.server.type=gfv3ee6 jar.compress=false From 36041c77ec072a6c5ec0dc54db6bfe6e6f58df9e Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 16:54:41 +0700 Subject: [PATCH 08/14] Template modified (4), Added javascript and other pages --- build/web/{test1.xhtml => admin_page.xhtml} | 13 +- build/web/editor_page.xhtml | 11 ++ build/web/index.xhtml | 8 +- build/web/new_post.xhtml | 7 + build/web/post.xhtml | 60 ++++++++ build/web/resources/js/app.js | 144 ++++++++++++++++++++ build/web/resources/js/fittext.js | 46 +++++++ build/web/resources/js/formValidation.js | 41 ++++++ build/web/resources/js/getdatabase.js | 91 +++++++++++++ build/web/resources/js/post.js | 12 ++ build/web/resources/js/respond.min.js | 2 + build/web/template.xhtml | 4 +- build/web/test2.xhtml | 16 --- web/{test1.xhtml => admin_page.xhtml} | 13 +- web/editor_page.xhtml | 11 ++ web/index.xhtml | 8 +- web/new_post.xhtml | 7 + web/post.xhtml | 60 ++++++++ web/resources/js/app.js | 144 ++++++++++++++++++++ web/resources/js/fittext.js | 46 +++++++ web/resources/js/formValidation.js | 41 ++++++ web/resources/js/getdatabase.js | 91 +++++++++++++ web/resources/js/post.js | 12 ++ web/resources/js/respond.min.js | 2 + web/template.xhtml | 4 +- web/test2.xhtml | 16 --- 26 files changed, 854 insertions(+), 56 deletions(-) rename build/web/{test1.xhtml => admin_page.xhtml} (67%) create mode 100644 build/web/editor_page.xhtml create mode 100644 build/web/post.xhtml create mode 100644 build/web/resources/js/app.js create mode 100644 build/web/resources/js/fittext.js create mode 100644 build/web/resources/js/formValidation.js create mode 100644 build/web/resources/js/getdatabase.js create mode 100644 build/web/resources/js/post.js create mode 100644 build/web/resources/js/respond.min.js delete mode 100644 build/web/test2.xhtml rename web/{test1.xhtml => admin_page.xhtml} (67%) create mode 100644 web/editor_page.xhtml create mode 100644 web/post.xhtml create mode 100644 web/resources/js/app.js create mode 100644 web/resources/js/fittext.js create mode 100644 web/resources/js/formValidation.js create mode 100644 web/resources/js/getdatabase.js create mode 100644 web/resources/js/post.js create mode 100644 web/resources/js/respond.min.js delete mode 100644 web/test2.xhtml diff --git a/build/web/test1.xhtml b/build/web/admin_page.xhtml similarity index 67% rename from build/web/test1.xhtml rename to build/web/admin_page.xhtml index 3ac44ba2..cd81f896 100644 --- a/build/web/test1.xhtml +++ b/build/web/admin_page.xhtml @@ -2,17 +2,10 @@ - - - tooooop - - + Simple Blog - Admin Page - contentttttt - - - - bottoooooom + + diff --git a/build/web/editor_page.xhtml b/build/web/editor_page.xhtml new file mode 100644 index 00000000..c55eedbf --- /dev/null +++ b/build/web/editor_page.xhtml @@ -0,0 +1,11 @@ + + + + Simple Blog - Editor Page + + + + + + diff --git a/build/web/index.xhtml b/build/web/index.xhtml index c7a74e1b..36186c78 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -2,7 +2,7 @@ - + Simple Blog
    @@ -14,4 +14,10 @@
    + + + + + +
    diff --git a/build/web/new_post.xhtml b/build/web/new_post.xhtml index 0c73eb36..680d8c7b 100644 --- a/build/web/new_post.xhtml +++ b/build/web/new_post.xhtml @@ -2,6 +2,7 @@ + Simple Blog - New Post
    @@ -31,5 +32,11 @@
    + + + + + +
    diff --git a/build/web/post.xhtml b/build/web/post.xhtml new file mode 100644 index 00000000..70ecc982 --- /dev/null +++ b/build/web/post.xhtml @@ -0,0 +1,60 @@ + + + + Simple Blog - <!-- Insert post title here --> + +
    + +
    +
    + +

    +

    +
    +
    + +
    +
    +

    + + +

    Komentar

    + +
    +
    + + + + + + + +
    + +

    + + + +
    +
    +
      + +
      + +
      + +
    +
    +
    + +
    +
    + + + + + + + +
    diff --git a/build/web/resources/js/app.js b/build/web/resources/js/app.js new file mode 100644 index 00000000..66276cd1 --- /dev/null +++ b/build/web/resources/js/app.js @@ -0,0 +1,144 @@ +var isMobile; + +// Identify if visitor on mobile with lame sniffing to remove parallaxing title +if( navigator.userAgent.match(/Android/i) || + navigator.userAgent.match(/webOS/i) || + navigator.userAgent.match(/iPhone/i) || + navigator.userAgent.match(/iPod/i) || + navigator.userAgent.match(/iPad/i) || + navigator.userAgent.match(/BlackBerry/) +){ + isMobile = true; +} + +$(document).ready(function() { + + // Global vars + var $artHeaderInner = $('.art-header-inner'); + var $artHeader = $('.art-header'); + var $artTitle = $('.art-title'); + var $artSubtitle = $('.art-subtitle'); + var $artTime = $('.art-time'); + var artTitleFontSize = parseInt($artTitle.css('font-size')); + var $nav = $('.nav'); + var windowScroll; + + // Apply Fittext to article titles to make it scale responsively in a smooth fashion + $artTitle.fitText(1, { minFontSize: '34px' }); + + // Identify if visitor has a large enough viewport for parallaxing title + function isLargeViewport() { + if($nav.css('position') == "relative") { + return false; + } else { + return true; + } + } + + // If large viewport and not mobile, parallax the title + if(!isMobile) { + $(window).scroll(function() { + if(isLargeViewport()) { + slidingTitle(); + } + }); + } + + // Window gets large enough, need to recalc all parallaxing title values + $(window).resize(function() { + if(isLargeViewport()) { + slidingTitle(); + } + }); + + // Functional parallaxing calculations + function slidingTitle() { + //Get scroll position of window + windowScroll = $(this).scrollTop(); + + //Slow scroll of .art-header-inner scroll and fade it out + $artHeaderInner.css({ + 'margin-top' : -(windowScroll/3)+"px", + 'opacity' : 1-(windowScroll/550) + }); + + //Slowly parallax the background of .art-header + $artHeader.css({ + 'background-position' : 'center ' + (-windowScroll/8)+"px" + }); + + //Fade the .nav out + $nav.css({ + 'opacity' : 1-(windowScroll/400) + }); + } + + // Link to top of page without changing URL + $('.back-to-top a').click(function(e) { + e.preventDefault(); + $(window).scrollTop(0); + }) + + // Cover image of the header + var $postImage = $('img[alt="cover"]'); + if ( $postImage.length ) { + var postImageURL = $postImage.attr('src'); + $('.art-header').css('background-image','url(' + postImageURL + ')'); + $('.art-header').css('background-size','100%'); + + // Change color scheme to white + $('#logo h1').css('color','white'); + $('.art-title').css('color','white'); + $('.art-subtitle').css('color','white'); + $('.art-time').css('color','white'); + $('.nav-primary li a').css('color','white'); + + // Add Text Shadows + $('.art-title').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + $('.art-subtitle').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + $('.art-time').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + + } + $postImage.remove(); + + // Subtitles + var $subtitle = $('span[id="subtitle"]'); + if ( $subtitle.length ) { + var subtitleText = $('#subtitle').text(); + $('.art-subtitle').html(subtitleText); + + } + $subtitle.remove(); + + // Make punctuation smarter + jQuery.fn.smarten = (function() { + + function smartenNode(node) { + if (node.nodeType === 3) { + node.data = node.data + .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // Opening singles + .replace(/'/g, "\u2019") // Closing singles & apostrophes + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201c") // Opening doubles + .replace(/"/g, "\u201d") // Closing doubles + .replace(/--/g, "\u2013") // En dashes + .replace(/---/g, "\u2014") // Em dashes + .replace(/\.{3}/g, "\u2026"); // Ellipsis + } else if (node.nodeType === 1) { + if (node = node.firstChild) do { + smartenNode(node); + } while (node = node.nextSibling); + } + } + + return function() { + return this.each(function(){ + smartenNode(this); + }); + }; + + }()); + + // Instantiation + $('article').smarten(); + +}); \ No newline at end of file diff --git a/build/web/resources/js/fittext.js b/build/web/resources/js/fittext.js new file mode 100644 index 00000000..035baa36 --- /dev/null +++ b/build/web/resources/js/fittext.js @@ -0,0 +1,46 @@ +/*global jQuery */ +/*! +* FitText.js 1.0 +* +* Copyright 2011, Dave Rupert http://daverupert.com +* Released under the WTFPL license +* http://sam.zoy.org/wtfpl/ +* +* Date: Thu May 05 14:23:00 2011 -0600 +*/ +$(document).ready(function() { + +(function( $ ){ + + $.fn.fitText = function( kompressor, options ) { + + // Setup options + var compressor = kompressor || 1, + settings = $.extend({ + 'minFontSize' : Number.NEGATIVE_INFINITY, + 'maxFontSize' : Number.POSITIVE_INFINITY + }, options); + + return this.each(function(){ + + // Store the object + var $this = $(this); + + // Resizer() resizes items based on the object width divided by the compressor * 10 + var resizer = function () { + $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); + }; + + // Call once to set. + resizer(); + + // Call on resize. Opera debounces their resize by default. + $(window).on('resize', resizer); + + }); + + }; + +})( jQuery ); + +}); \ No newline at end of file diff --git a/build/web/resources/js/formValidation.js b/build/web/resources/js/formValidation.js new file mode 100644 index 00000000..5093fe53 --- /dev/null +++ b/build/web/resources/js/formValidation.js @@ -0,0 +1,41 @@ +function Validation() +{ + var tanggal = document.getElementById('Tanggal').value; + document.getElementById('errormsg').innerHTML=""; + var tanggal1 = parseDate(tanggal); + if(tanggal1 === null) + { + return false; + } + else + { + var tanggal2 = new Date(); + var result = tanggal1 > tanggal2; + if(result) + { + var tanggal_reverse = tanggal.split("-").reverse().join("-"); + document.getElementById('Tanggal').value=tanggal_reverse; + return true; + } + else + { + document.getElementById('errormsg').innerHTML="*Tanggal sudah lewat. Masukkan tanggal yang valid."; + return false; + } + } +} + +function parseDate(str) { + var m = str.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/); + var tanggal3; + if(m) + { + var tanggal3 = new Date(m[3],m[2]-1,m[1]-(-1)); + } + else + { + document.getElementById("errormsg").innerHTML="*format tanggal salah. (format:dd-mm-yyyy)"; + var tanggal3 = null; + } + return tanggal3; +} \ No newline at end of file diff --git a/build/web/resources/js/getdatabase.js b/build/web/resources/js/getdatabase.js new file mode 100644 index 00000000..d4869c6e --- /dev/null +++ b/build/web/resources/js/getdatabase.js @@ -0,0 +1,91 @@ +/* function addcomment(id) +{ + var content = document.getElementById('ajaxcontent'); + var nama = document.getElementById('nama').value; + var komentar = document.getElementById('komentar').value; + var email = document.getElementById('email').value; + + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + content.innerHTML = xmlhttp.responseText; + } + }; + + xmlhttp.open("GET","addcomment.php?id="+id+"&nama="+nama+"&komentar="+komentar+"&email="+email,true); + xmlhttp.send(); +} */ + +function ajaxRequest(){ + var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE + if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken) + for (var i=0; i()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + if(email != "") + { + var valid = regex.test(email); + var errormessage = document.getElementById('errormsg'); + + if(valid) + { + errormessage.innerHTML=""; + var xmlhttp = new ajaxRequest(); + var content = document.getElementById('ajaxcontent'); + var nama = encodeURIComponent(document.getElementById('nama').value); + var komentar = encodeURIComponent(document.getElementById('komentar').value); + var id = encodeURIComponent(document.getElementById('pid').value); + console.log(id); + var email2 = encodeURIComponent(email); + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4 && ((xmlhttp.status == 200) || (window.location.href.indexOf("http")==-1))) + { + content.innerHTML = xmlhttp.responseText; + } + }; + + xmlhttp.open("POST","addcomment.php",true); + xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp.send("nama="+nama+"&komentar="+komentar+"&email="+email+"&pid="+id); + + } + else + { + errormessage.innerHTML="Format email tidak valid"; + } + } +} + diff --git a/build/web/resources/js/post.js b/build/web/resources/js/post.js new file mode 100644 index 00000000..c14e3a51 --- /dev/null +++ b/build/web/resources/js/post.js @@ -0,0 +1,12 @@ +function hapus(id) +{ + var konfirmasi = confirm('Apakah anda yakin menghapus post ini?'); + if(konfirmasi) + { + var formObjects = document.forms['post']; + var formElements = formObjects.elements['id']; + formElements.value = id.substring(1); + formObjects.action = "deletePost.php"; + formObjects.submit(); + } +} \ No newline at end of file diff --git a/build/web/resources/js/respond.min.js b/build/web/resources/js/respond.min.js new file mode 100644 index 00000000..b7fe2f47 --- /dev/null +++ b/build/web/resources/js/respond.min.js @@ -0,0 +1,2 @@ +/*! Respond.js v1.0.1pre: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false;try{v=new XMLHttpRequest()}catch(w){v=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); \ No newline at end of file diff --git a/build/web/template.xhtml b/build/web/template.xhtml index 9920a410..5b9eb6f2 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -9,7 +9,7 @@ - Simple Blog + Simple Blog @@ -22,6 +22,7 @@ +
    @@ -36,6 +37,7 @@
    +
    diff --git a/build/web/test2.xhtml b/build/web/test2.xhtml deleted file mode 100644 index fa31a202..00000000 --- a/build/web/test2.xhtml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - -
    - - -
    - -
    - -
    diff --git a/web/test1.xhtml b/web/admin_page.xhtml similarity index 67% rename from web/test1.xhtml rename to web/admin_page.xhtml index 3ac44ba2..cd81f896 100644 --- a/web/test1.xhtml +++ b/web/admin_page.xhtml @@ -2,17 +2,10 @@ - - - tooooop - - + Simple Blog - Admin Page - contentttttt - - - - bottoooooom + + diff --git a/web/editor_page.xhtml b/web/editor_page.xhtml new file mode 100644 index 00000000..c55eedbf --- /dev/null +++ b/web/editor_page.xhtml @@ -0,0 +1,11 @@ + + + + Simple Blog - Editor Page + + + + + + diff --git a/web/index.xhtml b/web/index.xhtml index c7a74e1b..36186c78 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -2,7 +2,7 @@ - + Simple Blog
    @@ -14,4 +14,10 @@
    + + + + + +
    diff --git a/web/new_post.xhtml b/web/new_post.xhtml index 0c73eb36..680d8c7b 100644 --- a/web/new_post.xhtml +++ b/web/new_post.xhtml @@ -2,6 +2,7 @@ + Simple Blog - New Post
    @@ -31,5 +32,11 @@
    + + + + + +
    diff --git a/web/post.xhtml b/web/post.xhtml new file mode 100644 index 00000000..70ecc982 --- /dev/null +++ b/web/post.xhtml @@ -0,0 +1,60 @@ + + + + Simple Blog - <!-- Insert post title here --> + +
    + +
    +
    + +

    +

    +
    +
    + +
    +
    +

    + + +

    Komentar

    + +
    +
    + + + + + + + +
    + +

    + + + +
    +
    +
      + +
      + +
      + +
    +
    +
    + +
    +
    + + + + + + + +
    diff --git a/web/resources/js/app.js b/web/resources/js/app.js new file mode 100644 index 00000000..66276cd1 --- /dev/null +++ b/web/resources/js/app.js @@ -0,0 +1,144 @@ +var isMobile; + +// Identify if visitor on mobile with lame sniffing to remove parallaxing title +if( navigator.userAgent.match(/Android/i) || + navigator.userAgent.match(/webOS/i) || + navigator.userAgent.match(/iPhone/i) || + navigator.userAgent.match(/iPod/i) || + navigator.userAgent.match(/iPad/i) || + navigator.userAgent.match(/BlackBerry/) +){ + isMobile = true; +} + +$(document).ready(function() { + + // Global vars + var $artHeaderInner = $('.art-header-inner'); + var $artHeader = $('.art-header'); + var $artTitle = $('.art-title'); + var $artSubtitle = $('.art-subtitle'); + var $artTime = $('.art-time'); + var artTitleFontSize = parseInt($artTitle.css('font-size')); + var $nav = $('.nav'); + var windowScroll; + + // Apply Fittext to article titles to make it scale responsively in a smooth fashion + $artTitle.fitText(1, { minFontSize: '34px' }); + + // Identify if visitor has a large enough viewport for parallaxing title + function isLargeViewport() { + if($nav.css('position') == "relative") { + return false; + } else { + return true; + } + } + + // If large viewport and not mobile, parallax the title + if(!isMobile) { + $(window).scroll(function() { + if(isLargeViewport()) { + slidingTitle(); + } + }); + } + + // Window gets large enough, need to recalc all parallaxing title values + $(window).resize(function() { + if(isLargeViewport()) { + slidingTitle(); + } + }); + + // Functional parallaxing calculations + function slidingTitle() { + //Get scroll position of window + windowScroll = $(this).scrollTop(); + + //Slow scroll of .art-header-inner scroll and fade it out + $artHeaderInner.css({ + 'margin-top' : -(windowScroll/3)+"px", + 'opacity' : 1-(windowScroll/550) + }); + + //Slowly parallax the background of .art-header + $artHeader.css({ + 'background-position' : 'center ' + (-windowScroll/8)+"px" + }); + + //Fade the .nav out + $nav.css({ + 'opacity' : 1-(windowScroll/400) + }); + } + + // Link to top of page without changing URL + $('.back-to-top a').click(function(e) { + e.preventDefault(); + $(window).scrollTop(0); + }) + + // Cover image of the header + var $postImage = $('img[alt="cover"]'); + if ( $postImage.length ) { + var postImageURL = $postImage.attr('src'); + $('.art-header').css('background-image','url(' + postImageURL + ')'); + $('.art-header').css('background-size','100%'); + + // Change color scheme to white + $('#logo h1').css('color','white'); + $('.art-title').css('color','white'); + $('.art-subtitle').css('color','white'); + $('.art-time').css('color','white'); + $('.nav-primary li a').css('color','white'); + + // Add Text Shadows + $('.art-title').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + $('.art-subtitle').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + $('.art-time').css('text-shadow','3px 3px 0 rgba(0,0,0,0.1), -1px -1px 0 rgba(0,0,0,0.1), 1px -1px 0 rgba(0,0,0,0.1), -1px 1px 0 rgba(0,0,0,0.1), 1px 1px 0 rgba(0,0,0,0.1)'); + + } + $postImage.remove(); + + // Subtitles + var $subtitle = $('span[id="subtitle"]'); + if ( $subtitle.length ) { + var subtitleText = $('#subtitle').text(); + $('.art-subtitle').html(subtitleText); + + } + $subtitle.remove(); + + // Make punctuation smarter + jQuery.fn.smarten = (function() { + + function smartenNode(node) { + if (node.nodeType === 3) { + node.data = node.data + .replace(/(^|[-\u2014/(\[{"\s])'/g, "$1\u2018") // Opening singles + .replace(/'/g, "\u2019") // Closing singles & apostrophes + .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, "$1\u201c") // Opening doubles + .replace(/"/g, "\u201d") // Closing doubles + .replace(/--/g, "\u2013") // En dashes + .replace(/---/g, "\u2014") // Em dashes + .replace(/\.{3}/g, "\u2026"); // Ellipsis + } else if (node.nodeType === 1) { + if (node = node.firstChild) do { + smartenNode(node); + } while (node = node.nextSibling); + } + } + + return function() { + return this.each(function(){ + smartenNode(this); + }); + }; + + }()); + + // Instantiation + $('article').smarten(); + +}); \ No newline at end of file diff --git a/web/resources/js/fittext.js b/web/resources/js/fittext.js new file mode 100644 index 00000000..035baa36 --- /dev/null +++ b/web/resources/js/fittext.js @@ -0,0 +1,46 @@ +/*global jQuery */ +/*! +* FitText.js 1.0 +* +* Copyright 2011, Dave Rupert http://daverupert.com +* Released under the WTFPL license +* http://sam.zoy.org/wtfpl/ +* +* Date: Thu May 05 14:23:00 2011 -0600 +*/ +$(document).ready(function() { + +(function( $ ){ + + $.fn.fitText = function( kompressor, options ) { + + // Setup options + var compressor = kompressor || 1, + settings = $.extend({ + 'minFontSize' : Number.NEGATIVE_INFINITY, + 'maxFontSize' : Number.POSITIVE_INFINITY + }, options); + + return this.each(function(){ + + // Store the object + var $this = $(this); + + // Resizer() resizes items based on the object width divided by the compressor * 10 + var resizer = function () { + $this.css('font-size', Math.max(Math.min($this.width() / (compressor*10), parseFloat(settings.maxFontSize)), parseFloat(settings.minFontSize))); + }; + + // Call once to set. + resizer(); + + // Call on resize. Opera debounces their resize by default. + $(window).on('resize', resizer); + + }); + + }; + +})( jQuery ); + +}); \ No newline at end of file diff --git a/web/resources/js/formValidation.js b/web/resources/js/formValidation.js new file mode 100644 index 00000000..5093fe53 --- /dev/null +++ b/web/resources/js/formValidation.js @@ -0,0 +1,41 @@ +function Validation() +{ + var tanggal = document.getElementById('Tanggal').value; + document.getElementById('errormsg').innerHTML=""; + var tanggal1 = parseDate(tanggal); + if(tanggal1 === null) + { + return false; + } + else + { + var tanggal2 = new Date(); + var result = tanggal1 > tanggal2; + if(result) + { + var tanggal_reverse = tanggal.split("-").reverse().join("-"); + document.getElementById('Tanggal').value=tanggal_reverse; + return true; + } + else + { + document.getElementById('errormsg').innerHTML="*Tanggal sudah lewat. Masukkan tanggal yang valid."; + return false; + } + } +} + +function parseDate(str) { + var m = str.match(/^(\d{1,2})-(\d{1,2})-(\d{4})$/); + var tanggal3; + if(m) + { + var tanggal3 = new Date(m[3],m[2]-1,m[1]-(-1)); + } + else + { + document.getElementById("errormsg").innerHTML="*format tanggal salah. (format:dd-mm-yyyy)"; + var tanggal3 = null; + } + return tanggal3; +} \ No newline at end of file diff --git a/web/resources/js/getdatabase.js b/web/resources/js/getdatabase.js new file mode 100644 index 00000000..d4869c6e --- /dev/null +++ b/web/resources/js/getdatabase.js @@ -0,0 +1,91 @@ +/* function addcomment(id) +{ + var content = document.getElementById('ajaxcontent'); + var nama = document.getElementById('nama').value; + var komentar = document.getElementById('komentar').value; + var email = document.getElementById('email').value; + + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4 && xmlhttp.status == 200) + { + content.innerHTML = xmlhttp.responseText; + } + }; + + xmlhttp.open("GET","addcomment.php?id="+id+"&nama="+nama+"&komentar="+komentar+"&email="+email,true); + xmlhttp.send(); +} */ + +function ajaxRequest(){ + var activexmodes=["Msxml2.XMLHTTP", "Microsoft.XMLHTTP"] //activeX versions to check for in IE + if (window.ActiveXObject){ //Test for support for ActiveXObject in IE first (as XMLHttpRequest in IE7 is broken) + for (var i=0; i()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; + if(email != "") + { + var valid = regex.test(email); + var errormessage = document.getElementById('errormsg'); + + if(valid) + { + errormessage.innerHTML=""; + var xmlhttp = new ajaxRequest(); + var content = document.getElementById('ajaxcontent'); + var nama = encodeURIComponent(document.getElementById('nama').value); + var komentar = encodeURIComponent(document.getElementById('komentar').value); + var id = encodeURIComponent(document.getElementById('pid').value); + console.log(id); + var email2 = encodeURIComponent(email); + xmlhttp.onreadystatechange = function() + { + if(xmlhttp.readyState == 4 && ((xmlhttp.status == 200) || (window.location.href.indexOf("http")==-1))) + { + content.innerHTML = xmlhttp.responseText; + } + }; + + xmlhttp.open("POST","addcomment.php",true); + xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"); + xmlhttp.send("nama="+nama+"&komentar="+komentar+"&email="+email+"&pid="+id); + + } + else + { + errormessage.innerHTML="Format email tidak valid"; + } + } +} + diff --git a/web/resources/js/post.js b/web/resources/js/post.js new file mode 100644 index 00000000..c14e3a51 --- /dev/null +++ b/web/resources/js/post.js @@ -0,0 +1,12 @@ +function hapus(id) +{ + var konfirmasi = confirm('Apakah anda yakin menghapus post ini?'); + if(konfirmasi) + { + var formObjects = document.forms['post']; + var formElements = formObjects.elements['id']; + formElements.value = id.substring(1); + formObjects.action = "deletePost.php"; + formObjects.submit(); + } +} \ No newline at end of file diff --git a/web/resources/js/respond.min.js b/web/resources/js/respond.min.js new file mode 100644 index 00000000..b7fe2f47 --- /dev/null +++ b/web/resources/js/respond.min.js @@ -0,0 +1,2 @@ +/*! Respond.js v1.0.1pre: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */ +(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length,z=0,y,x,A,v;for(;z=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send(null)},c=(function(){var v=false;try{v=new XMLHttpRequest()}catch(w){v=new ActiveXObject("Microsoft.XMLHTTP")}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); \ No newline at end of file diff --git a/web/template.xhtml b/web/template.xhtml index 9920a410..5b9eb6f2 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -9,7 +9,7 @@ - Simple Blog + Simple Blog @@ -22,6 +22,7 @@ +
    @@ -36,6 +37,7 @@
    +
    diff --git a/web/test2.xhtml b/web/test2.xhtml deleted file mode 100644 index fa31a202..00000000 --- a/web/test2.xhtml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - -
    - - -
    - -
    - -
    From b2499c7c3e551a1893c93bb5aede79982fb0b2d5 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 17:03:06 +0700 Subject: [PATCH 09/14] Javascript in JSF tag --- build/web/admin_page.xhtml | 9 +++++++-- build/web/editor_page.xhtml | 9 +++++++-- build/web/index.xhtml | 11 ++++++----- build/web/new_post.xhtml | 11 ++++++----- build/web/post.xhtml | 11 ++++++----- web/admin_page.xhtml | 9 +++++++-- web/editor_page.xhtml | 9 +++++++-- web/index.xhtml | 11 ++++++----- web/new_post.xhtml | 11 ++++++----- web/post.xhtml | 11 ++++++----- 10 files changed, 64 insertions(+), 38 deletions(-) diff --git a/build/web/admin_page.xhtml b/build/web/admin_page.xhtml index cd81f896..9cadcc0a 100644 --- a/build/web/admin_page.xhtml +++ b/build/web/admin_page.xhtml @@ -1,11 +1,16 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - Admin Page - + + + + + diff --git a/build/web/editor_page.xhtml b/build/web/editor_page.xhtml index c55eedbf..bd9ab282 100644 --- a/build/web/editor_page.xhtml +++ b/build/web/editor_page.xhtml @@ -1,11 +1,16 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - Editor Page - + + + + + diff --git a/build/web/index.xhtml b/build/web/index.xhtml index 36186c78..f7c28e9b 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://java.sun.com/jsf/html"> Simple Blog
    @@ -15,9 +16,9 @@
    - - - - + + + +
    diff --git a/build/web/new_post.xhtml b/build/web/new_post.xhtml index 680d8c7b..8a89871e 100644 --- a/build/web/new_post.xhtml +++ b/build/web/new_post.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - New Post @@ -33,10 +34,10 @@ - - - - + + + + diff --git a/build/web/post.xhtml b/build/web/post.xhtml index 70ecc982..e0942f14 100644 --- a/build/web/post.xhtml +++ b/build/web/post.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - <!-- Insert post title here -->
    @@ -51,10 +52,10 @@
    - - - - + + + +
    diff --git a/web/admin_page.xhtml b/web/admin_page.xhtml index cd81f896..9cadcc0a 100644 --- a/web/admin_page.xhtml +++ b/web/admin_page.xhtml @@ -1,11 +1,16 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - Admin Page - + + + + + diff --git a/web/editor_page.xhtml b/web/editor_page.xhtml index c55eedbf..bd9ab282 100644 --- a/web/editor_page.xhtml +++ b/web/editor_page.xhtml @@ -1,11 +1,16 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - Editor Page - + + + + + diff --git a/web/index.xhtml b/web/index.xhtml index 36186c78..f7c28e9b 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://java.sun.com/jsf/html"> Simple Blog
    @@ -15,9 +16,9 @@
    - - - - + + + +
    diff --git a/web/new_post.xhtml b/web/new_post.xhtml index 680d8c7b..8a89871e 100644 --- a/web/new_post.xhtml +++ b/web/new_post.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - New Post @@ -33,10 +34,10 @@ - - - - + + + + diff --git a/web/post.xhtml b/web/post.xhtml index 70ecc982..e0942f14 100644 --- a/web/post.xhtml +++ b/web/post.xhtml @@ -1,7 +1,8 @@ + template="./template.xhtml" + xmlns:h="http://xmlns.jcp.org/jsf/html"> Simple Blog - <!-- Insert post title here -->
    @@ -51,10 +52,10 @@
    - - - - + + + +
    From ff9ded6c2a2ee97e4893204496be0ac0a5cb34f7 Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Tue, 25 Nov 2014 17:05:58 +0700 Subject: [PATCH 10/14] Added client template --- build/web/client_template.xhtml | 18 ++++++++++++++++++ web/client_template.xhtml | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 build/web/client_template.xhtml create mode 100644 web/client_template.xhtml diff --git a/build/web/client_template.xhtml b/build/web/client_template.xhtml new file mode 100644 index 00000000..7907943f --- /dev/null +++ b/build/web/client_template.xhtml @@ -0,0 +1,18 @@ + + + + + + title + + + + content + + + + jscript + + + diff --git a/web/client_template.xhtml b/web/client_template.xhtml new file mode 100644 index 00000000..7907943f --- /dev/null +++ b/web/client_template.xhtml @@ -0,0 +1,18 @@ + + + + + + title + + + + content + + + + jscript + + + From 230343fd0f70636d7b166fcb3ee6553fd5d4374a Mon Sep 17 00:00:00 2001 From: Kevin Maulana Date: Thu, 27 Nov 2014 05:49:37 +0700 Subject: [PATCH 11/14] Added beans --- .../CommentsController.class | Bin 0 -> 433 bytes .../databaseController/PagesController.class | Bin 0 -> 424 bytes .../databaseController/UserController.class | Bin 0 -> 439 bytes build/web/WEB-INF/faces-config.xml | 2 +- build/web/index.xhtml | 10 ++++--- build/web/template.xhtml | 6 ++++- .../CommentsController.java | 25 ++++++++++++++++++ .../databaseController/PagesController.java | 25 ++++++++++++++++++ .../databaseController/UserController.java | 25 ++++++++++++++++++ web/WEB-INF/faces-config.xml | 2 +- web/index.xhtml | 10 ++++--- web/template.xhtml | 6 ++++- 12 files changed, 99 insertions(+), 12 deletions(-) create mode 100644 build/web/WEB-INF/classes/databaseController/CommentsController.class create mode 100644 build/web/WEB-INF/classes/databaseController/PagesController.class create mode 100644 build/web/WEB-INF/classes/databaseController/UserController.class create mode 100644 src/java/databaseController/CommentsController.java create mode 100644 src/java/databaseController/PagesController.java create mode 100644 src/java/databaseController/UserController.java diff --git a/build/web/WEB-INF/classes/databaseController/CommentsController.class b/build/web/WEB-INF/classes/databaseController/CommentsController.class new file mode 100644 index 0000000000000000000000000000000000000000..0dec47c441270b5529e957b8580273f0f8f0bb1d GIT binary patch literal 433 zcma)&Jxc>Y5Qg8)r^aYv1cQxeA$}BIVHpuLV09`al78-Pj2rHDR5+Sk9$ntRlR!eN+@qlgL~TH|t?rkn>un`LZV@z)wCw8pl~W4_jY zWPcesozXKX?2Jm|bjA~1XmPtV#yWD^8Zp}qJ@XPgP|QUTF`3|o3{5$?l3YCYmVpsJ zm0Y-SZ0DQ|+NhzfaPY5BD|EeIkdm1OchQVvhkaCJh5jhHGE8D)v0GmQ^^-TKS4k>p gN^FS&+XD8nB3b(f!m7M@W^EDMSQqu|hG+-)25VStW&i*H literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/classes/databaseController/PagesController.class b/build/web/WEB-INF/classes/databaseController/PagesController.class new file mode 100644 index 0000000000000000000000000000000000000000..eccd13dcc43ab0db52b79dd0f12c752ebdae85d3 GIT binary patch literal 424 zcmah_%Sr=55Uj~-HAWMoC|*RxgL-fe9wUMVJgpBB$-Q^CjT1IAx;rcWmM6i3AK*uc zJy8(!;51Zsbr)Sjzkj^G0XV`+6IFBqEC=W+G>)~=?nI%ww?9&-^=--u?MNHGET=K& zHxy^m=|(o8Y(%;C{JU9mce+s6jZ$(HQ^9>}TyC?B^YEI+T>S8!LUU-#JmGWg_pSb# zA5Q3z6gCE>aeB%lU1;$+HO4w}+8VLhjJ)P4yrqPTFlI901sSnP&!iTEt-pc+Ka^a! zVPfw&?X^%tU18_{?<#b>S(uR-hgb206Nhb7Y5Ph2uqcNJ8_<@ZWY}CRlQbq&~Se*(+Q`pVjjd8Uu6NVEN@f_ zyMNU~_Fk-pseRyMS7;TBqnyk*x=JRT26R!9KP--t5F^P8f_ifdR1aUF qUSv>0O>$i-uqnbVEK1i9nTW6?Orcqx=LS}!HU+N=-@HQ$Yrq#|rE2#8 literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/faces-config.xml b/build/web/WEB-INF/faces-config.xml index 0393e360..3d8175e1 100644 --- a/build/web/WEB-INF/faces-config.xml +++ b/build/web/WEB-INF/faces-config.xml @@ -3,5 +3,5 @@ xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> - + diff --git a/build/web/index.xhtml b/build/web/index.xhtml index f7c28e9b..4fa8eb19 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -16,9 +16,11 @@ - - - - + + + + + + diff --git a/build/web/template.xhtml b/build/web/template.xhtml index 5b9eb6f2..fafac34d 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -18,7 +18,11 @@ diff --git a/src/java/databaseController/CommentsController.java b/src/java/databaseController/CommentsController.java new file mode 100644 index 00000000..c8b11973 --- /dev/null +++ b/src/java/databaseController/CommentsController.java @@ -0,0 +1,25 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package databaseController; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; + +/** + * + * @author kevhnmay94 + */ +@ManagedBean +@RequestScoped +public class CommentsController { + + /** + * Creates a new instance of CommentsController + */ + public CommentsController() { + } + +} diff --git a/src/java/databaseController/PagesController.java b/src/java/databaseController/PagesController.java new file mode 100644 index 00000000..53e74b2c --- /dev/null +++ b/src/java/databaseController/PagesController.java @@ -0,0 +1,25 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package databaseController; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; + +/** + * + * @author kevhnmay94 + */ +@ManagedBean +@RequestScoped +public class PagesController { + + /** + * Creates a new instance of PagesController + */ + public PagesController() { + } + +} diff --git a/src/java/databaseController/UserController.java b/src/java/databaseController/UserController.java new file mode 100644 index 00000000..137ad895 --- /dev/null +++ b/src/java/databaseController/UserController.java @@ -0,0 +1,25 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package databaseController; + +import javax.faces.bean.ManagedBean; +import javax.faces.bean.SessionScoped; + +/** + * + * @author kevhnmay94 + */ +@ManagedBean(eager=true) +@SessionScoped +public class UserController { + + /** + * Creates a new instance of UserController + */ + public UserController() { + } + +} diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 0393e360..3d8175e1 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -3,5 +3,5 @@ xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> - + diff --git a/web/index.xhtml b/web/index.xhtml index f7c28e9b..4fa8eb19 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -16,9 +16,11 @@ - - - - + + + + + + diff --git a/web/template.xhtml b/web/template.xhtml index 5b9eb6f2..fafac34d 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -18,7 +18,11 @@ From 148d81f0eadd9e78a5eb23db33dd267b50fe731e Mon Sep 17 00:00:00 2001 From: kevhnmay94 Date: Tue, 2 Dec 2014 00:33:45 +0700 Subject: [PATCH 12/14] Added page bean and validator --- build.xml | 142 +- .../CommentsController.class | Bin 433 -> 0 bytes .../databaseController/PagesController.class | Bin 424 -> 0 bytes .../databaseController/UserController.class | Bin 439 -> 0 bytes build/web/index.xhtml | 34 +- build/web/new_post.xhtml | 38 +- build/web/post.xhtml | 12 +- build/web/resources/css/screen.css | 4 +- build/web/template.xhtml | 9 +- nbproject/build-impl.xml | 2885 +++++++++-------- nbproject/genfiles.properties | 16 +- nbproject/private/private.properties | 14 +- nbproject/project.properties | 181 +- nbproject/project.xml | 41 +- .../databaseController/PagesController.java | 25 - .../CommentsController.java | 2 +- .../databaseController/PagesController.java | 209 ++ .../databaseController/UserController.java | 2 +- .../validator/TanggalValidator.java | 50 + web/edit_post.xhtml | 18 + web/index.xhtml | 34 +- web/new_post.xhtml | 38 +- web/post.xhtml | 12 +- web/resources/css/screen.css | 4 +- web/template.xhtml | 9 +- 25 files changed, 2069 insertions(+), 1710 deletions(-) delete mode 100644 build/web/WEB-INF/classes/databaseController/CommentsController.class delete mode 100644 build/web/WEB-INF/classes/databaseController/PagesController.class delete mode 100644 build/web/WEB-INF/classes/databaseController/UserController.class delete mode 100644 src/java/databaseController/PagesController.java rename src/java/{ => simpleblog}/databaseController/CommentsController.java (92%) create mode 100644 src/java/simpleblog/databaseController/PagesController.java rename src/java/{ => simpleblog}/databaseController/UserController.java (92%) create mode 100644 src/java/simpleblog/validator/TanggalValidator.java create mode 100644 web/edit_post.xhtml diff --git a/build.xml b/build.xml index b949aae0..acc5ccb9 100644 --- a/build.xml +++ b/build.xml @@ -1,71 +1,71 @@ - - - - - - - - - - - Builds, tests, and runs the project SimpleBlog. - - - + + + + + + + + + + + Builds, tests, and runs the project SimpleBlog. + + + diff --git a/build/web/WEB-INF/classes/databaseController/CommentsController.class b/build/web/WEB-INF/classes/databaseController/CommentsController.class deleted file mode 100644 index 0dec47c441270b5529e957b8580273f0f8f0bb1d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 433 zcma)&Jxc>Y5Qg8)r^aYv1cQxeA$}BIVHpuLV09`al78-Pj2rHDR5+Sk9$ntRlR!eN+@qlgL~TH|t?rkn>un`LZV@z)wCw8pl~W4_jY zWPcesozXKX?2Jm|bjA~1XmPtV#yWD^8Zp}qJ@XPgP|QUTF`3|o3{5$?l3YCYmVpsJ zm0Y-SZ0DQ|+NhzfaPY5BD|EeIkdm1OchQVvhkaCJh5jhHGE8D)v0GmQ^^-TKS4k>p gN^FS&+XD8nB3b(f!m7M@W^EDMSQqu|hG+-)25VStW&i*H diff --git a/build/web/WEB-INF/classes/databaseController/PagesController.class b/build/web/WEB-INF/classes/databaseController/PagesController.class deleted file mode 100644 index eccd13dcc43ab0db52b79dd0f12c752ebdae85d3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 424 zcmah_%Sr=55Uj~-HAWMoC|*RxgL-fe9wUMVJgpBB$-Q^CjT1IAx;rcWmM6i3AK*uc zJy8(!;51Zsbr)Sjzkj^G0XV`+6IFBqEC=W+G>)~=?nI%ww?9&-^=--u?MNHGET=K& zHxy^m=|(o8Y(%;C{JU9mce+s6jZ$(HQ^9>}TyC?B^YEI+T>S8!LUU-#JmGWg_pSb# zA5Q3z6gCE>aeB%lU1;$+HO4w}+8VLhjJ)P4yrqPTFlI901sSnP&!iTEt-pc+Ka^a! zVPfw&?X^%tU18_{?<#b>S(uR-hgb206Nhb7Y5Ph2uqcNJ8_<@ZWY}CRlQbq&~Se*(+Q`pVjjd8Uu6NVEN@f_ zyMNU~_Fk-pseRyMS7;TBqnyk*x=JRT26R!9KP--t5F^P8f_ifdR1aUF qUSv>0O>$i-uqnbVEK1i9nTW6?Orcqx=LS}!HU+N=-@HQ$Yrq#|rE2#8 diff --git a/build/web/index.xhtml b/build/web/index.xhtml index 4fa8eb19..f83adbd6 100644 --- a/build/web/index.xhtml +++ b/build/web/index.xhtml @@ -2,14 +2,44 @@ + xmlns:h="http://java.sun.com/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" + xmlns:f="http://xmlns.jcp.org/jsf/core"> Simple Blog
    diff --git a/build/web/new_post.xhtml b/build/web/new_post.xhtml index 8a89871e..76a1a126 100644 --- a/build/web/new_post.xhtml +++ b/build/web/new_post.xhtml @@ -2,7 +2,9 @@ + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" + xmlns:f="http://xmlns.jcp.org/jsf/core"> Simple Blog - New Post @@ -15,19 +17,27 @@

    Tambah Post

    -
    - - - - - -
    - -

    - - - -
    + + + + + + + + + + + + + + + + + + + + +
    diff --git a/build/web/post.xhtml b/build/web/post.xhtml index e0942f14..16e11ebf 100644 --- a/build/web/post.xhtml +++ b/build/web/post.xhtml @@ -2,22 +2,22 @@ - Simple Blog - <!-- Insert post title here --> + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> + Simple Blog - #{Pages.current_title}
    - -

    -

    + +

    #{Pages.current_title}

    -

    +

    #{Pages.current_content}

    Komentar

    diff --git a/build/web/resources/css/screen.css b/build/web/resources/css/screen.css index 7b5d3d67..c433f593 100644 --- a/build/web/resources/css/screen.css +++ b/build/web/resources/css/screen.css @@ -871,4 +871,6 @@ label { margin-right: 15px; width: 100px; padding-top: 5px; -} \ No newline at end of file +}.default { + +} diff --git a/build/web/template.xhtml b/build/web/template.xhtml index fafac34d..6a9deebe 100644 --- a/build/web/template.xhtml +++ b/build/web/template.xhtml @@ -2,13 +2,20 @@ + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> + Simple Blog diff --git a/nbproject/build-impl.xml b/nbproject/build-impl.xml index 6d1463e1..ac0cfefe 100644 --- a/nbproject/build-impl.xml +++ b/nbproject/build-impl.xml @@ -1,1441 +1,1444 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set src.dir - Must set test.src.dir - Must set build.dir - Must set build.web.dir - Must set build.generated.dir - Must set dist.dir - Must set build.classes.dir - Must set dist.javadoc.dir - Must set build.test.classes.dir - Must set build.test.results.dir - Must set build.classes.excludes - Must set dist.war - - - - - - - - - -The Java EE server classpath is not correctly set up - server home directory is missing. -Either open the project in the IDE and assign the server or setup the server classpath manually. -For example like this: - ant -Dj2ee.server.home=<app_server_installation_directory> - - -The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. -Either open the project in the IDE and assign the server or setup the server classpath manually. -For example like this: - ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) -or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - No tests executed. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -The libs.CopyLibs.classpath property is not set up. -This property must point to -org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part -of NetBeans IDE installation and is usually located at -<netbeans_installation>/java<version>/ant/extra folder. -Either open the project in the IDE and make sure CopyLibs library -exists or setup the property manually. For example like this: - ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must set JVM to use for profiling in profiler.info.jvm - Must set profiler agent JVM arguments in profiler.info.jvmargs.agent - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.jsp.includes - - - - - - - - - - - - - - - - - - - - - - - - - - Must select a file in the IDE or set jsp.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. - - - Launching ${browse.url} - - - - - - Must select one file in the IDE or set run.class - - - - Must select one file in the IDE or set run.class - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - - - - - - - - Must select one file in the IDE or set debug.class - - - - - Must set fix.includes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This target only works when run from inside the NetBeans IDE. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Must select some files in the IDE or set javac.includes - - - - - - - - - - - - - - - - - - - Some tests failed; see details above. - - - - - - - - - Must select some files in the IDE or set test.includes - - - - Some tests failed; see details above. - - - - Must select some files in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - Some tests failed; see details above. - - - - - Must select one file in the IDE or set test.class - - - - Must select one file in the IDE or set test.class - Must select some method in the IDE or set test.method - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set test.src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nbproject/genfiles.properties b/nbproject/genfiles.properties index 7a2a3b05..adbef8ea 100644 --- a/nbproject/genfiles.properties +++ b/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=2b590d60 -build.xml.script.CRC32=bedf25f1 -build.xml.stylesheet.CRC32=651128d4@1.68.1.1 -# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. -# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=2b590d60 -nbproject/build-impl.xml.script.CRC32=d897eee6 -nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 +build.xml.data.CRC32=11ab5885 +build.xml.script.CRC32=bedf25f1 +build.xml.stylesheet.CRC32=651128d4@1.68.1.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=11ab5885 +nbproject/build-impl.xml.script.CRC32=22799c1c +nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.68.1.1 diff --git a/nbproject/private/private.properties b/nbproject/private/private.properties index 51b6b944..b38d255a 100644 --- a/nbproject/private/private.properties +++ b/nbproject/private/private.properties @@ -1,7 +1,7 @@ -deploy.ant.properties.file=/home/kevhnmay94/.netbeans/8.0.1/config/GlassFishEE6/Properties/gfv3394951402.properties -j2ee.platform.is.jsr109=true -j2ee.server.domain=/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1 -j2ee.server.home=/home/kevhnmay94/glassfish-4.1/glassfish -j2ee.server.instance=[/home/kevhnmay94/glassfish-4.1/glassfish:/home/kevhnmay94/glassfish-4.1/glassfish/domains/domain1]deployer:gfv3ee6:localhost:4848 -j2ee.server.middleware=/home/kevhnmay94/glassfish-4.1 -user.properties.file=/home/kevhnmay94/.netbeans/8.0.1/build.properties +deploy.ant.properties.file=C:\\Users\\Asus\\AppData\\Roaming\\NetBeans\\8.0.1\\config\\GlassFishEE6\\Properties\\gfv3-165012094.properties +j2ee.platform.is.jsr109=true +j2ee.server.domain=C:/Users/Asus/kevhndomain +j2ee.server.home=C:/Program Files/glassfish/glassfish +j2ee.server.instance=[C:\\Program Files\\glassfish\\glassfish;C:\\Users\\Asus\\kevhndomain]deployer:gfv3ee6wc:localhost:4848 +j2ee.server.middleware=C:/Program Files/glassfish +user.properties.file=C:\\Users\\Asus\\AppData\\Roaming\\NetBeans\\8.0.1\\build.properties diff --git a/nbproject/project.properties b/nbproject/project.properties index 18dbfaab..b1c925cc 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -1,90 +1,91 @@ -annotation.processing.enabled=true -annotation.processing.enabled.in.editor=true -annotation.processing.processors.list= -annotation.processing.run.all.processors=true -annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output -auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets -build.classes.dir=${build.web.dir}/WEB-INF/classes -build.classes.excludes=**/*.java,**/*.form -build.dir=build -build.generated.dir=${build.dir}/generated -build.generated.sources.dir=${build.dir}/generated-sources -build.test.classes.dir=${build.dir}/test/classes -build.test.results.dir=${build.dir}/test/results -build.web.dir=${build.dir}/web -build.web.excludes=${build.classes.excludes} -client.urlPart= -compile.jsps=false -conf.dir=${source.root}/conf -debug.classpath=${build.classes.dir}:${javac.classpath} -debug.test.classpath=\ - ${run.test.classpath} -display.browser=true -# Files to be excluded from distribution war -dist.archive.excludes= -dist.dir=dist -dist.ear.war=${dist.dir}/${war.ear.name} -dist.javadoc.dir=${dist.dir}/javadoc -dist.war=${dist.dir}/${war.name} -endorsed.classpath=\ - ${libs.javaee-endorsed-api-6.0.classpath} -excludes= -includes=** -j2ee.compile.on.save=true -j2ee.copy.static.files.on.save=true -j2ee.deploy.on.save=true -j2ee.platform=1.7-web -j2ee.platform.classpath=${j2ee.server.middleware}/mq/lib/jaxm-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.persistence.jar -j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar -j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar -j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar -j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar -j2ee.platform.wsit.classpath= -j2ee.server.type=gfv3ee6 -jar.compress=false -javac.classpath= -# Space-separated list of extra javac options -javac.compilerargs= -javac.debug=true -javac.deprecation=false -javac.processorpath=\ - ${javac.classpath} -javac.source=1.7 -javac.target=1.7 -javac.test.classpath=\ - ${javac.classpath}:\ - ${build.classes.dir} -javac.test.processorpath=\ - ${javac.test.classpath} -javadoc.additionalparam= -javadoc.author=false -javadoc.encoding=${source.encoding} -javadoc.noindex=false -javadoc.nonavbar=false -javadoc.notree=false -javadoc.preview=true -javadoc.private=false -javadoc.splitindex=true -javadoc.use=true -javadoc.version=false -javadoc.windowtitle= -lib.dir=${web.docbase.dir}/WEB-INF/lib -no.dependencies=false -persistence.xml.dir=${conf.dir} -platform.active=default_platform -resource.dir=setup -run.test.classpath=\ - ${javac.test.classpath}:\ - ${build.test.classes.dir} -# Space-separated list of JVM arguments used when running a class with a main method or a unit test -# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): -runmain.jvmargs= -source.encoding=UTF-8 -source.root=src -src.dir=${source.root}/java -test.src.dir=test -war.content.additional= -war.ear.name=${war.name} -war.name=SimpleBlog.war -web.docbase.dir=web -webinf.dir=web/WEB-INF +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +conf.dir=${source.root}/conf +debug.classpath=${build.classes.dir}:${javac.classpath} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +# Files to be excluded from distribution war +dist.archive.excludes= +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +endorsed.classpath=\ + ${libs.javaee-endorsed-api-6.0.classpath} +excludes= +includes=** +j2ee.compile.on.save=true +j2ee.copy.static.files.on.save=true +j2ee.deploy.on.save=true +j2ee.platform=1.7-web +j2ee.platform.classpath=${j2ee.server.home}/modules/endorsed/javax.annotation-api.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/bean-validator.jar:${j2ee.server.home}/modules/javax.batch-api.jar:${j2ee.server.home}/modules/javax.ejb-api.jar:${j2ee.server.home}/modules/javax.el.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent-api.jar:${j2ee.server.home}/modules/javax.enterprise.concurrent.jar:${j2ee.server.home}/modules/javax.enterprise.deploy-api.jar:${j2ee.server.home}/modules/javax.faces.jar:${j2ee.server.home}/modules/javax.inject.jar:${j2ee.server.home}/modules/javax.interceptor-api.jar:${j2ee.server.home}/modules/javax.jms-api.jar:${j2ee.server.home}/modules/javax.json.jar:${j2ee.server.home}/modules/javax.mail.jar:${j2ee.server.home}/modules/javax.management.j2ee-api.jar:${j2ee.server.home}/modules/javax.persistence.jar:${j2ee.server.home}/modules/javax.resource-api.jar:${j2ee.server.home}/modules/javax.security.auth.message-api.jar:${j2ee.server.home}/modules/javax.security.jacc-api.jar:${j2ee.server.home}/modules/javax.servlet-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl-api.jar:${j2ee.server.home}/modules/javax.servlet.jsp.jstl.jar:${j2ee.server.home}/modules/javax.transaction-api.jar:${j2ee.server.home}/modules/javax.websocket-api.jar:${j2ee.server.home}/modules/javax.ws.rs-api.jar:${j2ee.server.home}/modules/javax.xml.registry-api.jar:${j2ee.server.home}/modules/javax.xml.rpc-api.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/weld-osgi-bundle.jar:${j2ee.server.middleware}/mq/lib/jaxm-api.jar +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/endorsed/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar:${j2ee.server.home}/modules/endorsed/jaxb-api.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=gfv3ee6 +jar.compress=false +javac.classpath=\ + ${libs.PostgreSQLDriver.classpath} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=\ + ${javac.classpath} +javac.source=1.7 +javac.target=1.7 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir} +javac.test.processorpath=\ + ${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding=${source.encoding} +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +lib.dir=${web.docbase.dir}/WEB-INF/lib +no.dependencies=false +persistence.xml.dir=${conf.dir} +platform.active=default_platform +resource.dir=setup +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running a class with a main method or a unit test +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.encoding=UTF-8 +source.root=src +src.dir=${source.root}/java +test.src.dir=test +war.content.additional= +war.ear.name=${war.name} +war.name=SimpleBlog.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/nbproject/project.xml b/nbproject/project.xml index 16794a10..d8c666ef 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -1,18 +1,23 @@ - - - org.netbeans.modules.web.project - - - SimpleBlog - 1.6.5 - - - - - - - - - - - + + + org.netbeans.modules.web.project + + + SimpleBlog + 1.6.5 + + + ${libs.PostgreSQLDriver.classpath} + WEB-INF/lib + + + + + + + + + + + + diff --git a/src/java/databaseController/PagesController.java b/src/java/databaseController/PagesController.java deleted file mode 100644 index 53e74b2c..00000000 --- a/src/java/databaseController/PagesController.java +++ /dev/null @@ -1,25 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package databaseController; - -import javax.faces.bean.ManagedBean; -import javax.faces.bean.RequestScoped; - -/** - * - * @author kevhnmay94 - */ -@ManagedBean -@RequestScoped -public class PagesController { - - /** - * Creates a new instance of PagesController - */ - public PagesController() { - } - -} diff --git a/src/java/databaseController/CommentsController.java b/src/java/simpleblog/databaseController/CommentsController.java similarity index 92% rename from src/java/databaseController/CommentsController.java rename to src/java/simpleblog/databaseController/CommentsController.java index c8b11973..315dd72e 100644 --- a/src/java/databaseController/CommentsController.java +++ b/src/java/simpleblog/databaseController/CommentsController.java @@ -3,7 +3,7 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package databaseController; +package simpleblog.databaseController; import javax.faces.bean.ManagedBean; import javax.faces.bean.RequestScoped; diff --git a/src/java/simpleblog/databaseController/PagesController.java b/src/java/simpleblog/databaseController/PagesController.java new file mode 100644 index 00000000..dd8fdd6d --- /dev/null +++ b/src/java/simpleblog/databaseController/PagesController.java @@ -0,0 +1,209 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package simpleblog.databaseController; + +import java.sql.Connection; +import java.sql.Date; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.Statement; +import java.util.ArrayList; +import javax.faces.bean.ManagedBean; +import javax.faces.bean.RequestScoped; + +/** + * + * @author kevhnmay94 + */ +@ManagedBean(name="Pages") +@RequestScoped +public class PagesController { + + public class Page + { + int id; + String title; + String content; + String owner; + Date date; + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + + } + private ArrayList pagelist; + private String current_title; + private String current_date; + private String current_content; + private String current_owner; + private int current_id; + private final Connection c; + + public String getCurrent_owner() { + return current_owner; + } + + public void setCurrent_owner(String current_owner) { + this.current_owner = current_owner; + } + + public int getCurrent_id() { + return current_id; + } + + public void setCurrent_id(int current_id) { + this.current_id = current_id; + } + + public String getCurrent_title() { + return current_title; + } + + public void setCurrent_title(String current_title) { + this.current_title = current_title; + } + + public String getCurrent_date() { + return current_date; + } + + public void setCurrent_date(String current_date) { + this.current_date = current_date; + } + + public String getCurrent_content() { + return current_content; + } + + public void setCurrent_content(String current_content) { + this.current_content = current_content; + } + + public ArrayList getPagelist() { + return pagelist; + } + + /** + * Creates a new instance of PagesController + * @throws java.lang.Exception + */ + public PagesController() throws Exception { + Class.forName("org.postgresql.Driver"); + c = DriverManager.getConnection("jdbc:postgresql://localhost:5432/simpleblog","root", ""); + } + + public void listPost() throws Exception + { + String query = "SELECT * FROM public.pages WHERE publish=true AND" + + "soft_delete=false"; + Statement s = c.createStatement(); + ResultSet rs = s.executeQuery(query); + while(rs.next()) + { + Page p = new Page(); + p.setTitle(rs.getString("title")); + p.setContent(rs.getString("content")); + p.setOwner(rs.getString("owner")); + p.setId(rs.getInt("id")); + p.setDate(rs.getDate("date")); + pagelist.add(p); + } + } + + public void newPost() throws Exception + { + String query = "INSERT INTO public.pages (title,content,owner,date) " + + "('" + current_title + "','" + current_content + "','" + + current_owner + "','" + current_date +"')"; + Statement s = c.createStatement(); + s.executeUpdate(query); + } + + public void editPost(int id) throws Exception + { + String query = "SELECT * FROM public.pages WHERE id=" + id; + Statement s = c.createStatement(); + ResultSet rs = s.executeQuery(query); + rs.first(); + current_title = rs.getString("title"); + current_content = rs.getString("content"); + current_date = rs.getString("date"); + current_id = id; + } + + public void updatePost() throws Exception + { + String query = "UPDATE public.pages SET title='"+current_title +"', " + + "content='" + current_content + "', date=" + current_date + " WHERE " + + "ID=" + current_id; + Statement s = c.createStatement(); + s.executeUpdate(query); + c.close(); + } + + public void softdeletePost(int id) throws Exception + { + String query = "UPDATE public.pages SET soft_delete=true WHERE " + + "ID=" + current_id; + Statement s = c.createStatement(); + s.executeUpdate(query); + c.close(); + } + + public void deletePost(int id) throws Exception + { + String query = "DELETE FROM public.pages WHERE id=" + id; + Statement s = c.createStatement(); + s.executeUpdate(query); + c.close(); + } + + public void publishPost(int id) throws Exception + { + String query = "UPDATE public.pages SET publish=true WHERE id=" + id; + Statement s = c.createStatement(); + s.executeUpdate(query); + c.close(); + } +} diff --git a/src/java/databaseController/UserController.java b/src/java/simpleblog/databaseController/UserController.java similarity index 92% rename from src/java/databaseController/UserController.java rename to src/java/simpleblog/databaseController/UserController.java index 137ad895..400d2608 100644 --- a/src/java/databaseController/UserController.java +++ b/src/java/simpleblog/databaseController/UserController.java @@ -3,7 +3,7 @@ * To change this template file, choose Tools | Templates * and open the template in the editor. */ -package databaseController; +package simpleblog.databaseController; import javax.faces.bean.ManagedBean; import javax.faces.bean.SessionScoped; diff --git a/src/java/simpleblog/validator/TanggalValidator.java b/src/java/simpleblog/validator/TanggalValidator.java new file mode 100644 index 00000000..75275dae --- /dev/null +++ b/src/java/simpleblog/validator/TanggalValidator.java @@ -0,0 +1,50 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package simpleblog.validator; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import javax.faces.application.FacesMessage; +import javax.faces.component.UIComponent; +import javax.faces.context.FacesContext; +import javax.faces.validator.FacesValidator; +import javax.faces.validator.Validator; +import javax.faces.validator.ValidatorException; +//import java.sql.Date; +/** + * + * @author Asus + */ +@FacesValidator("TanggalValidator") +public class TanggalValidator implements Validator { + + @Override + public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { + if (value == null) { + return; + } + + DateFormat df = new SimpleDateFormat("dd-mm-yyyy"); + Date d; + try { + d = df.parse((String) value); + } catch (ParseException ex) { + throw new ValidatorException(new FacesMessage( + FacesMessage.SEVERITY_ERROR, "Format tanggal dd-mm-yyy", null)); + } + + Date e = new Date(); + if (e.after(d)) { + + throw new ValidatorException(new FacesMessage( + FacesMessage.SEVERITY_ERROR, "Tanggal tidak boleh kurang dari tanggal sekarang.", null)); + } + } + + +} diff --git a/web/edit_post.xhtml b/web/edit_post.xhtml new file mode 100644 index 00000000..7907943f --- /dev/null +++ b/web/edit_post.xhtml @@ -0,0 +1,18 @@ + + + + + + title + + + + content + + + + jscript + + + diff --git a/web/index.xhtml b/web/index.xhtml index 4fa8eb19..f83adbd6 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -2,14 +2,44 @@ + xmlns:h="http://java.sun.com/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" + xmlns:f="http://xmlns.jcp.org/jsf/core"> Simple Blog
    diff --git a/web/new_post.xhtml b/web/new_post.xhtml index 8a89871e..76a1a126 100644 --- a/web/new_post.xhtml +++ b/web/new_post.xhtml @@ -2,7 +2,9 @@ + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core" + xmlns:f="http://xmlns.jcp.org/jsf/core"> Simple Blog - New Post @@ -15,19 +17,27 @@

    Tambah Post

    -
    - - - - - -
    - -

    - - - -
    + + + + + + + + + + + + + + + + + + + + +
    diff --git a/web/post.xhtml b/web/post.xhtml index e0942f14..16e11ebf 100644 --- a/web/post.xhtml +++ b/web/post.xhtml @@ -2,22 +2,22 @@ - Simple Blog - <!-- Insert post title here --> + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> + Simple Blog - #{Pages.current_title}
    - -

    -

    + +

    #{Pages.current_title}

    -

    +

    #{Pages.current_content}

    Komentar

    diff --git a/web/resources/css/screen.css b/web/resources/css/screen.css index 7b5d3d67..c433f593 100644 --- a/web/resources/css/screen.css +++ b/web/resources/css/screen.css @@ -871,4 +871,6 @@ label { margin-right: 15px; width: 100px; padding-top: 5px; -} \ No newline at end of file +}.default { + +} diff --git a/web/template.xhtml b/web/template.xhtml index fafac34d..6a9deebe 100644 --- a/web/template.xhtml +++ b/web/template.xhtml @@ -2,13 +2,20 @@ + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> + Simple Blog From 11656e32d318010d842163d5cab9dbaa7526e757 Mon Sep 17 00:00:00 2001 From: kevhnmay94 Date: Tue, 2 Dec 2014 07:04:47 +0700 Subject: [PATCH 13/14] aadasd --- src/java/basisdata/logindata.java | 162 ++++++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 src/java/basisdata/logindata.java diff --git a/src/java/basisdata/logindata.java b/src/java/basisdata/logindata.java new file mode 100644 index 00000000..38900d48 --- /dev/null +++ b/src/java/basisdata/logindata.java @@ -0,0 +1,162 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package basisdata; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.faces.bean.SessionScoped; +import javax.inject.Named; + +/** + * + * @author steve + */ +@Named(value = "logindata") +@SessionScoped +public class logindata { + private String role; + private String nama; + private String namaAsli; + private String email; + private String password; + private final String url = "jdbc:postgresql://localhost:5432/simpleblog"; + private final String databaseUser = "postgresql"; + private final String databasePassword = "persib"; + + public String getRole() { + return role; + } + + public void setRole(String role) { + this.role = role; + } + + public String getNama() { + return nama; + } + + public void setNama(String nama) { + this.nama = nama; + } + + public String getNamaAsli() { + return namaAsli; + } + + public void setNamaAsli(String namaAsli) { + this.namaAsli = namaAsli; + } + + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + + public String getPassword() { + return password; + } + + public void setPassword(String password) { + this.password = password; + } + + + + /** + * Creates a new instance of logindata + */ + public logindata() { + } + + // Mengembalikan ID dari role user tertentu dalam bentuk integer + public int ConvertRoleToID() { + int role_id = 9999; + + switch (role) { + case "Owner": + role_id = 0; + break; + case "Editor": + role_id = 1; + break; + case "Admin": + role_id = 2; + break; + case "Guest": + role_id = 3; + break; + } + + return role_id; + } + + public String register() { + Statement statement; + // Buat container perintah query ke koneksi drive + try ( + // Konek ke drive jdbc postgresql + Connection connection = DriverManager.getConnection(url,databaseUser,databasePassword)) { + // Buat container perintah query ke koneksi drive + statement = connection.createStatement(); + // Insert data nama, email, dan role ke basis data + int role_id = ConvertRoleToID(); // Konversi role dari string ke integer + if (role_id != 9999) { // ID role terbentuk + String insertDataQuery = "INSERT INTO user(username,realname,role,email) VALUES (" + nama + "," + namaAsli + "," + role_id + "," + email; + statement.executeUpdate(insertDataQuery); + } + + statement.close(); + } catch (SQLException ex) { + Logger.getLogger(logindata.class.getName()).log(Level.SEVERE, null, ex); + } + + return "registered"; + } + + public String login() throws SQLException{ + // Penanda apakah username dan password valid atau tidak + boolean ValidAccount = false; + + Statement statement; + ResultSet record; + // Buat container perintah query ke koneksi drive + try ( // Konek ke drive jdbc postgresql + Connection connection = DriverManager.getConnection(url,databaseUser,databasePassword)) { + // Buat container perintah query ke koneksi drive + statement = connection.createStatement(); + // Search data username dan role pada database untuk validasi data yang dimasukkan + record = statement.executeQuery("SELECT * FROM user"); + while (record.next()) { + String value_username = record.getString("username"); + String value_password = record.getString("password"); + + // data yang dimasukkan dengan di database sesuai + if (value_username.equals(nama)) { + if (value_password.equals(password)) { + ValidAccount = true; + } + } + } + } + statement.close(); + record.close(); + + if (ValidAccount) { // Akun valid, asumsi user terkait sudah pernah login sebelumnya + return "successLogin"; + } + else { + return "failedLogin"; + } + } +} From 7c6dfc4dc12a99860f1c9f16586489c812055c97 Mon Sep 17 00:00:00 2001 From: ClearingPath <13512093@std.stei.itb.ac.id> Date: Tue, 2 Dec 2014 07:38:26 +0700 Subject: [PATCH 14/14] last commit --- .../classes/Controller/DBMSController.class | Bin 0 -> 2323 bytes .../classes/Controller/postController.class | Bin 0 -> 357 bytes .../WEB-INF/classes/Controller/posting.class | Bin 0 -> 272 bytes build/web/WEB-INF/classes/model/Post.class | Bin 0 -> 1718 bytes build/web/WEB-INF/classes/view/postView.class | Bin 0 -> 263 bytes build/web/WEB-INF/faces-config.xml | 20 +++- build/web/post.xhtml | 67 ++++++++++++++ build/web/test1.xhtml | 18 ---- nbproject/faces-config.NavData | 12 +++ setup/glassfish-resources.xml | 14 +++ src/java/Controller/DBMSController.java | 64 +++++++++++++ src/java/Controller/postController.java | 31 +++++++ src/java/Controller/posting.java | 20 ++++ src/java/model/Post.java | 86 ++++++++++++++++++ src/java/view/postView.java | 20 ++++ web/WEB-INF/faces-config.xml | 20 +++- web/post.xhtml | 67 ++++++++++++++ web/test1.xhtml | 18 ---- 18 files changed, 419 insertions(+), 38 deletions(-) create mode 100644 build/web/WEB-INF/classes/Controller/DBMSController.class create mode 100644 build/web/WEB-INF/classes/Controller/postController.class create mode 100644 build/web/WEB-INF/classes/Controller/posting.class create mode 100644 build/web/WEB-INF/classes/model/Post.class create mode 100644 build/web/WEB-INF/classes/view/postView.class create mode 100644 build/web/post.xhtml delete mode 100644 build/web/test1.xhtml create mode 100644 setup/glassfish-resources.xml create mode 100644 src/java/Controller/DBMSController.java create mode 100644 src/java/Controller/postController.java create mode 100644 src/java/Controller/posting.java create mode 100644 src/java/model/Post.java create mode 100644 src/java/view/postView.java create mode 100644 web/post.xhtml delete mode 100644 web/test1.xhtml diff --git a/build/web/WEB-INF/classes/Controller/DBMSController.class b/build/web/WEB-INF/classes/Controller/DBMSController.class new file mode 100644 index 0000000000000000000000000000000000000000..c076fcea260bb3d383c73340c2d517d9f16e0609 GIT binary patch literal 2323 zcmb7F?RFDY6y0}{GHE)oACy7?D^P?q(5AG-O4@=n4T>g(HZ2M&I!&+Xlu0H`CZ#@x zkKpnLfBc~?DOA_;0elVLL)~{W`J&OKE6Kg*ex0+=KKtJM{^u{h0homw#Yv=eEJUFp z6~UtFmsE2zid%TE7ct!K!!pv!T2WR;#~mH-NAUsfM)4s&>O~egWv%w%9`37VO*QLk zcV0E?IyMAELEuDo*W5Fc)u(nc?Uc*1;8{+2K_Fc9N}j-QYdPE2d{|nN_)Jmi#z=?(NtG zBAZp|mi_g}eY0A9=D6DeF=k(Qk~1ql8nUfple7y&GyAeo^JIQ4D-iF(#zYJ9x~$f0 zFE15?J!>`Tek~AkWhc$8O*%+YEbzZs*(Uw0SGN#%Sxf%<)3#HUtuoSkToE13J2kf; z?^uf5=>}HYv2iN9VG*0Oc`)6XP|<415Z^t1FdxKZS7Lo9aD9&Qfy5$P3Ea@vr>^| z)_t-Y-A4o-@Wir4Jg4D!I3AR~Q(q&^cq^{8C*7P`Hj9emSW$ZIwaax0eI#<1%ho2i zmODZ_-VEHDre+GRq_CQoTVSMtTfGU*c{+$yrFXmLIccXa*6)?bC-lE;E!;}Z82)I}xOf=?yR z^C>^c=U?N8m&UhvU)YBscsJiP^R!Y#vB(`cB0k3*b40UM!T6i=OSC5`ETa7C^T?QsC_T@E$e_#5!e56%Dp literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/classes/Controller/postController.class b/build/web/WEB-INF/classes/Controller/postController.class new file mode 100644 index 0000000000000000000000000000000000000000..14a39c39a0768a7435ff6ad1b70ee8e2276058ee GIT binary patch literal 357 zcmZ8du};G<5PeRQ210<+vLIk!0|qiMf>vXGbmh)P<2U#0d#-(kfsif1M{}tozSuX_k%c*TUXN^%V zc=wbWvU|I9jk?y}X5v@(?X#I&$sB7~7uf5||4al%URM~|J{7n1Of?;j5b@g}Mu?Gw sY>1Rm@X?T%h5L98B&Y8XZ$Y*}%s2)daP$y4v;0?tO>B|z0K^ERA9R{eBme*a literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/classes/Controller/posting.class b/build/web/WEB-INF/classes/Controller/posting.class new file mode 100644 index 0000000000000000000000000000000000000000..1f3a9437241cd70052fd08964cd54f3d1b4afd79 GIT binary patch literal 272 zcmZWkv2MaJ5PcT{p&>MY_yIQPK!%R3x*#z{Fo4*dU{NF2u8iToI#pum2lS&V&XkQi z>G|&Yz0=+A-}wi?GkPf+=q7kfkP}+3$|(OvXpAQtLOiouNytlO@ zTIh{%D)cup_V4OI7?v|@yt7(MSA5!oS7!G@NLTjgYB^WIpWXQBUYtaR7)_peZzJ@A zpwPnXie6`LIphF0TeVGivo&L&>7H?nJS&3a=~5NMhFuUZGyg(7dj*3 zj2AwD59PR4(v!QpH)~}d*1x~~@0CA)fBgoqh8G45Y~+x`6An)~Y;t(U;W>vb4kaDi zI(7uK$c;Qlpin-uKifsm_D_n3QPcHLwgggcLqO~c==H#l96zG{!580Y(#*$;n&*b6 zw0uz;t$EcQvSDY(gw?-+K{OKC zr<)QM-BqIk9;K~)UNmTNw|#qq);a?|`yg?H4{3eo+_2KNh6KqRF6vCBtz%Zzsg^Ag z7;9tqxTaG@vRY^%cNV$Wbi>0QTZd_P@7OpDE}C`cwaZ@S*r*kLTN9JGX5tD=6T=uW zk>{^b4r3^oxQcNT6DSaH*J6RuZeJYK&YXIL8R{Q{x=lxl)#xk5f^jCzIFoFgNjc6W z9%s_0oQGf-iq~mWq%0_F3qK*g$J=gD%*2x;xJln;vH?@LMI(XRxI^*(;vYzTlZvO6 z#dk5?D&8UT6d$#)c!^Z^Xd|ATg@(CUVKUj(I-b$^-b_7%dkT=DuM&u*1i6pdK9H$P z49Or%1hPB;gpFsAIi(|M*^yNx$OE+_X&GdlKsE+|@XIsELnVkNgKR26EH#KGgOmtl zdjJTx9)rwdfuh_a8Tn~mDnS;p)GF@w2t7?k2H7K!R|7z}_ZegvD+&-@cI1r`q=?l% w5NcLk1}PKB+W{c_^D)RHr6XC{k%|)JvD%TW3{oYK_X9xq?`M#;`1e@<2l$K6cmMzZ literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/classes/view/postView.class b/build/web/WEB-INF/classes/view/postView.class new file mode 100644 index 0000000000000000000000000000000000000000..c974cea881207955886fc3aafb0bce5c5c058630 GIT binary patch literal 263 zcmY*UyAFad6g>q5MO5Su+|)q^M~#b#lhHxLUa-*;1cQj*U-K{_#hYglPXeAx zHGf5;*vX?xmr|VlLv}0zA|nQSm7VfP%%rL|e#Ri?C3j$;LgHVA!Bw80@O0}h!&pQG uI?(8$YBAbWA~fGWP%}{JU%@U!G+2Z-oj{v{9;(EgPY5+~)D?9?4bBS=pfmUY literal 0 HcmV?d00001 diff --git a/build/web/WEB-INF/faces-config.xml b/build/web/WEB-INF/faces-config.xml index 0393e360..e8e6f938 100644 --- a/build/web/WEB-INF/faces-config.xml +++ b/build/web/WEB-INF/faces-config.xml @@ -3,5 +3,23 @@ xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> - + + Post + model.Post + session + + postView + view.postView + session + + + postController + Controller.postController + session + + + posting + Controller.posting + session + diff --git a/build/web/post.xhtml b/build/web/post.xhtml new file mode 100644 index 00000000..e12450c7 --- /dev/null +++ b/build/web/post.xhtml @@ -0,0 +1,67 @@ + + + + + +
    + +
    +
    + +

    Apa itu Simple Blog?

    +

    +
    +
    + +
    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis aliquam minus consequuntur amet nulla eius, neque beatae, nostrum possimus, officiis eaque consectetur. Sequi sunt maiores dolore, illum quidem eos explicabo! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam consequuntur consequatur molestiae saepe sed, incidunt sunt inventore minima voluptatum adipisci hic, est ipsa iste. Nobis, aperiam provident quae. Reprehenderit, iste.

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores animi tenetur nam delectus eveniet iste non culpa laborum provident minima numquam excepturi rem commodi, officia accusamus eos voluptates obcaecati. Possimus?

    + +
    + +

    Komentar

    + +
    +
    + + + + + + +

    + + + +
    +
    + +
      +
    • +
      +

      Jems

      +
      2 menit lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • + +
    • +
      +

      Kave

      +
      1 jam lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • +
    +
    +
    + +
    + +
    + + +
    diff --git a/build/web/test1.xhtml b/build/web/test1.xhtml deleted file mode 100644 index 3ac44ba2..00000000 --- a/build/web/test1.xhtml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - tooooop - - - - contentttttt - - - - bottoooooom - - - diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index e69de29b..127677b3 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/setup/glassfish-resources.xml b/setup/glassfish-resources.xml new file mode 100644 index 00000000..e3eca45a --- /dev/null +++ b/setup/glassfish-resources.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/src/java/Controller/DBMSController.java b/src/java/Controller/DBMSController.java new file mode 100644 index 00000000..0df0aa79 --- /dev/null +++ b/src/java/Controller/DBMSController.java @@ -0,0 +1,64 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.logging.Level; +import java.util.logging.Logger; + +/** + * + * @author Jonathan + */ +public class DBMSController { + private Connection c; + private Statement stmt; + + + public DBMSController(String DatabaseName,String Username,String Password){ + try { + c = DriverManager.getConnection("jdbc:postgresql://localhost:5432/"+DatabaseName,Username,Password); + stmt = c.createStatement(); + c.setAutoCommit(false); + } catch (SQLException ex) { + Logger.getLogger(DBMSController.class.getName()).log(Level.SEVERE, null, ex); + } + } + + public ResultSet ExecuteSQL(String Query){ + ResultSet ret = null; + try { + ret = stmt.executeQuery(Query); + } catch (SQLException ex) { + Logger.getLogger(DBMSController.class.getName()).log(Level.SEVERE, null, ex); + } + return ret; + } + + public int ExecuteUpdate(String Query){ + int ret = -1; + try { + ret = stmt.executeUpdate(Query); + } catch (SQLException ex) { + Logger.getLogger(DBMSController.class.getName()).log(Level.SEVERE, null, ex); + } + return ret; + } + + public void CloseConnection(){ + try { + stmt.close(); + c.commit(); + c.close(); + } catch (SQLException ex) { + Logger.getLogger(DBMSController.class.getName()).log(Level.SEVERE, null, ex); + } + } +} diff --git a/src/java/Controller/postController.java b/src/java/Controller/postController.java new file mode 100644 index 00000000..96cc3b56 --- /dev/null +++ b/src/java/Controller/postController.java @@ -0,0 +1,31 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +import javax.inject.Named; +import javax.enterprise.context.Dependent; + +/** + * + * @author Jonathan + */ + +public class postController { + /** + * List of Attributes + */ + private model.Post model; + private view.postView view; + + + + /** + * Creates a new instance of postController + */ + public postController() { + } + +} diff --git a/src/java/Controller/posting.java b/src/java/Controller/posting.java new file mode 100644 index 00000000..f6c381b1 --- /dev/null +++ b/src/java/Controller/posting.java @@ -0,0 +1,20 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package Controller; + +/** + * + * @author Jonathan + */ +public class posting { + + /** + * Creates a new instance of posting + */ + public posting() { + } + +} diff --git a/src/java/model/Post.java b/src/java/model/Post.java new file mode 100644 index 00000000..57ccb7e7 --- /dev/null +++ b/src/java/model/Post.java @@ -0,0 +1,86 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package model; + +import java.sql.Date; + +/** + * + * @author Jonathan + */ +public class Post { + /** + * Lists of attribute + */ + private String title; + private int id; + private String content; + private String owner; + private boolean publish; + private Date date; + private boolean softDelete; + + /** + * Setter and getter of attribute + * @return + */ + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public boolean isPublish() { + return publish; + } + + public void setPublish(boolean publish) { + this.publish = publish; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public boolean isSoftDelete() { + return softDelete; + } + + public void setSoftDelete(boolean softDelete) { + this.softDelete = softDelete; + } +} diff --git a/src/java/view/postView.java b/src/java/view/postView.java new file mode 100644 index 00000000..2cd3b1d5 --- /dev/null +++ b/src/java/view/postView.java @@ -0,0 +1,20 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ +package view; + +/** + * + * @author Jonathan + */ +public class postView { + + /** + * Creates a new instance of postView + */ + public postView() { + } + +} diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 0393e360..e8e6f938 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -3,5 +3,23 @@ xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"> - + + Post + model.Post + session + + postView + view.postView + session + + + postController + Controller.postController + session + + + posting + Controller.posting + session + diff --git a/web/post.xhtml b/web/post.xhtml new file mode 100644 index 00000000..e12450c7 --- /dev/null +++ b/web/post.xhtml @@ -0,0 +1,67 @@ + + + + + +
    + +
    +
    + +

    Apa itu Simple Blog?

    +

    +
    +
    + +
    +
    +
    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis aliquam minus consequuntur amet nulla eius, neque beatae, nostrum possimus, officiis eaque consectetur. Sequi sunt maiores dolore, illum quidem eos explicabo! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam consequuntur consequatur molestiae saepe sed, incidunt sunt inventore minima voluptatum adipisci hic, est ipsa iste. Nobis, aperiam provident quae. Reprehenderit, iste.

    +

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores animi tenetur nam delectus eveniet iste non culpa laborum provident minima numquam excepturi rem commodi, officia accusamus eos voluptates obcaecati. Possimus?

    + +
    + +

    Komentar

    + +
    +
    + + + + + + +

    + + + +
    +
    + +
      +
    • +
      +

      Jems

      +
      2 menit lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • + +
    • +
      +

      Kave

      +
      1 jam lalu
      +
      +

      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

      +
    • +
    +
    +
    + +
    + +
    + + +
    diff --git a/web/test1.xhtml b/web/test1.xhtml deleted file mode 100644 index 3ac44ba2..00000000 --- a/web/test1.xhtml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - tooooop - - - - contentttttt - - - - bottoooooom - - -