diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c19f746 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,46 @@ +name: Build Blog + +on: + push: + branches: + - main # Set a branch to deploy + +env: + IMAGE_REPO: ghcr.io/hotarublaze + IMAGE_NAME: fluttershub-blog + +jobs: + deploy: + runs-on: ubuntu-18.04 + # If running with act, Uncomment below + container: phaze9/action-runner + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: '0.83.1' + extended: true + + - name: Build + run: hugo --minify --destination build/ + + - name: Setup Docker + uses: docker/setup-buildx-action@v1 + + - name: Login to ghcr.io + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: HotaruBlaze + password: ${{ secrets.CR_PAT }} + + - name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + push: true + tags: ${{ env.IMAGE_REPO }}/${{ env.IMAGE_NAME }}:latest \ No newline at end of file diff --git a/docker/nginx.conf b/docker/nginx.conf new file mode 100644 index 0000000..abce9d4 --- /dev/null +++ b/docker/nginx.conf @@ -0,0 +1,26 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + + keepalive_timeout 65; + + include /etc/nginx/conf.d/*.conf; +} \ No newline at end of file diff --git a/docker/web.conf b/docker/web.conf new file mode 100644 index 0000000..666dbc1 --- /dev/null +++ b/docker/web.conf @@ -0,0 +1,8 @@ +server { + listen 80; + + location / { + root /usr/share/nginx/html; + index index.html; + } +} \ No newline at end of file diff --git a/src/archetypes/default.md b/src/archetypes/default.md new file mode 100644 index 0000000..00e77bd --- /dev/null +++ b/src/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/src/build.sh b/src/build.sh new file mode 100755 index 0000000..aa5b64c --- /dev/null +++ b/src/build.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rm -Rf public/ build/ +hugo --destination build/ \ No newline at end of file diff --git a/src/build/404.html b/src/build/404.html new file mode 100644 index 0000000..279353c --- /dev/null +++ b/src/build/404.html @@ -0,0 +1,71 @@ + + + + 404 Page not found // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

O + frown + +ps...

+

The link you followed may be broken, or the page may have been removed.

+ Go home + arrow-right + + +
+ +
+ + diff --git a/src/build/avatar.png b/src/build/avatar.png new file mode 100644 index 0000000..5849c2b Binary files /dev/null and b/src/build/avatar.png differ diff --git a/src/build/categories/index.html b/src/build/categories/index.html new file mode 100644 index 0000000..d13883f --- /dev/null +++ b/src/build/categories/index.html @@ -0,0 +1,68 @@ + + + + Categories // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ + +
+

Categories

+ +
+ + +
+ + diff --git a/src/build/categories/index.xml b/src/build/categories/index.xml new file mode 100644 index 0000000..fe9cc53 --- /dev/null +++ b/src/build/categories/index.xml @@ -0,0 +1,10 @@ + + + + Categories on Phoenix's Personal Blog + https://blog.fluttershub.com/categories/ + Recent content in Categories on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + + diff --git a/src/build/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css b/src/build/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css new file mode 100644 index 0000000..d22051c --- /dev/null +++ b/src/build/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css @@ -0,0 +1 @@ +*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8)}pre{font-size:1rem;line-height:1.2em;margin:0;overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{width:15rem;height:15rem}.app-container{padding:2.5rem}.app-header-social{font-size:2em;color:#fff}.app-header-social a{margin:0 .1em}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}@media(max-width:940px){h2{font-size:large}.app-container{padding:.5rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;vertical-align:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:block;padding:.285em .8em}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-content>pre,.post-content .highlight{margin:1em 0}.post-content>pre,.post-content .highlight>pre,.post-content .highlight>div{border-left:.4em solid rgba(87,204,138,.8);padding:.5em 1em}.post-content img{max-width:100%}.post-meta{font-size:.8em}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:block;font-size:.8em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{list-style:none;padding:.4em 0}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}}.gradient-border{margin:auto;--border-width:0.35rem;border-radius:.35rem;position:relative;display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-size:2.5rem;text-transform:uppercase;color:#fff;background:#222;border-radius:var(--border-width)}.gradient-border::after{position:absolute;content:"";top:calc(-1 * var(--border-width));left:calc(-1 * var(--border-width));z-index:-1;width:calc(100% + var(--border-width) * 2);height:calc(100% + var(--border-width) * 2);background:linear-gradient(60deg,#5f86f2,#a65ff2,#f25fd0,#f25f61,#f2cb5f,#abf25f,#5ff281,#5ff2f0);background-size:300% 300%;background-position:0;border-radius:calc(2 * var(--border-width));animation:moveGradient 4s alternate infinite}@keyframes moveGradient{50%{background-position:100%}}.gradient-border img{margin:auto;width:100%;border-radius:1.5%} \ No newline at end of file diff --git a/src/build/index.html b/src/build/index.html new file mode 100644 index 0000000..1e439dc --- /dev/null +++ b/src/build/index.html @@ -0,0 +1,90 @@ + + + + Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

Phoenix's Personal Blog

+ + + + + +
+ +
+ + diff --git a/src/build/index.xml b/src/build/index.xml new file mode 100644 index 0000000..d64ee92 --- /dev/null +++ b/src/build/index.xml @@ -0,0 +1,38 @@ + + + + Phoenix's Personal Blog + https://blog.fluttershub.com/ + Recent content on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn’t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Script + https://blog.fluttershub.com/posts/windows10-kvm/macvlan/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan/ + #!/bin/sh # Last Edited: 2020-05-18 # From: https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ # Let host and guests talk to each other over macvlan. # Configures a macvlan interface on the hypervisor. # Run this on the hypervisor (e.g. in /etc/rc.local) # Made for IPv4; need modification for IPv6. # Meant for a simple network setup with only eth0, # and a static (manual) ip config. # Evert Mouw, 2013. Slightly modified in 2020. HWLINK=enp34s0 MACVLN=macvlan0 TESTHOST=www. + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Service + https://blog.fluttershub.com/posts/windows10-kvm/macvlan-service/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan-service/ + # /etc/systemd/system/macvlan.service [Unit] Description=MACVLAN bridge to share a physical network interface with KVM/QEMU hosts. Documentation=https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ After=network-online.target Wants=network-online.target Before=libvirt-guests.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/home/phoenix/macvlan/macvlan.sh [Install] WantedBy=multi-user.target + + + + diff --git a/src/build/page/1/index.html b/src/build/page/1/index.html new file mode 100644 index 0000000..17a4c6a --- /dev/null +++ b/src/build/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/ \ No newline at end of file diff --git a/src/build/posts/index.html b/src/build/posts/index.html new file mode 100644 index 0000000..dff610c --- /dev/null +++ b/src/build/posts/index.html @@ -0,0 +1,90 @@ + + + + Posts // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

Posts

+ + + + + +
+ +
+ + diff --git a/src/build/posts/index.xml b/src/build/posts/index.xml new file mode 100644 index 0000000..0a6a62d --- /dev/null +++ b/src/build/posts/index.xml @@ -0,0 +1,38 @@ + + + + Posts on Phoenix's Personal Blog + https://blog.fluttershub.com/posts/ + Recent content in Posts on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn’t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Script + https://blog.fluttershub.com/posts/windows10-kvm/macvlan/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan/ + #!/bin/sh # Last Edited: 2020-05-18 # From: https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ # Let host and guests talk to each other over macvlan. # Configures a macvlan interface on the hypervisor. # Run this on the hypervisor (e.g. in /etc/rc.local) # Made for IPv4; need modification for IPv6. # Meant for a simple network setup with only eth0, # and a static (manual) ip config. # Evert Mouw, 2013. Slightly modified in 2020. HWLINK=enp34s0 MACVLN=macvlan0 TESTHOST=www. + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Service + https://blog.fluttershub.com/posts/windows10-kvm/macvlan-service/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan-service/ + # /etc/systemd/system/macvlan.service [Unit] Description=MACVLAN bridge to share a physical network interface with KVM/QEMU hosts. Documentation=https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ After=network-online.target Wants=network-online.target Before=libvirt-guests.service [Service] Type=oneshot RemainAfterExit=yes ExecStart=/home/phoenix/macvlan/macvlan.sh [Install] WantedBy=multi-user.target + + + + diff --git a/src/build/posts/page/1/index.html b/src/build/posts/page/1/index.html new file mode 100644 index 0000000..a1dac0d --- /dev/null +++ b/src/build/posts/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/posts/ \ No newline at end of file diff --git a/src/build/posts/windows10-kvm/images/hardware-overview.png b/src/build/posts/windows10-kvm/images/hardware-overview.png new file mode 100644 index 0000000..00e3043 Binary files /dev/null and b/src/build/posts/windows10-kvm/images/hardware-overview.png differ diff --git a/src/build/posts/windows10-kvm/images/network.png b/src/build/posts/windows10-kvm/images/network.png new file mode 100644 index 0000000..74fc847 Binary files /dev/null and b/src/build/posts/windows10-kvm/images/network.png differ diff --git a/src/build/posts/windows10-kvm/index.html b/src/build/posts/windows10-kvm/index.html new file mode 100644 index 0000000..777ca9e --- /dev/null +++ b/src/build/posts/windows10-kvm/index.html @@ -0,0 +1,176 @@ + + + + Windows 10 KVM Single-GPU Passthrough // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+
+

