diff --git a/_config.yml b/_config.yml index 92711ee..e1d95de 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,3 @@ -name: "MacGitver Website" -title: "MacGitver by Sascha Cunz and Nils Fenner" -markdown: rdiscount \ No newline at end of file +name: "macgitver.org" +title: "Home of MacGitver and Friends" +markdown: rdiscount diff --git a/_includes/menu.html b/_includes/menu.html new file mode 100644 index 0000000..fe94ca5 --- /dev/null +++ b/_includes/menu.html @@ -0,0 +1,22 @@ +
+ Menu + +
+ diff --git a/_layouts/default.html b/_layouts/default.html index a114407..c393928 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -7,43 +7,53 @@ - + + + + + + + - +
-

{{ site.name }}

- View project onGitHub -
-
-
-
-
- - {{ content }} - -
- - - +
+
{{ content }}
+ + +
- + + {% include menu.html %} + diff --git a/_layouts/welcome.html b/_layouts/welcome.html new file mode 100644 index 0000000..6c680e4 --- /dev/null +++ b/_layouts/welcome.html @@ -0,0 +1,36 @@ + + + + + {{ site.title }} + + + + + + + + + + + + + +
+
+

{{ page.title }}

+
+
+ +
+
+
{{ content }}
+
+
+ + {% include menu.html %} + + + diff --git a/about/index.md b/about/index.md deleted file mode 100644 index 9d38a84..0000000 --- a/about/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: About Macgitver -layout: default -group: "navigation" ---- - -# About the MacGitver project -More experienced users of the Git version control system know, that it is a very powerful and useful system. But -- the learning curve is still high for newcomers. And even experienced users always have to lookup command options to accomplish more complex versioning tasks. - -The lack of a good user interface (at least) for all major plattforms makes the user experience even worse. - -## Let's fix that! -MacGitver makes Git easier for newcomers and takes some of the burden, having to learn hundreds of Git options, hacking them into a terminal to simply setup a working repository. -At the same time, professional users are able to accomplish more sophisticated tasks like when a team member accidently messed up a repository. - -## Some internal details and project history -Development of MacGitver started in 2011 and actually is actually the result of two separate projects, driven by the same motivation: -*Create a freely available user interface to control Git in a comfortable way.* - -The developers of both projects decided to merge their begun work into one of the two projects. Thus, the other project, called *MsPiggit*, is no longer maintained and only lies there for reference. - -To make the system perform fast and support at least the major desktop plattforms as good as possible, Qt and C/C++ were the first choice as a solid base. - -## So, what is it? -Well, in short, the goal is to make you feel like being at home, relaxing on the couch, while managing complex versioning tasks of a your project(s) at work. diff --git a/css/menu.css b/css/menu.css new file mode 100644 index 0000000..a9a2911 --- /dev/null +++ b/css/menu.css @@ -0,0 +1,213 @@ +@import url(http://fonts.googleapis.com/css?family=Oswald); + +#cssmenu, +#cssmenu > .menu li, +#cssmenu > .menu li a { + margin: 0; + padding: 0; + border: 0; + display: block; + line-height: 1; + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +#cssmenu > .menu li, +#cssmenu > .menu li a { + display: none; +} + +#cssmenu { + display: inline-block; + position: absolute; + top: 48px; + left: 0; + right: 0; + width: 150px; + cursor: pointer; + font-family: 'Oswald', sans-serif; + text-align: left; + text-transform: uppercase; + text-decoration: none; +} +#cssmenu:after, +#cssmenu > .menu:after, +#cssmenu > .menu .submenu:after { + content: ""; + clear: both; + visibility: hidden; + line-height: 0; + height: 0; +} + +#cssmenu #menu-indicator { + display: inline-block; + position: absolute; + bottom: 0; + height: 0; + width: 0; + border: 25px solid transparent; + border-left-color: #333; + opacity: .7; + -webkit-transition: all 0.25s ease-out; + -moz-transition: all 0.25s ease-out; + -ms-transition: all 0.25s ease-out; + -o-transition: all 0.25s ease-out; + transition: all 0.25s ease-out; +} + +#cssmenu > .menu-head { + font-size: 24pt; + margin: 0; + padding: 0 32px 0px 32px; + line-height: 48px; + background: rgba(55, 55, 165,.3); + border: 1px solid #555; + border-top-right-radius: 10px; + border-bottom-right-radius: 10px; + color: #fb1; + -webkit-transition: color .8s; + -moz-transition: color .8s; + -ms-transition: color .8s; + -o-transition: color .8s; + transition: color .8s; +} + +#cssmenu > .menu { + position: absolute; + padding: 0; + margin: 0; + top: 0; left: 0; + height: 0; width: 0; + opacity: 0; + -webkit-transition: top .25s ease, opacity .5s; + -moz-transition: top .25s ease, opacity .5s; + -ms-transition: top .25s ease, opacity .5s; + -o-transition: top .25s ease, opacity .5s; + transition: top .25s ease, opacity .5s; +} +#cssmenu > .menu > li > a { + width: 100px; + line-height: 100px; + background: url(/images/menu/blob.svg); + background-size: 100%; + background-repeat: no-repeat; + text-align: center; + opacity: .8; +} +#cssmenu > .menu > li:first-child > a { + background: url(/images/menu/blob-first.svg); + background-size: 100%; + background-repeat: no-repeat; +} +#cssmenu > .menu > li:last-child > a { + background: url(/images/menu/blob-last.svg); + background-size: 100%; + background-repeat: no-repeat; +} +#cssmenu > .menu > li a { + text-transform: uppercase; + color: #999; + font-size: 18px; + outline: 0; + -webkit-transition: all .8s ease; + -moz-transition: all .8s ease; + -ms-transition: all .8s ease; + -o-transition: all .8s ease; + transition: all .8s ease; +} + +#cssmenu > .menu .submenu { + position: absolute; + left: 0; + min-width: 150px; + top: 35%; + padding: 10px 10px 10px 10px; + background: rgba(31, 68, 31, .75); + border-radius: 10px; + border: solid 1px #555; + opacity: 0; + -webkit-transition: left .3s ease, opacity .3s ease; + -moz-transition: left .3s ease, opacity .3s ease; + -ms-transition: left .3s ease, opacity .3s ease; + -o-transition: left .3s ease, opacity .3s ease; + transition: left .3s ease, opacity .3s ease; +} +#cssmenu > .menu .submenu hr { + margin: 2px 0 15px 0; + padding: 0; + border: 1px solid #585; +} +#cssmenu > .menu .submenu li a { + padding: 0 0 3px 0; + font-size: 16px; +} + +#cssmenu:hover > .menu-head { + color: #444444; + -webkit-transition: color .8s; + -moz-transition: color .8s; + -ms-transition: color .8s; + -o-transition: color .8s; + transition: color .8s; +} +#cssmenu:hover > .menu { + left: 30px; top: 100%; + height: auto; width: auto; + opacity: 1; +} +#cssmenu:hover > .menu li, +#cssmenu:hover > .menu > li a { + display: block; +} + +#cssmenu > .menu li > a:hover, +#cssmenu > .menu li:hover > a, +#cssmenu > .menu li.active > a { + color: #fd5; + text-shadow: 0 0 0.8em #a7c0f1, 0 0 0.8em #a7c0f1, 0 0 0.8em #a7c0f1; +} + +#cssmenu > .menu li:hover > .submenu { + left: 100% !Important; + opacity: 1; +} + +/* All Mobile Sizes (devices and browser) */ +@media only screen and (max-width: 767px) { + #cssmenu { + top: 0; + left: 0; + width: 75px; + padding: 0; + margin: 0; + } + #cssmenu > .menu-head { + margin: 0; + padding: 1px 5px 1px 5px; + font-size: 14pt; + line-height: 30px; + border: 0; + border-right: 1px dotted #333; + border-radius: 0; + } + #cssmenu #menu-indicator { + display: none; + visibility: hidden; + height: 0; + width: 0; + } + #cssmenu > .menu > li a, + #cssmenu > .menu .submenu > li a { + font-size: 13px; + } + #cssmenu > .menu > li > a { + width: 75px; + line-height: 75px; + } + + #cssmenu:hover > .menu { + left: 0; + } +} diff --git a/css/stylesheet.css b/css/stylesheet.css index 94cc50c..1181395 100644 --- a/css/stylesheet.css +++ b/css/stylesheet.css @@ -1,4 +1,4 @@ -/* http://meyerweb.com/eric/tools/css/reset/ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ @@ -11,183 +11,173 @@ b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, -article, aside, canvas, details, embed, -figure, figcaption, footer, header, hgroup, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { - margin: 0; - padding: 0; - border: 0; - font-size: 100%; - font: inherit; - vertical-align: baseline; + margin: 0; + padding: 0; + left: 0; + right: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ -article, aside, details, figcaption, figure, +article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { - display: block; + display: block; } body { line-height: 1; } ol, ul { - list-style: none; + list-style: none; } blockquote, q { - quotes: none; + quotes: none; } blockquote:before, blockquote:after, q:before, q:after { - content: ''; - content: none; + content: ''; + content: none; } table { - border-collapse: collapse; - border-spacing: 0; + border-collapse: collapse; + border-spacing: 0; } /* LAYOUT STYLES */ body { font-size: 15px; - line-height: 1.5; - background: #fafafa url(../images/body-bg.jpg) 0 0 repeat; + line-height: 1.5; + background: #fafafa url(/images/site-bg.jpg) 0 0 no-repeat; + background-size: cover; + background-attachment: fixed; font-family: 'Helvetica Neue', Helvetica, Arial, serif; font-weight: 400; - color: #666; + color: #ddd; } a { - color: #2879d0; + color: #ec3; + -webkit-transition: all .4s ease; + -moz-transition: all .4s ease; + -ms-transition: all .4s ease; + -o-transition: all .4s ease; + transition: all .4s ease; + outline: 0; } a:hover { - color: #2268b2; + color: #fd0; + text-decoration: none; + text-shadow: 0 0 0.8em #a7c0f1, 0 0 0.8em #ff0, 0 0 0.8em #fff; } header { - padding-top: 40px; - padding-bottom: 40px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - background: #2e7bcf url(../images/header-bg.jpg) 0 0 repeat-x; - border-bottom: solid 1px #275da1; + padding: 20px 0 10px 0; + font-family: 'Oswald', 'Helvetica Neue', Helvetica, Arial, serif; +} + +.inner { + position: relative; + margin: 0 20px 0 20px; +} +header .inner { + margin: 0; + padding: 30px 30px 30px 200px; + width: 60%; + background: rgba(85, 144, 221, .35); + border-top-right-radius: 2em; + border-bottom-right-radius: 7em; } header h1 { letter-spacing: -1px; - font-size: 72px; - color: #fff; + font-size: 42px; + color: #333; line-height: 1; - margin-bottom: 0.2em; - width: 540px; + text-transform: uppercase; } header h2 { font-size: 26px; - color: #9ddcff; + color: #333; font-weight: normal; line-height: 1.3; width: 540px; letter-spacing: 0; } -div#navigation { - background-color: rgba(10,10,10,0.5); - margin: 0; - padding: 0; -} -ul#nav-list { - margin: 0; - padding: 3px; - padding-left: 10px; - border-top: 1px dotted black; - border-bottom: 1px dotted black; -} -ul#nav-list li { - display: inline; - list-style: none; - margin: 0; - padding: 0; - padding-right: 5px; - color: #fff; -} -ul#nav-list a:visited { - color: #fff; -} -ul#nav-list a:focus { - color: #ff0; -} -ul#nav-list a:hover { - color: #ff0; -} -ul#nav-list a:active { - color: #dd0; -} - -.inner { - position: relative; - width: 940px; - margin: 0 auto; -} - #content-wrapper { - border-top: solid 1px #fff; - padding-top: 30px; + margin: 5px 0 20px 20px; } #main-content { - width: 690px; + display: block; float: left; + padding: 10px; + width: 60%; + background: rgba(10, 10, 10, .35); + background: url(/images/blueprint.jpg) 0 0 repeat; + border-radius: 15px; + -webkit-transition: opacity .8s ease; + -moz-transition: opacity .8s ease; + -ms-transition: opacity .8s ease; + -o-transition: opacity .8s ease; + transition: opacity .8s ease; } - #main-content img { max-width: 100%; } - -aside#sidebar { - width: 200px; - padding-left: 20px; - min-height: 504px; - float: right; - background: transparent url(../images/sidebar-bg.jpg) 0 0 no-repeat; - font-size: 12px; - line-height: 1.3; -} - -aside#sidebar p.repo-owner, -aside#sidebar p.repo-owner a { - font-weight: bold; -} - -#downloads { - margin-bottom: 40px; +/* +#main-content:after { + content: ""; + top: 0; + left: 0; + bottom: 0; + right: 0; + position: absolute; + z-index: -1; } +*/ -a.button { - width: 134px; - height: 58px; - line-height: 1.2; - font-size: 23px; - color: #fff; - padding-left: 68px; - padding-top: 22px; - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; +#sidebar { + display: inline; + float: left; + left: auto; + right: auto; + width: 200px; + margin-left: 15px; } -a.button small { +#sidebar .button { display: block; - font-size: 11px; + margin-bottom: 10px; + border: 1px solid #18f; + border-radius: 1em 2em 7em 1em; + background-color: rgba(85, 144, 221, .65); + font-family: 'Oswald', 'Helvetica Neue', Helvetica, Arial, serif; + letter-spacing: -1px; + font-size: 30px; + line-height: 52px; } -header a.button { - position: absolute; - right: 0; - top: 0; - background: transparent url(../images/github-button.png) 0 0 no-repeat; +#sidebar .button > img { + margin: 5px; + vertical-align: middle; + width: 48px; + height: 48px; } -aside a.button { - width: 138px; - padding-left: 64px; - display: block; - background: transparent url(../images/download-button.png) 0 0 no-repeat; - margin-bottom: 20px; - font-size: 21px; +#sidebar .button > a { + color: #fc3; +} +#sidebar .text-box { + margin-bottom: 10px; + padding: 10px; + border-radius: 15px; + background-color: rgba(55,55,55,.65); + color: #ddd; + font-size: 8pt; } code, pre { @@ -198,21 +188,22 @@ code, pre { } code { - background-color: #f2f8fc; - border: solid 1px #dbe7f3; + background-color: rgba(230,230,255,.52); + border-radius: 3px; padding: 0 3px; } pre { - padding: 20px; - background: #fff; + padding: 10px; + background-color: rgba(32,32,32,.75); text-shadow: none; overflow: auto; - border: solid 1px #f2f2f2; + /*border: solid 1px #f2f2f2;*/ + border-radius: 9px; } pre code { - color: #2879d0; - background-color: #fff; + color: #bbf; + background: transparent; border: none; padding: 0; } @@ -230,7 +221,7 @@ hr { margin-top: 1em; padding-bottom: 1em; border: none; - background: transparent url('../images/hr.png') 0 0 no-repeat; + background: transparent url(/images/hr.png) 0 0 no-repeat; } table { @@ -244,105 +235,103 @@ th { td { border: 1px solid #ebebeb; - text-align: center; + text-align: center; font-weight: 300; } form { background: #f2f2f2; padding: 20px; - + } /* GENERAL ELEMENT TYPE STYLES */ #main-content h1 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; - font-size: 2.8em; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 2em; letter-spacing: -1px; - color: #474747; -} - + color: #eee; +} #main-content h1:before { - content: "/"; - color: #9ddcff; - padding-right: 0.3em; - margin-left: -0.9em; + vertical-align: middle; + content: "*"; + color: #fc3; + font-size: 2em; + padding-right: 0.2em; } #main-content h2 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; font-size: 22px; font-weight: bold; margin-bottom: 8px; - color: #474747; -} + color: #ddd; +} #main-content h2:before { - content: "//"; - color: #9ddcff; + vertical-align: middle; + content: ""; + color: #ddd; padding-right: 0.3em; - margin-left: -1.5em; } #main-content h3 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; font-size: 18px; font-weight: bold; margin-top: 24px; margin-bottom: 8px; - color: #474747; -} - + color: #ddd; +} #main-content h3:before { - content: "///"; - color: #9ddcff; + vertical-align: middle; + content: ""; + color: #ddd; padding-right: 0.3em; - margin-left: -2em; } #main-content h4 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; font-size: 15px; font-weight: bold; - color: #474747; -} - + color: #ddd; +} h4:before { - content: "////"; + vertical-align: middle; + content: ""; color: #9ddcff; padding-right: 0.3em; - margin-left: -2.8em; } #main-content h5 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; font-size: 14px; - color: #474747; -} + color: #ddd; +} h5:before { - content: "/////"; + vertical-align: middle; + content: ""; color: #9ddcff; padding-right: 0.3em; - margin-left: -3.2em; } #main-content h6 { - font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; font-size: .8em; - color: #474747; -} + color: #ddd; +} h6:before { - content: "//////"; - color: #9ddcff; + vertical-align: middle; + content: ""; + color: #ddd; padding-right: 0.3em; - margin-left: -3.7em; } p { margin-bottom: 20px; } - + a { text-decoration: none; } @@ -374,7 +363,7 @@ dl dd { } footer { - background: transparent url('../images/hr.png') 0 0 no-repeat; + background: transparent url(/images/hr.png) 0 0 no-repeat; margin-top: 40px; padding-top: 20px; padding-bottom: 30px; @@ -383,7 +372,7 @@ footer { } footer a { - color: #666; + color: #555; } footer a:hover { color: #444; @@ -405,6 +394,15 @@ footer a:hover { /* #Media Queries ================================================== */ +/* screens in portrait orientation */ +@media only screen and (orientation: portrait) { + body { + background: #fafafa url(/images/site-bg-portrait.jpg) 0 0 no-repeat; + background-size: cover; + background-attachment: fixed; + } +} + /* Smaller than standard 960 (devices and browsers) */ @media only screen and (max-width: 959px) {} @@ -439,22 +437,27 @@ footer a:hover { /* All Mobile Sizes (devices and browser) */ @media only screen and (max-width: 767px) { + body, header, + #content-wrapper, #main-content, .inner { - width: 93%; + padding: 0; + margin: 0; + left: 0; + right: 0; } - header { - padding: 20px 0; + .inner { + margin: 0 5px; + padding: 0; } header .inner { - position: relative; - } - header h1, header h2 { + padding: 0 10px 0 60px; width: 100%; + background: rgba(85, 144, 221, .35); + border-radius: 0; + border-bottom: solid 3px #275da1; } - header h1 { - font-size: 48px; - } - header h2 { + header h1, header h2 { + line-height: 30px; font-size: 24px; } header a.button { @@ -470,27 +473,26 @@ footer a:hover { line-height: 1; background-color: #9ddcff; color: #2879d0; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; - border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; } header a.button small { font-size: 13px; display: inline; } #main-content, - aside#sidebar { - float: none; - width: 100% ! important; + #sidebar { + float: left; + width: 100% !important; } - aside#sidebar { + #sidebar { background-image: none; margin-top: 20px; border-top: solid 1px #ddd; padding: 20px 0; min-height: 0; } - aside#sidebar a.button { + #sidebar a.button { display: none; } #main-content h1:before, diff --git a/css/welcome.css b/css/welcome.css new file mode 100644 index 0000000..2df731c --- /dev/null +++ b/css/welcome.css @@ -0,0 +1,512 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + left: 0; + right: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} + +/* LAYOUT STYLES */ +body { + font-size: 15px; + line-height: 1.5; + background: #fafafa url(/images/site-bg.jpg) 0 0 no-repeat; + background-size: cover; + background-attachment: fixed; + font-family: 'Helvetica Neue', Helvetica, Arial, serif; + font-weight: 400; + color: #ddd; +} + +a { + color: #2879d0; +} +a:hover { + color: #2268b2; +} + +header { + padding: 20px 0 10px 0; + font-family: 'Oswald', 'Helvetica Neue', Helvetica, Arial, serif; +} + +.inner { + position: relative; + margin: 0 20px 0 20px; +} +header .inner { + margin: 0; + padding: 30px 30px 30px 200px; + width: 60%; + background: rgba(85, 144, 221, .35); + border-top-right-radius: 2em; + border-bottom-right-radius: 7em; + /*border-bottom: solid 1px #275da1;*/ +} + +header h1 { + letter-spacing: -1px; + font-size: 42px; + color: #333; + text-shadow: 0 0 0.8em #a7c0f1, 0 0 0.8em #a7c0f1, 0 0 0.8em #a7c0f1; + line-height: 1; + text-transform: uppercase; +} +header h2 { + font-size: 26px; + color: #333; + font-weight: normal; + line-height: 1.3; + width: 540px; + letter-spacing: 0; +} + +#content-wrapper { + padding-top: 5px; +} + +#main-content { + width: 100%; + float: left; +} +#main-content:after { + content: ""; + top: 0; left: 0; bottom: 0; right: 0; + position: absolute; + z-index: -1; +} + +#preview:before { + content: ""; + top: 0; left: 0; bottom: 0; right: 0; + position: absolute; + z-index: -1; +} +#preview { + table-layout: fixed; + width: 90%; + margin: 20px 0 0 5%; + padding: 0; + line-height: 0; + column-count: 4; + -moz-column-count: 4; + -webkit-column-count: 4; + column-gap: 0px; + -moz-column-gap: 0px; + -webkit-column-gap: 0px; +} +#preview > figure { + width: 98%; + margin: 0; +} +#preview figcaption { + display: none; +} +#preview > figure > img { + width: 100% !important; + height: auto !important; + border-radius: 5px; + box-shadow: 0 0 0.2em #555, 0 0 0.2em #999, 0 0 0.8em #000; + box-sizing: padding-box; + -webkit-transition: all .5s ease; + -moz-transition: all .5s ease; + -ms-transition: all .5s ease; + -o-transition: all .5s ease; + transition: all .5s ease; +} + +#preview > figure:hover img { + -webkit-transform:scale(1.25); + -moz-transform:scale(1.25); + -ms-transform:scale(1.25); + -o-transform:scale(1.25); + transform:scale(1.25); +} +#preview > figure:hover figcaption { + display: inline-block; + line-height: 1; + background: rgba(48,48,48,.8); + border-top-right-radius: 7px; + border-bottom-right-radius: 7px; +} + +code, pre { + font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; + color: #222; + margin-bottom: 30px; + font-size: 13px; +} + +code { + background-color: #f2f8fc; + border: solid 1px #dbe7f3; + padding: 0 3px; +} + +pre { + padding: 20px; + background: #fff; + text-shadow: none; + overflow: auto; + border: solid 1px #f2f2f2; +} +pre code { + color: #2879d0; + background-color: #fff; + border: none; + padding: 0; +} + +ul, ol, dl { + margin-bottom: 20px; +} + + +/* COMMON STYLES */ + +hr { + height: 1px; + line-height: 1px; + margin-top: 1em; + padding-bottom: 1em; + border: none; + background: transparent url(/images/hr.png) 0 0 no-repeat; +} + +table { + width: 100%; + border: 1px solid #ebebeb; +} + +th { + font-weight: 500; +} + +td { + border: 1px solid #ebebeb; + text-align: center; + font-weight: 300; +} + +form { + background: #f2f2f2; + padding: 20px; + +} + + +/* GENERAL ELEMENT TYPE STYLES */ + +#main-content h1 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 55px; + letter-spacing: -1px; + color: #448; + text-shadow: 0 0 0.8em #fff, 0 0 0.8em #fff, 0 0 0.8em #fff; + text-align: center; +} + +#main-content h2 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 36px; + font-weight: bold; + margin-bottom: 8px; + color: #333; + text-shadow: 0 0 0.8em #fff, 0 0 0.8em #fff, 0 0 0.8em #fff; + text-align: center; +} + +#main-content h3 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 18px; + font-weight: bold; + margin-top: 24px; + margin-bottom: 8px; + color: #ddd; +} + +#main-content h3:before { + content: "///"; + color: #ddd; + padding-right: 0.3em; + margin-left: -2em; +} + +#main-content h4 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 15px; + font-weight: bold; + color: #ddd; +} + +h4:before { + content: "////"; + color: #9ddcff; + padding-right: 0.3em; + margin-left: -2.8em; +} + +#main-content h5 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: 14px; + color: #ddd; +} +h5:before { + content: "/////"; + color: #9ddcff; + padding-right: 0.3em; + margin-left: -3.2em; +} + +#main-content h6 { + font-family: 'Architects Daughter', 'Helvetica Neue', Helvetica, Arial, serif; + font-size: .8em; + color: #ddd; +} +h6:before { + content: "//////"; + color: #ddd; + padding-right: 0.3em; + margin-left: -3.7em; +} + +p { + margin-bottom: 20px; +} + +a { + text-decoration: none; +} + +p a { + font-weight: 400; +} + +blockquote { + font-size: 1.6em; + border-left: 10px solid #e9e9e9; + margin-bottom: 20px; + padding: 0 0 0 30px; +} + +ul li { + list-style: disc inside; + padding-left: 20px; +} + +ol li { + list-style: decimal inside; + padding-left: 3px; +} + +dl dd { + font-style: italic; + font-weight: 100; +} + +footer { + background: transparent url(/images/hr.png) 0 0 no-repeat; + margin-top: 40px; + padding-top: 20px; + padding-bottom: 30px; + font-size: 13px; + color: #aaa; +} + +footer a { + color: #555; +} +footer a:hover { + color: #444; +} + +/* MISC */ +.clearfix:after { + clear: both; + content: '.'; + display: block; + visibility: hidden; + height: 0; +} + +.clearfix {display: inline-block;} +* html .clearfix {height: 1%;} +.clearfix {display: block;} + +/* #Media Queries +================================================== */ + +/* screens in portrait orientation */ +@media only screen and (orientation: portrait) { + body { + background: #fafafa url(/images/site-bg-portrait.jpg) 0 0 no-repeat; + background-size: cover; + background-attachment: fixed; + } +} + +/* Smaller than standard 960 (devices and browsers) */ +@media only screen and (max-width: 959px) {} + +/* Tablet Portrait size to standard 960 (devices and browsers) */ +@media only screen and (min-width: 768px) and (max-width: 959px) { + .inner { + width: 740px; + } + header h1, header h2 { + width: 340px; + } + header h1 { + font-size: 60px; + } + header h2 { + font-size: 30px; + } + #main-content { + width: 490px; + } + #main-content h1:before, + #main-content h2:before, + #main-content h3:before, + #main-content h4:before, + #main-content h5:before, + #main-content h6:before { + content: none; + padding-right: 0; + margin-left: 0; + } +} + +/* All Mobile Sizes (devices and browser) */ +@media only screen and (max-width: 767px) { + body, header, h1, h2, + #content-wrapper, #main-content + .inner { + padding: 0; + margin: 0; + left: 0; + right: 0; + } + .inner { + margin: 0 5px; + } + header .inner { + padding: 0 10px 0 60px; + width: 100%; + border-radius: 0; + border-bottom: solid 3px #275da1; + } + header h1, header h2 { + width: 100%; + line-height: 30px; + font-size: 24px; + } + header a.button { + background-image: none; + width: auto; + height: auto; + display: inline-block; + margin-top: 15px; + padding: 5px 10px; + position: relative; + text-align: center; + font-size: 13px; + line-height: 1; + background-color: #9ddcff; + color: #2879d0; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + border-radius: 5px; + } + header a.button small { + font-size: 13px; + display: inline; + } + #main-content, + aside#sidebar { + float: none; + width: 100% !important; + } + #main-content h1:before, + #main-content h2:before, + #main-content h3:before, + #main-content h4:before, + #main-content h5:before, + #main-content h6:before { + content: none; + padding-right: 0; + margin-left: 0; + } + #main-content { + margin-top: 20px; + } + #main-content h1 { + font-size: 24px; + line-height: 1.5; + } + #main-content h2 { + font-size: 16px; + line-height: 1.5; + } + + #preview { + column-count: 2; + -moz-column-count: 2; + -webkit-column-count: 2; + } +} + +/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ +@media only screen and (min-width: 480px) and (max-width: 767px) {} + +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ +@media only screen and (max-width: 479px) { + #main-content h1 { + font-size: 20px; + } + #main-content h2 { + font-size: 12px; + } +} diff --git a/images/header-bg.jpg b/images/blueprint.jpg similarity index 100% rename from images/header-bg.jpg rename to images/blueprint.jpg diff --git a/images/body-bg.jpg b/images/body-bg.jpg deleted file mode 100644 index 0e0f861..0000000 Binary files a/images/body-bg.jpg and /dev/null differ diff --git a/images/download-button.png b/images/download-button.png deleted file mode 100644 index df3f09a..0000000 Binary files a/images/download-button.png and /dev/null differ diff --git a/images/download.svg b/images/download.svg new file mode 100644 index 0000000..5b962a5 --- /dev/null +++ b/images/download.svg @@ -0,0 +1,74 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/images/github-button.png b/images/github-button.png deleted file mode 100644 index efe07f9..0000000 Binary files a/images/github-button.png and /dev/null differ diff --git a/images/menu/blob-first.svg b/images/menu/blob-first.svg new file mode 100644 index 0000000..64e9c30 --- /dev/null +++ b/images/menu/blob-first.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/images/menu/blob-last.svg b/images/menu/blob-last.svg new file mode 100644 index 0000000..ed18bb4 --- /dev/null +++ b/images/menu/blob-last.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/images/menu/blob.svg b/images/menu/blob.svg new file mode 100644 index 0000000..eedfd7d --- /dev/null +++ b/images/menu/blob.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/images/project-source.svg b/images/project-source.svg new file mode 100644 index 0000000..4f0faa1 --- /dev/null +++ b/images/project-source.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/images/sidebar-bg.jpg b/images/sidebar-bg.jpg deleted file mode 100644 index 42890fe..0000000 Binary files a/images/sidebar-bg.jpg and /dev/null differ diff --git a/images/site-bg-portrait.jpg b/images/site-bg-portrait.jpg new file mode 100644 index 0000000..6a6ddb8 Binary files /dev/null and b/images/site-bg-portrait.jpg differ diff --git a/images/site-bg.jpg b/images/site-bg.jpg new file mode 100644 index 0000000..e8ed4bd Binary files /dev/null and b/images/site-bg.jpg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..e96e2f1 --- /dev/null +++ b/index.html @@ -0,0 +1,29 @@ +--- +title: macgitver.org +layout: welcome +--- + +

