Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge menge #6

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions assets/scss/_featured-posts.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.featured-title {
font-size: 1.5rem;
font-family: monospace;
font-size: 1.8rem;
font-family: "roozname";
margin: 0 auto;
@media (min-width: $screen-lg) {
width: 80%;
Expand Down Expand Up @@ -66,7 +66,7 @@
// }

& time {
font-family: monospace;
font-family: "roozname";
}

&:hover {
Expand Down Expand Up @@ -173,33 +173,33 @@
grid-area: first;
.featured-post__title {
font-weight: 700;
font-size: 1.5rem;
font-size: 1.8rem;
margin: 0 0 1rem 0;
}
.featured-post__description {
font-size: 1rem;
font-size: 1.3rem;
}
}
&:nth-child(2) {
grid-area: second;
.featured-post__title {
font-weight: 700;
font-size: 1rem;
font-size: 1.3rem;
margin: 0.5rem 0;
}
.featured-post__description {
font-size: 0.8rem;
font-size: 1rem;
}
}
&:nth-child(3) {
grid-area: third;
.featured-post__title {
font-weight: 700;
font-size: 1rem;
font-size: 1.3rem;
margin: 0.5rem 0;
}
.featured-post__description {
font-size: 0.8rem;
font-size: 1rem;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions assets/scss/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ footer {
@media (min-width: $screen-md) {

.social-link {
width: 1.5rem;
height: 1.5rem;
margin:0;
width: 2.5rem;
height: 2.5rem;
margin:0rem;
}
}
13 changes: 8 additions & 5 deletions assets/scss/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ header {
align-items: center;

&__title {
font-size: 2rem;
font-size: 2.8rem;
font-weight: bold;
margin-bottom: 0.5rem;
margin-bottom: 0.7rem;
&--nomargin {
margin-bottom: 0;
}
Expand All @@ -29,6 +29,7 @@ header {
flex-flow: row wrap;
justify-content: center;
align-items: center;
font-family: "roozname";

&--menu {
display: none;
Expand All @@ -54,6 +55,8 @@ header {
border: 1px solid var(--color-border-dark);
max-height: 30px;
cursor: pointer;
font-family: "roozname";
font-size: 1.3rem;
@media (min-width: $screen-lg) {
display: inline-block;
}
Expand Down Expand Up @@ -130,7 +133,7 @@ header {
}
}
&__title {
font-size: 2.5rem;
font-size: 0.1rem;
font-weight: 700;
& text {
animation: 2s stroke alternate;
Expand All @@ -152,7 +155,7 @@ header {
&__item {
opacity: 0;
transition: opacity 0.3s ease;
font-size: 2.5rem;
font-size: 2.8rem;
margin: 1rem auto;
text-align: center;
}
Expand All @@ -166,7 +169,7 @@ header {
display: inline-block;
-webkit-text-stroke: 1px var(--color-text);
color: transparent;
background: linear-gradient(90deg, var(--color-extra-2) 0%, var(--color-extra-2) 100%);
background: linear-gradient(90deg,#fc7979 0%,#fc7979 100%);
background-position: left;
background-size: 0%;
background-repeat: no-repeat;
Expand Down
9 changes: 5 additions & 4 deletions assets/scss/_li.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

&__date {
color: var(--color-text-2);
font-family: monospace;
font-family: "roozname";
}
&--left {
flex: 1 1 47%;
Expand All @@ -56,22 +56,23 @@
border: 1px solid var(--color-border);
overflow: hidden;
position: relative;
width: 70%;

& > img {
position:absolute;
left:0;
top:0;
right:0;
bottom:0;
width: 100%;
height: 100%;
width: 80%;
height: 80%;
object-fit: cover;
}
}

&__title {
line-height: 1.2;
font-size: 1.5rem;
font-size: 1.8rem;
font-weight: 600;
color: black;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/scss/_list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
.list {
&__title {
font-size: 2.1rem;
font-size: 2.3rem;
font-weight: bold;
}
}
8 changes: 8 additions & 0 deletions assets/scss/_main.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/scss/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
flex-flow: column nowrap;
}
&__list-item {
font-size: 1.25rem;
font-size: 1.5rem;
}
&__list-item:not(:last-of-type) {
margin-bottom: 0.5rem;
Expand Down
22 changes: 15 additions & 7 deletions assets/scss/_single.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
}
.post-content {
&--nopost {
font-size: 1.5rem;
font-size: 1.8rem;
text-align: center;
}
h1{
font-size: 2.2rem;
font-size: 2.3rem;
font-weight: bold;
padding-top: 2.5rem;
margin-bottom: 1.5rem;
}
h2 {
font-size: 1.8rem;
font-size: 2.2rem;
font-weight: bold;
padding-top: 2.5rem;
margin-bottom: 1.2rem;
Expand Down Expand Up @@ -57,21 +57,22 @@
p, code, blockquote, a, table, pre,ul,ol,li {
font-size: 1rem;
@media (min-width: $screen-sm) {
font-size: 1.1rem;
font-size: 0.8rem;
}
@media (min-width: $screen-lg) {
font-size: 1.125rem;
font-size: 1.1rem;
}
}
p {
margin: 1rem 0;
font-family: 'Vazirmatn', sans-serif;
color: var(--color-text-2);
}
blockquote {
margin-left: 1rem;
padding-left: 1rem;
border-left: 4px solid var(--color-border);
font-family: $monospace;
font-family: 'Vazirmatn', sans-serif;
}
code {
padding: 1px 3px;
Expand Down Expand Up @@ -184,7 +185,8 @@
}
}
cite {
font-family: $monospace;
font-family: "roozname";
font-size: 0.5rem;
}
sub {
vertical-align: sub;
Expand All @@ -204,6 +206,12 @@
border-radius: 2px;
border: 1px solid var(--color-border);
}

ital {
font-style: italic;

}

strong {
font-weight: bold;
}
Expand Down
25 changes: 24 additions & 1 deletion assets/scss/style.scss

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions exampleSite/content/post/rich-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ imagelink = "https://images.unsplash.com/photo-1587129980116-d44492ecc7bb?ixlib=
+++

Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.

H<sub>2</sub>O

X<sup>n</sup> + Y<sup>n</sup> = Z<sup>n</sup>

Press <kbd><kbd>CTRL</kbd>+<kbd>ALT</kbd>+<kbd>Delete</kbd></kbd> to end the session.

Most <mark>salamanders</mark> are nocturnal, and hunt for insects, worms, and other small creatures.
<!--more-->
---

Expand Down
Binary file added images/.DS_Store
Binary file not shown.
Binary file removed images/screenshot.png
Binary file not shown.
Binary file removed images/tn.png
Binary file not shown.
Binary file added layouts/.DS_Store
Binary file not shown.
7 changes: 3 additions & 4 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
{{define "main"}}
<div class="not-found">
<div class="not-found__left">
<h2 class="not-found__htext">404</h2>
<a href="/" class="not-found__home-button">home</a>
<h2 class="not-found__htext">خطای ۴۰۴</h2>
<a href="/about/" class="not-found__home-button">درباره قیچی</a>
</div>
<div class="not-found__right">
<h2 class="not-found__htext pl-sm">Latest Posts</h2>
<h2 class="not-found__htext pl-sm">آخرین مطالب</h2>
<ul class="not-found__posts">
{{range first 3 .Site.RegularPages}}
<li class="not-found__post">
<a href={{.Permalink}}>
<div class="not-found__title mb-xs">{{.Title}}</div>
<div class="mb-sm">
<time datetime={{.Date}}>{{.Date.Format "2006-01-02"}}</time>
</div>
<div>{{.Description}}</div>
</a>
Expand Down
1 change: 0 additions & 1 deletion layouts/_default/li.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<div class="post-item-flex">
<a class="{{if not (isset .Params "tags")}}no-tag{{end}} post-item__meta post-item--left" href="{{.Permalink}}">
<h2 class="post-item__title">{{.Title}}</h2>
<time class="post-item__date" datetime="{{.Date.Format "2006-01-02"}}">{{.Date.Format "2006-01-02"}}</time>
{{if isset .Params "description"}}
<div class="post-item__description">{{.Description}}</div>
{{end}}
Expand Down
21 changes: 21 additions & 0 deletions layouts/_default/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{define "header"}}
{{partial "post-header.html" .}}
{{end}}
{{define "main"}}
<article class="post">
{{if .Content}}
<div class="post-content">
{{ $content := .Content }}
{{ $content = replaceRE `<a href="(https?://.+)">` `<a href="$1" target="_blank">` $content | safeHTML }}
{{ $content = replaceRE `<a href="(mailto:.+)">` `<a href="$1" target="_blank">` $content | safeHTML }}
{{ $content | safeHTML }}
</div>
{{else}}
<div class="post-content--nopost">Author leaves no content for this post :( </div>
{{end}}
</article>
{{ partial "button" . }}
{{end}}
{{define "footer"}}
{{partial "post-footer" .}}
{{end}}
40 changes: 40 additions & 0 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = (where (where $pctx.RegularPages ".Section" "post") "Kind" "page") -}}
{{- else -}}
{{- $pages = (where (where $pctx.Pages ".Section" "post") "Kind" "page") -}}
{{- end -}}

{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{- with .OutputFormats.Get "RSS" -}}
{{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }}
{{- end -}}
{{ range $pages }}
<item>
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html }}</description>
</item>
{{ end }}
</channel>
</rss>
7 changes: 6 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@
{{define "main"}}
<article class="post">
{{if .Content}}
<div class="post-content">{{.Content}}</div>
<div class="post-content">
{{ $content := .Content }}
{{ $content = replaceRE `<a href="(https?://.+)">` `<a href="$1" target="_blank">` $content | safeHTML }}
{{ $content = replaceRE `<a href="(mailto:.+)">` `<a href="$1" target="_blank">` $content | safeHTML }}
{{ $content | safeHTML }}
</div>
{{else}}
<div class="post-content--nopost">Author leaves no content for this post :( </div>
{{end}}
Expand Down
Binary file added layouts/partials/.DS_Store
Binary file not shown.
12 changes: 11 additions & 1 deletion layouts/partials/button.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<button class="floating-button">
<a class="floating-button__link" href="{{.Site.BaseURL}}">
<span>home</span>

<span

target="_blank"
class="social-link"
title="logo link"
rel="noopener"
>
{{partial "svg/gheychi-logo.svg"}}
</span>
</a>

</button>
1 change: 0 additions & 1 deletion layouts/partials/featured.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<a href="{{.Permalink}}" class="featured-post__wrapper">
<h2 class="featured-post__title">{{.Title}}</h2>
<div class="featured-post__description">{{.Description}}</div>
<time datetime="{{.Date}}">{{.Date.Format "2006/02/01"}}</time>
</a>
<ul class="featured-post__tags">
{{ range .Params.tags }}
Expand Down
Loading