Windows 10 KVM Single-GPU Passthrough

+ +
+
+

Note: This is here as notes and shouldn’t be taken as a direct guide.

+

Table of Contents

+ + +
+

Host Specs

+
CPU: AMD Ryzen 5 3600  
+GPU: NVIDIA GeForce GTX 1060 6GB  
+Motherboard: MSI B450 Tomahawk Max  
+OS: Garuda Linux: Spotted-Eagle
+Kernel: 5.12.3-zen1-1-zen  
+Memory: 16GB  
+

Final VM Configuration

+
CPU: 4 Cores, 8 Threads
+GPU: NVIDIA GeForce GTX 1060 6GB  
+Memory: 10GB
+Chipset: Q35
+Firmware: OVMF
+PCI Passthrough: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller
+PCI Passthrough: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
+

Extra Kernal Arguements

+
video:vesafb=off video:efifb=off amd_iommu=on iommu=pt iommu=1 pcie_acs_override=downstream,multifunction
+

Nvidia GPU VFIO patch (This is required on 10XX Series)

+

Original bios downloaded from: https://www.techpowerup.com/vgabios/
+NVIDIA vBIOS VFIO Patcher +

git clone https://github.com/Matoking/NVIDIA-vBIOS-VFIO-Patcher
+cd NVIDIA-vBIOS-VFIO-Patcher
+python nvidia_vbios_vfio_patcher.py -i /home/phoenix/download/gtx1060.rom -o ./gtx1060-patched.rom
+cp ./gtx1060-patched.rom /usr/share/vgabios/gtx1060-patched.rom

+

Make sure Bar is toggled, Pass the file for the rom, and the second address contains multifunction=‘on’

+
<hostdev mode='subsystem' type='pci' managed='yes'>
+  <source>
+    <address domain='0x0000' bus='0x26' slot='0x00' function='0x0'/>
+  </source>
+  <rom bar='on' file='/usr/share/vgabios/gtx1060-patched.rom'/>
+  <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/>
+</hostdev>
+

VM Networking

+

Scripts
+macvlan.sh
+macvlan.service

+

Virt-Manager Settings
+Virt-Manager-Networking

+

CPU Settings

+

<cputune>
+  <vcpupin vcpu='0' cpuset='2'/>
+  <vcpupin vcpu='1' cpuset='8'/>
+  <vcpupin vcpu='2' cpuset='3'/>
+  <vcpupin vcpu='3' cpuset='9'/>
+  <vcpupin vcpu='4' cpuset='4'/>
+  <vcpupin vcpu='5' cpuset='10'/>
+  <vcpupin vcpu='6' cpuset='5'/>
+  <vcpupin vcpu='7' cpuset='11'/>
+  <emulatorpin cpuset='0-1,6-7'/>
+</cputune>
+
  <cpu mode='host-passthrough' check='none' migratable='off'>
+    <topology sockets='1' dies='1' cores='4' threads='2'/>
+    <cache mode='passthrough'/>
+    <feature policy='require' name='topoext'/>
+  </cpu>

+

Sata Passthrough

+
<disk type='block' device='disk'>
+  <driver name='qemu' type='raw' cache='none' io='native' discard='unmap'/>
+  <source dev='/dev/disk/by-id/ata-....'/>
+  <target dev='sda' bus='sata'/>
+  <boot order='1'/>
+  <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+</disk>
+

Virt-Manager Hardware Overview

+

Virt-Manager-Overview

+ +
+ +
+ +
+ + diff --git a/src/build/posts/windows10-kvm/macvlan-service/index.html b/src/build/posts/windows10-kvm/macvlan-service/index.html new file mode 100644 index 0000000..4fcd3b9 --- /dev/null +++ b/src/build/posts/windows10-kvm/macvlan-service/index.html @@ -0,0 +1,99 @@ + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Service // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+
+

Windows 10 KVM Single-GPU Passthrough - macvlan Service

+ +
+
+
# /etc/systemd/system/macvlan.service
+ 
+[Unit]
+Description=MACVLAN bridge to share a physical network interface with KVM/QEMU hosts.
+Documentation=https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/
+After=network-online.target
+Wants=network-online.target
+Before=libvirt-guests.service
+ 
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/home/phoenix/macvlan/macvlan.sh
+ 
+[Install]
+WantedBy=multi-user.target
+ +
+ +
+ +
+ + diff --git a/src/build/posts/windows10-kvm/macvlan/index.html b/src/build/posts/windows10-kvm/macvlan/index.html new file mode 100644 index 0000000..c0f47d9 --- /dev/null +++ b/src/build/posts/windows10-kvm/macvlan/index.html @@ -0,0 +1,147 @@ + + + + Windows 10 KVM Single-GPU Passthrough - macvlan Script // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+
+

Windows 10 KVM Single-GPU Passthrough - macvlan Script

+ +
+
+
#!/bin/sh
+# Last Edited: 2020-05-18
+# From: https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/
+  
+# Let host and guests talk to each other over macvlan.
+# Configures a macvlan interface on the hypervisor.
+# Run this on the hypervisor (e.g. in /etc/rc.local)
+# Made for IPv4; need modification for IPv6.
+# Meant for a simple network setup with only eth0,
+# and a static (manual) ip config.
+# Evert Mouw, 2013. Slightly modified in 2020.
+ 
+HWLINK=enp34s0
+MACVLN=macvlan0
+TESTHOST=www.google.com
+ 
+# ------------
+# test if interface already exists
+# ------------
+if ip link show | grep "$MACVLN@$HWLINK" > /dev/null
+then
+	echo "Link $MACVLN already exists on $HWLINK."
+	exit
+fi
+ 
+# ------------
+# wait for network availability
+# ------------
+ 
+while ! ping -q -c 1 $TESTHOST > /dev/null
+do
+	echo "$0: Cannot ping $TESTHOST, waiting another 5 seconds."
+	sleep 5
+done
+ 
+# ------------
+# get network config
+# ------------
+ 
+IP=$(ip address show dev $HWLINK | grep "inet " | awk '{print $2}')
+NETWORK=$(ip -o route | grep $HWLINK | grep -v default | awk '{print $1}')
+GATEWAY=$(ip -o route | grep default | awk '{print $3}')
+ 
+# ------------
+# setting up $MACVLN interface
+# ------------
+ 
+ip link add $MACVLN link $HWLINK type macvlan mode bridge
+ip address add $IP dev $MACVLN
+ip link set dev $MACVLN up
+ 
+# ------------
+# routing table
+# ------------
+ 
+# empty routes
+ip route flush dev $HWLINK
+ip route flush dev $MACVLN
+ 
+# add routes
+ip route add $NETWORK dev $MACVLN metric 0
+ 
+# add the default gateway
+ip route add default via $GATEWAY
+ +
+ +
+ +
+ + diff --git a/src/build/sitemap.xml b/src/build/sitemap.xml new file mode 100644 index 0000000..52b8422 --- /dev/null +++ b/src/build/sitemap.xml @@ -0,0 +1,37 @@ + + + + https://blog.fluttershub.com/tags/kvm/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/tags/linux/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/posts/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/tags/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/tags/virtualization/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/tags/windows/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/posts/windows10-kvm/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/posts/windows10-kvm/macvlan-service/ + 2020-05-18T00:00:00+00:00 + + https://blog.fluttershub.com/categories/ + + diff --git a/src/build/tags/index.html b/src/build/tags/index.html new file mode 100644 index 0000000..d076864 --- /dev/null +++ b/src/build/tags/index.html @@ -0,0 +1,112 @@ + + + + Tags // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ + +
+

Tags

+ +
+ + +
+ + diff --git a/src/build/tags/index.xml b/src/build/tags/index.xml new file mode 100644 index 0000000..f50f3b6 --- /dev/null +++ b/src/build/tags/index.xml @@ -0,0 +1,47 @@ + + + + Tags on Phoenix's Personal Blog + https://blog.fluttershub.com/tags/ + Recent content in Tags on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + kvm + https://blog.fluttershub.com/tags/kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/tags/kvm/ + + + + + linux + https://blog.fluttershub.com/tags/linux/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/tags/linux/ + + + + + virtualization + https://blog.fluttershub.com/tags/virtualization/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/tags/virtualization/ + + + + + windows + https://blog.fluttershub.com/tags/windows/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/tags/windows/ + + + + + diff --git a/src/build/tags/kvm/index.html b/src/build/tags/kvm/index.html new file mode 100644 index 0000000..0ecdda2 --- /dev/null +++ b/src/build/tags/kvm/index.html @@ -0,0 +1,84 @@ + + + + kvm // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

kvm