Welcome to the home of MacGitver!

+

"The swiss army knife for Git"

+ +
+
+ MacGitver's welcome screen +
MacGitver friendly invites you with a beautiful welcome screen.
+
+ +
+ History view of MacGitver +
MacGitver shows an overview about your opened repositories and their history.
+
+ +
+ Working-Tree view of MacGitver +
Browse the repository's working directory within MacGitver and commit files.
+
+ +
+ MacGitver runs on Lubuntu +
MacGitver runs cross-platform! This one is for the Lubuntu people among us.
+
+
diff --git a/index.md b/index.md deleted file mode 100644 index d06ec9f..0000000 --- a/index.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Home -layout: default -group: navigation ---- -# Welcome to the MacGitver Website -This is the place where you can find all online resources available for the MacGitver project. - -# What is it? -MacGitver is a platform independent user interface for the Git versioning system. - -# Who is it for? -People, who like to version their files with Git, looking for a comfortable user interface. - -# Get a glimpse -See by yourself, what's about to be created here: - -Say hello to MacGitver: -![Welcome screen of MacGitver](images/screenshots/mgv_welcome_screen.png "MacGitver's welcome screen") - -The *history view* shows an overview about your repositories and their history: -![History view of MacGitver](images/screenshots/mgv_repo_history_view.png "MacGitver showing repositories and their history") - -This is, how your working directory appears in MacGitver: -![Working-Tree view of MacGitver](images/screenshots/mgv_repo_wd_index_view.png "MacGitver's working directory view") - -This one is for the Lubuntu people among us: -![MacGitver in Lubuntu](images/screenshots/lubuntu/mgv_repo_history_view.png "MacGitver, running on Lubuntu") diff --git a/projects/libgitwrap/index.md b/projects/libgitwrap/index.md new file mode 100644 index 0000000..a5ca921 --- /dev/null +++ b/projects/libgitwrap/index.md @@ -0,0 +1,189 @@ +--- +title: "The GitWrap library" +layout: default +group: "projects" +project: "libGitWrap" +--- + +# GitWrap - Git API for Qt +This library provides an easy to use Qt'ish API, based on the libgit2 library. + +If you want to write a Qt application with access to Git repositories, GitWrap is probably what you are looking for. + +**Important Note:** + +Development and API-Design of this library is mainly driven by the [MacGitver-Project](http://www.macgitver.org). We provide a deprecation mechanism, that avoids unnecessary API-breakage. Sometimes this is not possible though and you have to make adjustments by your own, when updating to a newer development version. + +## License +GitWrap is released under the terms of GPL version 2. + +# How to use GitWrap +Method names in GitWrap follow the libgit2 naming conventions in general. There are some methods, that are not available in libgit2. A good example is are GitWrap operations (i.e. `Git::CloneOperation`), which provides extended functionality. + +You can actually lookup most keywords in the libgit2 API reference, when they are not documented yet in GitWrap. + +Here's an example for the general convention for method names. + +```c++ +// libgit2 function +git_reference_name() + +// GitWrap method +Git::Reference::name() +``` + +## Handling Errors - Life without Exceptions! +GitWrap doesn't throw a single exception! Instead we provide reliable error handling, that binds closely to libgit2's error system. Sounds complicated? It's pretty easy and you'll probably love it! + +Here's how to use it: + +```c++ +// The general calling convention is: +Result r; + +Git::some-function( r, /* other parameters */ ); + +if ( !r ) +{ + // React to the failed result. + // For example, you can display the descriptive error text. + showError( r.errorText() ); + + // Usually you want to return here. + return; + + // If you need to continue for whatever reason, + // the result must be cleared: + r.clear(); +} +``` + +Here is a more complex example: +```c++ +void myFunction() +{ + // provide a path (or sub-path) to your repo + QStringLiteral repoSubPath("/path/to/repo/or/any/sub-path"); + + // Let the show begin! + Git::Result r; + Git::Repository repo = + Git::Repository::open( r, Git::Repository::discover( r, repoSubPath ) ); + + if ( !r ) + { + qCritical( "Unable to open repository at %s:\nGit error: %s", + qPrintable(repoSubPath), + qPrintable( r.errorText() ) ); + + return; + } + + QString activeBranch = repo.currentBranch( r ); + if ( !r ) + { + qCritical( "Unable to lookup the active branch." + "\nGit error: %s", qPrintable( r.errorText() ) ); + + return; + } + + // enjoy using GitWrap and go on coding +} +``` + +## A simple Example in Qt + +This example shows how you `git init` with GitWrap. + +```c++ +#include "libGitWrap/Repository.hpp" +#include "libGitWrap/Result.hpp" + +void initRepositoryExample() +{ + Git::Result r; + QStringLiteral path( "/here/is/my/new/repository" ); + bool bare = false; + Git::Repository newRepo = Git::Repository::create( path, bare, r ); + if ( !r ) + { + qCritical( "Unable to create repository at %s." + "\nGit error: %s", + qPrintable( path ), qPrintable( r.errorText() ) ); + } +} +``` + +# How to compile libGitWrap + +For now, the only way to install and use GitWrap is compiling from source code. + +## Pre-Requisites + +To compile GitWrap, you need the following install: + +* RAD-Tools (read "Install the RAD-Tools" below) + * You get them [here](https://github.com/Cunz-RAD/RAD-Tools)! +* CMake ( >= 2.8.12 ) +* Qt >= 5.3 (Qt4 will not work!) +* The C++ compiler of your choice! We recommend clang/llvm. + +## Got it! Now how do I compile it? + +These are the build instructions for OSX and Linux. + +### Install the RAD-Tools + +The RAD-Tools are a collection of CMake extension modules to simplify the build process. Nothing more, nothing less! + +```bash +# clone the repo into a path of your choice +git clone https://github.com/cunz-rad/RAD-Tools.git +cd RAD-Tools +mkdir build && cd build +cmake .. +sudo make install +``` + +### Build and Install GitWrap - The easy way! + +The easiest way to build GitWrap is by far using Qt-Creator. Just open the `CMakeLists.txt` file in the project's main directory and build the project. Done! + +Hint: Set `-DCMAKE_BUILD_TYPE=Release` before running CMake to create a release build. You can change that any time later! + +To install GitWrap, open a Terminal, go to the build directory (should be `Project-Dir/../libGitWrap-build`) and type: + +```bash +sudo make install +``` + +### Build and Install GitWrap - From a Terminal + +```bash +# clone the repo into a path of your choice +git clone --recursive https://github.com/macgitver/libGitWrap.git + +# You need to provide the path to your Qt5 installation. +# This is an example: +export QTDIR=$HOME/Qt/5.4/gcc_64 +export PATH=$QTDIR/bin:$PATH + +# now build & install! +mkdir libGitWrap-build && cd libGitWrap-build +cmake -DCMAKE_BUILD_TYPE=Release -- ../libGitWrap +make +sudo make install +``` + +# Want to help out? + +Sure, all you need is a Github account. Fork the repo and send a pull request. + +Create a feature branch with your initials like this: +If your Name is "Hans im Glück", write `git checkout -b hig/my-cool-feature master` + +Tip: Don't forget to update the submodules with `git submodule update --init --recursive` + + +That's all folks! Happy coding with GitWrap! diff --git a/projects/libheaven/index.md b/projects/libheaven/index.md new file mode 100644 index 0000000..577ac76 --- /dev/null +++ b/projects/libheaven/index.md @@ -0,0 +1,9 @@ +--- +title: "The Heaven library" +layout: default +group: "projects" +project: "libHeaven" +--- + +# About the Heaven library +TODO ... diff --git a/projects/macgitver/index.md b/projects/macgitver/index.md new file mode 100644 index 0000000..ff01b0e --- /dev/null +++ b/projects/macgitver/index.md @@ -0,0 +1,50 @@ +--- +title: MacGitver +layout: default +group: "main-projects" +project: "MacGitver" +--- + +# Why MacGitver is what you always searched for +Do you know Git? The awesomely fast, secure and flexible versioning system? No doubt, it really is a powerful system and probably you use it to maintain versions of your homepage or an open source application. And yes ... this very website you are just looking at is stored in a Git repository. + +So, why would you need another tool to handle such a well thought system? Well - assume you only want to view the history. You'll probably end up in typing something like this: + +```bash +git log --oneline --graph --decorated --color +``` + +After you learned how to do that, you create an alias (maybe something like `git history`). Does this sound familiar? Now let's say you work with a team of 5 developers. Every single developer in your team has to learn and perform the above task. Quite time consuming isn't it? + +Note, that this example is kept very simple, just to show where a GUI can be useful. + +There's tens of existing applications supporting that already, right? So **what makes MacGitver unique?** + +Well ... in short, our goal is to make you feel like relaxing on the couch while performing complex versioning tasks on your project(s). + +Ok, let me tell you some of our leading motivations ... + +**... for users:** + +1. Clean user interface with lean menus and well thought keyboard shortcuts. +2. Customizable (e.g. theming, fonts, branch colours, etc.) +3. Complete overview about your (local) repository (including submodules and worktree) in one screen. +4. Quick as the terminal (in both usability and performance). +5. Natively support the major platforms (currently UNIX only!). + +**... for project members** + +1. Open Source'd with a highly maintainable code base. +2. Build on a stable API instead of wrapping the console (aka libgit2). +2. Keep modularity. +3. Keep high stability and overall quality. + +We highly appreciate, if you like to try it and provide feedback. **Want to join the team?** Feel welcome! Start by browsing our public [issues](https://github.com/macgitver/MacGitver/issues) or register to our [mailing list](mailto:dev-subscribe@macgitver.org). + +# Some technical stuff +MacGitver is powered by the C-library [libgit2](https://libgit2.github.com). The higher level abstractions and the GUI part is completely powered by [Qt](http://qt.io) and advanced C++ techniques. This makes the system perform fast, while being able to provide multiplatform support. + +# Want to know how the project began? +Development of MacGitver started in 2011 and is the result of two separate projects, driven by the same motivation. + +The developers of both projects decided to merge their begun work into one project. Thus, the other project - *MsPiggit* - is no longer maintained and source code resides for reference. Source is still available on [GitHub](https://github.com/antis81/MsPiggit). diff --git a/scripts/jquery.sticky-kit.js b/scripts/jquery.sticky-kit.js new file mode 100644 index 0000000..e98c9a4 --- /dev/null +++ b/scripts/jquery.sticky-kit.js @@ -0,0 +1,265 @@ +// Generated by CoffeeScript 1.9.2 + +/** +@license Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net + */ + +(function() { + var $, win; + + $ = this.jQuery || window.jQuery; + + win = $(window); + + $.fn.stick_in_parent = function(opts) { + var doc, elm, enable_bottoming, fn, i, inner_scrolling, len, manual_spacer, offset_top, outer_width, parent_selector, recalc_every, sticky_class; + if (opts == null) { + opts = {}; + } + sticky_class = opts.sticky_class, inner_scrolling = opts.inner_scrolling, recalc_every = opts.recalc_every, parent_selector = opts.parent, offset_top = opts.offset_top, manual_spacer = opts.spacer, enable_bottoming = opts.bottoming; + if (offset_top == null) { + offset_top = 0; + } + if (parent_selector == null) { + parent_selector = void 0; + } + if (inner_scrolling == null) { + inner_scrolling = true; + } + if (sticky_class == null) { + sticky_class = "is_stuck"; + } + doc = $(document); + if (enable_bottoming == null) { + enable_bottoming = true; + } + outer_width = function(el) { + var _el, computed, w; + if (window.getComputedStyle) { + _el = el[0]; + computed = window.getComputedStyle(el[0]); + w = parseFloat(computed.getPropertyValue("width")) + parseFloat(computed.getPropertyValue("margin-left")) + parseFloat(computed.getPropertyValue("margin-right")); + if (computed.getPropertyValue("box-sizing") !== "border-box") { + w += parseFloat(computed.getPropertyValue("border-left-width")) + parseFloat(computed.getPropertyValue("border-right-width")) + parseFloat(computed.getPropertyValue("padding-left")) + parseFloat(computed.getPropertyValue("padding-right")); + } + return w; + } else { + return el.outerWidth(true); + } + }; + fn = function(elm, padding_bottom, parent_top, parent_height, top, height, el_float, detached) { + var bottomed, detach, fixed, last_pos, last_scroll_height, offset, parent, recalc, recalc_and_tick, recalc_counter, spacer, tick; + if (elm.data("sticky_kit")) { + return; + } + elm.data("sticky_kit", true); + last_scroll_height = doc.height(); + parent = elm.parent(); + if (parent_selector != null) { + parent = parent.closest(parent_selector); + } + if (!parent.length) { + throw "failed to find stick parent"; + } + fixed = false; + bottomed = false; + spacer = manual_spacer != null ? manual_spacer && elm.closest(manual_spacer) : $("
"); + if (spacer) { + spacer.css('position', elm.css('position')); + } + recalc = function() { + var border_top, padding_top, restore; + if (detached) { + return; + } + last_scroll_height = doc.height(); + border_top = parseInt(parent.css("border-top-width"), 10); + padding_top = parseInt(parent.css("padding-top"), 10); + padding_bottom = parseInt(parent.css("padding-bottom"), 10); + parent_top = parent.offset().top + border_top + padding_top; + parent_height = parent.height(); + if (fixed) { + fixed = false; + bottomed = false; + if (manual_spacer == null) { + elm.insertAfter(spacer); + spacer.detach(); + } + elm.css({ + position: "", + top: "", + width: "", + bottom: "" + }).removeClass(sticky_class); + restore = true; + } + top = elm.offset().top - (parseInt(elm.css("margin-top"), 10) || 0) - offset_top; + height = elm.outerHeight(true); + el_float = elm.css("float"); + if (spacer) { + spacer.css({ + width: outer_width(elm), + height: height, + display: elm.css("display"), + "vertical-align": elm.css("vertical-align"), + "float": el_float + }); + } + if (restore) { + return tick(); + } + }; + recalc(); + if (height === parent_height) { + return; + } + last_pos = void 0; + offset = offset_top; + recalc_counter = recalc_every; + tick = function() { + var css, delta, recalced, scroll, will_bottom, win_height; + if (detached) { + return; + } + recalced = false; + if (recalc_counter != null) { + recalc_counter -= 1; + if (recalc_counter <= 0) { + recalc_counter = recalc_every; + recalc(); + recalced = true; + } + } + if (!recalced && doc.height() !== last_scroll_height) { + recalc(); + recalced = true; + } + scroll = win.scrollTop(); + if (last_pos != null) { + delta = scroll - last_pos; + } + last_pos = scroll; + if (fixed) { + if (enable_bottoming) { + will_bottom = scroll + height + offset > parent_height + parent_top; + if (bottomed && !will_bottom) { + bottomed = false; + elm.css({ + position: "fixed", + bottom: "", + top: offset + }).trigger("sticky_kit:unbottom"); + } + } + if (scroll < top) { + fixed = false; + offset = offset_top; + if (manual_spacer == null) { + if (el_float === "left" || el_float === "right") { + elm.insertAfter(spacer); + } + spacer.detach(); + } + css = { + position: "", + width: "", + top: "" + }; + elm.css(css).removeClass(sticky_class).trigger("sticky_kit:unstick"); + } + if (inner_scrolling) { + win_height = win.height(); + if (height + offset_top > win_height) { + if (!bottomed) { + offset -= delta; + offset = Math.max(win_height - height, offset); + offset = Math.min(offset_top, offset); + if (fixed) { + elm.css({ + top: offset + "px" + }); + } + } + } + } + } else { + if (scroll > top) { + fixed = true; + css = { + position: "fixed", + top: offset + }; + css.width = elm.css("box-sizing") === "border-box" ? elm.outerWidth() + "px" : elm.width() + "px"; + elm.css(css).addClass(sticky_class); + if (manual_spacer == null) { + elm.after(spacer); + if (el_float === "left" || el_float === "right") { + spacer.append(elm); + } + } + elm.trigger("sticky_kit:stick"); + } + } + if (fixed && enable_bottoming) { + if (will_bottom == null) { + will_bottom = scroll + height + offset > parent_height + parent_top; + } + if (!bottomed && will_bottom) { + bottomed = true; + if (parent.css("position") === "static") { + parent.css({ + position: "relative" + }); + } + return elm.css({ + position: "absolute", + bottom: padding_bottom, + top: "auto" + }).trigger("sticky_kit:bottom"); + } + } + }; + recalc_and_tick = function() { + recalc(); + return tick(); + }; + detach = function() { + detached = true; + win.off("touchmove", tick); + win.off("scroll", tick); + win.off("resize", recalc_and_tick); + $(document.body).off("sticky_kit:recalc", recalc_and_tick); + elm.off("sticky_kit:detach", detach); + elm.removeData("sticky_kit"); + elm.css({ + position: "", + bottom: "", + top: "", + width: "" + }); + parent.position("position", ""); + if (fixed) { + if (manual_spacer == null) { + if (el_float === "left" || el_float === "right") { + elm.insertAfter(spacer); + } + spacer.remove(); + } + return elm.removeClass(sticky_class); + } + }; + win.on("touchmove", tick); + win.on("scroll", tick); + win.on("resize", recalc_and_tick); + $(document.body).on("sticky_kit:recalc", recalc_and_tick); + elm.on("sticky_kit:detach", detach); + return setTimeout(tick, 0); + }; + for (i = 0, len = this.length; i < len; i++) { + elm = this[i]; + fn($(elm)); + } + return this; + }; + +}).call(this); diff --git a/scripts/script.js b/scripts/script.js new file mode 100644 index 0000000..315ac71 --- /dev/null +++ b/scripts/script.js @@ -0,0 +1,124 @@ +(function($) { + + $.fn.menumaker = function(options) { + + var cssmenu = $(this), settings = $.extend({ + title: "Menu", + format: "dropdown", + breakpoint: 768, + sticky: false, + reset: 1000 + }, options); + + return this.each(function() { + cssmenu.find('li ul').parent().addClass('has-sub'); + /* + if (settings.format != 'select') { + cssmenu.prepend(''); + $(this).find("#menu-button").on('mouseover', function(){ + $(this).toggleClass('menu-opened'); + var mainmenu = $(this).next('ul'); + if (mainmenu.hasClass('open')) { + mainmenu.hide().removeClass('open'); + } + else { + mainmenu.show().addClass('open'); + if (settings.format === "dropdown") { + mainmenu.find('ul').show(); + } + } + }); + + multiTg = function() { + cssmenu.find(".has-sub").prepend(''); + cssmenu.find('.submenu-button').hover(function() { + $(this).toggleClass('submenu-opened'); + if ($(this).siblings('ul').hasClass('open')) { + $(this).siblings('ul').removeClass('open').hide(); + } + else { + $(this).siblings('ul').addClass('open').show(); + } + }); + }; + + if (settings.format === 'multitoggle') multiTg(); + else cssmenu.addClass('dropdown'); + }*/ + + if (settings.format === 'select') + { + cssmenu.append('