Skip to content

Commit

Permalink
readd theme
Browse files Browse the repository at this point in the history
  • Loading branch information
C0DK committed Jul 10, 2024
1 parent f37f8d2 commit 2e04272
Show file tree
Hide file tree
Showing 177 changed files with 15,835 additions and 0 deletions.
13 changes: 13 additions & 0 deletions themes/adritian-free-hugo-theme/.github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: [zetxek] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
## Updates demo site (https://github.com/zetxek/adritian-demo)
## taken from https://stackoverflow.com/a/68213855/570087

name: Update demo site
on:
push:
## run on push to main or a new semantic tag (ie: v1.2.3)
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
repository: zetxek/adritian-demo
token: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
submodules: true

- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Print submodule status
run: |
git submodule status
- name: Print submodule diff
run: |
git diff --submodule=diff
- name: Send pull-request
run: |
LATEST_TAG=$(git describe --tags --always --abbrev=0)
REPOSITORY="zetxek/adritian-demo"
FOLDER="bin/$REPOSITORY"
BRANCH_NAME="theme-update/update-theme-to-$LATEST_TAG"
# Clone the remote repository and change working directory to the
# folder it was cloned to.
git clone \
--depth=1 \
--branch=main \
https://some-user:${{ secrets.PRIVATE_TOKEN_GITHUB }}@github.com/$REPOSITORY \
$FOLDER
cd $FOLDER
# Setup the committers identity.
git config user.email "[email protected]"
git config user.name "GitHub Actions - update theme submodule"
# Create a new feature branch for the changes.
git checkout -b $BRANCH_NAME
# Update the script files to the latest version.
git submodule update --init --recursive
git submodule update --recursive --remote
# Commit the changes and push the feature branch to origin
git add --all
git commit -m "chore: update scripts to $LATEST_TAG"
git push origin $BRANCH_NAME
# Store the PAT in a file that can be accessed by the
# GitHub CLI.
echo "${{ secrets.PRIVATE_TOKEN_GITHUB }}" > token.txt
# Authorize GitHub CLI for the current repository and
# create a pull-requests containing the updates.
gh auth login --with-token < token.txt
gh pr create \
--body "" \
--title "chore: update theme to $LATEST_TAG" \
--head "$BRANCH_NAME" \
--base "main"
38 changes: 38 additions & 0 deletions themes/adritian-free-hugo-theme/.github/workflows/update-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
## Updates demo site (https://github.com/zetxek/adritian-demo)
## taken from https://stackoverflow.com/a/68213855/570087

name: Update demo site
on:
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
repository: zetxek/adritian-demo
token: ${{ secrets.PRIVATE_TOKEN_GITHUB }}
submodules: true

- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Print submodule status
run: |
git submodule status
- name: Print submodule diff
run: |
git diff --submodule=diff
- name: Commit
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions - update theme submodule"
git add --all
git commit -m "Update submodules" -m "Updating demo based on $(git submodule status)" || echo "No changes to commit (status = $(git submodule status))"
git push
10 changes: 10 additions & 0 deletions themes/adritian-free-hugo-theme/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Thumbs.db
.DS_Store
.dist
.tmp
.sass-cache
npm-debug.log
node_modules
builds
package-lock.json