+ + + + + +
+ +
+ + diff --git a/src/build/tags/kvm/index.xml b/src/build/tags/kvm/index.xml new file mode 100644 index 0000000..5519a66 --- /dev/null +++ b/src/build/tags/kvm/index.xml @@ -0,0 +1,20 @@ + + + + kvm on Phoenix's Personal Blog + https://blog.fluttershub.com/tags/kvm/ + Recent content in kvm on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn&rsquo;t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + diff --git a/src/build/tags/kvm/page/1/index.html b/src/build/tags/kvm/page/1/index.html new file mode 100644 index 0000000..916624a --- /dev/null +++ b/src/build/tags/kvm/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/tags/kvm/ \ No newline at end of file diff --git a/src/build/tags/linux/index.html b/src/build/tags/linux/index.html new file mode 100644 index 0000000..bceba3a --- /dev/null +++ b/src/build/tags/linux/index.html @@ -0,0 +1,84 @@ + + + + linux // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

linux

+ + + + + +
+ +
+ + diff --git a/src/build/tags/linux/index.xml b/src/build/tags/linux/index.xml new file mode 100644 index 0000000..d4f88e2 --- /dev/null +++ b/src/build/tags/linux/index.xml @@ -0,0 +1,20 @@ + + + + linux on Phoenix's Personal Blog + https://blog.fluttershub.com/tags/linux/ + Recent content in linux on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn&rsquo;t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + diff --git a/src/build/tags/linux/page/1/index.html b/src/build/tags/linux/page/1/index.html new file mode 100644 index 0000000..c642baa --- /dev/null +++ b/src/build/tags/linux/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/tags/linux/ \ No newline at end of file diff --git a/src/build/tags/virtualization/index.html b/src/build/tags/virtualization/index.html new file mode 100644 index 0000000..6fc27d5 --- /dev/null +++ b/src/build/tags/virtualization/index.html @@ -0,0 +1,84 @@ + + + + virtualization // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

virtualization

+ + + + + +
+ +
+ + diff --git a/src/build/tags/virtualization/index.xml b/src/build/tags/virtualization/index.xml new file mode 100644 index 0000000..a53a457 --- /dev/null +++ b/src/build/tags/virtualization/index.xml @@ -0,0 +1,20 @@ + + + + virtualization on Phoenix's Personal Blog + https://blog.fluttershub.com/tags/virtualization/ + Recent content in virtualization on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn&rsquo;t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + diff --git a/src/build/tags/virtualization/page/1/index.html b/src/build/tags/virtualization/page/1/index.html new file mode 100644 index 0000000..9332175 --- /dev/null +++ b/src/build/tags/virtualization/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/tags/virtualization/ \ No newline at end of file diff --git a/src/build/tags/windows/index.html b/src/build/tags/windows/index.html new file mode 100644 index 0000000..5f775cc --- /dev/null +++ b/src/build/tags/windows/index.html @@ -0,0 +1,84 @@ + + + + windows // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+
+ + + + Github + + + + + + + Twitter + + + + +
+
+
+ +
+

windows

+ + + + + +
+ +
+ + diff --git a/src/build/tags/windows/index.xml b/src/build/tags/windows/index.xml new file mode 100644 index 0000000..e1dcce1 --- /dev/null +++ b/src/build/tags/windows/index.xml @@ -0,0 +1,20 @@ + + + + windows on Phoenix's Personal Blog + https://blog.fluttershub.com/tags/windows/ + Recent content in windows on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Windows 10 KVM Single-GPU Passthrough + https://blog.fluttershub.com/posts/windows10-kvm/ + Mon, 18 May 2020 00:00:00 +0000 + + https://blog.fluttershub.com/posts/windows10-kvm/ + Note: This is here as notes and shouldn&rsquo;t be taken as a direct guide. Table of Contents Host Specs Final VM Configuration Extra Kernal Arguements Nvidia GPU VFIO patch (This is required on 10XX Series) VM Networking CPU Settings Sata Passthrough Virt-Manager Hardware Overview Host Specs CPU: AMD Ryzen 5 3600 GPU: NVIDIA GeForce GTX 1060 6GB Motherboard: MSI B450 Tomahawk Max OS: Garuda Linux: Spotted-Eagle Kernel: 5. + + + + diff --git a/src/build/tags/windows/page/1/index.html b/src/build/tags/windows/page/1/index.html new file mode 100644 index 0000000..d518224 --- /dev/null +++ b/src/build/tags/windows/page/1/index.html @@ -0,0 +1 @@ +https://blog.fluttershub.com/tags/windows/ \ No newline at end of file diff --git a/src/config.toml b/src/config.toml new file mode 100644 index 0000000..2ad08ae --- /dev/null +++ b/src/config.toml @@ -0,0 +1,63 @@ +baseURL = "https://blog.fluttershub.com/" +theme = "m10c" +languageCode = "en-us" +title = "Phoenix's Personal Blog" +homepage = "https://fluttershub.com" +tags = ["blog","personal","coding"] + + +[menu] + [[menu.main]] + identifier = "home" + name = "Home" + url = "/" + weight = 1 + [[menu.main]] + identifier = "tags" + name = "Tags" + url = "/tags/" + weight = 2 + # [[menu.main]] + # identifier = "about" + # name = "About Me" + # url = "/about/" + # weight = 3 + +[params] + author = "Phoenix" + description="Land of random projects i do." + menu_item_separator = " | " + noreadingtime = true + [[params.social]] + icon = "github" + name = "Github" + url = "https://github.com/HotaruBlaze" + [[params.social]] + icon = "twitter" + name = "Twitter" + url = "https://twitter.com/hotarublaze" + # [style] + # darkestColor = "#d35050" + # darkColor = "#212121" + # lightColor = "#f5e3e0" + # lightestColor = "#f5f5f5" + # primaryColor = "#e12f" + +[markup] + [markup.highlight] + anchorLineNos = false + codeFences = true + guessSyntax = false + hl_Lines = "" + lineAnchors = "" + lineNoStart = 1 + lineNos = false + lineNumbersInTable = true + noClasses = true + style = "dracula" + tabWidth = 1 + + [markup.tableOfContents] + endLevel = 3 + ordered = false + startLevel = 3 \ No newline at end of file diff --git a/src/content/posts/windows10-kvm.md b/src/content/posts/windows10-kvm.md new file mode 100644 index 0000000..3d7b03e --- /dev/null +++ b/src/content/posts/windows10-kvm.md @@ -0,0 +1,102 @@ ++++ +title = "Windows 10 KVM Single-GPU Passthrough" +tags = ["virtualization","kvm","windows","linux"] +date = "2020-05-18" ++++ +## Note: This is here as notes and shouldn't be taken as a direct guide. + +# Table of Contents +{{< table_of_contents >}} + +--- +### Host Specs +{{< highlight txt >}} +CPU: AMD Ryzen 5 3600 +GPU: NVIDIA GeForce GTX 1060 6GB +Motherboard: MSI B450 Tomahawk Max +OS: Garuda Linux: Spotted-Eagle +Kernel: 5.12.3-zen1-1-zen +Memory: 16GB +{{< /highlight >}} + +### Final VM Configuration +{{< highlight txt >}} +CPU: 4 Cores, 8 Threads +GPU: NVIDIA GeForce GTX 1060 6GB +Memory: 10GB +Chipset: Q35 +Firmware: OVMF +PCI Passthrough: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller +PCI Passthrough: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller +{{< /highlight >}} + +### Extra Kernal Arguements +{{< highlight txt >}} +video:vesafb=off video:efifb=off amd_iommu=on iommu=pt iommu=1 pcie_acs_override=downstream,multifunction +{{< /highlight >}} + +### Nvidia GPU VFIO patch (This is required on 10XX Series) +Original bios downloaded from: https://www.techpowerup.com/vgabios/ +[NVIDIA vBIOS VFIO Patcher](https://github.com/Matoking/NVIDIA-vBIOS-VFIO-Patcher) +{{< highlight bash >}} +git clone https://github.com/Matoking/NVIDIA-vBIOS-VFIO-Patcher +cd NVIDIA-vBIOS-VFIO-Patcher +python nvidia_vbios_vfio_patcher.py -i /home/phoenix/download/gtx1060.rom -o ./gtx1060-patched.rom +cp ./gtx1060-patched.rom /usr/share/vgabios/gtx1060-patched.rom +{{< /highlight >}} + +#### Make sure Bar is toggled, Pass the file for the rom, and the second address contains multifunction='on' +{{< highlight xml >}} + + +
+ + +
+ +{{< /highlight >}} + +### VM Networking +**Scripts** +[macvlan.sh](/posts/windows10-kvm/macvlan/) +[macvlan.service](/posts/windows10-kvm/macvlan-service/) + +**Virt-Manager Settings** +![Virt-Manager-Networking](/posts/windows10-kvm/images/network.png) + +### CPU Settings +{{< highlight xml >}} + + + + + + + + + + + +{{< /highlight >}} +{{< highlight xml >}} + + + + + +{{< /highlight >}} + +### Sata Passthrough + +{{< highlight xml >}} + + + + + +
+ +{{< /highlight >}} + +### Virt-Manager Hardware Overview +![Virt-Manager-Overview](/posts/windows10-kvm/images/hardware-overview.png) diff --git a/src/content/posts/windows10-kvm/images/hardware-overview.png b/src/content/posts/windows10-kvm/images/hardware-overview.png new file mode 100644 index 0000000..00e3043 Binary files /dev/null and b/src/content/posts/windows10-kvm/images/hardware-overview.png differ diff --git a/src/content/posts/windows10-kvm/images/network.png b/src/content/posts/windows10-kvm/images/network.png new file mode 100644 index 0000000..74fc847 Binary files /dev/null and b/src/content/posts/windows10-kvm/images/network.png differ diff --git a/src/content/posts/windows10-kvm/macvlan-service.md b/src/content/posts/windows10-kvm/macvlan-service.md new file mode 100644 index 0000000..9410bdb --- /dev/null +++ b/src/content/posts/windows10-kvm/macvlan-service.md @@ -0,0 +1,24 @@ ++++ +title = "Windows 10 KVM Single-GPU Passthrough - macvlan Service" +date = "2020-05-18" +hidden = true ++++ + +{{< highlight bash >}} +# /etc/systemd/system/macvlan.service + +[Unit] +Description=MACVLAN bridge to share a physical network interface with KVM/QEMU hosts. +Documentation=https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ +After=network-online.target +Wants=network-online.target +Before=libvirt-guests.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/home/phoenix/macvlan/macvlan.sh + +[Install] +WantedBy=multi-user.target +{{< /highlight >}} \ No newline at end of file diff --git a/src/content/posts/windows10-kvm/macvlan.md b/src/content/posts/windows10-kvm/macvlan.md new file mode 100644 index 0000000..b8a6ed0 --- /dev/null +++ b/src/content/posts/windows10-kvm/macvlan.md @@ -0,0 +1,72 @@ ++++ +title = "Windows 10 KVM Single-GPU Passthrough - macvlan Script" +date = "2020-05-18" +hidden = true ++++ + +{{< highlight bash >}} +#!/bin/sh +# Last Edited: 2020-05-18 +# From: https://www.furorteutonicus.eu/2013/08/04/enabling-host-guest-networking-with-kvm-macvlan-and-macvtap/ + +# Let host and guests talk to each other over macvlan. +# Configures a macvlan interface on the hypervisor. +# Run this on the hypervisor (e.g. in /etc/rc.local) +# Made for IPv4; need modification for IPv6. +# Meant for a simple network setup with only eth0, +# and a static (manual) ip config. +# Evert Mouw, 2013. Slightly modified in 2020. + +HWLINK=enp34s0 +MACVLN=macvlan0 +TESTHOST=www.google.com + +# ------------ +# test if interface already exists +# ------------ +if ip link show | grep "$MACVLN@$HWLINK" > /dev/null +then + echo "Link $MACVLN already exists on $HWLINK." + exit +fi + +# ------------ +# wait for network availability +# ------------ + +while ! ping -q -c 1 $TESTHOST > /dev/null +do + echo "$0: Cannot ping $TESTHOST, waiting another 5 seconds." + sleep 5 +done + +# ------------ +# get network config +# ------------ + +IP=$(ip address show dev $HWLINK | grep "inet " | awk '{print $2}') +NETWORK=$(ip -o route | grep $HWLINK | grep -v default | awk '{print $1}') +GATEWAY=$(ip -o route | grep default | awk '{print $3}') + +# ------------ +# setting up $MACVLN interface +# ------------ + +ip link add $MACVLN link $HWLINK type macvlan mode bridge +ip address add $IP dev $MACVLN +ip link set dev $MACVLN up + +# ------------ +# routing table +# ------------ + +# empty routes +ip route flush dev $HWLINK +ip route flush dev $MACVLN + +# add routes +ip route add $NETWORK dev $MACVLN metric 0 + +# add the default gateway +ip route add default via $GATEWAY +{{< /highlight >}} \ No newline at end of file diff --git a/src/isableFastRender/404.html b/src/isableFastRender/404.html new file mode 100644 index 0000000..dffa4c6 --- /dev/null +++ b/src/isableFastRender/404.html @@ -0,0 +1,71 @@ + + + + 404 Page not found // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

