diff options
73 files changed, 3451 insertions, 312 deletions
diff --git a/config.toml b/config.toml index d53a229..57152a0 100644 --- a/config.toml +++ b/config.toml @@ -1,10 +1,11 @@ baseURL = "http://www.andreasbaumann.cc/" languageCode = "en-us" title = "Andreas Baumann's Personal Home Page" +paginate = "10" # Number of posts per page theme = "new_theme" disableRss = true -enableRobotsTXT = true -SectionPagesMenu = "main" +disqusShortname = "" # Enable comments by entering your Disqus shortname +googleAnalytics = "" # Enable Google Analytics by entering your tracking id [Params] author = "Andreas Baumann" @@ -14,70 +15,89 @@ SectionPagesMenu = "main" location = "Zurich" copyright_years = "2009 - 2019" opengraph = true + authorbox = false # Show "Read more" button in list if true + twitter_cards = false strus_url = "http://eeepc.home:8080/strus/query/wwwandreasbaumanncc" + pager = true + post_meta = ["date", "categories"] # Order of post meta information + mathjax = false + customCSS = [ "css/localstyle.css" ] + # customJS = [ "/js/jquery.js" ] # doesn't work, added directly to baseof.html +[Params.logo] + subtitle = "Personal Home Page" # Logo subtitle + [Params.widgets] search = true recent_articles = true categories = true tags = true + recent_num = 5 # Set the number of articles in the "Recent articles" widget + tags_counter = false # Enable counter for each tag in "Tags" widget (disabled by default) + +[Params.sidebar] + home = "right" # Configure layout for home page + list = "right" # Configure layout for list pages + single = "right" # Configure layout for single pages + # Enable widgets in given order + widgets = ["dataprotection", "elasticlunr_search", "recent", "categories"] [taxonomies] -category = "categories" + category = "categories" [[menu.main]] - name = "Home" - weight = 30 - identifier = "home" - url = "/" + name = "Home" + weight = 30 + identifier = "home" + url = "/" [[menu.main]] - name = "Software" - weight = 40 - identifier = "software" - url = "/software" + name = "Software" + weight = 40 + identifier = "software" + url = "/software" [[menu.main]] - name = "Toolbox" - weight = 50 - identifier = "toolbox" - url = "/toolbox" + name = "Toolbox" + weight = 50 + identifier = "toolbox" + url = "/toolbox" [[menu.main]] - name = "Git" - weight = 60 - identifier = "git" - url = "/git" + name = "Git" + weight = 60 + identifier = "git" + url = "/git" [[menu.main]] - name = "Slides" - weight = 70 - identifier = "slide" - url = "/slide" + name = "Slides" + weight = 70 + identifier = "slide" + url = "/slide" [[menu.main]] - name = "Blog" - weight = 80 - identifier = "blog" - url = "/blog" + name = "Blog" + weight = 80 + identifier = "blog" + url = "/blog" [[menu.main]] - name = "Search" - weight = 90 - identifier = "search" - url = "/search" + name = "Search" + weight = 90 + identifier = "search" + url = "/search" [[menu.main]] - name = "Contact" - weight = 100 - identifier = "contact" - url = "/contact" + name = "Contact" + weight = 100 + identifier = "contact" + url = "/contact" [outputs] - home = [ "HTML", "JSON"] - page = [ "HTML"] + home = [ "HTML", "JSON"] + page = [ "HTML"] [sitemap] - changefreq = "monthly" - filename = "sitemap.xml" - priority = 0.5 + changefreq = "monthly" + filename = "sitemap.xml" + priority = 0.5 diff --git a/themes/new_theme/CHANGES b/themes/new_theme/CHANGES new file mode 100644 index 0000000..3af49a0 --- /dev/null +++ b/themes/new_theme/CHANGES @@ -0,0 +1,12 @@ +Changes made to https://github.com/Vimux/Mainroad.git + +- added slide theme for presentations +- added an Elasticlunr search widget +- added a data protection and privacy widget +- added data protection, location and author to partial footer.html +- layout for JSON (for search posts.json) +- list.html has a ranklist partial include (for the embedded search + result) +- list.html: only display list in blog contents, not on toolbox or + software section + diff --git a/themes/new_theme/assets/css/style.css b/themes/new_theme/assets/css/style.css new file mode 100644 index 0000000..545df0d --- /dev/null +++ b/themes/new_theme/assets/css/style.css @@ -0,0 +1,1306 @@ +{{- $highlightColor := .Site.Params.highlightColor | default "#e22d30" -}} + +*, +*::before, +*::after { + box-sizing: border-box; +} + +article, +aside, +dialog, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section { + display: block; +} + +:focus::-webkit-input-placeholder { + color: transparent; +} + +:focus::-moz-placeholder { + color: transparent; +} + +:focus:-moz-placeholder { + color: transparent; +} + +:focus:-ms-input-placeholder { + color: transparent; +} + +/* Structure */ +html { + font-size: 100%; + -ms-text-size-adjust: none; + -webkit-text-size-adjust: none; +} + +body { + margin: 0; + font-family: "Open Sans", Helvetica, Arial, sans-serif; + font-size: 14px; + font-size: .875rem; + line-height: 1.6; + word-wrap: break-word; + background: #f7f7f7; + -webkit-font-smoothing: antialiased; +} + +.container { + position: relative; + width: 100%; + max-width: 1080px; + margin: 0 auto; +} + +.container--outer { + margin: 25px auto; + box-shadow: 0 0 10px rgba(50, 50, 50, .17); +} + +.wrapper { + padding: 25px; + background: #fff; +} + +.flex { + display: -webkit-flex; + display: flex; +} + +.primary { + -webkit-flex: 1 0 65.83%; + flex: 1 0 65.83%; + -webkit-order: 1; + order: 1; + min-width: 0; +} + +.sidebar { + -webkit-flex: 1 0 31.66%; + flex: 1 0 31.66%; + -webkit-order: 2; + order: 2; + min-width: 0; + margin: 0 0 0 2.5%; +} + +.sidebar--left { + -webkit-order: 0; + order: 0; + margin: 0 2.5% 0 0; +} + +.clearfix { + display: block; +} + +.clearfix::after { + display: block; + height: 0; + padding: 0; + margin: 0; + clear: both; + line-height: 0; + visibility: hidden; + content: ""; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +/* Button */ +.btn { + padding: 5px 10px; + font-weight: 700; + color: #fff; + white-space: pre-line; + background: #2a2a2a; +} + +.btn:hover { + color: #fff; + background: {{ $highlightColor }}; +} + +/* Animation */ +.menu__item, +.btn { + transition: background-color .25s ease-out; +} + +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0 0 20px; + margin: 0 0 1.25rem; + font-weight: 700; + line-height: 1.3; + color: #000; +} + +h1 { + font-size: 32px; + font-size: 2rem; +} + +h2 { + font-size: 24px; + font-size: 1.5rem; +} + +h3 { + font-size: 20px; + font-size: 1.25rem; +} + +h4 { + font-size: 18px; + font-size: 1.125rem; +} + +h5 { + font-size: 16px; + font-size: 1rem; +} + +h6 { + font-size: 16px; + font-size: 1rem; +} + +a { + color: #000; + text-decoration: none; +} + +a:hover { + color: {{ $highlightColor }}; +} + +hr { + margin: 0 0 20px; + border: 0; + border-top: 1px solid #dadada; +} + +p { + margin: 0 0 20px; + margin: 0 0 1.25rem; +} + +b, +strong { + font: inherit; + font-weight: 700; +} + +i, +em { + font: inherit; + font-style: italic; +} + +ol, +ul { + padding: 0; + margin: 0; +} + +small { + font-size: 12px; + font-size: .75rem; +} + +mark { + background-color: #fd5; +} + +figure { + margin: 0 0 20px; + margin: 0 0 1.25rem; +} + +figcaption { + margin-top: 4px; + margin-top: .25rem; + color: #666; +} + +figcaption h4 { + margin: 0; + color: inherit; +} + +pre, +code, +kbd, +samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: inherit; +} + +pre, +code { + background-color: #f5f5f5; + border: 1px solid #ebebeb; +} + +code { + padding: 0 5px; + color: #c33; +} + +pre { + display: block; + padding: 0; + padding: 1.25rem; + margin-bottom: 20px; + margin-bottom: 1.25rem; + overflow: auto; + color: #000; +} + +pre code { + padding: 0; + color: inherit; + white-space: inherit; + background: inherit; + border: 0; +} + +kbd { + padding: 2px 3px; + color: #fff; + background-color: #2a2a2a; +} + +blockquote { + display: block; + padding: 5px 0 5px 15px; + margin: 0 0 20px; + margin: 0 0 1.25rem; + line-height: 1.6; + border-left: 5px solid {{ $highlightColor }}; +} + +blockquote p:last-child { + margin: 0; +} + +blockquote footer { + text-align: right; +} + +sup, +sub { + font-size: 10px; + font-size: .625rem; + font-style: normal; +} + +sup { + vertical-align: super; +} + +sub { + vertical-align: sub; +} + +abbr[title] { + text-decoration: none; + cursor: help; + border-bottom: 1px dotted #000; +} + +q { + font-style: italic; +} + +address { + margin-bottom: 20px; + margin-bottom: 1.25rem; + font-family: "Consolas", Courier New, Courier, monospace; + line-height: 1.5; +} + +dl { + margin: 0 0 10px 20px; +} + +dt, +dd { + display: list-item; +} + +dt { + font-weight: bold; + list-style-type: square; +} + +dd { + margin-left: 20px; + list-style-type: circle; +} + +select { + max-width: 100%; +} + +.warning { + padding: 20px 10px; + text-align: center; + border: 1px solid #ddd; +} + +.warning__icon { + margin-bottom: 20px; + fill: #ddd; +} + +/* Header */ +.header { + background: #fff; +} + +.logo { + padding: 25px; +} + +.logo__link { + display: inline-block; +} + +.logo__item { + display: inline-block; + vertical-align: middle; +} + +.logo__img { + max-height: 256px; +} + +.logo__text { + text-transform: uppercase; +} + +.logo--mixed .logo__item { + margin: .5rem auto; +} + +.logo--mixed .logo__img { + max-width: 128px; + max-height: 128px; +} + +.logo--mixed .logo__text { + padding: 0 1rem; +} + +.logo__title { + font-size: 32px; + font-size: 2rem; + font-weight: 700; + line-height: 1; + color: #000; +} + +.logo__tagline { + display: inline-block; + padding-top: 10px; + margin-top: 10px; + font-size: 14px; + font-size: .875rem; + font-weight: 700; + line-height: 1; + color: {{ $highlightColor }}; + border-top: 1px solid #ebebeb; +} + +.divider { + height: 5px; + margin: 0; + background: {{ $highlightColor }}; + border: 0; +} + +/* Main menu */ +.no-js .menu__btn { + display: none; +} + +.menu__btn { + display: block; + width: 100%; + padding: 0; + font: inherit; + color: #fff; + background: #2a2a2a; + border: 0; + outline: 0; +} + +.menu__btn-title { + position: relative; + display: block; + padding: 10px 15px; + padding: .625rem .9375rem; + font-weight: 700; + text-align: right; + text-transform: uppercase; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; +} + +:focus > .menu__btn-title { + box-shadow: inset 0 0 1px 3px {{ $highlightColor }}; +} + +button:not(:-moz-focusring):focus > .menu__btn-title { + box-shadow: none; +} + +.menu__btn:focus, +.menu__btn-title:focus { + outline: 0; +} + +.js .menu__btn--active { + color: {{ $highlightColor }}; +} + +.menu__list { + list-style: none; + background: #2a2a2a; +} + +.menu__item:hover { + background: {{ $highlightColor }}; +} + +.menu__item:first-child { + border: 0; +} + +.menu__item--active { + background: {{ $highlightColor }}; +} + +.menu__link { + display: block; + padding: 10px 15px; + padding: .625rem .9375rem; + font-weight: 700; + color: #fff; + text-transform: uppercase; +} + +.menu__link:hover { + color: #fff; +} + +.js .menu__list { + position: absolute; + z-index: 1; + width: 100%; + visibility: hidden; + -webkit-transform: scaleY(0); + transform: scaleY(0); + -webkit-transform-origin: top left; + transform-origin: top left; +} + +.js .menu__list--active { + visibility: visible; + border-top: 1px solid rgba(255, 255, 255, .1); + border-bottom: 1px solid rgba(255, 255, 255, .1); + -webkit-transform: scaleY(1); + transform: scaleY(1); +} + +.menu__list--transition { + transition: visibility .15s ease, transform .15s ease, -webkit-transform .15s ease; +} + +@media screen and (min-width: 767px) { + .menu { + border-bottom: 5px solid {{ $highlightColor }}; + } + + .menu__btn { + display: none; + } + + .menu__list, + .js .menu__list { + position: relative; + display: -webkit-flex; + display: flex; + -webkit-flex-wrap: wrap; + flex-wrap: wrap; + visibility: visible; + border: 0; + -webkit-transform: none; + transform: none; + } + + .menu__item { + border-left: 1px solid rgba(255, 255, 255, .1); + } +} + +/* Posts/Pages */ +.post__header, +.main__header { + margin-bottom: 20px; + margin-bottom: 1.25rem; +} + +.main__title { + font-size: 28px; + font-size: 1.75rem; +} + +.main__content { + margin-bottom: 20px; + margin-bottom: 1.25rem; +} + +.meta { + font-size: 13px; + font-size: .8125rem; + vertical-align: baseline; +} + +.meta, +.meta a { + color: #666; +} + +.meta a:hover { + color: {{ $highlightColor }}; +} + +.meta__item { + display: inline; + margin-left: 15px; +} + +.meta__item:first-child { + margin-left: 0; +} + +.meta__icon { + margin-right: 5px; + vertical-align: middle; + fill: #c4c4c4; +} + +.meta__text { + vertical-align: middle; +} + +.post__title { + margin: 0; +} + +.post__meta { + padding: 5px 0; + margin-top: 10px; + margin-top: .625rem; + border-top: 1px dotted #ebebeb; + border-bottom: 1px dotted #ebebeb; +} + +.post__lead { + margin-top: 4px; + margin-top: .25rem; + margin-bottom: 0; + font-size: 16px; + font-size: 1rem; + font-style: italic; +} + +.post__thumbnail { + max-width: 1030px; + margin: 0 0 20px; + margin-bottom: 0 0 1.25rem; +} + +.post__thumbnail img { + width: 100%; +} + +.content a, +.warning a, +.authorbox__description a { + font-weight: 700; + color: {{ $highlightColor }}; +} + +.content a:hover, +.warning a:hover, +.authorbox__description a:hover { + color: {{ $highlightColor }}; + text-decoration: underline; +} + +.content .alignnone { + display: block; + margin: 20px 0; + margin: 1.25rem 0; +} + +.content .aligncenter { + display: block; + margin: 20px auto; + margin: 1.25rem auto; +} + +.content .alignleft { + display: inline; + float: left; + margin: 5px 20px 20px 0; + margin: .3125rem 1.25rem 1.25rem 0; +} + +.content .alignright { + display: inline; + float: right; + margin: 5px 0 20px 20px; + margin: .3125rem 0 1.25rem 1.25rem; +} + +.content ul { + list-style: square; +} + +.content ol { + list-style: decimal; +} + +.content ul, +.content ol { + margin: 0 0 20px 40px; +} + +.content ul ul, +.content ol ol, +.content ol ul, +.content ul ol { + margin: 0 0 0 40px; +} + +.content li { + margin-bottom: 5px; +} + +.post__footer { + margin-top: 20px; + margin-top: 1.25rem; +} + +/* Post tags */ +.tags { + margin-bottom: 20px; + margin-bottom: 1.25rem; + font-size: 12px; + font-size: .75rem; + line-height: 1; + color: #fff; +} + +.tags__list { + list-style: none; +} + +.tags__item { + float: left; + margin: 0 6px 6px 0; + margin: 0 .375rem .375rem 0; + text-transform: uppercase; + background: #2a2a2a; +} + +.tags__item:hover { + background: {{ $highlightColor }}; +} + +.tags__link, +.tags__link:hover { + display: block; + padding: 10px 15px; +} + +.tags__badge { + float: left; + width: 32px; + height: 32px; + padding: 8px; + margin-right: 6px; + background: {{ $highlightColor }}; + fill: #fff; +} + +/* Table of Contents */ +.toc { + margin-bottom: 20px; + font-weight: 700; + color: #7a8288; + background: #fff; + border-color: #ebebeb; + border-style: solid; + border-top-width: 1px; + border-right-width: 1px; + border-bottom-width: 0; + border-left-width: 1px; +} + +.toc__title { + padding: 5px 10px; + color: #fff; + text-transform: uppercase; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + background: #2a2a2a; +} + +.toc__menu ul { + margin: 0; + list-style: none; +} + +.toc__menu ul ul ul a { + padding-left: 25px; +} + +.toc__menu ul ul ul ul a { + padding-left: 45px; +} + +.toc__menu ul ul ul ul ul a { + padding-left: 65px; +} + +.toc__menu ul ul ul ul ul ul a { + padding-left: 85px; +} + +.toc__menu li { + margin: 0; +} + +.toc__menu a { + display: block; + padding: 5px 10px; + color: {{ $highlightColor }}; + border-bottom: 1px solid #ebebeb; +} + +.toc__menu a:hover { + text-decoration: underline; +} + +/* Author Box */ +.authorbox { + padding: 25px 0; + margin-bottom: 25px; + line-height: 1.5; + border-top: 1px solid #ebebeb; + border-bottom: 1px solid #ebebeb; +} + +.authorbox__avatar { + float: left; + padding: 3px; + margin: 0 25px 0 0; + border: 1px solid #ebebeb; +} + +.authorbox__header { + margin-bottom: 10px; +} + +.authorbox__name { + font-size: 16px; + font-size: 1rem; + font-weight: 700; +} + +/* List content */ +.list__item { + padding-bottom: 20px; + padding-bottom: 1.25rem; + margin-bottom: 20px; + margin-bottom: 1.25rem; + border-bottom: 1px solid #ebebeb; +} + +.list__header { + margin-bottom: 10px; + margin-bottom: .625rem; +} + +.list__meta { + margin-top: 5px; +} + +.list__thumbnail { + float: left; + margin: 0 20px 0 0; +} + +.list__thumbnail img { + width: 100%; + max-width: 235px; +} + +.list__footer-readmore { + float: right; + margin-top: 10px; +} + +/* Pagination */ +.pagination { + margin-top: 20px; +} + +.pagination__item { + display: inline-block; + padding: 10px 15px; + font-weight: 700; + color: #000; + background: #f5f5f5; +} + +.pagination__item:hover, +.pagination__item--current { + color: #fff; + background: {{ $highlightColor }}; +} + +/* Pager (prev/next links) navigation */ +.pager { + -webkit-justify-content: space-between; + justify-content: space-between; + padding-top: 25px; + padding-bottom: 25px; + margin-bottom: 25px; + border-bottom: 1px solid #ebebeb; +} + +.pager__subtitle { + display: block; + margin-bottom: 5px; + font-weight: 700; + line-height: 1; + text-transform: uppercase; +} + +.pager__title { + margin-bottom: 0; + overflow: hidden; + font-size: 13px; + font-size: .8125rem; +} + +.pager__item { + -webkit-flex: 1 1 50%; + flex: 1 1 50%; + max-width: 48%; +} + +.pager__item--next { + margin-left: auto; + text-align: right; +} + +.pager__link { + display: block; +} + +/* Images / Video */ +img { + width: auto\9; /* ie8 */ + max-width: 100%; + height: auto; + vertical-align: bottom; +} + +iframe, +embed, +object, +video { + max-width: 100%; +} + +/* Table */ +table { + width: 100%; + margin-bottom: 20px; + margin-bottom: 1.25rem; + border-spacing: 0; + border-collapse: collapse; + border-top: 1px solid #ebebeb; + border-left: 1px solid #ebebeb; +} + +td, +th { + padding: 5px 10px; + border-right: 1px solid #ebebeb; + border-bottom: 1px solid #ebebeb; +} + +th { + font-weight: 700; +} + +/* Forms */ +input { + padding: 5px; + font-size: 12px; + vertical-align: middle; + background: #f5f5f5; + border: 1px solid #ebebeb; + transition: all .25s ease-in-out; +} + +input[type=text], +input[type=email], +input[type=tel], +input[type=url] { + width: 60%; +} + +input[type=text]:hover, +input[type=email]:hover, +input[type=tel]:hover, +input[type=url]:hover, +textarea:hover { + border: 1px solid #aaa; +} + +input[type=submit], +input[type=reset] { + display: inline-block; + min-width: 150px; + padding: 10px 15px; + font-weight: 700; + color: #fff; + text-transform: uppercase; + cursor: pointer; + background: #2a2a2a; + border: 0; + transition: all .1s linear; + -webkit-appearance: none; +} + +input[type=submit]:hover, +input[type=reset]:hover { + background: {{ $highlightColor }}; +} + +textarea { + width: 96%; + padding: 5px; + overflow: auto; + line-height: 1.5; + resize: vertical; + background: #f5f5f5; + border: 1px solid rgba(0, 0, 0, .1); +} + +/* Widgets */ +.widget { + margin-bottom: 25px; + overflow: hidden; +} + +.widget:last-child { + margin-bottom: 0; +} + +.widget__title { + position: relative; + padding-bottom: 5px; + font-size: 16px; + font-size: 1rem; + text-transform: uppercase; + border-bottom: 3px solid {{ $highlightColor }}; +} + +.widget__item { + display: block; + padding: 5px 0; + border-bottom: 1px dotted #ebebeb; +} + +.widget__item:first-child { + padding-top: 0; +} + +/* Search widget */ +.widget-search__form { + display: block; + padding: 5%; + margin: 0 auto; + background: #f5f5f5; +} + +.widget-search__form .widget-search__submit { + display: none; +} + +.widget-search__field { + position: relative; + display: block; + width: 90%; + padding: 8px; + margin: 0 auto; + font-size: 11px; + cursor: pointer; + background: #fff; + border: 1px solid #ebebeb; + border-radius: 0; + outline-offset: -2px; + transition: none; + -webkit-appearance: none; +} + +.widget-search__field:active, +.widget-search__field:focus { + cursor: text; +} + +/* Social widget */ +.widget-social__item { + padding: 0; + border: 0; +} + +.widget-social__link { + display: block; + margin: 0 0 8px; + white-space: normal; +} + +.widget-social__link-icon { + margin: 0 5px 0 0; + vertical-align: middle; + fill: #fff; +} + +/* Tags Widget */ +.widget-taglist__link { + display: inline-block; + margin: 0 4px 8px 0; + font-size: 12px; + text-transform: uppercase; +} + +/* Languages Widget */ +.widget-languages__link { + display: block; +} + +.widget-languages__link:hover .widget-languages__link-btn { + color: #fff; + background: {{ $highlightColor }}; +} + +.widget-languages__link-btn { + display: inline-block; +} + +/* Footer */ +.footer { + padding: 10px 25px; + font-size: 12px; + font-size: .75rem; + color: #999; + background: #2a2a2a; + border-top: 3px solid #999; +} + +.footer__container { + -webkit-flex-flow: row wrap; + flex-flow: row wrap; + -webkit-justify-content: space-between; + justify-content: space-between; +} + +.footer__links { + -webkit-order: 1; + order: 1; +} + +.footer a { + color: #fff; +} + +.footer a:hover { + text-decoration: underline; +} + +/* Media Queries */ +@media screen and (max-width: 1475px) { + .container--outer { + width: 95%; + } +} + +@media screen and (max-width: 900px) { + .container--outer { + width: 100%; + margin: 0 auto; + } + + .wrapper, + .logo { + padding: 20px; + } + + .widget { + margin-bottom: 20px; + } + + .footer__container { + display: block; + } + + .footer__links { + padding-bottom: 8px; + padding-bottom: 0.5rem; + text-align: center; + } + + .footer__copyright { + text-align: center; + } +} + +@media screen and (max-width: 767px) { + .wrapper { + display: block; + } + + .sidebar { + float: none; + width: 100%; + margin: 0; + } + + .logo { + text-align: center; + } + + .logo__link { + margin: 0 auto; + } + + .logo__title { + font-size: 24px; + font-size: 1.5rem; + } + + .sidebar { + margin-top: 20px; + } +} + +@media screen and (max-width: 620px) { + input[type=text], + input[type=email], + input[type=tel], + input[type=url] { + width: 88%; + } + + .meta__item { + display: block; + margin-left: 0; + } + + .authorbox { + text-align: center; + } + + .authorbox__avatar { + display: inline-block; + float: none; + margin: 0 0 20px; + } + + .pager { + display: block; + } + + .pager__item { + min-width: 100%; + text-align: center; + } + + .pager__item--prev { + padding-bottom: 25px; + } + + .content ul, + .content ol { + margin: 0 0 20px 20px; + } + + .content ul ul, + .content ol ol, + .content ol ul, + .content ul ol { + margin: 0 0 0 20px; + } + + .list__thumbnail { + max-width: 80px; + } + + .list__title { + font-size: 16px; + font-size: 1rem; + } + + .list__lead { + font-size: 14px; + font-size: .875rem; + } + + .list__meta { + display: block; + font-size: 11px; + font-size: .6875rem; + } +} diff --git a/themes/new_theme/i18n/bg.yaml b/themes/new_theme/i18n/bg.yaml new file mode 100644 index 0000000..ab99714 --- /dev/null +++ b/themes/new_theme/i18n/bg.yaml @@ -0,0 +1,94 @@ +# General +- id: read_more + translation: "Чети нататък…" + +- id: menu_label + translation: "Меню" + +- id: sidemenu_title + translation: "Меню" + +# Post meta +- id: meta_lastmod + translation: "Последна промяна" + +- id: meta_translations + translation: "Преводи" + +# Table of Contents +- id: toc_title + translation: "Съдържание" + +# Post nav +- id: post_nav_prev + translation: "Предишна" + +- id: post_nav_next + translation: "Следваща" + +# Authorbox +- id: authorbox_name + translation: "За {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "ПРЕДУПРЕЖДЕНИЕ" + +- id: sidebar_recommendation + translation: "Моля, активирай поне един блок в страничния панел." + +# Search widget +- id: search_placeholder + translation: "ТЪРСЕНЕ..." + +# Languages widget +- id: languages_title + translation: "Езици" + +# Categories widget +- id: categories_title + translation: "Категории" + +# Recent Posts widget +- id: recent_title + translation: "Последни писания" + +# Social widget +- id: social_title + translation: "Социални" + +# Tags List widget +- id: tags_title + translation: "Тагове" + +# Footer +- id: footer_credits + translation: + "Генерирано с <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> и тема \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Страницата не е намерена" + +- id: 404_text + translation: + "Страницата, която търсите, изглежда е била преместена, изтрита, или не съществува. Моля, използвайте полето за \ + търсене или отидете на" + +- id: 404_linktext + translation: "главна страница" + +# No posts empty state +- id: noposts_warning_title + translation: "Все още нямаш никакви писания!" + +- id: noposts_warning_description + translation: + "След като запишеш нещо в коя да е поддиректория (секция) на директория <b>content</b>, то ще се появи тук. По \ + подразбиране само една секция (с най-многото писания) ще се показва на главната страница." + +- id: noposts_warning_tip + translation: + "<b>Tip:</b> Можеш да покажеш колкото искаш на брой секции, като ги укажеш в конфигурационния параметър \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/cs.yaml b/themes/new_theme/i18n/cs.yaml new file mode 100644 index 0000000..a209199 --- /dev/null +++ b/themes/new_theme/i18n/cs.yaml @@ -0,0 +1,94 @@ +# General +- id: read_more + translation: "Číst více…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Naposledy upraveno" + +- id: meta_translations + translation: "Překlady" + +# Table of Contents +- id: toc_title + translation: "Obsah stránky" + +# Post nav +- id: post_nav_prev + translation: "Předchozí" + +- id: post_nav_next + translation: "Následující" + +# Authorbox +- id: authorbox_name + translation: "O {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "POZOR" + +- id: sidebar_recommendation + translation: "Prosím aktivujte aspoň jeden widget postranní lišty." + +# Search widget +- id: search_placeholder + translation: "Hledat..." + +# Languages widget +- id: languages_title + translation: "Jazyky" + +# Categories widget +- id: categories_title + translation: "Kategorie" + +# Recent Posts widget +- id: recent_title + translation: "Poslední příspěvky" + +# Social widget +- id: social_title + translation: "Sociální sítě" + +# Tags List widget +- id: tags_title + translation: "Štítky" + +# Footer +- id: footer_credits + translation: + "Vytvořeno pomocí <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> a tématu \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Stránka nebyla nalezena" + +- id: 404_text + translation: + "Požadovaná stránka neexistuje, nebo byla přesunuta či smazána. Využijte, prosím, vyhledávání, nebo pokračujte na" + +- id: 404_linktext + translation: "hlavní stránka" + +# No posts empty state +- id: noposts_warning_title + translation: "Zatím nemáte žádné příspěvky!" + +- id: noposts_warning_description + translation: + "Jakmile vytvoříte příspěvek v libovolném podadresáři (sekci) adresáře <b>content</b>, objeví se zde. Ve výchozím \ + nastavení je na hlavní stránce zobrazena pouze jedna sekce (s největším množstvím příspěvků)." + +- id: noposts_warning_tip + translation: + "<b>Tip:</b> Pomocí parametru \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + můžete zobrazit libovolný počet sekcí." diff --git a/themes/new_theme/i18n/de.yaml b/themes/new_theme/i18n/de.yaml new file mode 100644 index 0000000..308d3a0 --- /dev/null +++ b/themes/new_theme/i18n/de.yaml @@ -0,0 +1,94 @@ +# General +- id: read_more + translation: "Weiterlesen…" + +- id: menu_label + translation: "Menü" + +- id: sidemenu_title + translation: "Menü" + +# Post meta +- id: meta_lastmod + translation: "Zuletzt geändert" + +- id: meta_translations + translation: "Übersetzungen" + +# Table of Contents +- id: toc_title + translation: "Inhaltsverzeichnis" + +# Post nav +- id: post_nav_prev + translation: "Zurück" + +- id: post_nav_next + translation: "Weiter" + +# Authorbox +- id: authorbox_name + translation: "Über {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "WARNUNG" + +- id: sidebar_recommendation + translation: "Bitte aktivieren sie mindestens ein Widget." + +# Search widget +- id: search_placeholder + translation: "Suche..." + +# Languages widget +- id: languages_title + translation: "Sprachen" + +# Categories widget +- id: categories_title + translation: "Kategorien" + +# Recent Posts widget +- id: recent_title + translation: "Letzte Beiträge" + +# Social widget +- id: social_title + translation: "Soziale Netzwerke" + +# Tags List widget +- id: tags_title + translation: "Tags" + +# Footer +- id: footer_credits + translation: + "Erstellt mit <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> und \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a> Theme." + +# 404 +- id: 404_title + translation: "404. Seite nicht gefunden" + +- id: 404_text + translation: + "Die gesuchte Seite existiert nicht, wurde verschoben oder gelöscht. Bitte nutzen Sie die Suche oder gehen Sie zur" + +- id: 404_linktext + translation: "Startseite" + +# No posts empty state +- id: noposts_warning_title + translation: "Es gibt noch keine Posts!" + +- id: noposts_warning_description + translation: + "Hier erscheinen Posts, die in einem Unterordner des <b>content/</b> Ordners abgelegt werden (z.B. in \ + <b>content/post</b>). Standardmäßig werden nur Posts der Gruppe mit den meisten Einträgen angezeigt." + +- id: noposts_warning_tip + translation: + "<b>Tipp:</b> Mit dem \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + Parameter lassen sich beliebig viele weitere Gruppen konfigurieren." diff --git a/themes/new_theme/i18n/en.yaml b/themes/new_theme/i18n/en.yaml new file mode 100644 index 0000000..3084c7b --- /dev/null +++ b/themes/new_theme/i18n/en.yaml @@ -0,0 +1,94 @@ +# General +- id: read_more + translation: "Read more…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Last Modified" + +- id: meta_translations + translation: "Translations" + +# Table of Contents +- id: toc_title + translation: "Page content" + +# Post nav +- id: post_nav_prev + translation: "Previous" + +- id: post_nav_next + translation: "Next" + +# Authorbox +- id: authorbox_name + translation: "About {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "WARNING" + +- id: sidebar_recommendation + translation: "Please activate at least one sidebar widget." + +# Search widget +- id: search_placeholder + translation: "SEARCH..." + +# Languages widget +- id: languages_title + translation: "Languages" + +# Categories widget +- id: categories_title + translation: "Categories" + +# Recent Posts widget +- id: recent_title + translation: "Recent Posts" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Tags" + +# Footer +- id: footer_credits + translation: + "Generated with <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> and \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a> theme." + +# 404 +- id: 404_title + translation: "404. Page not found" + +- id: 404_text + translation: + "The page you were looking for appears to have been moved, deleted or does not exist. Please, use search or go to" + +- id: 404_linktext + translation: "main page" + +# No posts empty state +- id: noposts_warning_title + translation: "You don't have any posts yet!" + +- id: noposts_warning_description + translation: + "Once you post something in any folder (section) under the <b>content</b> directory, it will appear here. Only one \ + section (with the most posts) will be displayed on the main page by default." + +- id: noposts_warning_tip + translation: + "<b>Tip:</b> You can show as many sections as you like with \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + config parameter." diff --git a/themes/new_theme/i18n/es.yaml b/themes/new_theme/i18n/es.yaml new file mode 100644 index 0000000..47904d7 --- /dev/null +++ b/themes/new_theme/i18n/es.yaml @@ -0,0 +1,92 @@ +# General +- id: read_more + translation: "Leer más" + +- id: menu_label + translation: "Menú" + +- id: sidemenu_title + translation: "Menú" + +# Post meta +- id: meta_lastmod + translation: "Última modificación" + +- id: meta_translations + translation: "Traducciones" + +# Table of Contents +- id: toc_title + translation: "Índice" + +# Post nav +- id: post_nav_prev + translation: "Anterior" + +- id: post_nav_next + translation: "Siguiente" + +# Authorbox +- id: authorbox_name + translation: "Sobre el autor {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "Atención" + +- id: sidebar_recommendation + translation: "Activa al menos un widget en la barra lateral." + +# Search widget +- id: search_placeholder + translation: "Buscar..." + +# Languages widget +- id: languages_title + translation: "Idiomas" + +# Categories widget +- id: categories_title + translation: "Categorías" + +# Recent Posts widget +- id: recent_title + translation: "Más Recientes" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Etiquetas" + +# Footer +- id: footer_credits + translation: + "Generado con <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> y \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Página no encontrada" + +- id: 404_text + translation: "La página que estás buscando no aparece, no existe o se ha movido a otro lugar." + +- id: 404_linktext + translation: "Página principal" + +# No posts empty state +- id: noposts_warning_title + translation: "¡Todavía no hay publicaciones!" + +- id: noposts_warning_description + translation: + "Una vez que publiques algo en cualquier carpeta (sección) dentro del directorio <b>content</b>, se verá aquí. \ + Sólo una sección (la que tenga más publicaciones) se mostrará por defecto en la página principal." + +- id: noposts_warning_tip + translation: + "<b>Aviso:</b> Puedes mostrar tantas secciones como gustes con el parámetro de configuración \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/fr.yaml b/themes/new_theme/i18n/fr.yaml new file mode 100644 index 0000000..8267d9c --- /dev/null +++ b/themes/new_theme/i18n/fr.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "Lire la suite…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Dernière modification" + +- id: meta_translations + translation: "Traductions" + +# Table of Contents +- id: toc_title + translation: "Sommaire" + +# Post nav +- id: post_nav_prev + translation: "Précédent" + +- id: post_nav_next + translation: "Suivant" + +# Authorbox +- id: authorbox_name + translation: "À propos {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "Attention" + +- id: sidebar_recommendation + translation: "Activez au moins un widget pour la barre latérale." + +# Search widget +- id: search_placeholder + translation: "Rechercher..." + +# Languages widget +- id: languages_title + translation: "Langues" + +# Categories widget +- id: categories_title + translation: "Catégories" + +# Recent Posts widget +- id: recent_title + translation: "Articles récents" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Mots-clefs" + +# Footer +- id: footer_credits + translation: + "Produit par <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> et le thème \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Page introuvable." + +- id: 404_text + translation: "La page que vous recherchez a apparemment été supprimée, déplacée, ou n'existe pas." + +- id: 404_linktext + translation: "Accueil" + +# No posts empty state +- id: noposts_warning_title + translation: "Vous n'avez pas encore de posts!" + +- id: noposts_warning_description + translation: + "Une fois que vous avez publié quelque chose dans n'importe quel sous-dossier (section) du dossier <b>content</b>, \ + ça apparaîtra ici. par défaut, une seule section (Celle avec le plus de posts) sera affichée sur la page \ + principale." + +- id: noposts_warning_tip + translation: + "<b>Astuce:</b> Vous pouvez afficher autant de sections que vous voulez avec le paramètre de configuration \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/hu.yaml b/themes/new_theme/i18n/hu.yaml new file mode 100644 index 0000000..5a54496 --- /dev/null +++ b/themes/new_theme/i18n/hu.yaml @@ -0,0 +1,95 @@ +# General +- id: read_more + translation: "Tovább olvas…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Utoljára módosítva" + +- id: meta_translations + translation: "Fordítások" + +# Table of Contents +- id: toc_title + translation: "Az oldal tartalma" + +# Post nav +- id: post_nav_prev + translation: "Előző" + +- id: post_nav_next + translation: "Következő" + +# Authorbox +- id: authorbox_name + translation: "A {{ .Count }} -ról" + +# Sidebar +- id: sidebar_warning + translation: "FIGYELMEZTETÉS" + +- id: sidebar_recommendation + translation: "Kérjük, aktiváljon legalább egy oldalsáv-modult." + +# Search widget +- id: search_placeholder + translation: "KERES..." + +# Languages widget +- id: languages_title + translation: "Nyelvek" + +# Categories widget +- id: categories_title + translation: "Kategóriák" + +# Recent Posts widget +- id: recent_title + translation: "Legutóbbi bejegyzések" + +# Social widget +- id: social_title + translation: "Közösség" + +# Tags List widget +- id: tags_title + translation: "Cimkék" + +# Footer +- id: footer_credits + translation: + "Létrehozva <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> és \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a> témával." + +# 404 +- id: 404_title + translation: "404. Az oldal nem található" + +- id: 404_text + translation: + "Úgy tűnik, hogy a kívánt oldalt áthelyezték, törölték vagy nem létezik. Kérjük, használja a keresést, vagy lépjen \ + ide" + +- id: 404_linktext + translation: "főoldal" + +# No posts empty state +- id: noposts_warning_title + translation: "Még nincs bejegyzésed!" + +- id: noposts_warning_description + translation: + "Ha valamit a <b>content</b> könyvtár alatti mappába (szakaszba) közzéteszel, az itt jelenik meg. Csak egy szakasz \ + (a legtöbb hozzászólással) jelenik meg a főoldalon alapértelmezés szerint." + +- id: noposts_warning_tip + translation: + "<b>Tipp:</b> Megjeleníthet annyi szakaszt, amennyit csak akar a \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + konfigurációs paraméterrel." diff --git a/themes/new_theme/i18n/it.yaml b/themes/new_theme/i18n/it.yaml new file mode 100644 index 0000000..583a71c --- /dev/null +++ b/themes/new_theme/i18n/it.yaml @@ -0,0 +1,94 @@ +# General +- id: read_more + translation: "Continua a leggere…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Ultima modifica" + +- id: meta_translations + translation: "Traduzioni" + +# Table of Contents +- id: toc_title + translation: "Indice" + +# Post nav +- id: post_nav_prev + translation: "Precedente" + +- id: post_nav_next + translation: "Prossimo" + +# Authorbox +- id: authorbox_name + translation: "Riguardo {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "ATTENZIONE" + +- id: sidebar_recommendation + translation: "Si prega di attivare almeno un widget della barra laterale." + +# Search widget +- id: search_placeholder + translation: "CERCA..." + +# Languages widget +- id: languages_title + translation: "Lingue" + +# Categories widget +- id: categories_title + translation: "Categorie" + +# Recent Posts widget +- id: recent_title + translation: "Post recenti" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Tag" + +# Footer +- id: footer_credits + translation: + "Generato con <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> e il tema \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Pagina non trovata" + +- id: 404_text + translation: + "La pagina che stai cercando sembra essere stata spostata, rimossa o non esiste. Si prega di usare la ricerca o \ + andare alla" + +- id: 404_linktext + translation: "pagina principale" + +# No posts empty state +- id: noposts_warning_title + translation: "Non hai ancora nessun post!" + +- id: noposts_warning_description + translation: + "Una volta pubblicato qualcosa in una qualsiasi cartella (sezione) dentro la directory <b>content</b>, apparirà \ + qui. Solo una sezione (quella con più post) verrà mostrata in modo predefinito nella pagina principale." + +- id: noposts_warning_tip + translation: + "<b>Suggerimento:</b> Puoi mostrare quante sezioni vuoi con il parametro \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/ja.yaml b/themes/new_theme/i18n/ja.yaml new file mode 100644 index 0000000..67cdffe --- /dev/null +++ b/themes/new_theme/i18n/ja.yaml @@ -0,0 +1,95 @@ +# General +- id: read_more + translation: "続きを読む…" + +- id: menu_label + translation: "メニュー" + +- id: sidemenu_title + translation: "メニュー" + +# Post meta +- id: meta_lastmod + translation: "最終更新" + +- id: meta_translations + translation: "翻訳" + +# Table of Contents +- id: toc_title + translation: "目次" + +# Post nav +- id: post_nav_prev + translation: "前の投稿" + +- id: post_nav_next + translation: "次の投稿" + +# Authorbox +- id: authorbox_name + translation: "{{ .Count }}について" + +# Sidebar +- id: sidebar_warning + translation: "警告" + +- id: sidebar_recommendation + translation: "1つ以上のサイドバーウィジェットを有効にしてください。" + +# Search widget +- id: search_placeholder + translation: "検索..." + +# Languages widget +- id: languages_title + translation: "言語" + +# Categories widget +- id: categories_title + translation: "カテゴリー" + +# Recent Posts widget +- id: recent_title + translation: "最近の投稿" + +# Social widget +- id: social_title + translation: "ソーシャル" + +# Tags List widget +- id: tags_title + translation: "タグ" + +# Footer +- id: footer_credits + translation: + "このサイトは <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> と \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a> \ + テーマで生成されています。" + +# 404 +- id: 404_title + translation: "404. ページが見つかりません" + +- id: 404_text + translation: + "お探しのページは移動されたか削除された、もしくは存在しないようです。検索するか、こちらのページに移動してください: " + +- id: 404_linktext + translation: "メインページ" + +# No posts empty state +- id: noposts_warning_title + translation: "まだ何も投稿していません!" + +- id: noposts_warning_description + translation: + "<b>content</b> 以下のどこかのディレクトリに投稿を追加するとここに表示されます。デフォルトでは(最も投稿の多い)1つのセクション \ + だけがメインページに表示されます。" + +- id: noposts_warning_tip + translation: + "<b>ヒント:</b> 設定のパラメーター \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + を使って好きな数だけセクションを表示させることもできます。" diff --git a/themes/new_theme/i18n/nl.yaml b/themes/new_theme/i18n/nl.yaml new file mode 100644 index 0000000..6ddfcf1 --- /dev/null +++ b/themes/new_theme/i18n/nl.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "Meer lezen…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Laatst gewijzigd" + +- id: meta_translations + translation: "Vertalingen" + +# Table of Contents +- id: toc_title + translation: "Inhoud" + +# Post nav +- id: post_nav_prev + translation: "Vorige" + +- id: post_nav_next + translation: "Volgende" + +# Authorbox +- id: authorbox_name + translation: "Over {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "WAARSCHUWING" + +- id: sidebar_recommendation + translation: "Activeer minstens één sidebar widget." + +# Search widget +- id: search_placeholder + translation: "ZOEKEN..." + +# Languages widget +- id: languages_title + translation: "Talen" + +# Categories widget +- id: categories_title + translation: "Categorieën" + +# Recent Posts widget +- id: recent_title + translation: "Recente posts" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Tags" + +# Footer +- id: footer_credits + translation: + "Gegenereerd met <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> en het \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a> theme." + +# 404 +- id: 404_title + translation: "404. Pagina niet gevonden" + +- id: 404_text + translation: "De pagina is mogelijk verplaatst, verwijderd of bestaat niet. Gebruik de zoekfunctie of \"ga naar\"" + +- id: 404_linktext + translation: "hoofdpagina" + +# No posts empty state +- id: noposts_warning_title + translation: "Er zijn nog geen posts!" + +- id: noposts_warning_description + translation: + "Zodra je iets post in welke map (sectie) dan ook onder de <b>content</b> directory, zal het hier verschijnen. \ + Slechts één sectie (met de meeste posts) zal standaard getoond worden op de hoofdpagina." + +- id: noposts_warning_tip + translation: + "<b>Tip:</b> Je kunt zoveel secties laten zien als je wilt met de \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + config parameter." diff --git a/themes/new_theme/i18n/pt-br.yaml b/themes/new_theme/i18n/pt-br.yaml new file mode 100644 index 0000000..625865b --- /dev/null +++ b/themes/new_theme/i18n/pt-br.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "Leia mais…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Última modificação" + +- id: meta_translations + translation: "Traduções" + +# Table of Contents +- id: toc_title + translation: "Conteúdo da página" + +# Post nav +- id: post_nav_prev + translation: "Anterior" + +- id: post_nav_next + translation: "Próximo" + +# Authorbox +- id: authorbox_name + translation: "Sobre {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "ATENÇÃO" + +- id: sidebar_recommendation + translation: "Ative pelo menos um widget da barra lateral." + +# Search widget +- id: search_placeholder + translation: "BUSCAR..." + +# Languages widget +- id: languages_title + translation: "Línguas" + +# Categories widget +- id: categories_title + translation: "Categorias" + +# Recent Posts widget +- id: recent_title + translation: "Postagens recentes" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Tags" + +# Footer +- id: footer_credits + translation: + "Gerado com <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> com o tema \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Página não encontrada" + +- id: 404_text + translation: + "A página que você estava procurando parece ter sido excluída ou não existe. Por favor, use a pesquisa ou vá para" + +- id: 404_linktext + translation: "página principal" + +# No posts empty state +- id: noposts_warning_title + translation: "Você ainda não tem nenhuma postagem!" + +- id: noposts_warning_description + translation: + "Quando você criar uma postagem em qualquer pasta (seção) dentro do diretório <b>content</b>, ele vai aparecer aqui. \ + Apenas uma seção (a que conter mais postagens) será exibida na página principal por padrão." + +- id: noposts_warning_tip + translation: + "<b>Dica:</b> Você pode mostrar quantas seções você quiser com o parâmetro de configuração \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/pt.yaml b/themes/new_theme/i18n/pt.yaml new file mode 100644 index 0000000..625865b --- /dev/null +++ b/themes/new_theme/i18n/pt.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "Leia mais…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Última modificação" + +- id: meta_translations + translation: "Traduções" + +# Table of Contents +- id: toc_title + translation: "Conteúdo da página" + +# Post nav +- id: post_nav_prev + translation: "Anterior" + +- id: post_nav_next + translation: "Próximo" + +# Authorbox +- id: authorbox_name + translation: "Sobre {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "ATENÇÃO" + +- id: sidebar_recommendation + translation: "Ative pelo menos um widget da barra lateral." + +# Search widget +- id: search_placeholder + translation: "BUSCAR..." + +# Languages widget +- id: languages_title + translation: "Línguas" + +# Categories widget +- id: categories_title + translation: "Categorias" + +# Recent Posts widget +- id: recent_title + translation: "Postagens recentes" + +# Social widget +- id: social_title + translation: "Social" + +# Tags List widget +- id: tags_title + translation: "Tags" + +# Footer +- id: footer_credits + translation: + "Gerado com <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> com o tema \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Página não encontrada" + +- id: 404_text + translation: + "A página que você estava procurando parece ter sido excluída ou não existe. Por favor, use a pesquisa ou vá para" + +- id: 404_linktext + translation: "página principal" + +# No posts empty state +- id: noposts_warning_title + translation: "Você ainda não tem nenhuma postagem!" + +- id: noposts_warning_description + translation: + "Quando você criar uma postagem em qualquer pasta (seção) dentro do diretório <b>content</b>, ele vai aparecer aqui. \ + Apenas uma seção (a que conter mais postagens) será exibida na página principal por padrão." + +- id: noposts_warning_tip + translation: + "<b>Dica:</b> Você pode mostrar quantas seções você quiser com o parâmetro de configuração \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/ru.yaml b/themes/new_theme/i18n/ru.yaml new file mode 100644 index 0000000..917780e --- /dev/null +++ b/themes/new_theme/i18n/ru.yaml @@ -0,0 +1,95 @@ +# General +- id: read_more + translation: "Читать далее…" + +- id: menu_label + translation: "Меню" + +- id: sidemenu_title + translation: "Меню" + +# Post meta +- id: meta_lastmod + translation: "Последнее изменение" + +- id: meta_translations + translation: "Переводы" + +# Table of Contents +- id: toc_title + translation: "Содержимое страницы" + +# Post nav +- id: post_nav_prev + translation: "Назад" + +- id: post_nav_next + translation: "Вперед" + +# Authorbox +- id: authorbox_name + translation: "Об авторе {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "ВНИМАНИЕ" + +- id: sidebar_recommendation + translation: "Пожалуйста, активируйте как минимум один виджет боковой панели." + +# Search widget +- id: search_placeholder + translation: "ПОИСК..." + +# Languages widget +- id: languages_title + translation: "Языки" + +# Categories widget +- id: categories_title + translation: "Категории" + +# Recent Posts widget +- id: recent_title + translation: "Недавние публикации" + +# Social widget +- id: social_title + translation: "Социальные сети" + +# Tags List widget +- id: tags_title + translation: "Теги" + +# Footer +- id: footer_credits + translation: + "Сгенерировано с использованием <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> \ + и темы <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Страница не найдена" + +- id: 404_text + translation: + "Страница, которую вы искали, по-видимому, была перемещена, удалена или не существовала вообще. Пожалуйста, \ + используйте поиск или перейдите на" + +- id: 404_linktext + translation: "главную страницу" + +# No posts empty state +- id: noposts_warning_title + translation: "У вас нет ни одной публикации!" + +- id: noposts_warning_description + translation: + "Как только вы опубликуете что-нибудь в любой папке (разделе) внутри директории <b>content</b>, оно появится \ + здесь. По-умолчанию на главной странице будет отображаться только один раздел (с наибольшим количеством \ + публикаций)." + +- id: noposts_warning_tip + translation: + "<b>Совет:</b> Вы можете отображать сколько угодно разделов с помощью параметра конфигурации \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/vi.yaml b/themes/new_theme/i18n/vi.yaml new file mode 100644 index 0000000..16a80f3 --- /dev/null +++ b/themes/new_theme/i18n/vi.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "Đọc tiếp…" + +- id: menu_label + translation: "Menu" + +- id: sidemenu_title + translation: "Menu" + +# Post meta +- id: meta_lastmod + translation: "Cập nhật lần cuối" + +- id: meta_translations + translation: "Bản dịch" + +# Table of Contents +- id: toc_title + translation: "Mục lục" + +# Post nav +- id: post_nav_prev + translation: "Trước" + +- id: post_nav_next + translation: "Sau" + +# Authorbox +- id: authorbox_name + translation: "Về {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "CÁNH BÁO" + +- id: sidebar_recommendation + translation: "Vui lòng tạo hoặc kích hoạt tối thiểu một thành phần trong thanh bên." + +# Search widget +- id: search_placeholder + translation: "TÌM KIẾM..." + +# Languages widget +- id: languages_title + translation: "Ngôn ngữ" + +# Categories widget +- id: categories_title + translation: "Chủ đề" + +# Recent Posts widget +- id: recent_title + translation: "Bài viết gần đây" + +# Social widget +- id: social_title + translation: "Xã hội" + +# Tags List widget +- id: tags_title + translation: "Thẻ" + +# Footer +- id: footer_credits + translation: + "Được tạo từ <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> sử dụng với \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>." + +# 404 +- id: 404_title + translation: "404. Không tìm thấy trang này" + +- id: 404_text + translation: + "Trang bạn đang tìm kiếm đã bị xoá hoặc không tồn tại. Vui lòng sử dụng chức năng tìm kiếm" + +- id: 404_linktext + translation: "trang chủ" + +# No posts empty state +- id: noposts_warning_title + translation: "Bạn chưa có bài viết nào!" + +- id: noposts_warning_description + translation: + "Khi bạn xuất bản bất kì bài viết nào trong bất kì thư mục nào trong thư mục <b>content</b>, nó sẽ xuất hiện tại đây.\ + Mặc định chỉ một phần của bài viết sẽ được xuất hiện trong trang chủ cho hầu hết các bài viết." + +- id: noposts_warning_tip + translation: + "<b>Gợi ý:</b> Bạn có thể hiện bao nhiêu phần tuỳ ý bằng tham số parameter \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b>." diff --git a/themes/new_theme/i18n/zh-cn.yaml b/themes/new_theme/i18n/zh-cn.yaml new file mode 100644 index 0000000..e66faae --- /dev/null +++ b/themes/new_theme/i18n/zh-cn.yaml @@ -0,0 +1,92 @@ +# General +- id: read_more + translation: "阅读全文…" + +- id: menu_label + translation: "菜单" + +- id: sidemenu_title + translation: "菜单" + +# Post meta +- id: meta_lastmod + translation: "最后修改" + +- id: meta_translations + translation: "翻译" + +# Table of Contents +- id: toc_title + translation: "目录" + +# Post nav +- id: post_nav_prev + translation: "上一篇" + +- id: post_nav_next + translation: "下一篇" + +# Authorbox +- id: authorbox_name + translation: "关于 {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "警告" + +- id: sidebar_recommendation + translation: "请至少选择一个侧边栏组件" + +# Search widget +- id: search_placeholder + translation: "搜索..." + +# Languages widget +- id: languages_title + translation: "语言" + +# Categories widget +- id: categories_title + translation: "分类" + +# Recent Posts widget +- id: recent_title + translation: "近期文章" + +# Social widget +- id: social_title + translation: "社交" + +# Tags List widget +- id: tags_title + translation: "标签" + +# Footer +- id: footer_credits + translation: "基于 <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> 引擎和 \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>主題" + +# 404 +- id: 404_title + translation: "404. 抱歉,找不到您要找的页面" + +- id: 404_text + translation: "您要找的页面可能已经被移除、刪除或不存在,不妨去首页搜索一下吧。" + +- id: 404_linktext + translation: "回到首页" + +# No posts empty state +- id: noposts_warning_title + translation: "目前还没有任何内容!" + +- id: noposts_warning_description + translation: + "在 <b>content</b> 目录下的任意文件夹(板块)中发布内容后,它就会显示在这里。\ + 只有一个板块的内容(默认文章最多的文件夹)会显示在主页面上" + +- id: noposts_warning_tip + translation: + "<b>提示:</b> 您可以通过 \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + 参数来控制展示您想要展示的板块内容。" diff --git a/themes/new_theme/i18n/zh-tw.yaml b/themes/new_theme/i18n/zh-tw.yaml new file mode 100644 index 0000000..4854662 --- /dev/null +++ b/themes/new_theme/i18n/zh-tw.yaml @@ -0,0 +1,93 @@ +# General +- id: read_more + translation: "閱讀全文…" + +- id: menu_label + translation: "選單" + +- id: sidemenu_title + translation: "選單" + +# Post meta +- id: meta_lastmod + translation: "最後修改" + +- id: meta_translations + translation: "翻譯" + +# Table of Contents +- id: toc_title + translation: "內文" + +# Post nav +- id: post_nav_prev + translation: "前一則" + +- id: post_nav_next + translation: "下一則" + +# Authorbox +- id: authorbox_name + translation: "關於 {{ .Count }}" + +# Sidebar +- id: sidebar_warning + translation: "警告" + +- id: sidebar_recommendation + translation: "請至少選擇一個側邊欄元件" + +# Search widget +- id: search_placeholder + translation: "搜尋..." + +# Languages widget +- id: languages_title + translation: "語言" + +# Categories widget +- id: categories_title + translation: "分類" + +# Recent Posts widget +- id: recent_title + translation: "近期文章" + +# Social widget +- id: social_title + translation: "社群" + +# Tags List widget +- id: tags_title + translation: "標籤" + +# Footer +- id: footer_credits + translation: + "使用 <a href=\"https://gohugo.io/\" rel=\"nofollow noopener\" target=\"_blank\">Hugo</a> 技術與 \ + <a href=\"https://github.com/Vimux/Mainroad/\" rel=\"nofollow noopener\" target=\"_blank\">Mainroad</a>主題" + +# 404 +- id: 404_title + translation: "404. 糟糕!我們似乎無法找到您要找的頁面。" + +- id: 404_text + translation: "您要找的頁面可能已經被移除、刪除或是不存在。請回到首頁或是使用搜尋功能。" + +- id: 404_linktext + translation: "回到首頁" + +# No posts empty state +- id: noposts_warning_title + translation: "目前還沒有任何内容!" + +- id: noposts_warning_description + translation: + "在 <b>content</b> 目錄下的任意資料夾(區塊)中發布内容後,就會被顯示在此處。\ + 其中只有一個區塊的内容(預設是擁有文章數量最多的資料夾)會被顯示在主要頁面上" + +- id: noposts_warning_tip + translation: + "<b>提示:</b> 您可以透過 \ + <b><a href=\"https://gohugo.io/functions/where/#mainsections\" rel=\"nofollow noopener\" target=\"_blank\">mainSections</a></b> \ + 參數來控制所要展示的區塊內容。" diff --git a/themes/new_theme/images/screenshot.png b/themes/new_theme/images/screenshot.png Binary files differnew file mode 100644 index 0000000..d67e2c0 --- /dev/null +++ b/themes/new_theme/images/screenshot.png diff --git a/themes/new_theme/images/tn.png b/themes/new_theme/images/tn.png Binary files differnew file mode 100644 index 0000000..cd45c84 --- /dev/null +++ b/themes/new_theme/images/tn.png diff --git a/themes/new_theme/layouts/404.html b/themes/new_theme/layouts/404.html index 59a1ebf..6e067f0 100644 --- a/themes/new_theme/layouts/404.html +++ b/themes/new_theme/layouts/404.html @@ -1,15 +1,8 @@ -{{ partial "header.html" . }} - -<div class="main-content content" role="main" itemprop="mainContentOfPage"> - <article class="post"> - <header class="post__header clearfix"> - <h1 class="post__title">{{ .Title }}</h1> - </header> - <div class="post__content clearfix"> - Page not found.. - </div> - </article> -</div> - -{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} +{{ define "main" }} +<main class="main" role="main"> + <div class="warning"> + <h1 class="warning__headline">{{ T "404_title" }}</h1> + <p class="warning__text">{{ T "404_text" }} <a href="{{ "" | relLangURL }}">{{ T "404_linktext" }}</a>.</p> + </div> +</main> +{{ end }} diff --git a/themes/new_theme/layouts/_default/baseof.html b/themes/new_theme/layouts/_default/baseof.html new file mode 100644 index 0000000..4b80bec --- /dev/null +++ b/themes/new_theme/layouts/_default/baseof.html @@ -0,0 +1,59 @@ +<!DOCTYPE html> +<html class="no-js" lang="{{ .Site.Language.Lang }}"> +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }}</title> + <script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script> + <meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Params.Description }}{{ end }}"> + {{- if .Site.Params.opengraph }} + {{ template "_internal/opengraph.html" . }} + {{- end }} + {{- if .Site.Params.schema }} + {{ template "_internal/schema.html" . }} + {{- end }} + {{- if .Site.Params.twitter_cards }} + {{ template "_internal/twitter_cards.html" . }} + {{- end }} + <link rel="dns-prefetch" href="//fonts.googleapis.com"> + <link rel="dns-prefetch" href="//fonts.gstatic.com"> + {{ with .OutputFormats.Get "rss" -}} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{ end -}} + <script src="/js/jquery.js" type="text/javascript"></script> + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700"> + {{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}} + <link rel="stylesheet" href="{{ $style.RelPermalink }}"> + {{ range .Site.Params.customCSS -}} + <link rel="stylesheet" href="{{ . | relURL }}"> + {{- end }} + <link rel="shortcut icon" href="{{ "favicon.ico" | relURL }}"> + {{- if not .Site.IsServer }} + {{ template "_internal/google_analytics_async.html" . }} + {{- end }} +</head> +<body class="body"> + <div class="container container--outer"> + {{ partial "header" . }} + <div class="wrapper flex"> + <div class="primary"> + {{ block "main" . }} + {{ with .Content }} + <div class="content main__content clearfix"> + {{ . }} + </div> + {{ end }} + {{ end }} + </div> + {{ partial "sidebar.html" . }} + </div> + {{ partial "footer" . }} + </div> +<script async defer src="{{ "js/menu.js" | relURL }}"></script> +{{ range .Site.Params.customJS -}} +<script src="{{ . | relURL }}"></script> +{{- end }} +{{- partial "mathjax.html" . -}} +</body> +</html> diff --git a/themes/new_theme/layouts/_default/list.html b/themes/new_theme/layouts/_default/list.html index bca3132..4a151c3 100644 --- a/themes/new_theme/layouts/_default/list.html +++ b/themes/new_theme/layouts/_default/list.html @@ -1,67 +1,22 @@ -{{ partial "header.html" . }} - -{{ $section := .Section }} - -{{ if and ( ne $section "blog" ) ( ne $section "" ) ( ne $section "categories" ) }} -<div class="main-content content" role="main" itemprop="mainContentOfPage"> - <article class="post"> - <header class="post__header clearfix"> - <h1 class="post__title">{{ .Title }}</h1> - </header> - <div class="post__content clearfix"> - {{ if ( eq $section "search" ) }} - {{ partial "ranklist.html" . }} - {{ .Content }} - {{ else }} - {{ .Content }} - {{ end }} - </div> - </article> -</div> -{{ else }} - <div class="main-content loop content" role="main"> - {{- if not .IsHome }} - <header class="page-header"> - <h1 class="page-header__title">{{ .Title }}</h1> - </header> - {{- end }} - {{- range .Pages }} - <article class="loop__item post clearfix"> - {{- if .Params.thumbnail }} - <figure class="loop__thumbnail"> - <a href="{{ .Permalink }}"> - <img src="{{ .Params.thumbnail | absURL }}" alt="{{ .Title }}" /> - </a> - </figure> - {{- end }} - <div class="loop__content clearfix"> - <header class="loop__header"> - <h3 class="loop__title post__title "> - <a href="{{ .Permalink }}" rel="bookmark">{{ .Title }}</a> - </h3> - <div class="loop__meta meta"> - <svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg> - <time class="loop__meta-date" datetime="{{ .Date }}">{{.Date.Format "January 02, 2006"}}</time> - {{- if .Params.categories }} - <span class="post__meta-categories meta-categories"> - <svg class="icon icon-category" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 2l1 2h8v11h-16v-13z"/></svg> - {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "/categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span> - {{- end }} - </div> - </header> - <div class="loop__excerpt post__content"> - {{ .Summary }} - </div> - <div class="post__content"> - <a href="{{ .URL }}">View full post</a> - </div> - </div> - </article> - {{- end }} - - {{ partial "pagination.html" . }} +{{ define "main" }} +<main class="main list" role="main"> + {{- with .Title }} + <header class="main__header"> + <h1 class="main__title">{{ . }}</h1> + </header> + {{- end }} + {{- with .Content }} + <div class="content main__content clearfix"> + {{ . }} + {{ partial "ranklist.html" . }} </div> + {{- end }} + {{ $section := .Section }} + {{- if or ( eq $section "blog" ) ( eq $section "" ) ( eq $section "categories" ) }} + {{- range .Paginator.Pages }} + {{- .Render "summary" }} + {{- end }} + {{- end }} +</main> +{{ partial "pagination.html" . }} {{ end }} - -{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} diff --git a/themes/new_theme/layouts/_default/single.html b/themes/new_theme/layouts/_default/single.html index 77fbd4a..9c84ca4 100644 --- a/themes/new_theme/layouts/_default/single.html +++ b/themes/new_theme/layouts/_default/single.html @@ -1,48 +1,32 @@ -{{ partial "header.html" . }} - -{{ $section := .Section }} - -{{ if ne $section "blog" }} -<div class="main-content content" role="main" itemprop="mainContentOfPage"> +{{ define "main" }} +<main class="main" role="main"> <article class="post"> - <header class="post__header clearfix"> + <header class="post__header"> <h1 class="post__title">{{ .Title }}</h1> - </header> - <div class="post__content clearfix"> - {{ .Content }} - </div> - </article> -</div> -{{ else }} -<div class="main-content content" role="main" itemprop="mainContentOfPage"> - <article class="post"> - <header class="post__header clearfix"> - <h1 class="post__title">{{ .Title }}</h1> - <p class="post__meta meta"> - <svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg> - <time class="post__meta-date" datetime="{{ .Date }}">{{.Date.Format "January 02, 2006"}}</time> - {{- if .Params.categories }} - <span class="post__meta-categories meta-categories"> - <svg class="icon icon-category" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 2l1 2h8v11h-16v-13z"/></svg> - {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "/categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span> - {{- end }} - </p> - </header> - <div class="post__content clearfix"> - {{- if .Params.thumbnail }} - <figure class="post__thumbnail"> - <img src="{{ .Params.thumbnail | absURL }}" alt="{{ .Title }}"> - </figure> + {{- with .Params.lead }} + <p class="post__lead">{{ . }}</p> {{- end }} + {{ with partial "post_meta.html" . -}} + <div class="post__meta meta">{{ . }}</div> + {{- end }} + </header> + {{- if .Params.thumbnail }} + <figure class="post__thumbnail"> + <img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Title }}"> + </figure> + {{- end }} + {{- partial "post_toc.html" . -}} + <div class="content post__content clearfix"> {{ .Content }} </div> - {{ partial "post_tags.html" . }} + {{- if .Params.tags }} + <footer class="post__footer"> + {{ partial "post_tags.html" . }} + </footer> + {{- end }} </article> - {{ partial "authorbox.html" . }} - {{ partial "post_nav.html" . }} - {{ partial "comments.html" . }} -</div> +</main> +{{ partial "authorbox.html" . }} +{{ partial "pager.html" . }} +{{ partial "comments.html" . }} {{ end }} - -{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} diff --git a/themes/new_theme/layouts/_default/summary.html b/themes/new_theme/layouts/_default/summary.html new file mode 100644 index 0000000..df7428d --- /dev/null +++ b/themes/new_theme/layouts/_default/summary.html @@ -0,0 +1,32 @@ +<article class="list__item post"> + {{- if .Params.thumbnail }} + <figure class="list__thumbnail"> + <a href="{{ .Permalink }}"> + <img src="{{ .Params.thumbnail | relURL }}" alt="{{ .Title }}" /> + </a> + </figure> + {{- end }} + <header class="list__header"> + <h3 class="list__title post__title "> + <a href="{{ .RelPermalink }}" rel="bookmark"> + {{ .Title }} + </a> + </h3> + {{- with .Params.lead }} + <p class="list__lead post__lead">{{ . }}</p> + {{- end }} + {{ with partial "post_meta.html" . -}} + <div class="list__meta meta">{{ . }}</div> + {{- end }} + </header> + <div class="content list__excerpt post__content clearfix"> + {{ .Summary }} + </div> + {{- if .Site.Params.readmore }} + {{- if .Truncated }} + <div class="list__footer clearfix"> + <a class="list__footer-readmore btn" href="{{ .RelPermalink }}">{{ T "read_more" }}</a> + </div> + {{- end }} + {{- end }} +</article>
\ No newline at end of file diff --git a/themes/new_theme/layouts/index.html b/themes/new_theme/layouts/index.html index 77fbd4a..9250441 100644 --- a/themes/new_theme/layouts/index.html +++ b/themes/new_theme/layouts/index.html @@ -1,48 +1,24 @@ -{{ partial "header.html" . }} - -{{ $section := .Section }} - -{{ if ne $section "blog" }} -<div class="main-content content" role="main" itemprop="mainContentOfPage"> - <article class="post"> - <header class="post__header clearfix"> - <h1 class="post__title">{{ .Title }}</h1> - </header> - <div class="post__content clearfix"> - {{ .Content }} +{{ define "main" }} +<main class="main list" role="main"> + {{- with .Content }} + <div class="content main__content clearfix"> + {{ . }} + </div> + {{- end }} + {{ $paginator := .Paginate (where .Site.RegularPages "Type" "in" .Site.Params.mainSections) }} + {{- range $paginator.Pages }} + {{- .Render "summary" }} + {{- end }} + {{- if and (eq $paginator.TotalNumberOfElements 0) (not $.Content) }} + <div class="warning"> + {{ partial "svg/files.svg" (dict "class" "warning__icon") }} + <h3 class="warning__headline">{{ T "noposts_warning_title" | safeHTML }}</h3> + <div class="warning__text"> + <p class="warning__description">{{ T "noposts_warning_description" | safeHTML }}</p> + <p class="warning__tip">{{ T "noposts_warning_tip" | safeHTML }}</p> + </div> </div> - </article> -</div> -{{ else }} -<div class="main-content content" role="main" itemprop="mainContentOfPage"> - <article class="post"> - <header class="post__header clearfix"> - <h1 class="post__title">{{ .Title }}</h1> - <p class="post__meta meta"> - <svg class="icon icon-time" height="14" viewBox="0 0 16 16" width="14" xmlns="http://www.w3.org/2000/svg"><path d="m8-.0000003c-4.4 0-8 3.6-8 8 0 4.4000003 3.6 8.0000003 8 8.0000003 4.4 0 8-3.6 8-8.0000003 0-4.4-3.6-8-8-8zm0 14.4000003c-3.52 0-6.4-2.88-6.4-6.4000003 0-3.52 2.88-6.4 6.4-6.4 3.52 0 6.4 2.88 6.4 6.4 0 3.5200003-2.88 6.4000003-6.4 6.4000003zm.4-10.4000003h-1.2v4.8l4.16 2.5600003.64-1.04-3.6-2.1600003z"/></svg> - <time class="post__meta-date" datetime="{{ .Date }}">{{.Date.Format "January 02, 2006"}}</time> - {{- if .Params.categories }} - <span class="post__meta-categories meta-categories"> - <svg class="icon icon-category" height="16" viewBox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg"><path d="m7 2l1 2h8v11h-16v-13z"/></svg> - {{ range $index, $category := .Params.categories }}{{ if gt $index 0 }}, {{ end }}<a class="meta-categories__link" href="{{ "/categories/" | relLangURL }}{{ . | urlize | lower }}" rel="category">{{ . }}</a>{{ end }}</span> - {{- end }} - </p> - </header> - <div class="post__content clearfix"> - {{- if .Params.thumbnail }} - <figure class="post__thumbnail"> - <img src="{{ .Params.thumbnail | absURL }}" alt="{{ .Title }}"> - </figure> - {{- end }} - {{ .Content }} - </div> - {{ partial "post_tags.html" . }} - </article> - {{ partial "authorbox.html" . }} - {{ partial "post_nav.html" . }} - {{ partial "comments.html" . }} -</div> + {{ end }} +</main> +{{ partial "pagination.html" . }} {{ end }} - -{{ partial "sidebar.html" . }} -{{ partial "footer.html" . }} diff --git a/themes/new_theme/layouts/partials/authorbox.html b/themes/new_theme/layouts/partials/authorbox.html index cfd09c5..29faa5f 100644 --- a/themes/new_theme/layouts/partials/authorbox.html +++ b/themes/new_theme/layouts/partials/authorbox.html @@ -1,13 +1,24 @@ -{{- if .Site.Params.authorbox }} +{{- if .Param "authorbox" }} <div class="authorbox clearfix"> + {{- if and (not .Site.Author.avatar) (not .Site.Author.name) (not .Site.Author.bio) }} + <p class="authorbox__warning"> + <strong>WARNING:</strong> Authorbox is activated, but [Author] parameters are not specified. + </p> + {{- end }} + {{- with .Site.Author.avatar }} <figure class="authorbox__avatar"> - <img alt="{{ .Site.Author.name }} avatar" src="{{ .Site.Author.avatar | absURL }}" class="avatar" height="90" width="90"> + <img alt="{{ $.Site.Author.name }} avatar" src="{{ $.Site.Author.avatar | relURL }}" class="avatar" height="90" width="90"> </figure> + {{- end }} + {{- with .Site.Author.name }} <div class="authorbox__header"> - <span class="authorbox__name">About {{ .Site.Author.name }}</span> + <span class="authorbox__name">{{ T "authorbox_name" . }}</span> </div> + {{- end }} + {{- with .Site.Author.bio }} <div class="authorbox__description"> - {{ .Site.Author.bio }} + {{ . | markdownify }} </div> + {{- end }} </div> -{{- end }}
\ No newline at end of file +{{- end }} diff --git a/themes/new_theme/layouts/partials/comments.html b/themes/new_theme/layouts/partials/comments.html index e69de29..b2e619d 100644 --- a/themes/new_theme/layouts/partials/comments.html +++ b/themes/new_theme/layouts/partials/comments.html @@ -0,0 +1,5 @@ +{{ if and .Site.DisqusShortname (index .Params "comments" | default "true") (not .Site.IsServer) }} +<section class="comments"> + {{ template "_internal/disqus.html" . }} +</section> +{{ end }} diff --git a/themes/new_theme/layouts/partials/footer.html b/themes/new_theme/layouts/partials/footer.html index d7fce85..092f258 100644 --- a/themes/new_theme/layouts/partials/footer.html +++ b/themes/new_theme/layouts/partials/footer.html @@ -1,15 +1,10 @@ +<footer class="footer"> + <div class="container footer__container flex"> + {{ partial "footer_links.html" . }} + <div class="footer__copyright"> + © {{ .Site.Params.copyright_years }}, {{ .Site.Params.Location }}, {{ .Site.Params.author }}, + <span class="footer__copyright-credits">{{ T "footer_credits" | safeHTML }}</span> + , read here about <a href="/dataprotection">Data Protection and Privacy</a> + </div> </div> - <footer class="footer" itemscope="itemscope" itemtype="http://schema.org/WPFooter"> - <div class="container container-inner"> - <p class="footer__copyright">© {{ .Site.Params.copyright_years }}, {{ .Site.Params.Location }}, {{ .Site.Params.author }}. Based on <a href="//wordpress.org/themes/mh-magazine-lite/" target="_blank" rel="nofollow noopener noreferrer">MH Magazine lite</a>, read here about <a href="/dataprotection">Data Protection and Privacy</a></p> - </div> - </footer> - </div><!-- .mh-container-outer --> - -<script> - var navigation = responsiveNav(".menu", { - navClass: "menu--collapse", - }); -</script> -</body> -</html> +</footer> diff --git a/themes/new_theme/layouts/partials/footer_links.html b/themes/new_theme/layouts/partials/footer_links.html new file mode 100644 index 0000000..b86860d --- /dev/null +++ b/themes/new_theme/layouts/partials/footer_links.html @@ -0,0 +1,8 @@ +{{- with .Site.Menus.footer }} +<div class="footer__links"> + {{ range $key, $value := . }} + {{- if ne $key 0 }} | {{ end -}} + <a class="footer__link" href="{{ $value.URL }}">{{ $value.Name }}</a> + {{- end }} +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/header.html b/themes/new_theme/layouts/partials/header.html index 8dff6e7..4548177 100644 --- a/themes/new_theme/layouts/partials/header.html +++ b/themes/new_theme/layouts/partials/header.html @@ -1,30 +1,6 @@ -<!DOCTYPE html> -<html lang="{{ .Site.LanguageCode | default "en-us" }}"> -<head> -<meta charset="UTF-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title>{{ .Title }}</title> -{{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }} -{{ .Hugo.Generator }} -{{ if .Site.Params.opengraph }}{{ template "_internal/opengraph.html" . }}{{ end }} -<link rel="dns-prefetch" href="//fonts.googleapis.com" /> -{{ if .RSSLink }}<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }} Feed" href="{{ .RSSLink }}">{{ end }} -<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700" type="text/css" media="all" /> -<link rel="stylesheet" href="{{ .Site.BaseURL }}css/magstyle.css" type="text/css" media="all" /> -<link rel="stylesheet" href="{{ .Site.BaseURL }}css/localstyle.css" type="text/css" media="all" /> -<script type="text/javascript" src="{{ .Site.BaseURL }}js/scripts.js"></script> -</head> -<body class="body {{ if (.Site.Params.leftsidebar) or (.Params.leftsidebar) }}body-left-sidebar{{ else }}body-right-sidebar{{ end }} mobile" itemscope="itemscope" itemtype="http://schema.org/WebPage"> - <div class="container container-outer"> - <header class="header" itemscope="itemscope" itemtype="http://schema.org/WPHeader"> - <div class="container container-inner clearfix"> - <div class="logo" role="banner" itemscope="itemscope" itemtype="http://schema.org/Brand"> - <a class="logo__link" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" rel="home"> - <h1 class="logo__title">{{ .Site.Params.toptitle }}</h1> - {{ with .Site.Params.subtitle }}<h2 class="logo__tagline">{{ . }}</h2>{{ end }} - </a> - </div> - </div> - {{ partial "menu.html" . }} - </header> - <div class="wrapper clearfix"> +<header class="header"> + <div class="container header__container"> + {{ partial "logo.html" . }} + {{ partial "menu.html" . }} + </div> +</header> diff --git a/themes/new_theme/layouts/partials/logo.html b/themes/new_theme/layouts/partials/logo.html new file mode 100644 index 0000000..bf7d668 --- /dev/null +++ b/themes/new_theme/layouts/partials/logo.html @@ -0,0 +1,24 @@ +{{- $logoTitle := .Site.Params.logo.title | default .Site.Title -}} +{{- $logoSubtitle := .Site.Params.logo.subtitle | default .Site.Params.subtitle -}} +{{- $logoImage := .Site.Params.logo.image -}} + +{{- if or $logoTitle $logoImage }} + {{/* Defined when logo is mixed (image + text) */}} + {{- $logoMix := and $logoImage $logoTitle -}} + + <div class="logo{{ with $logoMix }} logo--mixed{{ end }}"> + <a class="logo__link" href="{{ "" | relLangURL }}"{{ with $logoTitle }} title="{{ . }}"{{ end }} rel="home"> + {{ with $logoImage -}} + <div class="logo__item logo__imagebox"> + <img class="logo__img" src="{{ . | relURL }}"> + </div> + {{- end -}} + {{ with $logoTitle -}} + <div class="logo__item logo__text"> + <div class="logo__title">{{ . }}</div> + {{ with $logoSubtitle }}<div class="logo__tagline">{{ . }}</div>{{ end }} + </div> + {{- end }} + </a> + </div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/mathjax.html b/themes/new_theme/layouts/partials/mathjax.html new file mode 100644 index 0000000..8a5ea04 --- /dev/null +++ b/themes/new_theme/layouts/partials/mathjax.html @@ -0,0 +1,3 @@ +{{ if and .IsPage (eq (.Param "mathjax") true) }} +<script src="{{ .Param "mathjaxPath" | default "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" }}{{ with .Param "mathjaxConfig" | default "TeX-AMS-MML_HTMLorMML" }}?config={{ . }}{{ end }}" async></script> +{{ end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/menu.html b/themes/new_theme/layouts/partials/menu.html index df9c403..34843c4 100644 --- a/themes/new_theme/layouts/partials/menu.html +++ b/themes/new_theme/layouts/partials/menu.html @@ -1,12 +1,23 @@ -<nav class="menu" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"> +{{- if .Site.Menus.main }} +<nav class="menu"> + <button class="menu__btn" aria-haspopup="true" aria-expanded="false" tabindex="0"> + <span class="menu__btn-title" tabindex="-1">{{ T "menu_label" }}</span> + </button> <ul class="menu__list"> - {{- if .Site.Menus.main }} {{- $currentNode := . }} - {{- range sort .Site.Menus.main }} - {{- if ( not ( eq .Name "Data Protection And Privacy" ) ) }} - <li class="menu__item {{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li> - {{- end }} + {{- range .Site.Menus.main }} + {{- if .Name }} + <li class="menu__item{{ if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }} menu__item--active{{ end }}"> + <a class="menu__link" href="{{ .URL }}"> + {{ .Pre }} + <span class="menu__text">{{ .Name }}</span> + {{ .Post }} + </a> + </li> {{- end }} {{- end }} </ul> </nav> +{{ else -}} +<div class="divider"></div> +{{- end }} diff --git a/themes/new_theme/layouts/partials/pager.html b/themes/new_theme/layouts/partials/pager.html new file mode 100644 index 0000000..78cf9d2 --- /dev/null +++ b/themes/new_theme/layouts/partials/pager.html @@ -0,0 +1,22 @@ +{{- if .Param "pager" }} +{{- if or (.PrevInSection) (.NextInSection) }} +<nav class="pager flex"> + {{- if .PrevInSection }} + <div class="pager__item pager__item--prev"> + <a class="pager__link" href="{{ .PrevInSection.RelPermalink }}" rel="prev"> + <span class="pager__subtitle">« {{ T "post_nav_prev" }}</span> + <p class="pager__title">{{ .PrevInSection.Title }}</p> + </a> + </div> + {{- end }} + {{- if .NextInSection }} + <div class="pager__item pager__item--next"> + <a class="pager__link" href="{{ .NextInSection.RelPermalink }}" rel="next"> + <span class="pager__subtitle">{{ T "post_nav_next" }} »</span> + <p class="pager__title">{{ .NextInSection.Title }}</p> + </a> + </div> + {{- end }} +</nav> +{{- end }} +{{- end }} diff --git a/themes/new_theme/layouts/partials/pagination.html b/themes/new_theme/layouts/partials/pagination.html index 82ad195..8cf40d5 100644 --- a/themes/new_theme/layouts/partials/pagination.html +++ b/themes/new_theme/layouts/partials/pagination.html @@ -1,11 +1,13 @@ -{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }} -<div class="pagination clearfix"> +{{- if or (.Paginator.HasPrev) (.Paginator.HasNext) }} +<div class="pagination"> {{- if .Paginator.HasPrev }} - <a class="pagination__item pagination__item--prev" href="{{ .Paginator.Prev.URL }}">«</a> + <a class="pagination__item pagination__item--prev btn" href="{{ .Paginator.Prev.URL }}">«</a> {{- end }} - <span class="pagination__item pagination__item--current">{{ .Paginator.PageNumber }}/{{ .Paginator.TotalPages }}</span> + <span class="pagination__item pagination__item--current"> + {{- .Paginator.PageNumber }}/{{ .Paginator.TotalPages -}} + </span> {{- if .Paginator.HasNext }} - <a class="pagination__item pagination__item--next" href="{{ .Paginator.Next.URL }}">»</a> + <a class="pagination__item pagination__item--next btn" href="{{ .Paginator.Next.URL }}">»</a> {{- end }} </div> -{{ end }}
\ No newline at end of file +{{- end }} diff --git a/themes/new_theme/layouts/partials/post_meta.html b/themes/new_theme/layouts/partials/post_meta.html new file mode 100644 index 0000000..f357ddb --- /dev/null +++ b/themes/new_theme/layouts/partials/post_meta.html @@ -0,0 +1,7 @@ +{{- $root := . -}} +{{- with .Param "post_meta" -}} + {{- range $field := . -}} + {{- $p := printf "post_meta/%s.html" $field -}} + {{- partial $p $root -}} + {{- end -}} +{{- end -}}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/post_meta/author.html b/themes/new_theme/layouts/partials/post_meta/author.html new file mode 100644 index 0000000..0ee0fc9 --- /dev/null +++ b/themes/new_theme/layouts/partials/post_meta/author.html @@ -0,0 +1,6 @@ +{{- if .Site.Author.name -}} +<div class="meta__item-author meta__item"> + {{ partial "svg/author.svg" (dict "class" "meta__icon") -}} + <span class="meta__text">{{ .Site.Author.name }}</span> +</div> +{{- end -}}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/post_meta/categories.html b/themes/new_theme/layouts/partials/post_meta/categories.html new file mode 100644 index 0000000..8ab4202 --- /dev/null +++ b/themes/new_theme/layouts/partials/post_meta/categories.html @@ -0,0 +1,16 @@ +{{- $taxo := "categories" -}} +{{- with .Param $taxo -}} +<div class="meta__item-categories meta__item"> + {{- partial "svg/category.svg" (dict "class" "meta__icon") -}} + <span class="meta__text"> + {{- range $index, $category := . }} + {{- $url := urls.Parse ($category | urlize) -}} + {{- $path := $url.Path -}} + {{- with $.Site.GetPage (printf "/%s/%s" $taxo $path) }} + {{- if gt $index 0 }}, {{ end -}} + <a class="meta__link" href="{{ .RelPermalink }}" rel="category">{{ .Title }}</a> + {{- end }} + {{- end }} + </span> +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/post_meta/date.html b/themes/new_theme/layouts/partials/post_meta/date.html new file mode 100644 index 0000000..24a6c32 --- /dev/null +++ b/themes/new_theme/layouts/partials/post_meta/date.html @@ -0,0 +1,13 @@ +{{- if not .Date.IsZero }} +<div class="meta__item-datetime meta__item"> + {{ partial "svg/time.svg" (dict "class" "meta__icon") -}} + <time class="meta__text" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}"> + {{- .Date.Format (.Site.Params.dateformat | default "January 02, 2006") -}} + </time> + {{- if ne .Date .Lastmod }} + <time class="meta__text" datetime="{{ .Lastmod.Format "2006-01-02T15:04:05Z07:00" }}">( + {{- T "meta_lastmod" }}: {{ .Lastmod.Format (.Site.Params.dateformat | default "January 02, 2006") -}} + )</time> + {{- end -}} +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/post_meta/translations.html b/themes/new_theme/layouts/partials/post_meta/translations.html new file mode 100644 index 0000000..34d1172 --- /dev/null +++ b/themes/new_theme/layouts/partials/post_meta/translations.html @@ -0,0 +1,10 @@ +{{- if .IsTranslated }} +<div class="meta__item-translations meta__item"> + <span class="meta__text"> + {{- T "meta_translations" }}: {{ range $index, $translation := .Translations }} + {{- if gt $index 0 }}, {{ end -}} + <a class="meta__link" href="{{ .RelPermalink }}">{{ .Lang | upper }}</a> + {{- end }} + </span> +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/post_tags.html b/themes/new_theme/layouts/partials/post_tags.html index 549c76b..f21f372 100644 --- a/themes/new_theme/layouts/partials/post_tags.html +++ b/themes/new_theme/layouts/partials/post_tags.html @@ -1,10 +1,14 @@ {{- if .Params.tags }} <div class="post__tags tags clearfix"> - <svg class="icon icon-tag" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m4.73135 3.3795002q0-.5597-.39604-.9557-.39604-.3961-.95577-.3961-.55974 0-.95578.3961-.39604.396-.39604.9557 0 .5598.39604.9558.39604.3961.95578.3961.55973 0 .95577-.3961.39604-.396.39604-.9558zm11.26865 6.0832q0 .5596998-.39076.9504998l-5.18548 5.196q-.41188.3908-.9610504.3908-.55974 0-.9505-.3908l-7.5511496-7.5616998q-.40132-.3907-.68119-1.0666-.27987-.6759-.27987-1.2357v-4.3934q0-.54920004.40132-.95050004.40132-.4013.9505-.4013h4.39339q.55974 0 1.23565.2799.67591.2798 1.07723.6812l7.55115 7.54060004q.39076.4118.39076.961z"/></svg> + {{ partial "svg/tag.svg" (dict "class" "tags__badge") }} <ul class="tags__list"> {{- range .Params.tags }} - <li class="tags__item"><a class="tags__link" href="/tags/{{ . | urlize }}/" rel="tag">{{ . }}</a></li> + <li class="tags__item"> + <a class="tags__link btn" href="{{ "tags/" | relLangURL }}{{ . | urlize }}/" rel="tag"> + {{- . -}} + </a> + </li> {{- end }} </ul> </div> -{{- end }}
\ No newline at end of file +{{- end }} diff --git a/themes/new_theme/layouts/partials/post_toc.html b/themes/new_theme/layouts/partials/post_toc.html new file mode 100644 index 0000000..2133247 --- /dev/null +++ b/themes/new_theme/layouts/partials/post_toc.html @@ -0,0 +1,8 @@ +{{ if .Param "toc" }} +<div class="post__toc toc"> + <div class="toc__title">{{ T "toc_title" }}</div> + <div class="toc__menu"> + {{ .TableOfContents }} + </div> +</div> +{{ end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/sidebar.html b/themes/new_theme/layouts/partials/sidebar.html index 4fc8150..c4fd283 100644 --- a/themes/new_theme/layouts/partials/sidebar.html +++ b/themes/new_theme/layouts/partials/sidebar.html @@ -1,10 +1,22 @@ -<aside class="sidebar" itemscope="itemscope" itemtype="http://schema.org/WPSideBar"> - {{ partial "widgets/dataprotection.html" . }} - {{ partial "widgets/elasticlunr_search.html" . }} - {{ $section := .Section }} - {{ if or ( eq $section "blog" ) ( eq $section "" ) ( eq $section "categories" ) }} - {{ partial "widgets/recent.html" . }} - {{ partial "widgets/categories.html" . }} - {{ partial "widgets/taglist.html" . }} - {{ end }} +{{- $sidebar := false }} +{{- if eq .Kind "home" -}} + {{ $sidebar = (default .Site.Params.sidebar.home .Params.sidebar) }} +{{- else if eq .Kind "page" -}} + {{ $sidebar = (default .Site.Params.sidebar.single .Params.sidebar) }} +{{- else -}} + {{ $sidebar = (default .Site.Params.sidebar.list .Params.sidebar) }} +{{ end }} + +{{- if $sidebar -}} +<aside class="sidebar{{ if eq $sidebar "left" }} sidebar--left{{ end }}"> +{{- $root := . }} +{{- with (default .Site.Params.sidebar.widgets .Params.widgets) -}} + {{- range $widget := . }} + {{- $p := printf "widgets/%s.html" $widget }} + {{- partial $p $root }} + {{- end }} +{{- else }} + <p class="sidebar__warning"><strong>{{ T "sidebar_warning" }}:</strong><br>{{ T "sidebar_recommendation" }}</p> +{{- end }} </aside> +{{- end }} diff --git a/themes/new_theme/layouts/partials/svg/author.svg b/themes/new_theme/layouts/partials/svg/author.svg new file mode 100644 index 0000000..0be6d81 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/author.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-author" width="16" height="16" viewBox="0 0 12 16"><path d="M6 1c2.2 0 3.5 2 3.5 4.5C9.5 7 8.9 8.2 8 9c2.9.8 4 2.5 4 5v1H0v-1c0-2.5 1.1-4.2 4-5-.9-.8-1.5-2-1.5-3.5C2.5 3 3.8 1 6 1z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/bitbucket.svg b/themes/new_theme/layouts/partials/svg/bitbucket.svg new file mode 100644 index 0000000..0f10764 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/bitbucket.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-bitbucket" width="24" height="24" viewBox="0 0 256 231"><path d="M8.308 0A8.202 8.202 0 0 0 .106 9.516l34.819 211.373a11.155 11.155 0 0 0 10.909 9.31h167.04a8.202 8.202 0 0 0 8.201-6.89l34.82-213.752a8.202 8.202 0 0 0-8.203-9.514L8.308 0zm146.616 152.768h-53.315l-14.436-75.42h80.67l-12.919 75.42z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/category.svg b/themes/new_theme/layouts/partials/svg/category.svg new file mode 100644 index 0000000..89f9f21 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/category.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-category" width="16" height="16" viewBox="0 0 16 16"><path d="m7 2l1 2h8v11h-16v-13z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/email.svg b/themes/new_theme/layouts/partials/svg/email.svg new file mode 100644 index 0000000..8fd8467 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/email.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-mail" width="24" height="24" viewBox="0 0 416 288"><path d="m0 16v256 16h16 384 16v-16-256-16h-16-384-16zm347 16-139 92.5-139-92.5zm-148 125.5 9 5.5 9-5.5 167-111.5v210h-352v-210z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/facebook.svg b/themes/new_theme/layouts/partials/svg/facebook.svg new file mode 100644 index 0000000..24babe2 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/facebook.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-facebook" width="24" height="24" viewBox="0 0 352 352"><path d="m0 32v288c0 17.5 14.5 32 32 32h288c17.5 0 32-14.5 32-32v-288c0-17.5-14.5-32-32-32h-288c-17.5 0-32 14.5-32 32zm320 0v288h-83v-108h41.5l6-48h-47.5v-31c0-14 3.5-23.5 23.5-23.5h26v-43.5c-4.4-.6-19.8-1.5-37.5-1.5-36.9 0-62 22.2-62 63.5v36h-42v48h42v108h-155v-288z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/files.svg b/themes/new_theme/layouts/partials/svg/files.svg new file mode 100644 index 0000000..72af481 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/files.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-files" width="96" height="96" viewBox="0 0 384 384"><path d="m368 64h-224-16v16 288 16h16 224 16v-16-288-16zm-16 288h-192v-256h192zm-320-320h192v16h32v-32-16h-16-224-16v16 288 16h16 96v-32h-80zm144 272h160v-32h-160zm0-64h160v-32h-160zm0-64h160v-32h-160zm-128 64h64v-32h-64zm0-64h64v-32h-64zm0-64h64v-32h-64z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/github.svg b/themes/new_theme/layouts/partials/svg/github.svg new file mode 100644 index 0000000..e694a12 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/github.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-github" width="24" height="24" viewBox="0 0 384 374"><path d="m192 0c-106.1 0-192 85.8-192 191.7 0 84.7 55 156.6 131.3 181.9 9.6 1.8 13.1-4.2 13.1-9.2 0-4.6-.2-16.6-.3-32.6-53.4 11.6-64.7-25.7-64.7-25.7-8.7-22.1-21.3-28-21.3-28-17.4-11.9 1.3-11.6 1.3-11.6 19.3 1.4 29.4 19.8 29.4 19.8 17.1 29.3 44.9 20.8 55.9 15.9 1.7-12.4 6.7-20.8 12.2-25.6-42.6-4.8-87.5-21.3-87.5-94.8 0-20.9 7.5-38 19.8-51.4-2-4.9-8.6-24.3 1.9-50.7 0 0 16.1-5.2 52.8 19.7 15.3-4.2 31.7-6.4 48.1-6.5 16.3.1 32.7 2.2 48.1 6.5 36.7-24.8 52.8-19.7 52.8-19.7 10.5 26.4 3.9 45.9 1.9 50.7 12.3 13.4 19.7 30.5 19.7 51.4 0 73.7-44.9 89.9-87.7 94.6 6.9 5.9 13 17.6 13 35.5 0 25.6-.2 46.3-.2 52.6 0 5.1 3.5 11.1 13.2 9.2 76.2-25.5 131.2-97.3 131.2-182 0-105.9-86-191.7-192-191.7z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/gitlab.svg b/themes/new_theme/layouts/partials/svg/gitlab.svg new file mode 100644 index 0000000..1efadbe --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/gitlab.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-gitlab" width="24" height="24" viewBox="0 0 265 265"><path d="M128.075 236.075l47.104-144.97H80.97l47.104 144.97z M14.956 91.104L.642 135.16a9.752 9.752 0 0 0 3.542 10.903l123.891 90.012-113.12-144.97z M14.956 91.105H80.97L52.601 3.79c-1.46-4.493-7.816-4.492-9.275 0l-28.37 87.315z M241.194 91.104l14.314 44.056a9.752 9.752 0 0 1-3.543 10.903l-123.89 90.012 113.119-144.97z M241.194 91.105h-66.015l28.37-87.315c1.46-4.493 7.816-4.492 9.275 0l28.37 87.315z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/instagram.svg b/themes/new_theme/layouts/partials/svg/instagram.svg new file mode 100644 index 0000000..47bed7f --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/instagram.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-instagram" width="24" height="24" viewBox="0 0 256 256"><circle cx="193" cy="59" r="15"/><path fill-rule="evenodd" d="M101 0h54c41 0 58.4 3.9 74.5 17C256.2 37.5 256 74.8 256 97.7v60c0 26.7 0 60.4-26.5 81.4-16 13.4-33.5 16.9-74.5 16.9h-54c-41 0-57.5-3.5-74.5-16.9C1 218.9.5 186.3.1 160.5L0 155V97.7c0-23-.2-60.2 26.5-80.7C45 2 60 0 101 0zm4.9 23h44.3c45.8 0 58.3 3.5 70.3 17.5 11.8 13.2 12 30.1 12.5 62.9V156c.2 20.8.3 45.8-12.5 59.5-12 14-24.5 17.5-70.3 17.5h-44.3c-45.9 0-57.3-3.5-70.4-17.5-12.2-13-12.3-36.5-12.4-56.7v-55.6c.4-32.6.7-49.6 12.4-62.7C48 26.5 60 23 105.9 23zm19.6 144.5a42 42 0 1 0 0-84 42 42 0 0 0 0 84zm0 22.5a64.5 64.5 0 1 0 0-129 64.5 64.5 0 0 0 0 129z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/linkedin.svg b/themes/new_theme/layouts/partials/svg/linkedin.svg new file mode 100644 index 0000000..4fe2234 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/linkedin.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-linkedin" width="24" height="24" viewBox="0 0 352 352"><path d="M0,40v272c0,21.9,18.1,40,40,40h272c21.9,0,40-18.1,40-40V40c0-21.9-18.1-40-40-40H40C18.1,0,0,18.1,0,40z M312,32 c4.6,0,8,3.4,8,8v272c0,4.6-3.4,8-8,8H40c-4.6,0-8-3.4-8-8V40c0-4.6,3.4-8,8-8H312z M59.5,87c0,15.2,12.3,27.5,27.5,27.5 c15.2,0,27.5-12.3,27.5-27.5c0-15.2-12.3-27.5-27.5-27.5C71.8,59.5,59.5,71.8,59.5,87z M187,157h-1v-21h-45v152h47v-75 c0-19.8,3.9-39,28.5-39c24.2,0,24.5,22.4,24.5,40v74h47v-83.5c0-40.9-8.7-72-56.5-72C208.5,132.5,193.3,145.1,187,157z M64,288h47.5 V136H64V288z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/tag.svg b/themes/new_theme/layouts/partials/svg/tag.svg new file mode 100644 index 0000000..ccc7d50 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/tag.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-tag" width="16" height="16" viewBox="0 0 32 32"><path d="M32 19c0 1-1 2-1 2L21 31s-1 1-2 1-2-1-2-1L2 16c-1-1-1.4-2-1.4-2S0 12.5 0 11V3C0 1.5.8.8.8.8S1.5 0 3 0h8c1.5 0 3 .6 3 .6S15 1 16 2l15 15s1 1 1 2zM7 10a3 3 0 1 0 0-6 3 3 0 0 0 0 6z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/telegram.svg b/themes/new_theme/layouts/partials/svg/telegram.svg new file mode 100644 index 0000000..c22ab56 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/telegram.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-telegram" width="24" height="24" viewBox="0 0 132 110"><path fill="#ddd" d="M50 103c-4 0-3-1-5-5L34 60l88-52"/><path fill="#aaa" d="M50 103c3 0 4-1 6-3l16-16-20-12"/><path fill="#fff" d="M52 72l48 36c6 3 10 2 11-5l20-93c2-8-3-11-8-9L7 45c-8 4-8 8-1 10l29 9 69-43c3-2 6-1 4 1"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/time.svg b/themes/new_theme/layouts/partials/svg/time.svg new file mode 100644 index 0000000..b6c6e96 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/time.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-time" width="16" height="14" viewBox="0 0 30 28"><path d="M15 0C7 0 1 6 1 14s6 14 14 14 14-6 14-14S23 0 15 0zm0 25C9 25 4 20 4 14S9 3 15 3s11 5 11 11-5 11-11 11zm1-18h-2v8.4l6.8 4.4L22 18l-6-3.8V7z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/svg/twitter.svg b/themes/new_theme/layouts/partials/svg/twitter.svg new file mode 100644 index 0000000..a78e073 --- /dev/null +++ b/themes/new_theme/layouts/partials/svg/twitter.svg @@ -0,0 +1 @@ +<svg class="{{ with .class }}{{ . }} {{ end }}icon icon-twitter" width="24" height="24" viewBox="0 0 384 312"><path d="m384 36.9c-14.1 6.3-29.3 10.5-45.2 12.4 16.3-9.7 28.8-25.2 34.6-43.6-15.2 9-32.1 15.6-50 19.1-14.4-15.2-34.9-24.8-57.5-24.8-43.5 0-78.8 35.3-78.8 78.8 0 6.2.7 12.2 2 17.9-65.5-3.3-123.5-34.6-162.4-82.3-6.7 11.6-10.6 25.2-10.6 39.6 0 27.3 13.9 51.4 35 65.6-12.9-.4-25.1-4-35.7-9.9v1c0 38.2 27.2 70 63.2 77.2-6.6 1.8-13.6 2.8-20.8 2.8-5.1 0-10-.5-14.8-1.4 10 31.3 39.1 54.1 73.6 54.7-27 21.1-60.9 33.7-97.8 33.7-6.4 0-12.6-.4-18.8-1.1 34.9 22.4 76.3 35.4 120.8 35.4 144.9 0 224.1-120 224.1-224.1 0-3.4-.1-6.8-.2-10.2 15.4-11.1 28.7-25 39.3-40.8z"/></svg>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/widgets/categories.html b/themes/new_theme/layouts/partials/widgets/categories.html index 7b93a4e..4998c44 100644 --- a/themes/new_theme/layouts/partials/widgets/categories.html +++ b/themes/new_theme/layouts/partials/widgets/categories.html @@ -1,16 +1,17 @@ -{{- if .Site.Params.widgets.categories }} -{{- if isset .Site.Taxonomies "categories" }} -{{- if not (eq (len .Site.Taxonomies.categories) 0) }} +{{- $categories := .Site.Taxonomies.categories }} +{{- if gt (len $categories) 0 }} <div class="widget-categories widget"> - <h4 class="widget__title">Categories</h4> + <h4 class="widget__title">{{ T "categories_title" }}</h4> <div class="widget__content"> <ul class="widget__list"> - {{- range $name, $items := .Site.Taxonomies.categories }} - <li class="widget__item"><a class="widget__link" href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}">{{ $name | title }}</a></li> + {{- range $name, $taxonomy := $categories }} + {{- with $.Site.GetPage (printf "/categories/%s" $name) }} + <li class="widget__item"> + <a class="widget__link" href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> {{- end }} + {{- end }} </ul> </div> </div> {{- end }} -{{- end }} -{{- end }} diff --git a/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html index 9fa5b34..2085966 100644 --- a/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html +++ b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html @@ -1,10 +1,8 @@ -{{- if .Site.Params.widgets.search }} <h4 class="widget__title">Search</h4> <div class="widget-search widget"> <form class="widget-search__form" role="search" method="get" action="/search/"> <label> - <span class="screen-reader-text">Search for:</span> - <input class="widget-search__field" type="search" autocomplete="off" placeholder="SEARCH..." value="" id="query" name="q"> + <input class="widget-search__field" type="search" autocomplete="off" placeholder="{{ T "search_placeholder" }}" value="" id="query" name="q" aria-label="{{ T "search_placeholder" }}"> </label> <input class="widget-search__submit" type="submit" value="Search"> </form> @@ -21,6 +19,3 @@ } ); </script> {{- end }} -{{- end }} - - diff --git a/themes/new_theme/layouts/partials/widgets/languages.html b/themes/new_theme/layouts/partials/widgets/languages.html new file mode 100644 index 0000000..e54adb1 --- /dev/null +++ b/themes/new_theme/layouts/partials/widgets/languages.html @@ -0,0 +1,20 @@ +{{- $translations := .Site.Home.AllTranslations }} +{{- if and .Site.IsMultiLingual (gt (len $translations) 0) }} +<div class="widget-languages widget"> + <h4 class="widget__title">{{ T "languages_title" }}</h4> + <div class="widget__content"> + <ul class="widget__list"> + {{- range $translations }} + <li class="widget__item"> + <a class="widget-languages__link widget__link" href="{{ .RelPermalink }}"> + <span class="widget-languages__link-btn widget__link-btn btn">{{ .Language | upper }}</span> + {{- with .Language.LanguageName }} + <span class="widget-languages__link-text widget__link-text">{{ . | title | humanize }}</span> + {{- end }} + </a> + </li> + {{- end }} + </ul> + </div> +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/widgets/recent.html b/themes/new_theme/layouts/partials/widgets/recent.html index 6aaee19..c264062 100644 --- a/themes/new_theme/layouts/partials/widgets/recent.html +++ b/themes/new_theme/layouts/partials/widgets/recent.html @@ -1,9 +1,12 @@ -{{- if .Site.Params.widgets.recent_articles }} +{{- $recent := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} +{{- $recent_num := (.Site.Params.widgets.recent_num | default 10) }} + +{{- if $recent }} <div class="widget-recent widget"> - <h4 class="widget__title">Recent Posts</h4> + <h4 class="widget__title">{{ T "recent_title" }}</h4> <div class="widget__content"> <ul class="widget__list"> - {{- range first 10 (where .Site.Pages "Section" "blog") }} + {{- range first $recent_num $recent }} <li class="widget__item"><a class="widget__link" href="{{ .RelPermalink }}">{{ .Title }}</a></li> {{- end }} </ul> diff --git a/themes/new_theme/layouts/partials/widgets/search.html b/themes/new_theme/layouts/partials/widgets/search.html new file mode 100644 index 0000000..d6b1652 --- /dev/null +++ b/themes/new_theme/layouts/partials/widgets/search.html @@ -0,0 +1,9 @@ +<div class="widget-search widget"> + <form class="widget-search__form" role="search" method="get" action="https://google.com/search"> + <label> + <input class="widget-search__field" type="search" placeholder="{{ T "search_placeholder" }}" value="" name="q" aria-label="{{ T "search_placeholder" }}"> + </label> + <input class="widget-search__submit" type="submit" value="Search"> + <input type="hidden" name="sitesearch" value="{{ .Site.BaseURL }}" /> + </form> +</div>
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/widgets/sidemenu.html b/themes/new_theme/layouts/partials/widgets/sidemenu.html new file mode 100644 index 0000000..2369233 --- /dev/null +++ b/themes/new_theme/layouts/partials/widgets/sidemenu.html @@ -0,0 +1,14 @@ +{{ if .Site.Menus.side }} +<div class="widget-sidemenu widget"> + <h4 class="widget__title">{{ T "sidemenu_title" }}</h4> + <nav class="widget__content"> + <ul class="widget__list"> + {{ range .Site.Menus.side }} + <li class="widget__item"> + <a class="widget__link" href="{{ .URL }}">{{ .Name }}</a> + </li> + {{ end }} + </ul> + </nav> +</div> +{{ end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/widgets/social.html b/themes/new_theme/layouts/partials/widgets/social.html new file mode 100644 index 0000000..7f8faa9 --- /dev/null +++ b/themes/new_theme/layouts/partials/widgets/social.html @@ -0,0 +1,90 @@ +{{- if .Site.Params.widgets.social }} +<div class="widget-social widget"> + <h4 class="widget-social__title widget__title">{{ T "social_title" }}</h4> + <div class="widget-social__content widget__content"> + {{- with .Site.Params.widgets.social.facebook }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Facebook" rel="noopener noreferrer" href="https://facebook.com/{{ . }}" target="_blank"> + {{ partial "svg/facebook.svg" (dict "class" "widget-social__link-icon") }} + <span>Facebook</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.twitter }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Twitter" rel="noopener noreferrer" href="https://twitter.com/{{ . }}" target="_blank"> + {{ partial "svg/twitter.svg" (dict "class" "widget-social__link-icon") }} + <span>Twitter</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.instagram }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Instagram" rel="noopener noreferrer" href="https://www.instagram.com/{{ . }}" target="_blank"> + {{ partial "svg/instagram.svg" (dict "class" "widget-social__link-icon") }} + <span>Instagram</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.linkedin }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="LinkedIn" rel="noopener noreferrer" href="https://linkedin.com/in/{{ . }}" target="_blank"> + {{ partial "svg/linkedin.svg" (dict "class" "widget-social__link-icon") }} + <span>LinkedIn</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.telegram }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Telegram" rel="noopener noreferrer" href="https://t.me/{{ . }}" target="_blank"> + {{ partial "svg/telegram.svg" (dict "class" "widget-social__link-icon") }} + <span>Telegram</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.github }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="GitHub" rel="noopener noreferrer" href="https://github.com/{{ . }}" target="_blank"> + {{ partial "svg/github.svg" (dict "class" "widget-social__link-icon") }} + <span>GitHub</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.gitlab }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="GitLab" rel="noopener noreferrer" href="https://gitlab.com/{{ . }}" target="_blank"> + {{ partial "svg/gitlab.svg" (dict "class" "widget-social__link-icon") }} + <span>GitLab</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.bitbucket }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Bitbucket" rel="noopener noreferrer" href="https://bitbucket.org/{{ . }}" target="_blank"> + {{ partial "svg/bitbucket.svg" (dict "class" "widget-social__link-icon") }} + <span>Bitbucket</span> + </a> + </div> + {{- end }} + {{- with .Site.Params.widgets.social.email }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="Email" href="mailto:{{ . }}"> + {{ partial "svg/email.svg" (dict "class" "widget-social__link-icon") }} + <span>{{ . }}</span> + </a> + </div> + {{- end }} + + {{ range .Site.Params.widgets.social.custom }} + <div class="widget-social__item widget__item"> + <a class="widget-social__link widget__link btn" title="{{ .title }}" rel="noopener noreferrer" href="{{ .url }}" target="_blank"> + {{- if .icon }} + {{ partial .icon (dict "class" "widget-social__link-icon") }} + {{- end }} + <span>{{ .title }}</span> + </a> + </div> + {{ end }} + </div> +</div> +{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/layouts/partials/widgets/taglist.html b/themes/new_theme/layouts/partials/widgets/taglist.html index 966205a..9b6046b 100644 --- a/themes/new_theme/layouts/partials/widgets/taglist.html +++ b/themes/new_theme/layouts/partials/widgets/taglist.html @@ -1,14 +1,15 @@ -{{- if .Site.Params.widgets.tags }} -{{- if isset .Site.Taxonomies "tags" }} -{{- if not (eq (len .Site.Taxonomies.tags) 0) }} +{{- $tags := .Site.Taxonomies.tags }} +{{- if gt (len $tags) 0 }} <div class="widget-taglist widget"> - <h4 class="widget__title">Tags</h4> + <h4 class="widget__title">{{ T "tags_title" }}</h4> <div class="widget__content"> - {{- range $name, $items := .Site.Taxonomies.tags }} - <a class="widget__link widget__link--taglist" href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}" title="{{ $name }}">{{ $name }}</a> + {{- range $name, $taxonomy := $tags }} + {{- with $.Site.GetPage (printf "/tags/%s" $name) }} + <a class="widget-taglist__link widget__link btn" href="{{ .RelPermalink }}" title="{{ .Title }}"> + {{- .Title -}}{{- if .Site.Params.widgets.tags_counter }} ({{ $taxonomy.Count }}){{ end -}} + </a> {{- end }} + {{- end }} </div> </div> {{- end }} -{{- end }} -{{- end }}
\ No newline at end of file diff --git a/themes/new_theme/static/apple-touch-icon.png b/themes/new_theme/static/apple-touch-icon.png Binary files differnew file mode 100644 index 0000000..441def4 --- /dev/null +++ b/themes/new_theme/static/apple-touch-icon.png diff --git a/themes/new_theme/static/favicon.ico b/themes/new_theme/static/favicon.ico Binary files differnew file mode 100644 index 0000000..b7a49cc --- /dev/null +++ b/themes/new_theme/static/favicon.ico diff --git a/themes/new_theme/static/img/avatar.png b/themes/new_theme/static/img/avatar.png Binary files differnew file mode 100644 index 0000000..8afac66 --- /dev/null +++ b/themes/new_theme/static/img/avatar.png diff --git a/themes/new_theme/static/img/placeholder.png b/themes/new_theme/static/img/placeholder.png Binary files differnew file mode 100644 index 0000000..a3d8535 --- /dev/null +++ b/themes/new_theme/static/img/placeholder.png diff --git a/themes/new_theme/static/js/menu.js b/themes/new_theme/static/js/menu.js new file mode 100644 index 0000000..16f1d37 --- /dev/null +++ b/themes/new_theme/static/js/menu.js @@ -0,0 +1,25 @@ +'use strict'; + +(function iifeMenu(document, window, undefined) { + var menuBtn = document.querySelector('.menu__btn'); + var menu = document.querySelector('.menu__list'); + + function toggleMenu() { + menu.classList.toggle('menu__list--active'); + menu.classList.toggle('menu__list--transition'); + this.classList.toggle('menu__btn--active'); + this.setAttribute( + 'aria-expanded', + this.getAttribute('aria-expanded') === 'true' ? 'false' : 'true' + ); + } + + function removeMenuTransition() { + this.classList.remove('menu__list--transition'); + } + + if (menuBtn && menu) { + menuBtn.addEventListener('click', toggleMenu, false); + menu.addEventListener('transitionend', removeMenuTransition, false); + } +}(document, window)); diff --git a/themes/new_theme/theme.toml b/themes/new_theme/theme.toml index 902f64e..1745675 100644 --- a/themes/new_theme/theme.toml +++ b/themes/new_theme/theme.toml @@ -1,18 +1,18 @@ name = "Mainroad" license = "GPLv2" -licenselink = "//github.com/vimux/mainroad/blob/master/LICENSE.md" +licenselink = "https://github.com/vimux/mainroad/blob/master/LICENSE.md" description = "Mainroad is a responsive, clean and content-focused Hugo theme." -homepage = "//github.com/vimux/mainroad/" -tags = ["blog", "responsive", "widgets", "rss", "disqus", "wordpress"] +homepage = "https://github.com/vimux/mainroad/" +tags = ["blog", "responsive", "customizable", "widgets", "rss", "disqus", "google analytics", "wordpress"] features = ["blog", "responsive", "widgets", "rss", "disqus", "wordpress"] -min_version = 0.17 +min_version = "0.48" [author] name = "Vimux" - homepage = "//github.com/vimux" + homepage = "https://github.com/vimux" # If porting an existing theme [original] name = "MH Magazine lite" - homepage = "//wordpress.org/themes/mh-magazine-lite/" - repo = "//themes.trac.wordpress.org/browser/mh-magazine-lite/2.5.6" + homepage = "https://wordpress.org/themes/mh-magazine-lite/" + repo = "https://themes.trac.wordpress.org/browser/mh-magazine-lite/2.5.6" |