20 changes: 20 additions & 0 deletions themes/adritian-free-hugo-theme/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright for portions of the theme are held by (c) 2020 Radity (https://radity.com). Other copyright is held by Adrián Moreno Peña, 2022.

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.
130 changes: 130 additions & 0 deletions themes/adritian-free-hugo-theme/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
# Adritian Free Hugo Theme
###### Adritian Hugo Theme for Personal Websites or Professional minimalistic landing pages

See it live at **[adritian-demo.vercel.app](https://https://adritian-demo.vercel.app/)** (simple demo site, vanilla installation) or **[adrianmoreno.info](https://www.adrianmoreno.info)** (my personal site, running on this theme)

This free Hugo theme is a fork of [Raditian Theme](https://github.com/radity/raditian-free-hugo-theme) - a great Hugo theme originally created by [Radity](https://github.com/radity). It's called __Adritian__ because I, the author, am called Adrián - and if you shuffle Raditian and Adrián letters you get... Adritian 😅

It focuses on accessibility, high performance and usability.

The templates are based on Bootstrap (so they're responsive and mobile-first), and the main changes I have made have been upgrades on the web performance and accessibility of the template.

Some of the best applications for the theme are for minimalistic websites, single-page applications, and personal portfolios. It has a contact form you can customize to your mail address without setting up a backend (https://formspree.io).


🚀 Improvements on this version:

- removal of jQuery
- upgrade of Bootstrap from v4 to v5
- Hugo assets pipeline support
- some (basic) i18n features
- added more pages/templates (experience, blog)

- upgrade loading performance (100 score in [Google Page Speed Insights](https://pagespeed.web.dev))

You can see it live at [www.adrianmoreno.info](https://www.adrianmoreno.info) (my personal website), as well as in this screenshot for reference:

![adrianmorenoinfo](https://user-images.githubusercontent.com/240085/230632835-74349170-d610-4731-8fac-62c413e6b3f5.png)

You can see the source code for [my website](https://www.adrianmoreno.info) [in github too](https://github.com/zetxek/adrianmoreno.info), as well as the [demo site for the theme, adritian-demo](https://adritian-demo.vercel.app/) ([and its code](https://github.com/zetxek/adritian-demo)) (a simpler version of the website).

## Download

- Clone the repo: `git clone https://github.com/zetxek/adritian-free-hugo-theme.git`.
[Download from ](https://github.com/zetxek/adritian-free-hugo-theme/archive/main.zip)GitHub.

## Installation

#### Install Hugo

To use `adritian-free-hugo-theme` you need to install Hugo by following https://gohugo.io/getting-started/installing/.

#### Setting up
As a pre-requirement, you will need Hugo set up and running. You can follow [the official guide for it](https://gohugo.io/categories/installation/).

Note: the theme has **not** been migrated to Hugo Modules yet. To install it, you need to set it up by copying the theme files (either as a sub-module or by copying the files). You can follow these [older instructions](https://gohugobrasil.netlify.app/themes/installing-and-using-themes/) or the next ones as help:

- Create a new Hugo site (this will create a new folder): `hugo new site <your website's name>`
- Enter the newly created folder: `cd <your website's name>/`
- Install PostCSS: execute `npm i -D postcss postcss-cli autoprefixer` from the top-level site folder [check [Hugo's official docs](https://gohugo.io/hugo-pipes/postcss/)].
- Clone the adritian-free-hugo-theme: `git clone https://github.com/zetxek/adritian-free-hugo-theme.git themes/adritian-free-hugo-theme`.
- Replace the `config.toml` file in the project's root directory with themes/adritian-free-hugo-theme/exampleSite/config.toml: `cp themes/adritian-free-hugo-theme/exampleSite/hugo.toml hugo.toml` (*executed from the website root folder*)
- Start Hugo with `hugo server -D`
- 🎉 The theme is alive on http://localhost:1313/

The output for the last command will be something like
```
adritian-demo git:(master) ✗ hugo server -D
port 1313 already in use, attempting to use an available port
Watching for changes in /Users/adrianmorenopena/Projects/adritian-demo/{archetypes,assets,content,data,i18n,layouts,static,themes}
Watching for config changes in /Users/adrianmorenopena/Projects/adritian-demo/hugo.toml
Start building sites …
hugo v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended darwin/arm64 BuildDate=2024-01-26T15:54:24Z VendorInfo=brew
WARN found no layout file for "html" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
| EN
-------------------+------
Pages | 5
Paginator pages | 0
Non-page files | 0
Static files | 114
Processed images | 4
Aliases | 0
Sitemaps | 1
Cleaned | 0
Built in 617 ms
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:53031/ (bind address 127.0.0.1)
Press Ctrl+C to stop
```

#### Additional configuration

##### Contact form
_(optional, if you want to use the contact form)_ edit line 212 in your `homepage.yml` file, to customize your mail address. Sign up in [formspree](https://formspree.io) to redirect mails to your own.

##### Blog

<img width="1449" alt="SCR-20240624-uajc" src="https://github.com/zetxek/adritian-free-hugo-theme/assets/240085/7540f5f0-f753-48f8-bc69-1aa9c715a6d7">


To use the blog, you can use the content type "blog", and render it in the URL `/blog`.
You can add a menu link to it in `hugo.toml`.

The posts will be markdown files stored in the `content/blog` folder.

##### Experience

<img width="1444" alt="SCR-20240624-uaoi" src="https://github.com/zetxek/adritian-free-hugo-theme/assets/240085/9ea86d6a-62c6-4c4f-96ba-8450fa24dd68">


It can be used to render job experience of projects. Each experience/project has a duration, job title, company name, location and description/excerpt as well as a longer text.

## Troubleshooting

This theme is a version of the one found on my website [adriamoreno.info](https://www.adrianmoreno.info). If you run into trouble, [you can check the code on my website](https://github.com/zetxek/adrianmoreno.info) for reference.

If you have improvements for the theme, you are very welcome to make a PR if you are able 💕. Otherwise - see below for how to get help (and maybe help others with the same problem).

## Getting help

The project is offered "as is", and it's a hobby project. Support is given whenever life allows - you can create an issue [create an issue](https://github.com/zetxek/adritian-free-hugo-theme/issues) so anyone else could also help, or the author.

## Showcase

Have you used the theme in your website? Send a PR to add it to the list for inspiration! (Extra points if the repo is open source :-)

- [demo site](https://adritian.vercel.app)
- [adrian moreno's personal site](https://www.adrianmoreno.info)
- add your website here!


## License

- Copyright 2020 Radity (https://radity.com/), 2022 Adrián Moreno Peña (https://www.adrianmoreno.info)
- Licensed under MIT (https://github.com/zetxek/adritian-free-hugo-theme/blob/master/LICENSE)
2 changes: 2 additions & 0 deletions themes/adritian-free-hugo-theme/archetypes/default.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
+++
+++
85 changes: 85 additions & 0 deletions themes/adritian-free-hugo-theme/assets/css/animation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
/*
Animation example, for spinners
*/
.animate-spin {
-moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear;
-webkit-animation: spin 2s infinite linear;
animation: spin 2s infinite linear;
display: inline-block;
}
@-moz-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-webkit-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-o-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@-ms-keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes spin {
0% {
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}

100% {
-moz-transform: rotate(359deg);
-o-transform: rotate(359deg);
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
1 change: 1 addition & 0 deletions themes/adritian-free-hugo-theme/assets/css/bundle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* placeholder */
1 change: 1 addition & 0 deletions themes/adritian-free-hugo-theme/assets/css/critical.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* placeholder file: to be populated by npm scripts */
Loading

0 comments on commit 2e04272

Please sign in to comment.