O + frown + +ps...

+

The link you followed may be broken, or the page may have been removed.

+ Go home + arrow-right + + +
+ +
+ + diff --git a/src/isableFastRender/avatar.jpg b/src/isableFastRender/avatar.jpg new file mode 100644 index 0000000..dad9e72 Binary files /dev/null and b/src/isableFastRender/avatar.jpg differ diff --git a/src/isableFastRender/avatar.png b/src/isableFastRender/avatar.png new file mode 100644 index 0000000..5849c2b Binary files /dev/null and b/src/isableFastRender/avatar.png differ diff --git a/src/isableFastRender/categories/index.html b/src/isableFastRender/categories/index.html new file mode 100644 index 0000000..87525ec --- /dev/null +++ b/src/isableFastRender/categories/index.html @@ -0,0 +1,66 @@ + + + + Categories // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

Categories

+
    + +
+
+ +
+ + diff --git a/src/isableFastRender/categories/index.xml b/src/isableFastRender/categories/index.xml new file mode 100644 index 0000000..e9d666b --- /dev/null +++ b/src/isableFastRender/categories/index.xml @@ -0,0 +1,10 @@ + + + + Categories on Phoenix's Personal Blog + http://localhost:1313/categories/ + Recent content in Categories on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + + diff --git a/src/isableFastRender/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css b/src/isableFastRender/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css new file mode 100644 index 0000000..d22051c --- /dev/null +++ b/src/isableFastRender/css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css @@ -0,0 +1 @@ +*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8)}pre{font-size:1rem;line-height:1.2em;margin:0;overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{width:15rem;height:15rem}.app-container{padding:2.5rem}.app-header-social{font-size:2em;color:#fff}.app-header-social a{margin:0 .1em}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}@media(max-width:940px){h2{font-size:large}.app-container{padding:.5rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;vertical-align:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:block;padding:.285em .8em}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-content>pre,.post-content .highlight{margin:1em 0}.post-content>pre,.post-content .highlight>pre,.post-content .highlight>div{border-left:.4em solid rgba(87,204,138,.8);padding:.5em 1em}.post-content img{max-width:100%}.post-meta{font-size:.8em}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:block;font-size:.8em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{list-style:none;padding:.4em 0}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}}.gradient-border{margin:auto;--border-width:0.35rem;border-radius:.35rem;position:relative;display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-size:2.5rem;text-transform:uppercase;color:#fff;background:#222;border-radius:var(--border-width)}.gradient-border::after{position:absolute;content:"";top:calc(-1 * var(--border-width));left:calc(-1 * var(--border-width));z-index:-1;width:calc(100% + var(--border-width) * 2);height:calc(100% + var(--border-width) * 2);background:linear-gradient(60deg,#5f86f2,#a65ff2,#f25fd0,#f25f61,#f2cb5f,#abf25f,#5ff281,#5ff2f0);background-size:300% 300%;background-position:0;border-radius:calc(2 * var(--border-width));animation:moveGradient 4s alternate infinite}@keyframes moveGradient{50%{background-position:100%}}.gradient-border img{margin:auto;width:100%;border-radius:1.5%} \ No newline at end of file diff --git a/src/isableFastRender/index.html b/src/isableFastRender/index.html new file mode 100644 index 0000000..51b90ca --- /dev/null +++ b/src/isableFastRender/index.html @@ -0,0 +1,87 @@ + + + + Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

Phoenix's Personal Blog

+
    + +
  • + Test Post + + + calendar + + + May 18, 2020 + - + + clock + + + 1 min read + +
  • + +
+ + + + +
+ +
+ + diff --git a/src/isableFastRender/index.xml b/src/isableFastRender/index.xml new file mode 100644 index 0000000..e3c522d --- /dev/null +++ b/src/isableFastRender/index.xml @@ -0,0 +1,20 @@ + + + + Phoenix's Personal Blog + http://localhost:1313/ + Recent content on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Test Post + http://localhost:1313/posts/test/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/posts/test/ + This is a test HTML &lt;section id=&#34;main&#34;&gt; &lt;div&gt; &lt;h1 id=&#34;title&#34;&gt;{{ .Title }}&lt;/h1&gt; {{ range .Pages }} {{ .Render &#34;summary&#34;}} {{ end }} &lt;/div&gt; &lt;/section&gt; Golang package main import &#34;fmt&#34; func main() { fmt.Println(&#34;hello world&#34;) } + + + + diff --git a/src/isableFastRender/page/1/index.html b/src/isableFastRender/page/1/index.html new file mode 100644 index 0000000..fca5035 --- /dev/null +++ b/src/isableFastRender/page/1/index.html @@ -0,0 +1 @@ +http://localhost:1313/ \ No newline at end of file diff --git a/src/isableFastRender/posts/index.html b/src/isableFastRender/posts/index.html new file mode 100644 index 0000000..e9c9302 --- /dev/null +++ b/src/isableFastRender/posts/index.html @@ -0,0 +1,87 @@ + + + + Posts // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

Posts

+
    + +
  • + Test Post + + + calendar + + + May 18, 2020 + - + + clock + + + 1 min read + +
  • + +
+ + + + +
+ +
+ + diff --git a/src/isableFastRender/posts/index.xml b/src/isableFastRender/posts/index.xml new file mode 100644 index 0000000..9381d63 --- /dev/null +++ b/src/isableFastRender/posts/index.xml @@ -0,0 +1,20 @@ + + + + Posts on Phoenix's Personal Blog + http://localhost:1313/posts/ + Recent content in Posts on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Test Post + http://localhost:1313/posts/test/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/posts/test/ + This is a test HTML &lt;section id=&#34;main&#34;&gt; &lt;div&gt; &lt;h1 id=&#34;title&#34;&gt;{{ .Title }}&lt;/h1&gt; {{ range .Pages }} {{ .Render &#34;summary&#34;}} {{ end }} &lt;/div&gt; &lt;/section&gt; Golang package main import &#34;fmt&#34; func main() { fmt.Println(&#34;hello world&#34;) } + + + + diff --git a/src/isableFastRender/posts/page/1/index.html b/src/isableFastRender/posts/page/1/index.html new file mode 100644 index 0000000..0d976eb --- /dev/null +++ b/src/isableFastRender/posts/page/1/index.html @@ -0,0 +1 @@ +http://localhost:1313/posts/ \ No newline at end of file diff --git a/src/isableFastRender/posts/test/index.html b/src/isableFastRender/posts/test/index.html new file mode 100644 index 0000000..4830a02 --- /dev/null +++ b/src/isableFastRender/posts/test/index.html @@ -0,0 +1,116 @@ + + + + Test Post // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+
+

Test Post

+ +
+
+

This is a test

+ +

HTML

+
<section id="main">
+    <div>
+        <h1 id="title">{{ .Title }}</h1>
+        {{ range .Pages }}
+            {{ .Render "summary"}}
+        {{ end }}
+    </div>
+</section>
+

Golang

+
package main
+
+import "fmt"
+
+func main() {
+    fmt.Println("hello world")
+}
+ +
+ +
+ +
+ + diff --git a/src/isableFastRender/sitemap.xml b/src/isableFastRender/sitemap.xml new file mode 100644 index 0000000..1e6a77a --- /dev/null +++ b/src/isableFastRender/sitemap.xml @@ -0,0 +1,25 @@ + + + + http://localhost:1313/tags/development/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/posts/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/tags/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/tags/test/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/posts/test/ + 2020-05-18T00:00:00+00:00 + + http://localhost:1313/categories/ + + diff --git a/src/isableFastRender/tags/development/index.html b/src/isableFastRender/tags/development/index.html new file mode 100644 index 0000000..39c781b --- /dev/null +++ b/src/isableFastRender/tags/development/index.html @@ -0,0 +1,87 @@ + + + + development // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

development

+
    + +
  • + Test Post + + + calendar + + + May 18, 2020 + - + + clock + + + 1 min read + +
  • + +
+ + + + +
+ +
+ + diff --git a/src/isableFastRender/tags/development/index.xml b/src/isableFastRender/tags/development/index.xml new file mode 100644 index 0000000..43a59e0 --- /dev/null +++ b/src/isableFastRender/tags/development/index.xml @@ -0,0 +1,20 @@ + + + + development on Phoenix's Personal Blog + http://localhost:1313/tags/development/ + Recent content in development on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Test Post + http://localhost:1313/posts/test/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/posts/test/ + This is a test HTML &lt;section id=&#34;main&#34;&gt; &lt;div&gt; &lt;h1 id=&#34;title&#34;&gt;{{ .Title }}&lt;/h1&gt; {{ range .Pages }} {{ .Render &#34;summary&#34;}} {{ end }} &lt;/div&gt; &lt;/section&gt; Golang package main import &#34;fmt&#34; func main() { fmt.Println(&#34;hello world&#34;) } + + + + diff --git a/src/isableFastRender/tags/development/page/1/index.html b/src/isableFastRender/tags/development/page/1/index.html new file mode 100644 index 0000000..74a19d2 --- /dev/null +++ b/src/isableFastRender/tags/development/page/1/index.html @@ -0,0 +1 @@ +http://localhost:1313/tags/development/ \ No newline at end of file diff --git a/src/isableFastRender/tags/index.html b/src/isableFastRender/tags/index.html new file mode 100644 index 0000000..3279da5 --- /dev/null +++ b/src/isableFastRender/tags/index.html @@ -0,0 +1,88 @@ + + + + Tags // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ + + +
+ + diff --git a/src/isableFastRender/tags/index.xml b/src/isableFastRender/tags/index.xml new file mode 100644 index 0000000..f198c0f --- /dev/null +++ b/src/isableFastRender/tags/index.xml @@ -0,0 +1,29 @@ + + + + Tags on Phoenix's Personal Blog + http://localhost:1313/tags/ + Recent content in Tags on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + development + http://localhost:1313/tags/development/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/tags/development/ + + + + + Test + http://localhost:1313/tags/test/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/tags/test/ + + + + + diff --git a/src/isableFastRender/tags/test/index.html b/src/isableFastRender/tags/test/index.html new file mode 100644 index 0000000..12ebd7f --- /dev/null +++ b/src/isableFastRender/tags/test/index.html @@ -0,0 +1,87 @@ + + + + Test // Phoenix's Personal Blog + + + + + + + + + + + + + + + + + + + + + + +
+ Phoenix +

Phoenix's Personal Blog

+ +

Land of random projects i do.

+ +
+
+ +
+

Test

+
    + +
  • + Test Post + + + calendar + + + May 18, 2020 + - + + clock + + + 1 min read + +
  • + +
+ + + + +
+ +
+ + diff --git a/src/isableFastRender/tags/test/index.xml b/src/isableFastRender/tags/test/index.xml new file mode 100644 index 0000000..81d0603 --- /dev/null +++ b/src/isableFastRender/tags/test/index.xml @@ -0,0 +1,20 @@ + + + + Test on Phoenix's Personal Blog + http://localhost:1313/tags/test/ + Recent content in Test on Phoenix's Personal Blog + Hugo -- gohugo.io + en-us + Mon, 18 May 2020 00:00:00 +0000 + + Test Post + http://localhost:1313/posts/test/ + Mon, 18 May 2020 00:00:00 +0000 + + http://localhost:1313/posts/test/ + This is a test HTML &lt;section id=&#34;main&#34;&gt; &lt;div&gt; &lt;h1 id=&#34;title&#34;&gt;{{ .Title }}&lt;/h1&gt; {{ range .Pages }} {{ .Render &#34;summary&#34;}} {{ end }} &lt;/div&gt; &lt;/section&gt; Golang package main import &#34;fmt&#34; func main() { fmt.Println(&#34;hello world&#34;) } + + + + diff --git a/src/isableFastRender/tags/test/page/1/index.html b/src/isableFastRender/tags/test/page/1/index.html new file mode 100644 index 0000000..63b3dc9 --- /dev/null +++ b/src/isableFastRender/tags/test/page/1/index.html @@ -0,0 +1 @@ +http://localhost:1313/tags/test/ \ No newline at end of file diff --git a/src/m10c/.editorconfig b/src/m10c/.editorconfig new file mode 100644 index 0000000..4bd3bd8 --- /dev/null +++ b/src/m10c/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/src/m10c/.gitignore b/src/m10c/.gitignore new file mode 100644 index 0000000..aa94faa --- /dev/null +++ b/src/m10c/.gitignore @@ -0,0 +1,2 @@ +public/ +exampleSite/resources/ diff --git a/src/m10c/LICENSE.md b/src/m10c/LICENSE.md new file mode 100644 index 0000000..5941ee2 --- /dev/null +++ b/src/m10c/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 Fabien Casters + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/src/m10c/README.md b/src/m10c/README.md new file mode 100644 index 0000000..a2f883e --- /dev/null +++ b/src/m10c/README.md @@ -0,0 +1,93 @@ +# m10c theme + +![Intro](https://github.com/vaga/hugo-theme-m10c/blob/master/images/cover.png) + +A Hugo minimalistic theme for bloggers + +Main features: + +- Fully responsive +- Twitter Cards, Open Graph, Disqus and Google Analytics supported (see Hugo docs) +- Customizable colors +- Customizable picture and description +- Customizable menu on sidebar +- Customizable social media links on sidebar +- Optimized for performance 100/100 on Lighthouse +- All feather icons included + +## Getting started + +### Installation + +Create a new Hugo site: +```bash +$ hugo new site [path] +``` + +Clone this repository into `themes/` directory: +```bash +$ cd [path] +$ git clone https://github.com/vaga/hugo-theme-m10c.git themes/m10c +``` + +Add this line in the `config.toml` file: +```toml +theme = "m10c" +``` + +### Configuration + +In your `config.toml` file, define the following variables in `params`: + +- `author`: Name of the author +- `description`: Short description of the author +- `avatar`: Path of file containing the author avatar image +- `menu_item_separator`: Separator between each menu item. HTML allowed (default: " - ") +- `favicon`: Absolute path of your favicon.ico file (default: "/favicon.ico") + +To add a menu item, add the following lines in `menu`: + +``` +[[menu.main]] + identifier = "tags" + name = "Tags" + url = "/tags/" +``` + +[Read Hugo documentations](https://gohugo.io/content-management/menus/#readout) for more informations about menu + +To add a social link, add the following lines in `params`: + +``` +[[params.social]] + icon = "github" + name = "My Github" + url = "https://github.com/vaga" +``` + +To change theme colors, add the following lines in `params`: + +``` +[params.style] + darkestColor = "#d35050" + darkColor = "#212121" + lightColor = "#f5e3e0" + lightestColor = "#f5f5f5" + primaryColor = "#ffffff" +``` + +If you want the above theme colors, you can see the [exampleSite/config.toml](/exampleSite/config.toml) file. + +### Styling + +To override styles using scss, add a file called `_extra.scss` to `[path]/assets/css/` + +**Note:** Hugo releases come in two versions, `hugo` and `hugo_extended`. You need `hugo_extended` to automatically compile your scss. + +## License + +This theme is released under the [**MIT**](/LICENSE.md) License. + +## Acknowledgements + +- [feather](https://feathericons.com/) - [MIT](https://github.com/feathericons/feather/blob/master/LICENSE) diff --git a/src/m10c/assets/css/_base.scss b/src/m10c/assets/css/_base.scss new file mode 100644 index 0000000..d0a3f3f --- /dev/null +++ b/src/m10c/assets/css/_base.scss @@ -0,0 +1,59 @@ +* { + box-sizing: border-box; +} + +html { + line-height: 1.6; +} + +body { + margin: 0; + font-family: sans-serif; + background: $dark-color; + color: $light-color; +} + +h1, h2, h3, h4, h5, h6 { + color: $lightest-color; +} + +a { + color: $primary-color; + transition: color 0.35s; + text-decoration: none; + + &:hover { + color: $lightest-color; + } +} + +// Browsers seem to use a smaller default font-size with monospaced code +// blocks (like 80% of the size of normal text) and that looks pretty bad with +// small inline code-blocks in the middle of normal text (mainly because of +// the very noticeable difference in x-height). This CSS corrects that problem. +code { + font-family: monospace,monospace; + font-size: 1em; + color: rgba($light-color, .8); +} + +pre { + font-size: 1rem; + line-height: 1.2em; + margin: 0; + overflow: auto; + + // A larger monospaced block of text (that isn't mixed with normal text) + // generally looks heavier than normal text with the same font size. For this + // reason using a smaller monospaced font size makes sense in this situation. + code { + font-size: .8em; + } +} + +::selection { + background: rgba($light-color, .25); +} +::-moz-selection { + background: rgba($light-color, .25); +} diff --git a/src/m10c/assets/css/_extra.scss b/src/m10c/assets/css/_extra.scss new file mode 100644 index 0000000..8eaa4d4 --- /dev/null +++ b/src/m10c/assets/css/_extra.scss @@ -0,0 +1,2 @@ +// Do not add any CSS to this file in the theme sources. +// This file can be overridden to add project-specific CSS. diff --git a/src/m10c/assets/css/components/_app.scss b/src/m10c/assets/css/components/_app.scss new file mode 100644 index 0000000..df90c21 --- /dev/null +++ b/src/m10c/assets/css/components/_app.scss @@ -0,0 +1,64 @@ +.app-header { + padding: 2.5em; + background: $darkest-color; + text-align: center; +} + +.app-header-avatar { + width: 15rem; + height: 15rem; + // border-radius: 100%; + // border: 0.5rem solid $primary-color; +} + +.app-container { + padding: 2.5rem; +} + +.app-header-social { + font-size: 2em; + color: $lightest-color; + + a { + margin: 0 0.1em; + } +} + +@media (min-width: 940px) { + .app-header { + position: fixed; + top: 0; + left: 0; + width: 20rem; + min-height: 100vh; + } + + .app-container { + max-width: 65rem; + margin-left: 20rem; + } +} + +@media (max-width: 940px) { + h2 { + font-size: large; + } + + // p { + // clear: both; + // text-align: left; + // } + // } + + // .app-header-avatar { + // max-width: 8rem; + // max-height: 8rem; + // border-radius: 100%; + // border: .25rem solid $primary-color; + // float: left; + // } + + .app-container { + padding: 0.5rem; + } +} \ No newline at end of file diff --git a/src/m10c/assets/css/components/_border_animation.scss b/src/m10c/assets/css/components/_border_animation.scss new file mode 100644 index 0000000..55d24a7 --- /dev/null +++ b/src/m10c/assets/css/components/_border_animation.scss @@ -0,0 +1,57 @@ +.gradient-border { + + margin: auto; + // width: 50%; + + --border-width: 0.35rem; + + border-radius: 0.35rem; + + position: relative; + display: flex; + justify-content: center; + align-items: center; + font-family: Lato, sans-serif; + font-size: 2.5rem; + text-transform: uppercase; + color: white; + background: #222; + border-radius: var(--border-width); + + &::after { + position: absolute; + content: ""; + top: calc(-1 * var(--border-width)); + left: calc(-1 * var(--border-width)); + z-index: -1; + width: calc(100% + var(--border-width) * 2); + height: calc(100% + var(--border-width) * 2); + background: linear-gradient( + 60deg, + hsl(224, 85%, 66%), + hsl(269, 85%, 66%), + hsl(314, 85%, 66%), + hsl(359, 85%, 66%), + hsl(44, 85%, 66%), + hsl(89, 85%, 66%), + hsl(134, 85%, 66%), + hsl(179, 85%, 66%) + ); + background-size: 300% 300%; + background-position: 0 50%; + border-radius: calc(2 * var(--border-width)); + animation: moveGradient 4s alternate infinite; + } + } + + @keyframes moveGradient { + 50% { + background-position: 100% 50%; + } + } +.gradient-border img { + margin: auto; + width: 100%; + border-radius: 1.5%; + // border-radius: 50%; +} \ No newline at end of file diff --git a/src/m10c/assets/css/components/_error_404.scss b/src/m10c/assets/css/components/_error_404.scss new file mode 100644 index 0000000..c819570 --- /dev/null +++ b/src/m10c/assets/css/components/_error_404.scss @@ -0,0 +1,7 @@ +.error-404 { + text-align: center; +} + +.error-404-title { + text-transform: uppercase; +} diff --git a/src/m10c/assets/css/components/_icon.scss b/src/m10c/assets/css/components/_icon.scss new file mode 100644 index 0000000..1af7c1b --- /dev/null +++ b/src/m10c/assets/css/components/_icon.scss @@ -0,0 +1,6 @@ +.icon { + display: inline-block; + width: 1em; + height: 1em; + vertical-align: -0.125em; +} diff --git a/src/m10c/assets/css/components/_pagination.scss b/src/m10c/assets/css/components/_pagination.scss new file mode 100644 index 0000000..cc0d8a1 --- /dev/null +++ b/src/m10c/assets/css/components/_pagination.scss @@ -0,0 +1,24 @@ +.pagination { + display: block; + list-style: none; + padding: 0; + font-size: 0.8em; + text-align: center; + margin: 3em 0; +} + +.page-item { + display: inline-block; + .page-link { + display: block; + padding: 0.285em 0.8em; + } + + &.active { + .page-link { + color: $lightest-color; + border-radius: 2em; + background: $primary-color; + } + } +} diff --git a/src/m10c/assets/css/components/_post.scss b/src/m10c/assets/css/components/_post.scss new file mode 100644 index 0000000..afecccd --- /dev/null +++ b/src/m10c/assets/css/components/_post.scss @@ -0,0 +1,25 @@ +.post-title { + color: $lightest-color; +} + +.post-content { + & > pre, + .highlight { + margin: 1em 0; + } + + & > pre, + .highlight > pre, + .highlight > div { + border-left: 0.4em solid rgba($primary-color, .8); + padding: .5em 1em; + } + + img { + max-width: 100%; + } +} + +.post-meta { + font-size: 0.8em; +} diff --git a/src/m10c/assets/css/components/_posts_list.scss b/src/m10c/assets/css/components/_posts_list.scss new file mode 100644 index 0000000..fd9eea7 --- /dev/null +++ b/src/m10c/assets/css/components/_posts_list.scss @@ -0,0 +1,17 @@ +.posts-list { + padding: 0; +} + +.posts-list-item { + list-style: none; + padding: 0.4em 0; + + &:not(:last-child) { + border-bottom: 1px dashed rgba(255, 255, 255, 0.3); + } +} + +.posts-list-item-description { + display: block; + font-size: 0.8em; +} diff --git a/src/m10c/assets/css/components/_tag.scss b/src/m10c/assets/css/components/_tag.scss new file mode 100644 index 0000000..8bf628a --- /dev/null +++ b/src/m10c/assets/css/components/_tag.scss @@ -0,0 +1,15 @@ +.tag { + display: inline-block; + margin-right: 0.2em; + padding: 0 0.6em; + font-size: 0.9em; + border-radius: 0.2em; + white-space: nowrap; + background: rgba(255, 255, 255, 0.1); + transition: color 0.35s, background 0.35s; + + &:hover { + transition: color 0.25s, background 0.05s; + background: rgba(255, 255, 255, 0.3); + } +} diff --git a/src/m10c/assets/css/components/_tags_list.scss b/src/m10c/assets/css/components/_tags_list.scss new file mode 100644 index 0000000..0b8b331 --- /dev/null +++ b/src/m10c/assets/css/components/_tags_list.scss @@ -0,0 +1,28 @@ +.tags-list { + padding: 0; +} + +.tags-list-item { + list-style: none; + padding: 0.4em 0; + &:not(:last-child) { + border-bottom: 1px dashed rgba(255, 255, 255, 0.3); + } +} + +@media (min-width: 450px) { + .tags-list { + display: flex; + flex-wrap: wrap; + } + + .tags-list-item { + width: calc(50% - 1em); + &:nth-child(even) { + margin-left: 1em; + } + &:nth-last-child(2) { + border: none; + } + } +} diff --git a/src/m10c/assets/css/main.scss b/src/m10c/assets/css/main.scss new file mode 100644 index 0000000..741a7bd --- /dev/null +++ b/src/m10c/assets/css/main.scss @@ -0,0 +1,22 @@ +$darkest-color: {{ .Site.Params.style.darkestColor | default "#242930" }}; +$dark-color: {{ .Site.Params.style.darkColor | default "#353b43" }}; +$light-color: {{ .Site.Params.style.lightColor | default "#afbac4" }}; +$lightest-color: {{ .Site.Params.style.lightestColor | default "#ffffff" }}; +$primary-color: {{ .Site.Params.style.primaryColor | default "#57cc8a" }}; + +@import 'base'; + +@import 'components/app'; +@import 'components/error_404'; +@import 'components/icon'; +@import 'components/pagination'; +@import 'components/post'; +@import 'components/posts_list'; +@import 'components/tag'; +@import 'components/tags_list'; +@import 'components/border_animation'; + + +// The last 'extra' import can optionally be overridden on a per project +// basis by creating a /assets/css/_extra.scss file. +@import 'extra'; diff --git a/src/m10c/data/m10c/icons.json b/src/m10c/data/m10c/icons.json new file mode 100644 index 0000000..b806f64 --- /dev/null +++ b/src/m10c/data/m10c/icons.json @@ -0,0 +1 @@ +{"activity":"","airplay":"","alert-circle":"","alert-octagon":"","alert-triangle":"","align-center":"","align-justify":"","align-left":"","align-right":"","anchor":"","aperture":"","archive":"","arrow-down-circle":"","arrow-down-left":"","arrow-down-right":"","arrow-down":"","arrow-left-circle":"","arrow-left":"","arrow-right-circle":"","arrow-right":"","arrow-up-circle":"","arrow-up-left":"","arrow-up-right":"","arrow-up":"","at-sign":"","award":"","bar-chart-2":"","bar-chart":"","battery-charging":"","battery":"","bell-off":"","bell":"","bluetooth":"","bold":"","book-open":"","book":"","bookmark":"","box":"","briefcase":"","calendar":"","camera-off":"","camera":"","cast":"","check-circle":"","check-square":"","check":"","chevron-down":"","chevron-left":"","chevron-right":"","chevron-up":"","chevrons-down":"","chevrons-left":"","chevrons-right":"","chevrons-up":"","chrome":"","circle":"","clipboard":"","clock":"","cloud-drizzle":"","cloud-lightning":"","cloud-off":"","cloud-rain":"","cloud-snow":"","cloud":"","code":"","codepen":"","codesandbox":"","coffee":"","columns":"","command":"","compass":"","copy":"","corner-down-left":"","corner-down-right":"","corner-left-down":"","corner-left-up":"","corner-right-down":"","corner-right-up":"","corner-up-left":"","corner-up-right":"","cpu":"","credit-card":"","crop":"","crosshair":"","database":"","delete":"","disc":"","divide-circle":"","divide-square":"","divide":"","dollar-sign":"","download-cloud":"","download":"","dribbble":"","droplet":"","edit-2":"","edit-3":"","edit":"","external-link":"","eye-off":"","eye":"","facebook":"","fast-forward":"","feather":"","figma":"","file-minus":"","file-plus":"","file-text":"","file":"","film":"","filter":"","flag":"","folder-minus":"","folder-plus":"","folder":"","framer":"","frown":"","gift":"","git-branch":"","git-commit":"","git-merge":"","git-pull-request":"","github":"","gitlab":"","globe":"","grid":"","hard-drive":"","hash":"","headphones":"","heart":"","help-circle":"","hexagon":"","home":"","image":"","inbox":"","info":"","instagram":"","italic":"","key":"","layers":"","layout":"","life-buoy":"","link-2":"","link":"","linkedin":"","list":"","loader":"","lock":"","log-in":"","log-out":"","mail":"","map-pin":"","map":"","maximize-2":"","maximize":"","meh":"","menu":"","message-circle":"","message-square":"","mic-off":"","mic":"","minimize-2":"","minimize":"","minus-circle":"","minus-square":"","minus":"","monitor":"","moon":"","more-horizontal":"","more-vertical":"","mouse-pointer":"","move":"","music":"","navigation-2":"","navigation":"","octagon":"","package":"","paperclip":"","pause-circle":"","pause":"","pen-tool":"","percent":"","phone-call":"","phone-forwarded":"","phone-incoming":"","phone-missed":"","phone-off":"","phone-outgoing":"","phone":"","pie-chart":"","play-circle":"","play":"","plus-circle":"","plus-square":"","plus":"","pocket":"","power":"","printer":"","radio":"","refresh-ccw":"","refresh-cw":"","repeat":"","rewind":"","rotate-ccw":"","rotate-cw":"","rss":"","save":"","scissors":"","search":"","send":"","server":"","settings":"","share-2":"","share":"","shield-off":"","shield":"","shopping-bag":"","shopping-cart":"","shuffle":"","sidebar":"","skip-back":"","skip-forward":"","slack":"","slash":"","sliders":"","smartphone":"","smile":"","speaker":"","square":"","star":"","stop-circle":"","sun":"","sunrise":"","sunset":"","tablet":"","tag":"","target":"","terminal":"","thermometer":"","thumbs-down":"","thumbs-up":"","toggle-left":"","toggle-right":"","tool":"","trash-2":"","trash":"","trello":"","trending-down":"","trending-up":"","triangle":"","truck":"","tv":"","twitch":"","twitter":"","type":"","umbrella":"","underline":"","unlock":"","upload-cloud":"","upload":"","user-check":"","user-minus":"","user-plus":"","user-x":"","user":"","users":"","video-off":"","video":"","voicemail":"","volume-1":"","volume-2":"","volume-x":"","volume":"","watch":"","wifi-off":"","wifi":"","wind":"","x-circle":"","x-octagon":"","x-square":"","x":"","youtube":"","zap-off":"","zap":"","zoom-in":"","zoom-out":""} \ No newline at end of file diff --git a/src/m10c/layouts/404.html b/src/m10c/layouts/404.html new file mode 100644 index 0000000..7009c19 --- /dev/null +++ b/src/m10c/layouts/404.html @@ -0,0 +1,7 @@ +{{ define "main" }} +
+

O{{ partial "icon.html" (dict "ctx" $ "name" "frown") }}ps...

+

The link you followed may be broken, or the page may have been removed.

+ Go home {{ partial "icon.html" (dict "ctx" $ "name" "arrow-right") }} +
+{{ end }} diff --git a/src/m10c/layouts/_default/baseof.html b/src/m10c/layouts/_default/baseof.html new file mode 100644 index 0000000..9c75a61 --- /dev/null +++ b/src/m10c/layouts/_default/baseof.html @@ -0,0 +1,50 @@ + + + + {{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }} // {{ .Site.Title }}{{ end }} + + + {{ hugo.Generator }} + + + + {{ $style := resources.Get "css/main.scss" | resources.ExecuteAsTemplate "css/main.scss" . | resources.ToCSS | resources.Minify | resources.Fingerprint -}} + + + {{ template "_internal/google_analytics.html" . }} + {{ template "_internal/twitter_cards.html" . }} + {{ template "_internal/opengraph.html" . }} + + + +
+ {{ .Site.Params.author | default +

{{ .Site.Title }}

+ {{- with .Site.Menus.main }} + + {{- end }} +

{{ .Site.Params.description | default "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vehicula turpis sit amet elit pretium." }}

+ {{- with .Site.Params.social }} + + {{- end }} +
+
+ {{ block "main" . }} + {{ .Content }} + {{ end }} +
+ + diff --git a/src/m10c/layouts/_default/list.html b/src/m10c/layouts/_default/list.html new file mode 100644 index 0000000..73bc59e --- /dev/null +++ b/src/m10c/layouts/_default/list.html @@ -0,0 +1,24 @@ +{{ define "main" }} +
+

{{ .Title }}

+
    + {{ range where .Paginator.Pages "Type" "!=" "page" }} + {{ if not .Params.hidden }} +
  • + {{ .Title }} + + {{ partial "icon.html" (dict "ctx" $ "name" "calendar") }} + {{ .PublishDate.Format "Jan 2, 2006" }} + {{ if not .Site.Params.noreadingtime }} + - + {{ partial "icon.html" (dict "ctx" $ "name" "clock") }} + {{ .ReadingTime }} min read + {{ end }} + + {{ end }} +
  • + {{ end }} +
+ {{ partial "pagination.html" $ }} +
+{{ end }} diff --git a/src/m10c/layouts/_default/single.html b/src/m10c/layouts/_default/single.html new file mode 100644 index 0000000..9368cd8 --- /dev/null +++ b/src/m10c/layouts/_default/single.html @@ -0,0 +1,37 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+ {{- if ne .Type "page" }} + + {{- end }} +
+
+ {{ .Content }} +
+ +
+{{ end }} diff --git a/src/m10c/layouts/_default/terms.html b/src/m10c/layouts/_default/terms.html new file mode 100644 index 0000000..459ab73 --- /dev/null +++ b/src/m10c/layouts/_default/terms.html @@ -0,0 +1,18 @@ +{{ define "main" }} +{{if not .Page.Params.hidden}} + + {{ end }} +{{ end }} diff --git a/src/m10c/layouts/partials/icon.html b/src/m10c/layouts/partials/icon.html new file mode 100644 index 0000000..06f8a42 --- /dev/null +++ b/src/m10c/layouts/partials/icon.html @@ -0,0 +1,11 @@ +{{- if isset .ctx.Site.Data.m10c.icons .name -}} + + {{ .title | default .name }} + {{ safeHTML (index .ctx.Site.Data.m10c.icons .name) }} + +{{- else -}} + + + + +{{- end -}} diff --git a/src/m10c/layouts/partials/pagination.html b/src/m10c/layouts/partials/pagination.html new file mode 100644 index 0000000..be6fa11 --- /dev/null +++ b/src/m10c/layouts/partials/pagination.html @@ -0,0 +1,27 @@ +{{ with $.Paginator }} +{{ if gt .TotalPages 1 }} + +{{ end }} +{{ end }} diff --git a/src/m10c/layouts/shortcodes/table_of_contents.html b/src/m10c/layouts/shortcodes/table_of_contents.html new file mode 100644 index 0000000..c619f10 --- /dev/null +++ b/src/m10c/layouts/shortcodes/table_of_contents.html @@ -0,0 +1,3 @@ +
+ {{ .Page.TableOfContents }} +
diff --git a/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content b/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content new file mode 100644 index 0000000..a9271c0 --- /dev/null +++ b/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content @@ -0,0 +1 @@ +*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8)}pre{overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{max-width:15rem;max-height:15rem;border-radius:100%;border:.5rem solid #57cc8a}.app-container{padding:2.5rem}.app-header-social{font-size:2em;color:#fff}.app-header-social a{margin:0 .1em}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;vertical-align:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:block;padding:.285em .8em}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-content pre{border-left:.4em solid rgba(87,204,138,.8);padding-left:1em}.post-content img{max-width:100%}.post-meta{font-size:.8em}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:block;font-size:.8em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{list-style:none;padding:.4em 0}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}} \ No newline at end of file diff --git a/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json b/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json new file mode 100644 index 0000000..6346e6b --- /dev/null +++ b/src/m10c/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json @@ -0,0 +1 @@ +{"Target":"css/main.min.88e7083eff65effb7485b6e6f38d10afbec25093a6fac42d734ce9024d3defbd.css","MediaType":"text/css","Data":{"Integrity":"sha256-iOcIPv9l7/t0hbbm840Qr77CUJOm+sQtc0zpAk09770="}} \ No newline at end of file diff --git a/src/m10c/scripts/update_feather_icons.sh b/src/m10c/scripts/update_feather_icons.sh new file mode 100755 index 0000000..dff5129 --- /dev/null +++ b/src/m10c/scripts/update_feather_icons.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +FEATHER_PATH=`dirname "$0"`/feather + +# Clone feather repository +git clone --depth=1 git@github.com:feathericons/feather.git $FEATHER_PATH + +pushd $FEATHER_PATH + +# Install dependencies +yarn + +mkdir dist + +# Generate icons.json +npx babel-node bin/build-icons-json.js + +# Copy icons.json into theme data +cp dist/icons.json ../../data/m10c/icons.json + +popd + +# Remove the repository +rm -rf $FEATHER_PATH diff --git a/src/m10c/static/avatar.png b/src/m10c/static/avatar.png new file mode 100644 index 0000000..5849c2b Binary files /dev/null and b/src/m10c/static/avatar.png differ diff --git a/src/m10c/theme.toml b/src/m10c/theme.toml new file mode 100644 index 0000000..30daa84 --- /dev/null +++ b/src/m10c/theme.toml @@ -0,0 +1,17 @@ +name = "m10c" +license = "MIT" +licenselink = "https://github.com/vaga/hugo-theme-m10c/blob/master/LICENSE.md" +description = "A minimalistic (m10c) theme for bloggers" +homepage = "https://" +tags = ["blog","personal","blog", "dark"] +features = [ + "minimalistic blog", + "social icons", + "editable colors" +] +min_version = 0.55 + +[author] + name = "vaga" + homepage = "https://vaga.io" + diff --git a/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content b/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content new file mode 100644 index 0000000..d22051c --- /dev/null +++ b/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.content @@ -0,0 +1 @@ +*{box-sizing:border-box}html{line-height:1.6}body{margin:0;font-family:sans-serif;background:#353b43;color:#afbac4}h1,h2,h3,h4,h5,h6{color:#fff}a{color:#57cc8a;transition:color .35s;text-decoration:none}a:hover{color:#fff}code{font-family:monospace,monospace;font-size:1em;color:rgba(175,186,196,.8)}pre{font-size:1rem;line-height:1.2em;margin:0;overflow:auto}pre code{font-size:.8em}::selection{background:rgba(175,186,196,.25)}::-moz-selection{background:rgba(175,186,196,.25)}.app-header{padding:2.5em;background:#242930;text-align:center}.app-header-avatar{width:15rem;height:15rem}.app-container{padding:2.5rem}.app-header-social{font-size:2em;color:#fff}.app-header-social a{margin:0 .1em}@media(min-width:940px){.app-header{position:fixed;top:0;left:0;width:20rem;min-height:100vh}.app-container{max-width:65rem;margin-left:20rem}}@media(max-width:940px){h2{font-size:large}.app-container{padding:.5rem}}.error-404{text-align:center}.error-404-title{text-transform:uppercase}.icon{display:inline-block;width:1em;height:1em;vertical-align:-.125em}.pagination{display:block;list-style:none;padding:0;font-size:.8em;text-align:center;margin:3em 0}.page-item{display:inline-block}.page-item .page-link{display:block;padding:.285em .8em}.page-item.active .page-link{color:#fff;border-radius:2em;background:#57cc8a}.post-title{color:#fff}.post-content>pre,.post-content .highlight{margin:1em 0}.post-content>pre,.post-content .highlight>pre,.post-content .highlight>div{border-left:.4em solid rgba(87,204,138,.8);padding:.5em 1em}.post-content img{max-width:100%}.post-meta{font-size:.8em}.posts-list{padding:0}.posts-list-item{list-style:none;padding:.4em 0}.posts-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}.posts-list-item-description{display:block;font-size:.8em}.tag{display:inline-block;margin-right:.2em;padding:0 .6em;font-size:.9em;border-radius:.2em;white-space:nowrap;background:rgba(255,255,255,.1);transition:color .35s,background .35s}.tag:hover{transition:color .25s,background .05s;background:rgba(255,255,255,.3)}.tags-list{padding:0}.tags-list-item{list-style:none;padding:.4em 0}.tags-list-item:not(:last-child){border-bottom:1px dashed rgba(255,255,255,.3)}@media(min-width:450px){.tags-list{display:flex;flex-wrap:wrap}.tags-list-item{width:calc(50% - 1em)}.tags-list-item:nth-child(even){margin-left:1em}.tags-list-item:nth-last-child(2){border:none}}.gradient-border{margin:auto;--border-width:0.35rem;border-radius:.35rem;position:relative;display:flex;justify-content:center;align-items:center;font-family:Lato,sans-serif;font-size:2.5rem;text-transform:uppercase;color:#fff;background:#222;border-radius:var(--border-width)}.gradient-border::after{position:absolute;content:"";top:calc(-1 * var(--border-width));left:calc(-1 * var(--border-width));z-index:-1;width:calc(100% + var(--border-width) * 2);height:calc(100% + var(--border-width) * 2);background:linear-gradient(60deg,#5f86f2,#a65ff2,#f25fd0,#f25f61,#f2cb5f,#abf25f,#5ff281,#5ff2f0);background-size:300% 300%;background-position:0;border-radius:calc(2 * var(--border-width));animation:moveGradient 4s alternate infinite}@keyframes moveGradient{50%{background-position:100%}}.gradient-border img{margin:auto;width:100%;border-radius:1.5%} \ No newline at end of file diff --git a/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json b/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json new file mode 100644 index 0000000..210d9ac --- /dev/null +++ b/src/resources/_gen/assets/scss/css/main.scss_e86386c8bae1cd02295de71a1be078d6.json @@ -0,0 +1 @@ +{"Target":"css/main.min.4c70cb4897ba15d2c09f9dabed6b26b751f0638d2a16a28ec38cfcde2ffc4de6.css","MediaType":"text/css","Data":{"Integrity":"sha256-THDLSJe6FdLAn52r7Wsmt1HwY40qFqKOw4z83i/8TeY="}} \ No newline at end of file