initial commit
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
public/
|
||||||
6
archetypes/default.md
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
||||||
16
config.toml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
baseurl = "/"
|
||||||
|
title = "Infinite Improbability"
|
||||||
|
theme = "beautifulhugo"
|
||||||
|
|
||||||
|
[Params]
|
||||||
|
mainSections = ["post"]
|
||||||
|
intro = true
|
||||||
|
headline = "Infinite Improbability"
|
||||||
|
description = "thoughts on computing"
|
||||||
|
github = "https://github.com/shautvast"
|
||||||
|
opengraph = true
|
||||||
|
shareTwitter = true
|
||||||
|
dateFormat = "Mon, Jan 2, 2006"
|
||||||
|
|
||||||
|
[Permalinks]
|
||||||
|
post = "/:filename/"
|
||||||
9
content/page/about.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
+++
|
||||||
|
title = "About"
|
||||||
|
date = 2015-04-03T02:13:50Z
|
||||||
|
author = "My Name"
|
||||||
|
description = "Things about me."
|
||||||
|
+++
|
||||||
|
|
||||||
|
## About
|
||||||
|
Disclosure: I like to create things!
|
||||||
8
content/page/contact.md
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
+++
|
||||||
|
title = "Contact"
|
||||||
|
date = 2015-04-03T02:13:50Z
|
||||||
|
author = "Sander Hautvast"
|
||||||
|
description = "How to contact me."
|
||||||
|
+++
|
||||||
|
|
||||||
|
## Contact
|
||||||
12
content/post/distrust-antipattern.md
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
---
|
||||||
|
title: "Distrust Antipattern"
|
||||||
|
date: 2022-01-28T10:47:56+01:00
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
||||||
|
__can you trust your own team mates?__
|
||||||
|
|
||||||
|
Context:
|
||||||
|
A platform called 'Inspire Scaler' by a company called Quadient. It's a graphical workflow editor with custom components in javascript. A workflow could be described as a rest API. You initiate it by doing a GET request on an http server. Typically there's a few flows I guess, for different scenario's. The end product is a customer message, like a letter in PDF format. So basically all you need is a template and some data.
|
||||||
|
This post is not about this product. It's what this team has built with it.
|
||||||
|
Imagine a workflow that receives a request for a customer message. Th
|
||||||
137
content/post/from_java_2_rust.md
Executable file
|
|
@ -0,0 +1,137 @@
|
||||||
|
---
|
||||||
|
title: "Rust for Java developers, part 1"
|
||||||
|
date: 2021-12-17T13:07:49+01:00
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|

|
||||||
|
|
||||||
|
**Manifesto**
|
||||||
|
|
||||||
|
ahum..
|
||||||
|
|
||||||
|
It is my conviction that rust should should rule the world! Not only because it is cool new technology, but first and foremost because it requires less computing resources (cpu cycles and memory) which also translates to natural resources (electricity). Since large parts of the grid are still powered by fossile, rust in the end is a way to cut back on CO2 emissions! _Especially_ compared to java which is still resource hungry, despites lots and lots of improvements over the years.
|
||||||
|
|
||||||
|
And java powers much of the web. Rust, while being regarded as a _systems_ language is a perfectly feasible choice for any web application. Yet it's uptake is slow, in part because of the learning curve. This blog is intended to help developers make the change. There is already splendid documentation out there. I hope that I can add some information that I have found useful, once I got my head around it.
|
||||||
|
|
||||||
|
**tl;dr**
|
||||||
|
Do not think 'Rust is just a new language, I can map what I already know onto some new keywords'. Rust is different. But taking the effort will pay off.
|
||||||
|
|
||||||
|
Imagine a language in which duplicating a valid line of code slaps you in the face with a compilation error:
|
||||||
|
{{< gist shautvast 1e402ea018b1a3209d7e4b1794e93250 >}}
|
||||||
|
|
||||||
|
__line 6 is a copy of line 3. The first compiles but the second does not. WTF?__
|
||||||
|
|
||||||
|
So what is going on? Let's look at it line by line.
|
||||||
|
|
||||||
|
Starting at line 1 it seems easy enough, and it is: `fn` defines a function, in this case `main` which is the entrypoint for any rust application. We could add `pub` to make it public, but in this case that wouldn't be necessary.
|
||||||
|
Next `()`, like in a lot of languages means: put any parameters here. Curly braces: we have block scope.
|
||||||
|
|
||||||
|
`let` defines a variable, in ths case `name`. Some things to say about this:
|
||||||
|
For one: rust is _strongly typed_, so we could also say `let name: String = String::from("...")` but rust infers the type as much as possible (and that is much more than let's say java does).
|
||||||
|
|
||||||
|
Actually `let` does more than declare and assign, it determines ownership. More on that later.
|
||||||
|
|
||||||
|
One last thing to mention here:
|
||||||
|
this is allowed:
|
||||||
|
{{< gist shautvast de41deb52f42ecba42ea14408c1f49fd >}}
|
||||||
|
and this is not:
|
||||||
|
|
||||||
|
{{< gist shautvast 446e584ee590ed1c2014d4b6bbd48063 >}}
|
||||||
|
|
||||||
|
because no value is actually assigned to `name`. In java we could cheat and assign `null` to name, but rust won't have any of that.
|
||||||
|
|
||||||
|
There is no `null` in rust.
|
||||||
|
|
||||||
|
This is when you say: _'Thank god for that!'_
|
||||||
|
|
||||||
|
To which I would reply: _'Welll... actually there is'_, but that is an advanced topic, and beyond the scope of this post. Let's just stick to the good habit of never having null-references and life is fine.
|
||||||
|
|
||||||
|
_So much going on in just 2 lines of code...._
|
||||||
|
|
||||||
|
About strings: There is String and there is &str (pronounced string-slice). Javans are allowed to apply the following mapping in their head:
|
||||||
|
| Rust |Java |
|
||||||
|
|------|-------------|
|
||||||
|
|String|StringBuilder|
|
||||||
|
|&str |String |
|
||||||
|
|
||||||
|
So rust String is mutable and &str is not. The latter is also a (shared) reference. This is important. It means I have **borrowed** something, I can use it, but I am not allowed to change it and I am certainly not the **owner**. More on ownership later...
|
||||||
|
|
||||||
|
On to the next two lines.
|
||||||
|
```
|
||||||
|
let msg = get_hello(name);
|
||||||
|
println!("{}", msg);
|
||||||
|
```
|
||||||
|
Nothing too fancy: we call a function and print the result. Rust has easy string interpolation using `{}` for a value that you want to insert into a string. The print! statement ends with an exclamation mark and this signifies that you're dealing with a *macro*. So it compiles to something completely different, but who cares about that?
|
||||||
|
|
||||||
|
Next:
|
||||||
|
|
||||||
|
`fn get_hello(name: String) -> String {...`
|
||||||
|
|
||||||
|
This function actually has a return value which unlike java and C is at the end of the declaration (following the arrow```->```). I find this more intuitive.
|
||||||
|
|
||||||
|
Next we again create a String, concatenate the input argument and return the result. Nothing too fancy, but...
|
||||||
|
|
||||||
|
`let mut some_string = String::from("Hello ");`
|
||||||
|
|
||||||
|
The `mut` keyword indicates that we are actually allowed to change the the value of `some_string`. I mentioned earlier that String is mutable, but if you actually want to mutate it, you have to add `mut`. And: **types aren't mutable (or not), bindings are!**
|
||||||
|
|
||||||
|
So:
|
||||||
|
```
|
||||||
|
let x = String::from("x");
|
||||||
|
//x.push_str("NO!"); // compilation error, x is not mutable
|
||||||
|
let mut y = x;
|
||||||
|
y.push_str("YES!"); // but this compiles!
|
||||||
|
```
|
||||||
|
|
||||||
|
Weird, right? Well remember that by default nothing is mutable. And that things can magically 'become' mutable through `mut`.
|
||||||
|
|
||||||
|
But be aware: What do you think would happen if you'd add
|
||||||
|
`get_hello(x);`?
|
||||||
|
It would not compile. Ownership has passed from `x` to `y`. So there is never a situation in which a value is mutable and immutable at the same time. The compiler prevents this. And it prevents a **lot** of things. The rust compiler is quite famous for handing you friendly reminders that your code has issues, even suggesting fixes...
|
||||||
|
|
||||||
|
Next line:
|
||||||
|
`some_string.push_str(&name);`
|
||||||
|
|
||||||
|
What's interesting here is that we pass a reference to `name`, using the ampersand `&`. A reference to a String is by definition a string-slice. So the signature for push_str is:
|
||||||
|
|
||||||
|
`pub fn push_str(&mut self, string: &str)`
|
||||||
|
|
||||||
|
Oh and this is interesting: the `self` keyword is sort of like `this` in java, but not quite. See `this` is the reference to the object you act on in java. In rust, like python, if we have a function on an object (also called a method), the first argument is always `self`. We have objects in rust, but they're called `struct`, and they're like classes and objects really, but there's no inheritance. Remember 'favour composition over inheritance'?
|
||||||
|
|
||||||
|
Okay, one more line to go:
|
||||||
|
|
||||||
|
`return some_string;`
|
||||||
|
|
||||||
|
You might have noticed that this could have been java code, except that rust prefers _snake_case_ for local variables. The compiler actually enforces this. You can turn it off, but that would be rude.
|
||||||
|
The funny thing about this line is that in practice it will always be written like this:
|
||||||
|
|
||||||
|
`some_string`
|
||||||
|
|
||||||
|
`return` is optional (handy for early returns), but it needs the semicolon. It's shorter without them, so why not?
|
||||||
|
|
||||||
|
Be aware that is more powerful than it seems at first glance. The last line(s) of anything, provided that is does not end with `;` is always evaluated as an expression and returned to the caller. So it could have been a compound `match` expression (fetaured in a later blog) or a simple `if` (which is also an expression!):
|
||||||
|
```
|
||||||
|
fn foo(bar: bool) -> u32{
|
||||||
|
if bar {
|
||||||
|
1
|
||||||
|
} else {
|
||||||
|
0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
This is so much cleaner than anything else!
|
||||||
|
|
||||||
|
__ownership__
|
||||||
|
|
||||||
|
I saved the best for last here, but I have already given some hints as to what this is. Please memorize the following rules:
|
||||||
|
1. There is one, and only one _owner_ of a value
|
||||||
|
2. Ownership is scoped by blocks: at the end of the containing block, a value is dropped.
|
||||||
|
3. I may lend _shared references_ to any number of any number of borrowers.
|
||||||
|
4. I may at any given time lend only _one_ _unique_ reference to a borrower. I remain owner.
|
||||||
|
5. I may pass on ownership, but then I can no longer use it in any way.
|
||||||
|
6. Reassigning a value to a new binding means transfer of ownership.
|
||||||
|
7. A function parameter becomes owner when the function is called. (unless it's a reference)
|
||||||
|
|
||||||
|
The latter is the reason that I could not call `get_hello` *twice* with `name` as the argument. At the first call, my ownership is passed on. The function, being the owner, can do with as it sees fit, but at the end of the function, the the value is dropped and you can no longer use it. Once you have updated your mental models with this knowledge, your life as a rust developer has become a little easier.
|
||||||
|
|
||||||
|
Astute readers may have noticed the `&mut` before `self` in the function declaration for push_str. This is what a unique reference looks like. So you get a mutable reference to self, which means that you can mutate `self` (here append some text to the string), but you have not become the owner. The mutable reference to self goes out out scope once the method ends and the original owner can carry on using it. This is true for any `&mut`.
|
||||||
205
content/post/how-to-build-my-new_restservice.md
Executable file
|
|
@ -0,0 +1,205 @@
|
||||||
|
---
|
||||||
|
title: "To Stored Procedure or Not"
|
||||||
|
date: 2021-12-07T20:32:49+01:00
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|
### Or: My personal Object-Relational Mapping [Vietnam war story](https://blogs.tedneward.com/post/the-vietnam-of-computer-science/)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
__tl;dr__
|
||||||
|
Choose the right tool for the job. What that is, well, it depends.
|
||||||
|
|
||||||
|
The standard reaction of a lot of java developers (add enterprisey language X) to the question: 'Stored procedures?' is often a plain 'No'.
|
||||||
|
The reasoning goes somewhat like this:
|
||||||
|
_'A database is a dumb datastore that might be swapped out, so we don't want to add intelligence there.'_
|
||||||
|
At least that is what I heard multiple times in the past, and as you can guess by now: the database is never, ever swapped out. God I wished I was Larry Ellison!
|
||||||
|
|
||||||
|
A more valid argument goes like this:
|
||||||
|
_'We need to add business logic and we want to centralize that in the application'._
|
||||||
|
|
||||||
|
And indeed you would not want to put logic in the database as well as the application. The debugging burden doubles and weird interaction effects may follow.
|
||||||
|
|
||||||
|
Often people make a distinction between high-level and low-level logic. It is a good thing not to put address retrieval (low level) and 'validate address for customer message X' (high level) in the same component. Downside is that there are always gray areas and looking at it from the outside, you may not be sure to take the right direction when fixing some bug. _Do you take the database or the application?_
|
||||||
|
|
||||||
|
Service layers are a typical place to suffer from this sometimes blurry distinction. Either logic from above (the REST controller) or from below (the datastore, messaging) leaks in. Service layers ideally are abstracted away from technical implementation details. But while this is all nice and good, it is often difficult to uphold. Service layers get messy quickly for other reasons too. A service needs to call another service, calling another... Microservices mitigate this, but I am digressing. In the end a lot of responsibility lays in the hand of the senior developer, given unittests and enough time for refactoring.
|
||||||
|
|
||||||
|
Let me introduce a situation where the service layer is actually a no-op, only passing on data from and to the restcontroller and the database. The data objects themselves are also mere structs, devoid of logic. This ['anemic'](https://martinfowler.com/bliki/AnemicDomainModel.html) service layer , whether materialized in actual code that does nothing, or just absent, should indicate that there is, indeed no business logic. A mere CRUD type application, or even just reading database values for displaying them in some user interface. This type of application is quite common. It can be a part of a larger system, where it fulfills a specific need: show some data. Could be ticket retrieval in a messaging system, or a blog application, a CMS etcetera. It could also be a part of an eventsourcing architecture in which domain events are aggregated in a read-only datastore that is optimized for a small number of queries.
|
||||||
|
|
||||||
|
Working in enterprisey governmental organization X, we built such a system with 'boring' tech: a java enterprise (JEE) application, running in IBM Webpshere, on linux. This tech stack is fortunately getting less and less common. Now that IBM has acquired Redhat, big bureaucratic entities have an shiny new yet still amazingly enterprisey alternative: openshift and openliberty, the latter being a 'stripped down' websphere, somewhat more suited to the past decade (ie. containerization). This way JEE can still pay for mortgage.
|
||||||
|
|
||||||
|
The application connected to SQLServer running on Windows. While initially things were all well, at one point the development team ran into a problem. The SQLServer guys demanded what they consider normal: login through the windows active directory couplings that windows provides and other OS's lack obviously. So, good old username and password were not considered safe enough. 'Only when we disable 'mixed-mode' (as it's called), and use Active Directory for database user management, we can make sure all database activity is audited and that is what we want', is what they said.
|
||||||
|
Websphere on top of linux, on the other hand, in use in basically the rest of the organization, has no support for this, nor for Kerberos authentication in datasources. Kerberos should be a common standard for this type of authentication challenges, and is well supported both on linux as in standard java. Webpshere too, supports it, just not for datasources in our case (only when you need user credential delegation, and still hardly documented, if at all).
|
||||||
|
|
||||||
|
So what do we do?
|
||||||
|
|
||||||
|
The project goal is to build a customer messaging system that is structured like a typical workflow application, enriching, routing and transforming messages from mere data to a pdf and other formats. Whenever some step in the process goes wrong, the message gets stuck in an 'error' state, that requires manual intervention. This is all implemented in an off the shelf application, let's call it Cardhouse (not the real name), with bespoke (javascript) components for specfic steps in the process.
|
||||||
|
So now there is a need for a user interface for analyzing messages with errors and it was decided that a web application and corresponding REST backend be built, serving the database records in JSON format. Originally the architects had envisioned this backend as part of the Cardhouse solution itself, but the development team had advised against it ('not possible/feasible'), and so java, being the standard for custom applications, was decided upon.
|
||||||
|
|
||||||
|
Let's take a look at how this java application is structured and what kind of code it contains:
|
||||||
|
|
||||||
|
First: a fairly standard and decently implemented layered architecture:
|
||||||
|
* MessageDao (Data access object), uses JPA @Entity's like Message, MessageErrorRecord, MessageDetails
|
||||||
|
* MessageService, uses the JPA entities, simply passing them on to:
|
||||||
|
* MessageRestController @Stateless, uses MessageDTO and MessageDetailDTO, these objects can be automatically converted to JSON.
|
||||||
|
|
||||||
|
But there is more:
|
||||||
|
The Controller's input argument is a bean with @BeanParams that has @QueryParams, all optional url query parameters, to filter certain message properties like date, status, and type. And because we don't want to generate the database query (with all the optional select columns) ourselves, we use JPA's Criteria API.
|
||||||
|
The following code has been anonymized to protect the innocent:
|
||||||
|
```
|
||||||
|
...
|
||||||
|
final Join<Message, MessageErrorRecord> messageErrorRecordListJoin = from.join(Message_.messageErrorRecordList, JoinType.LEFT); //*
|
||||||
|
final Subquery<Timestamp> subQuery = query.subquery(Timestamp.class);
|
||||||
|
final Root<MessageErrorErrord> subRoot = subQuery.from(MessageErrorRecord.class);
|
||||||
|
final Path<Timestamp> errorEventDateTime = subRoot.get(MessageErrorRecord_.errorEventDateTime);
|
||||||
|
subQuery.select(builder.greatest(errorEventDateTime));
|
||||||
|
subQuery.where(builder.equal(from, subRoot.get(MessageErrorRecord_.message)));
|
||||||
|
final List<Predicate> predicates = new ArrayList<>();
|
||||||
|
predicates.add(builder.or(builder.equal(subQuery, messageErrorRecordListJoin.get(MessageErrorRecord_.errorEventDateTime)),
|
||||||
|
builder.isNull(messageErrorRecordListJoin.get(MessageErrorRecord_.errorEventDateTime))));
|
||||||
|
...
|
||||||
|
errorCode.ifPresent(ec -> predicates.add(builder.like(messageErrorRecordListJoin.get(MessageErrorRecord_.errorCode), like(ec))));
|
||||||
|
messageType.ifPresent(mt -> predicates.add(builder.equal(from.get(Message_.status), mt)));
|
||||||
|
...
|
||||||
|
```
|
||||||
|
* class names ending with underscore (Message_) are a result of JPA @StaticMetaModel, in case you're wondering. They are generated by a Maven plugin.
|
||||||
|
|
||||||
|
So what's going on??
|
||||||
|
|
||||||
|
First: here is the (simplified) datamodel
|
||||||
|
```
|
||||||
|
message -< (1..*) message_error
|
||||||
|
```
|
||||||
|
Meaning a message can have zero or more message_error records. There are more tables, having the same 1-to-* cardinality, that all contain extra information about the message while undergoing processing. It's worth mentioning that this model was devised for the Cardhouse system itself, not the java application or its function. A large part of it though is storing data for tracking and auditing purposes. There is a genuine need for accountability, because the messages sent can indeed ruin lives!
|
||||||
|
|
||||||
|
The user (an administrator) wants to see messages with at least one message_error record, and when there are more (when processing has failed multiple times), just the latest (for an overview page, he or she then clicks for details).
|
||||||
|
|
||||||
|
In pure SQL (simplified for readability):
|
||||||
|
```
|
||||||
|
SELECT * FROM message m
|
||||||
|
JOIN message_error me on me.message_id = m.id
|
||||||
|
WHERE status = 'error'
|
||||||
|
AND [OPTIONAL SELECT's]
|
||||||
|
AND me.datetime = (SELECT MAX(datetime) FROM message_error WHERE message_id = m.id)
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
So the query is a little bit complex, as there is a join and a subselect. There are other ways to do this, bit it works fine, performance-wise as well, but believe me, it hasn't been properly performance tested yet and isn't live at the time of this writing. It's about nine months old now.
|
||||||
|
|
||||||
|
_ insert meme here: It's like that, and it's the way it is _
|
||||||
|
|
||||||
|
The JPA code above generates more or less the same query in the end. It adds even more unnecessary complexity by the way, but the bigger point I am trying to make is: this JPA code, while using all the industry standards, is absolutely horrendous!
|
||||||
|
|
||||||
|
The astute reader (good job!), might notice that the java code is built on the assumption that there might be records in the message table that have status 'error' but do not have an entry in message_error. This is not a valid situation and I left it out of the SQL query. This is actually a fascinating side story, because the java team and the Cardhouse team hardly spoke for a year, because the Cardhouse team, the producer of messages and message_errors had one priority: go live with their system. This wrong assumption is minor really, compared to others...
|
||||||
|
|
||||||
|
Anyway
|
||||||
|
|
||||||
|
I started this story describing the impediment with the websphere datasource. There was a regular datasource in DEV, because that sqlserver instance still had so called mixed-mode, enabling good old username & password. So no one noticed until the dev team asked for a connection string to the TST database.
|
||||||
|
And that's were things went sour pretty quickly and the term 'total rewrite' was heard aloud in meeting #1. 'There must be other options!'
|
||||||
|
|
||||||
|
Here starts just another aspect of this story.
|
||||||
|
|
||||||
|
The initial java code was written by a medior level developer. His style of writing code is basically: copy stuff from the previous project and adjust until it works. And it worked, after a couple of weeks. It did not yet contain all the fancy predicate code, just plain SQL within JPA and those fine nullchecks:
|
||||||
|
```
|
||||||
|
String query = ...
|
||||||
|
if (timestamp_from !=null){
|
||||||
|
query += " AND me.timestamp > ?";
|
||||||
|
}
|
||||||
|
```
|
||||||
|
you get the gist...mind the spaces.
|
||||||
|
|
||||||
|
Then, another medior level developer, a younger more ambitious guy, yearning to build beautiful things, took over. Should this have happened, scrum-wise? I wonder, but I wasn't really involved at the time, so I don't know. I do recall that there wasn't really any pressure coming from the backlog. We had to beg for work at the time, so is that a blessing or a foe? This younger developer introduced the Criteria API and some other modern inventions and created a rather intricate web of code. I entered the picture when a review was needed. I spent a lot of time getting my head around it, partly because I did't know JPA that well, but also because of unclear naming. So I commented on the code, got into an argument, but in the end prevailed, and convinced the guy that my simpler code was better.
|
||||||
|
|
||||||
|
This was the code I actually called horrendous...
|
||||||
|
|
||||||
|
And here this part of the story ends. We built the UI as well using a very well known enterprisey web framework. All was fine and good until we wanted to test the lot in the TST environment. How long did it take to write the jave code? It's hard to reconstruct, so let's give some statistics:
|
||||||
|
|
||||||
|
number of classes: 32
|
||||||
|
lines of code: 1516
|
||||||
|
explanation: just a quick manual count, including whitespace and comments
|
||||||
|
|
||||||
|
I included all javax.validation code, to make sure a date entered in the UI is actually a date. All jackson customizations, for correctly serializing dates (them again...), Boilerplate like the class that contains @ApplicationPath etcetera. But I did not include all the xml that JEE still requires. Not the huge openliberty server config xml ... etcetera.
|
||||||
|
|
||||||
|
Still, 1516 lines of code to inspect 5 tables (3 more that I didn't mention for brevity)
|
||||||
|
|
||||||
|
- that - is - a - lot - insert fitting meme here -
|
||||||
|
|
||||||
|
Ok, JEE is bad! But trust me, it wouldn't have been (much) better in springboot, micronaut, quarkus or any other java framework du jour. Sure springboot can autogenerate queries, but not this one...
|
||||||
|
|
||||||
|
Did I mention we use Lombok? There are not getters or setters in the count.. - insert smile emoji - We all love Lombok, don't we?
|
||||||
|
|
||||||
|
So what's the real problem?
|
||||||
|
|
||||||
|
I think the real elephant in the room, the thing that is omnipresent, but overlooked all the time is -context-.
|
||||||
|
Let me explain:
|
||||||
|
This is a simple application, with simple requirements, the most important being: it's read only.
|
||||||
|
This rules out a swath of stuff. There is no state, no user session, no business logic, some input validation. No concurrency. No huge performance requirements (total number of users: 5, a wild guess).
|
||||||
|
And JEE (or J-$X), this one-solution-fits-all kind of a beast that it still is (despite micro-profile and all) is just overengineering from the beginning. - In - this - Context - (add emphasis)
|
||||||
|
|
||||||
|
[note to self: add the word 'bloated' somewhere]
|
||||||
|
|
||||||
|
But what about language X, what about PHP, ruby, python/django, .Net etc. ??
|
||||||
|
Ok, There are frameworks in other languages that are probably better at some (a lot of) things than java. On the other hand: being an IT manager (not me) it seems java is a good solution in this case because:
|
||||||
|
-java is battletested
|
||||||
|
-java has been used before in projects like this
|
||||||
|
-we only want to hire java developers
|
||||||
|
-there are zillions of java developers in this country (The Netherlands) and in places like Rumania and India..
|
||||||
|
-they all sort of get the job done, which is good!
|
||||||
|
|
||||||
|
And while some languages like python do shine in one direction, they tend to have disadvantages as well. It's a tradeoff, like everything else.
|
||||||
|
|
||||||
|
So maybe the language you chose, or was non-negotiable, is not the issue. What is?
|
||||||
|
|
||||||
|
So let's go back to the original problem:
|
||||||
|
|
||||||
|
'Select and show some data in sqlserver in a web user interface'
|
||||||
|
|
||||||
|
This is what I ended up with:
|
||||||
|
```
|
||||||
|
CREATE OR ALTER PROCEDURE MessageOverview
|
||||||
|
@errorcode VARCHAR(4) = NULL,
|
||||||
|
@date_from DATETIME2(3) = NULL,
|
||||||
|
@date_to DATETIME2(3) = NULL,
|
||||||
|
... other filter criteria,
|
||||||
|
@offset INT = 0,
|
||||||
|
@fetch_size INT = 25,
|
||||||
|
@sort VARCHAR(25) = 'id.ASC'
|
||||||
|
AS
|
||||||
|
IF @fetch_size >200
|
||||||
|
BEGIN
|
||||||
|
SET @fetch_size = 200
|
||||||
|
END
|
||||||
|
SELECT(
|
||||||
|
SELECT m.Id ...,
|
||||||
|
me.error_code, ...
|
||||||
|
FROM message m
|
||||||
|
JOIN message_error me on me.message_id = m.id
|
||||||
|
WHERE m.status = 'error'
|
||||||
|
AND (@errorcode IS NULL OR (m.error_code = @errorcode))
|
||||||
|
AND me.datetime = (SELECT MAX(datetime) FROM message_error WHERE message_id = m.id)
|
||||||
|
ORDER BY
|
||||||
|
CASE WHEN @sort = 'id.ASC' THEN m.Id END ASC,
|
||||||
|
CASE WHEN @sort = 'id.DESC' THEN m.Id END DESC,
|
||||||
|
...
|
||||||
|
OFFSET @offset ROWS
|
||||||
|
FETCH NEXT @fetch_size ROWS ONLY
|
||||||
|
FOR JSON PATH) AS results
|
||||||
|
,
|
||||||
|
...
|
||||||
|
FOR JSON PATH, WITHOUT_ARRAY_WRAPPER
|
||||||
|
GO;
|
||||||
|
```
|
||||||
|
|
||||||
|
This is some remarkably effective code. It recreates the exact same JSON structure as before, which is an object containing a page of X results and a count for the total number of records in the database for the given filter criteria. I had not written a stored procedure in my life, and it cost me like half a day. This is not about me bragging. It is about the documentation readily available online, from microsoft and stackoverflow. And the clarity and strength in SQL combined with the recent (2016) JSON capabilities in SQLServer.
|
||||||
|
|
||||||
|
In a total of 71 lines it does what cost 1516 lines of java code did. Well, not really. There's hardly any input validation here and it isn't a http server. But we didn't count the lines in openliberty now, did we?
|
||||||
|
|
||||||
|
And don't get me wrong. This seems to me a good fit given the _Context_ I described earlier.
|
||||||
|
Whenever you need to make decision in code, based on the data ('business logic'), you probably want a single place as mentioned. So would you want that in a stored procedure? I guess not. One option is to have the procedure as a lowlevel component, providding 'objects' to the domain layer where the 'real' decisions are made.
|
||||||
|
This all depends and there is no silver bullet, only tradeoffs, many of which not directly technical.
|
||||||
|
|
||||||
|
We could do a couple of things now. Replacing the java backend with a small java service that calls this procedure is not one of them because we haven't fixed the database login yet.
|
||||||
|
If only we could run on windows... then logging in would be easy, right. .Net? Yeah, but there's no .Net yet in this project. That would mean more new infrastructure, and we can't completely remove java yet. Nah, the project owner/manager doesn't like that. What about some custom javascript code in 'Cardhouse' that calls the database and returns the JSON to the client? This product does run on windows here and importantly, already talks to this database, so why not add a service? As it turns out, we can actually do this. In fact, it's what the architect had originally wanted, remember? So everyone is happy.
|
||||||
|
|
||||||
|
|
||||||
|
PS. now, don't laugh when I mention this: Cardhouse, what is that written in? Not javascript, no it's: java... Yes you heard right, plain old f##ing java and the Rhino javascript engine. Irony, doubled.
|
||||||
29
content/post/optional.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
title: "The rust option"
|
||||||
|
date: 2021-12-20T10:55:14+01:00
|
||||||
|
draft: true
|
||||||
|
---
|
||||||
|
|
||||||
|
`Option` is a well known construct in many languages. The first time I saw it was in scala, but soon after it appeared in java8. As java still means my livelyhood, it serves as my main frame of reference. I won't be covering all the details, because the java type is really a no brainer: it simply wraps a value _or not_ and what operations (methods on Optional) do depends on there being a value or not.
|
||||||
|
Rust Option starts with the same premisse. But immediately things start to diverge where it comes to actally using it. In rust the type is more or less mandatory for any optional value, because there is no (safe) `null` reference. So any struct or function that allows the absence of a value may use `std::option::Option` (or just `Option`) whereas in java it's (strangely) discouraged by static code analysis tools for class members and method arguments. Just use `null` they say, but I find it very useful to express the explicit possibility of null values as a valid state.
|
||||||
|
|
||||||
|
In a java application that uses IOC `null` is in many instances a 'not yet valid state' ie. a class instance has been constructed but its dependencies have not yet been injected. This is never a valid state once the application is fully constructed and so this would not be a case for an Optional value.
|
||||||
|
|
||||||
|
Rust's Option differs from java's Optional first and foremost in that in rust it is en enum. That would not be possible in java, because it's enums are limited in that an enum in java can only have attributes of the same type (for all enum values). Whereas in rust Option::None is different from Option::Some in that Some has a value ie Some("string") and None has not.
|
||||||
|
|
||||||
|
In code:
|
||||||
|
```
|
||||||
|
pub enum Option<T> {
|
||||||
|
None,
|
||||||
|
Some(T),
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
construction:
|
||||||
|
|
||||||
|
|java.util.Optional<T>|std::option:Option<T>|
|
||||||
|
|---------------------|---------------------|
|
||||||
|
| of(T value) | Some(value: T) |
|
||||||
|
| ofNullable(T value) | Some(value: T) |
|
||||||
|
* Some(null) will not compile.
|
||||||
|
|
||||||
258
content/post/rust_wasm_photos.md
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
---
|
||||||
|
title: "Let's create an app in webassembly"
|
||||||
|
date: 2022-02-05T20:11:08+01:00
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|

|
||||||
|
Web assembly is cool and new and it lacks nice how-to's for tasks that are by now quite mundane for most web developers. So let's get started using [yew](https://yew.rs/).
|
||||||
|
|
||||||
|
What is yew?
|
||||||
|
|
||||||
|
'Yew is a modern Rust framework for creating multi-threaded front-end web apps using WebAssembly.' (yew.rs)
|
||||||
|
|
||||||
|
I actually tried several other rust/wasm frameworks, but this is the first that didn't end in tears and compile errors. The documentation is quite good. There's lots of examples. And it works well in _stable_ rust!
|
||||||
|
|
||||||
|
I will not explain rust specific stuff. There are other tutorials already. Instead I want to focus on creating a simple webapp. It will have a 'drop zone' for dragging and dropping images from your local harddrive that will then be put on the screen (no upload to a server). This is really simple, but still requires a lot more code than a simple 'hello world' and will introduce the rust bindings for web api's that you probably already know.
|
||||||
|
|
||||||
|
**Install yew**
|
||||||
|
|
||||||
|
You can read all about how to install it [here](https://yew.rs/docs/tutorial).
|
||||||
|
In short:
|
||||||
|
* install rust if you haven't already
|
||||||
|
* install trunk: ```cargo install trunk```
|
||||||
|
[Trunk](https://trunkrs.dev/) is like webpack for wasm
|
||||||
|
* ```rustup target add wasm32-unknown-unknown```
|
||||||
|
|
||||||
|
|
||||||
|
**Create a project**
|
||||||
|
|
||||||
|
```cargo new yew-app```
|
||||||
|
This creates a regular rust project with a Cargo.toml and a main.rs.
|
||||||
|
|
||||||
|
**Add a skeleton index.html**
|
||||||
|
|
||||||
|
In the project root, create ```index.html``` and enter:
|
||||||
|
{{<highlight html "linenos=table">}}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>dropping images using wasm and yew</title>
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
||||||
|
color: rgb(20, 20, 104);
|
||||||
|
}
|
||||||
|
|
||||||
|
.drop-zone {
|
||||||
|
border: 4px dashed rgb(17, 122, 184);
|
||||||
|
width: 200px;
|
||||||
|
height: 100px;
|
||||||
|
background-color: rgb(202, 202, 238);
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
display: table;
|
||||||
|
margin: 0 auto;
|
||||||
|
transform: translateY(50%);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
**Start serving**
|
||||||
|
|
||||||
|
```trunk serve``` will start a webserver on [http://localhost:8080](http://localhost:8080).
|
||||||
|
|
||||||
|
Bonus: it will pick up _any_ changes and refresh your website accordingly. I wouldn't wanna have it any other way!
|
||||||
|
|
||||||
|
**Add boilerplate**
|
||||||
|
* Add these dependencies to ```Cargo.toml```
|
||||||
|
{{<highlight toml "linenos=table">}}
|
||||||
|
gloo-utils = "0.1.2"
|
||||||
|
log = "0.4.6"
|
||||||
|
wasm-bindgen = "0.2.79"
|
||||||
|
wasm-logger = "0.2.0"
|
||||||
|
web-sys = {version = "0.3.56", features = [
|
||||||
|
"DataTransfer",
|
||||||
|
"DataTransferItemList",
|
||||||
|
"DataTransferItem",
|
||||||
|
"Document",
|
||||||
|
"Element",
|
||||||
|
"HtmlImageElement",
|
||||||
|
"Url",
|
||||||
|
'Blob'
|
||||||
|
]}
|
||||||
|
yew = "0.19"
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
* In src add a new file: ```app.rs```
|
||||||
|
* Make src/main.rs look like:
|
||||||
|
{{<highlight rust "linenos=table">}}
|
||||||
|
mod app;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
wasm_logger::init(wasm_logger::Config::default());
|
||||||
|
yew::start_app::<crate::app::DropPhoto>();
|
||||||
|
}
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
This is actually not much too much in terms of boilerplate. There is a lot of power included in these crates!
|
||||||
|
|
||||||
|
**Add a component**
|
||||||
|
|
||||||
|
BTW I mostly use visual studio code for writing rust. Intellij does the job equally well. Neovim with the appropriate plugins (as always) is also an option, but I'm not an nvim wizard and I haven't got it to work quite as well as for example [Jon Gjengset](https://thesquareplanet.com/) (check out his [youtube channel](https://www.youtube.com/c/JonGjengset)).
|
||||||
|
|
||||||
|
We'll be adding all code to ```app.rs```, so open that file in your IDE.
|
||||||
|
|
||||||
|
**Tip**
|
||||||
|
|
||||||
|
Avoid copy-paste! I found that simply copying code from blogs like this leaves you no smarter than you are right now. Actually typing in the code by hand will improve retention of what you actually did.
|
||||||
|
|
||||||
|
**Added bonus**
|
||||||
|
|
||||||
|
Any typing mistakes will potentially leave you in the dark because the compile error you get is unclear to you. This will make you look harder for differences and you may even end up debugging and whatnot, which will help you remember even better!
|
||||||
|
|
||||||
|
{{<highlight rust "linenos=table">}}
|
||||||
|
use gloo_utils::document;
|
||||||
|
use wasm_bindgen::JsCast;
|
||||||
|
use web_sys::{Url};
|
||||||
|
use web_sys::{DragEvent, HtmlImageElement};
|
||||||
|
use yew::{html, Component, Context, Html};
|
||||||
|
|
||||||
|
enum Msg{
|
||||||
|
Dropped(DragEvent),
|
||||||
|
Dragged(DragEvent),
|
||||||
|
}
|
||||||
|
|
||||||
|
struct DropImage{
|
||||||
|
images: Vec<String>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Component for DropImage {
|
||||||
|
type Message = Msg;
|
||||||
|
type Properties = ();
|
||||||
|
|
||||||
|
fn create(_ctx: &Context<Self>) -> Self {
|
||||||
|
Self { images: vec!()}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn update(&mut self, _ctx: &Context<Self>, msg: Self::Message) -> bool {
|
||||||
|
match msg {
|
||||||
|
Msg::Dragged(event) => true,
|
||||||
|
Msg::Dropped(event) => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
||||||
|
let link = ctx.link();
|
||||||
|
html! {
|
||||||
|
<>
|
||||||
|
<div class="drop-zone"
|
||||||
|
ondragover={link.callback(|e| Msg::Dragged(e))}
|
||||||
|
ondrop={link.callback(|e| Msg::Dropped(e))}>
|
||||||
|
<p>{ "drag your images here" }</p>
|
||||||
|
</div>
|
||||||
|
<div id="images"></div>
|
||||||
|
<div>{ self.images.iter().collect::<Html>() }</div>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
* you added an enum
|
||||||
|
* you added a struct
|
||||||
|
* you implemented the trait yew::Component for the DropImage struct
|
||||||
|
|
||||||
|
So DropImage is now a _Component_, much the same way as in for instance _Angular_ or other frameworks. The component is the object that will maintain your state, update the view and respond to events. A component has at least two methods: ```create``` and ```view```. Often it will also include ```update```.
|
||||||
|
|
||||||
|
```create``` must return the struct so this is the place to add initial state values, here an empty list of the names of the files that will be dragged in. The injected &Context reference can be used to register callbacks.
|
||||||
|
|
||||||
|
```view``` determines how the component is rendered to the DOM. This looks like jsx in _React_. Use the html! macro to create html. This is probably more convenient than to do it programmatically, but that is also an option.
|
||||||
|
|
||||||
|
There are some differences with regular html to be aware of. All _text_ must be surrounded by curly braces {}. A constant string in quotes will simply be turned into the text html child, but you can output any component value, eg: ```{self.value}```
|
||||||
|
|
||||||
|
Note that two event handlers, ```ondragover``` and ```ondrop``` are registered in the drop-zone div. What does ```{link.callback(|e| Msg::Dragged(e))}``` mean? It sends a message called Msg::Dragged with a payload that is the raised html event (e). The component now be able the handle this message. For this you need:
|
||||||
|
|
||||||
|
```update``` is called by the framework and it receives an instance of the Msg enum and it will respond by choosing appropriate action. This could mean update the internal component state or the view directly. I fact I doubt if the latter is really what you would want. In fact we could have defined the _images_ div as follows
|
||||||
|
{{<highlight html>}}
|
||||||
|
<div id="images">{ images.iter().collect::<Html>() }</div>
|
||||||
|
{{</highlight>}}
|
||||||
|
In general you should let the view reflect component state, instead of hacking the DOM. But this doesn't work here because there is no formatter for image objects, so we will add them to the DOM in the update method itself. (I'm open for anything better). Instead I added another div, which does iterate over the image names, which are strings. This implementation is utterly naive and ugly (for the end user). The aim is simply to show two ways to update the view.
|
||||||
|
|
||||||
|
**Add Event handling**
|
||||||
|
|
||||||
|
We will now be updating the ```update``` method as follows:
|
||||||
|
{{<highlight rust "linenos=table">}}
|
||||||
|
match msg {
|
||||||
|
Msg::Dragged(event) => {
|
||||||
|
event.prevent_default();
|
||||||
|
false
|
||||||
|
}
|
||||||
|
Msg::Dropped(event) => {
|
||||||
|
event.prevent_default();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
The first step is preventing default browser behaviour for dragging and dropping. This is the same as what would do in javascript or typescript. All the usual methods (here ```preventDefault```) are available but in snake case as is the way of rust.
|
||||||
|
|
||||||
|
(It takes some code reading to find the right methods. I think we need more documentation than mere references to MDN.)
|
||||||
|
|
||||||
|
Now we just have to add the following after prevent_default in the Msg::Dropped case (between lines 7 and 8 in the above code).
|
||||||
|
|
||||||
|
{{<highlight rust "linenos=table">}}
|
||||||
|
// access DataTransfer api
|
||||||
|
let data_transfer = event.data_transfer().expect("Event should have DataTransfer");
|
||||||
|
let item_list = data_transfer.items();
|
||||||
|
for i in 0..item_list.length() {
|
||||||
|
let item = item_list.get(i).expect("Should find an item");
|
||||||
|
if item.kind() == "file" {
|
||||||
|
let file = item.get_as_file().expect("Should find a file here").unwrap();
|
||||||
|
|
||||||
|
// create img element
|
||||||
|
let element = document().create_element("img").unwrap();
|
||||||
|
let img = element.dyn_ref::<HtmlImageElement>().expect("Cannot create image element");
|
||||||
|
let url = Url::create_object_url_with_blob(&file).expect("Cannot creat url");
|
||||||
|
img.set_src(&url);
|
||||||
|
img.set_width(100);
|
||||||
|
img.set_height(100);
|
||||||
|
|
||||||
|
// append it to container div
|
||||||
|
if let Some(images) = document().get_element_by_id("images") {
|
||||||
|
images.append_child(img).expect("Cannot add photo");
|
||||||
|
}
|
||||||
|
|
||||||
|
// update component state
|
||||||
|
self.images.push(file.name());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
true
|
||||||
|
{{</highlight>}}
|
||||||
|
|
||||||
|
This is quite a bit of things going on. But it was more or less taken directly from the javascript on MDN [here](https://developer.mozilla.org/en-US/docs/Web/API/File/Using_files_from_web_applications) and [here](https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API).
|
||||||
|
|
||||||
|
Doesn't this look familiar?
|
||||||
|
```rust
|
||||||
|
document().create_element("img")
|
||||||
|
```
|
||||||
|
|
||||||
|
Make sure to have all the imports (```use``` statements) right, or this will not compile and it will not be obvious why. The ```true``` return value means the engine has to rerender the view after an update of the component.
|
||||||
|
|
||||||
|
**Final thoughts**
|
||||||
|
* I only tested it in firefox, no guarantees.
|
||||||
|
* OMG, I changed my code while writing this post. A definite no-no. I hope the code works. Otherwise check the repo...sorry.
|
||||||
|
* Actually that is kinda interesting: while explaining the code, I thought, "well that (code) doesn't really make sense", and I found a better solution.
|
||||||
|
* Yew allows for other ways to handle events for instance. I ended up with what I found most elegant.
|
||||||
|
* There's more to yew. Read the docs!
|
||||||
|
* I used inline css here, but you don't have to.
|
||||||
|
* There's undoubtedly room for more improvements. Hey, I'm still learning!
|
||||||
|
* The workflow/structure is pretty solid: good old MVC pattern.
|
||||||
|
* The code is definitely more 'technical' than what regular webdevs write nowadays. Is this to be mainstream stuff in the near future? Or will it occupy a high performance niche? I am guessing that for most web developers more abstraction is needed, in framework or language support...
|
||||||
|
* But on the whole I think WASM and Yew are up to it: redefine web apps once again!
|
||||||
|
|
||||||
|
|
||||||
83
content/post/value.md
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
---
|
||||||
|
title: "On the value of software and pasta"
|
||||||
|
date: 2022-01-17T10:29:29+01:00
|
||||||
|
draft: false
|
||||||
|
---
|
||||||
|

|
||||||
|
This week some things 'happened' to me that made me want to read up on the grander scheme of things, meaning economic value, in particular that of software. I'll just list them briefly
|
||||||
|
* [this youtube video](https://youtu.be/W8wZbNmdIKw) which is about a French guy cooking pasta really, states an interesting economic theory, namely that aiming for the highest quality of some product is the best way to create value for all actors in a vaue chain. In this case, producing the best (and therefore more expensive) pasta is a way to give the wheat farmer a fair price.
|
||||||
|
* [Neil on sofware](https://neilonsoftware.com/) argues that software has no 'intrinsic value'. The lengthy argument boils down to: software is like a building. The moment it's built, the value is zero. It becomes valuable once the tenants move in and start to pay rent, or someone buys the property. There is no such thing as perfect software which value is selfevident, because it probably solves a problem that the world needs solved, eg. self-driving cars.
|
||||||
|
The question Neil tries to answer is whether Microsoft paid 68 billion for Activision Blizzard partly for its software. Interesting...
|
||||||
|
* My mother sent me money (to avoid inheritance tax)
|
||||||
|
* I'm quitting the project and my current employer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
__What is the value of software?__
|
||||||
|
|
||||||
|
[Jamie](https://jamie.ideasasylum.com/2012/09/11/software-has-no-intrinsic-value/) says this: Software is no different from anything else: it’s only worth what you can sell it for.
|
||||||
|
|
||||||
|
Right, so does 'anything else' then have 'intrinsic value'? Either nothing has, because everything conceivable (sellable) is only worth what you can sell it for, or everything has, because intrinsic value actually is (an estimate of) what you can sell it for.
|
||||||
|
|
||||||
|
It seems that Jamie and Neil (software developers) implicitly think that intrinsic value is some property that some 'things' have and others don't but has nothing to do with the price that someone ends up paying for it. And software doesn't have it. This in itself is not interesting I think. I frankly do not care.
|
||||||
|
|
||||||
|
What is interesting though, are the consequences, namely that developers should not hang on to their code, for the sake of it. Yes, it may be utterly beautiful, or complex, or developers have slaved on a large software behemoth for years, it's worth nothing, if it's useless, if it solves no customer problem or enables no business opportunities. Like a beautiful golden hammer that is endlessly configurable to all your woodworking needs, but fails to hit a nail. It must die, like so many shiny innovative new products emerging from startups or whatever.
|
||||||
|
|
||||||
|
Which is true of course.
|
||||||
|
|
||||||
|
Software developers should not get hung up on quality, or beauty, or whatever they strive for in code, while it's still unsure if it will sell. There is the aspect of risk. Why invest in a good quality hammer if there are plenty cheap hammers out there that will do the job? Or when the world is still unsure it needs one at all. [Adam Savage](https://www.tested.com/) said: if you think a tool could be useful, first buy the cheapest version, and add it to your toolshop and if it proves it's worth, and only then, go back to the shop and buy the most expensive you can afford.
|
||||||
|
|
||||||
|
__So what is 'Intrinsic Value' anyway?__
|
||||||
|
|
||||||
|
Just googling for an answer here...
|
||||||
|
[random link](https://www.investopedia.com/terms/i/intrinsicvalue.asp):
|
||||||
|
|
||||||
|
_Intrinsic value is a measure of what an asset is worth. This measure is arrived at by means of an objective calculation or complex financial model, rather than using the currently trading market price of that asset._
|
||||||
|
|
||||||
|
This 'objective' calculation is then based on numerous subjective estimates and qualifications, nonetheless.
|
||||||
|
|
||||||
|
_Some analysts and investors might place a higher weighting on a corporation's management team while others might view earnings and revenue as the gold standard_
|
||||||
|
|
||||||
|
And what is the purpose of the analysis? It's to estimate _future cashflows_
|
||||||
|
|
||||||
|
I'm not saying that what is said here is the absolute truth, but it seems reasonable that someone's estimate of the quality of the management team of a company is a fair thing to take into consideration when trying to guess the value of that company.
|
||||||
|
|
||||||
|
But then I would argue that if such an elusive concept is part of the mix (the 'complex financial model') then surely software, a large codebase, arguably the result of years of work by some fine minds, albeit not physical in nature, but undoubtedly objectively inspectable by anyone (in theory, or at least by experts) must also be. A game engine (in the case of Activision Blizzard) that has powered multiple best selling games in the past, is a source of (potential) future cashflows.
|
||||||
|
|
||||||
|
And this got me reading Piketty's _Capital in the 21 century_ (or rather the 50 page version of this behemoth of a book). I had originally thought of Karl Marx, but then, I'm not a communist and we don't live in the nineteenth century anymore, but Marx does talk about the creation of value, so that's why. I don't want to re-explain this book here. Read it for yourself if you want to. What I got from it is that it's fair to say that software is part of national capital, like houses, agricultural land and investments.
|
||||||
|
|
||||||
|
The big message of the book is that the income gap widens. The rich get richer, not by working, but by leveraging their wealth in a way that middle and lower classes will never be able to.
|
||||||
|
|
||||||
|
Now, I am a software developer and my mothers capital is modest really. I won't get rich by quitting my job and investing her money in stocks, startups and obligations. I'd probably starve. But avoidance of inheritance tax is indeed the way, the elites stay rich, while the rest of us toil and suffer.
|
||||||
|
|
||||||
|
__Why I quit__
|
||||||
|
|
||||||
|
So I'll just continue making software. I like it. I _value_ it. Someone _pays_ for it. My livelyhood.
|
||||||
|
|
||||||
|
It may very well turn out, though, that the project I have been working on since past year will be cancelled because it hasn't worked out really well and will cost too much to make it a success. Why? A system too bloated for what it is supposed to do: send letters to tax payers. Overengineered with specs that noone needed. Some piece of software (platform) that will never be able to handle the desired throughput, because architects and designers and business analysts came up with a highly composable hammer that hits like a hundred nails every week where it should have been two million per day. My motivation is completely drained and i'm writing a blog post instead of deploying the UI which I'm supposed to do.
|
||||||
|
|
||||||
|
Hopefully my next employer will find some interesting work. They are really small, devoid of fluff and bullshit talk. There's no office. They work from home.
|
||||||
|
|
||||||
|
__Continuous Improvement and the art of making pasta__
|
||||||
|
|
||||||
|
So the project failed and what's to learn that less money would have been wasted if the product had been cancelled earlier or had gone live successfully with less fancy system.
|
||||||
|
|
||||||
|
Start simple. Improve later
|
||||||
|

|
||||||
|
|
||||||
|
Maybe the pasta makers at Felicetti also started with a plain staple pasta that did not stand out from anything in the supermarket. Their factory and lab are immensely impressive but it started a hundred years ago when the great grandfater sold his company and bought a small pasta factory.
|
||||||
|
|
||||||
|
Pasta is a commodity. But achieving _this_ product, sold at _this_ price (3 euros for 500 g, which is expensive, but not extremely so) ensures that the whole supply chain gets the correct price. 'from the seed to the land, to the farmer, to the miller, the pasta producer and the owner of the store.'
|
||||||
|
|
||||||
|
What he says next (3:10) is nothing less than mind blowing:
|
||||||
|
|
||||||
|
'...because this idea, increasing the quality and the value of agriculture gets spreaded around. And this is our goal.'
|
||||||
|
|
||||||
|
So in reality they are not even in the pasta business, they produce ideas that improve agriculture (by producing pasta).
|
||||||
|
|
||||||
|
Everybody eats pasta, but my family less so because two of us are gluten intolerant (coeliac disease) and I abstain from wheat because of irritable bowel syndrom. So no wheat based pasta and I'll just stay in the software business. The pace is higher, meaning it doesn't take one hundred years to create a great product out of nothing. And _if_ it's a piece of software, that actually serves a need, if it makes peoples lives better, or just a little more happy, then the best thing you as a developer can do is improve it. Continuously as in every day. So that people get the best value for their money.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
8
deploy
Executable file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
USER=sander
|
||||||
|
HOST=twinklespark
|
||||||
|
DIR=/var/www/html
|
||||||
|
|
||||||
|
hugo && rsync -avz --delete public/ ${USER}@${HOST}:${DIR}
|
||||||
|
|
||||||
|
exit 0
|
||||||
1273
static/Editing main_use_of_moved_value.rs.html
Normal file
BIN
static/Editing main_use_of_moved_value.rs_files/3645743.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register([],function(l){"use strict";return{execute:function(){l({d:m,g:u,s:d});var f=Object.defineProperty,r=(n,o)=>f(n,"name",{value:o,configurable:!0});function u(n){const o=[];for(const e of a()){const[i,c]=e.trim().split("=");n===i&&typeof c!="undefined"&&o.push({key:i,value:c})}return o}r(u,"getCookies");function a(){try{return document.cookie.split(";")}catch{return[]}}r(a,"readCookies");function d(n,o,e=null,i=!1,c="lax"){let t=document.domain;if(t==null)throw new Error("Unable to get document domain");t.endsWith(".github.com")&&(t="github.com");const s=location.protocol==="https:"?"; secure":"",h=e?`; expires=${e}`:"";i===!1&&(t=`.${t}`);try{document.cookie=`${n}=${o}; path=/; domain=${t}${h}${s}; samesite=${c}`}catch{}}r(d,"setCookie");function m(n,o=!1){let e=document.domain;if(e==null)throw new Error("Unable to get document domain");e.endsWith(".github.com")&&(e="github.com");const i=new Date().getTime(),c=new Date(i-1).toUTCString(),t=location.protocol==="https:"?"; secure":"",s=`; expires=${c}`;o===!1&&(e=`.${e}`);try{document.cookie=`${n}=''; path=/; domain=${e}${s}${t}`}catch{}}r(m,"deleteCookie")}}});
|
||||||
|
//# sourceMappingURL=chunk-cookies-5ebed743.js.map
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register(["./chunk-vendor.js"],function(){"use strict";var u;return{setters:[function(d){u=d.o}],execute:function(){var d=Object.defineProperty,o=(e,t)=>d(e,"name",{value:t,configurable:!0});function r(e){document.querySelector(".js-gist-dropzone").classList.remove("d-none"),e.stopPropagation(),e.preventDefault()}o(r,"onDragenter");function a(e){const t=e.target;t instanceof Element&&t.classList.contains("js-gist-dropzone")&&t.classList.add("d-none")}o(a,"onDragleave");async function f(e){const t=e.dataTransfer;if(!!t)for(const i of t.files)try{const n=await l(i);e.target.dispatchEvent(new CustomEvent("gist:filedrop",{bubbles:!0,detail:n}))}catch{}}o(f,"doDrop");function s(e){f(e),document.querySelector(".js-gist-dropzone").classList.add("d-none"),e.stopPropagation(),e.preventDefault()}o(s,"onDrop"),u(".js-gist-dropzone",{add(){document.body.addEventListener("dragenter",r),document.body.addEventListener("dragleave",a),document.body.addEventListener("dragover",r),document.body.addEventListener("drop",s)},remove(){document.body.removeEventListener("dragenter",r),document.body.removeEventListener("dragleave",a),document.body.removeEventListener("dragover",r),document.body.removeEventListener("drop",s)}});function l(e){return new Promise(function(t,i){const n=new FileReader;n.onload=function(){const c=n.result;c&&!/\0/.test(c)?t({file:e,data:c}):i(new Error("invalid file"))},n.readAsText(e)})}o(l,"readTextFile")}}});
|
||||||
|
//# sourceMappingURL=chunk-drag-drop-7af1cc62.js.map
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register(["./chunk-frameworks.js"],function(d){"use strict";var f,g;return{setters:[function(o){f=o.B,g=o.f}],execute:function(){d({g:l,r:m});var o=Object.defineProperty,s=(t,n)=>o(t,"name",{value:n,configurable:!0});function l(t,n){const i=t||c();if(!i)return{};const e=i.querySelector(n||".js-notifications-list-item.navigation-focus");return e instanceof HTMLElement?{id:e.getAttribute("data-notification-id"),position:u(i).indexOf(e)}:{}}s(l,"getCurrentFocus");function m({id:t,position:n},i){const e=i||c();if(!(e instanceof HTMLElement))return;const a=u(e);let r;t&&(r=a.find(v=>v.getAttribute("data-notification-id")===t)),!r&&n!=null&&(r=a[Math.min(n,a.length-1)]),r instanceof HTMLElement&&g(e,r)}s(m,"restoreFocus");function c(){return document.querySelector(".js-notifications-list .js-navigation-container")}s(c,"getNotificationsList");function u(t){return Array.from(t.querySelectorAll(".js-navigation-item")).filter(f)}s(u,"getItems")}}});
|
||||||
|
//# sourceMappingURL=chunk-notification-list-focus-e6eb60ab.js.map
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register(["./chunk-frameworks.js","./chunk-vendor.js"],function(g){"use strict";var u,d,o,m;return{setters:[function(t){u=t.c,d=t.M,o=t.aB},function(t){m=t.o}],execute:function(){g("a",c);var t=Object.defineProperty,r=(e,i)=>t(e,"name",{value:i,configurable:!0});m(".js-responsive-underlinenav",{constructor:HTMLElement,subscribe:e=>(c(e),u(window,"resize",()=>l(e)))});async function c(e){await d,l(e)}r(c,"asyncCalculateVisibility");function y(e,i){e.style.visibility=i?"hidden":"";const n=e.getAttribute("data-tab-item");if(n){const s=document.querySelector(`[data-menu-item=${n}]`);s instanceof HTMLElement&&(s.hidden=!i)}}r(y,"toggleItem");function l(e){const i=e.querySelectorAll(".js-responsive-underlinenav-item"),n=e.querySelector(".js-responsive-underlinenav-overflow"),s=o(n,e);if(!s)return;let f=!1;for(const a of i){const b=o(a,e);if(b){const v=b.left+a.offsetWidth>=s.left;y(a,v),f=f||v}}n.style.visibility=f?"":"hidden"}r(l,"calculateVisibility")}}});
|
||||||
|
//# sourceMappingURL=chunk-responsive-underlinenav-a23c0002.js.map
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register(["./chunk-vendor.js"],function(){"use strict";var a,l,n;return{setters:[function(s){a=s.o,l=s.h,n=s.f}],execute:function(){var s=Object.defineProperty,h=(i,t)=>s(i,"name",{value:t,configurable:!0});class u{constructor(t){this.container=t.container,this.selections=t.selections,this.inputWrap=t.inputWrap,this.input=t.input,this.tagTemplate=t.tagTemplate,this.form=this.input.form,this.autoComplete=t.autoComplete,this.multiTagInput=t.multiTagInput}setup(){this.container.addEventListener("click",t=>{t.target.closest(".js-remove")?this.removeTag(t):this.onFocus()}),this.input.addEventListener("focus",this.onFocus.bind(this)),this.input.addEventListener("blur",this.onBlur.bind(this)),this.input.addEventListener("keydown",this.onKeyDown.bind(this)),this.form.addEventListener("submit",this.onSubmit.bind(this)),this.autoComplete.addEventListener("auto-complete-change",()=>{this.selectTag(this.autoComplete.value)})}onFocus(){this.inputWrap.classList.add("focus"),this.input!==document.activeElement&&this.input.focus()}onBlur(){this.inputWrap.classList.remove("focus"),this.autoComplete.open||this.onSubmit()}onSubmit(){this.input.value&&(this.selectTag(this.input.value),this.autoComplete.open=!1)}onKeyDown(t){switch(l(t)){case"Backspace":this.onBackspace();break;case"Enter":case"Tab":this.taggifyValueWhenSuggesterHidden(t);break;case",":case" ":this.taggifyValue(t);break}}taggifyValueWhenSuggesterHidden(t){!this.autoComplete.open&&this.input.value&&(t.preventDefault(),this.selectTag(this.input.value))}taggifyValue(t){this.input.value&&(t.preventDefault(),this.selectTag(this.input.value),this.autoComplete.open=!1)}selectTag(t){const e=this.normalizeTag(t),r=this.selectedTags();let c=!1;for(let o=0;o<e.length;o++){const p=e[o];r.indexOf(p)<0&&(this.selections.appendChild(this.templateTag(p)),c=!0)}c&&(this.input.value="",n(this.form,"tags:changed"))}removeTag(t){const e=t.target;t.preventDefault(),e.closest(".js-tag-input-tag").remove(),n(this.form,"tags:changed")}templateTag(t){const e=this.tagTemplate.cloneNode(!0);return e.querySelector("input").value=t,e.querySelector(".js-placeholder-tag-name").replaceWith(t),e.classList.remove("d-none","js-template"),e}normalizeTag(t){const e=t.toLowerCase().trim();return e?this.multiTagInput?e.split(/[\s,']+/):[e.replace(/[\s,']+/g,"-")]:[]}onBackspace(){if(!this.input.value){const t=this.selections.querySelector("li:last-child .js-remove");t instanceof HTMLElement&&t.click()}}selectedTags(){const t=this.selections.querySelectorAll("input");return Array.from(t).map(e=>e.value).filter(e=>e.length>0)}}h(u,"TagInput"),a(".js-tag-input-container",{constructor:HTMLElement,initialize(i){new u({container:i,inputWrap:i.querySelector(".js-tag-input-wrapper"),input:i.querySelector('input[type="text"], input:not([type])'),selections:i.querySelector(".js-tag-input-selected-tags"),tagTemplate:i.querySelector(".js-template"),autoComplete:i.querySelector("auto-complete"),multiTagInput:!1}).setup()}}),a(".js-multi-tag-input-container",{constructor:HTMLElement,initialize(i){new u({container:i,inputWrap:i.querySelector(".js-tag-input-wrapper"),input:i.querySelector('input[type="text"], input:not([type])'),selections:i.querySelector(".js-tag-input-selected-tags"),tagTemplate:i.querySelector(".js-template"),autoComplete:i.querySelector("auto-complete"),multiTagInput:!0}).setup()}})}}});
|
||||||
|
//# sourceMappingURL=chunk-tag-input-50df751e.js.map
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
System.register(["./chunk-frameworks.js","./chunk-vendor.js"],function(U,D){"use strict";var h,w,b,k,S,p,E,L,T,c,j,_;return{setters:[function(r){h=r.o,w=r.aW,b=r.C,k=r.X,S=r.F,p=r.p,E=r.k,L=r.aY,T=r.r},function(r){c=r.a,j=r.o,_=r.r}],execute:function(){var r=Object.defineProperty,a=(e,t)=>r(e,"name",{value:t,configurable:!0});function v(e){const t=e.querySelector(".js-gist-files"),s=document.getElementById("js-gist-file-template"),n=document.createElement("div");n.innerHTML=s.textContent;for(const i of n.querySelectorAll("[id]"))i.id!=="blob-dragged-file-input"&&i.removeAttribute("id");const o=n.querySelector(".js-code-textarea");o!=null&&o.setAttribute("id",`blob_contents_${Date.now()}`);for(const i of n.children)t.append(i);return t.lastElementChild}a(v,"createEmptyFile");function x(e){for(const t of e.querySelectorAll(".js-gist-file")){const s=t.querySelector(".js-gist-filename"),n=t.querySelector(".js-blob-contents");if(!s.value&&!n.value)return t}return v(e)}a(x,"withEmptyFile");function d(e){return w(e.closest(".js-code-editor"))}a(d,"withEditor");async function g(e){const t=e.getAttribute("data-language-detection-url");if(!t)return;const s=new URL(t,window.location.origin),n=new URLSearchParams(s.search.slice(1));n.append("filename",e.value),s.search=n.toString();const o=await fetch(s.toString(),{headers:{"X-Requested-With":"XMLHttpRequest",Accept:"application/json"}});if(!o.ok){const u=new Error,f=o.statusText?` ${o.statusText}`:"";throw u.message=`HTTP ${o.status}${f}`,u}const l=await o.json();(await d(e)).setMode(l.language)}a(g,"onFilenameChange"),h(".js-gist-filename",async e=>{const t=e,s=e.closest(".js-code-editor");await d(s),b(t,g),e.addEventListener("blur",()=>k(t,g),{once:!0})}),c("click",".js-add-gist-file",function(e){e.preventDefault();const t=e.currentTarget.closest(".js-blob-form");v(t).scrollIntoView()}),c("gist:filedrop",".js-blob-form",async function(e){const{file:t,data:s}=e.detail,n=x(e.currentTarget),o=n.querySelector(".js-gist-filename");o.value=t.name,g(o),(await d(o)).setCode(s),n.scrollIntoView()}),c("click",".js-remove-gist-file",function(e){e.preventDefault();const t=e.currentTarget.closest(".js-gist-file");for(const s of t.querySelectorAll(".js-gist-deleted input"))s.disabled=!1;t.querySelector(".js-code-editor").remove()});function y(e){const t=e.querySelectorAll(".js-remove-gist-file");for(const s of t)s.classList.toggle("d-none",t.length<2)}a(y,"updateRemoveButtonVisibility"),j(".js-remove-gist-file",function(e){const t=e.closest(".js-gist-files");return{add(){y(t)},remove(){y(t)}}});var I=Object.defineProperty,m=(e,t)=>I(e,"name",{value:t,configurable:!0});h(".js-quicksearch-field",A),S(".js-quicksearch-field",C),c("navigation:keydown",".js-quicksearch-results",R),c("submit",".js-quicksearch-form",F),c("focusout:delay",".js-quicksearch-field",function(e){const s=e.currentTarget.closest("form").querySelector(".js-quicksearch-results");s&&(s.classList.remove("active"),p(s))});function A(e){E(e.form.querySelector(".js-quicksearch-results"))}m(A,"bindQuickSearchEvents");function F(e){const t=e.currentTarget.querySelector(".js-quicksearch-results");t&&(t.classList.remove("active"),p(t))}m(F,"teardown");function R(e){const t=e,s=t.target,n=s.closest("form");if(t.detail.hotkey==="Escape"){const o=n.querySelector(".js-quicksearch-results");o.classList.remove("active"),L(o)}else t.detail.hotkey==="Enter"&&!s.classList.contains("js-navigation-item")&&(T(n),t.preventDefault())}m(R,"onNavigationKeyDown");let q=null;async function C(e){const t=e.target,s=t.value.replace(/^\s+|\s+$/g,""),n=t.closest("form"),o=n.querySelector(".js-quicksearch-results"),l=o.getAttribute("data-quicksearch-url");let i="";q==null||q.abort();const{signal:u}=q=new AbortController;if(s.length){const f=new URL(l,window.location.origin),P=new URLSearchParams(f.search.slice(1));P.append("q",s),f.search=P.toString(),n.classList.add("is-sending");try{const $=await fetch(f.toString(),{signal:u});$.ok&&(i=await $.text())}catch{}}u.aborted||(i&&(o.innerHTML=i),o.classList.toggle("active",s!==""),n.classList.remove("is-sending"))}m(C,"fetchResults"),_(".js-gist-file-update-container .js-comment-update",async function(e,t){let s;try{s=await t.json()}catch{return}if(e.action=s.json.url,s.json.authenticity_token){const n=e.querySelector("input[name=authenticity_token]");n.value=s.json.authenticity_token}}),j(".js-gist-dropzone",()=>{D.import("./chunk-drag-drop.js")})}}});
|
||||||
|
//# sourceMappingURL=gist-2b478f35.js.map
|
||||||
72
static/Editing main_use_of_moved_value.rs_files/rust.js
Normal file
|
|
@ -0,0 +1,72 @@
|
||||||
|
// CodeMirror, copyright (c) by Marijn Haverbeke and others
|
||||||
|
// Distributed under an MIT license: https://codemirror.net/LICENSE
|
||||||
|
|
||||||
|
(function(mod) {
|
||||||
|
if (typeof exports == "object" && typeof module == "object") // CommonJS
|
||||||
|
mod(require("../../lib/codemirror"), require("../../addon/mode/simple"));
|
||||||
|
else if (typeof define == "function" && define.amd) // AMD
|
||||||
|
define(["../../lib/codemirror", "../../addon/mode/simple"], mod);
|
||||||
|
else // Plain browser env
|
||||||
|
mod(CodeMirror);
|
||||||
|
})(function(CodeMirror) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
CodeMirror.defineSimpleMode("rust",{
|
||||||
|
start: [
|
||||||
|
// string and byte string
|
||||||
|
{regex: /b?"/, token: "string", next: "string"},
|
||||||
|
// raw string and raw byte string
|
||||||
|
{regex: /b?r"/, token: "string", next: "string_raw"},
|
||||||
|
{regex: /b?r#+"/, token: "string", next: "string_raw_hash"},
|
||||||
|
// character
|
||||||
|
{regex: /'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/, token: "string-2"},
|
||||||
|
// byte
|
||||||
|
{regex: /b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/, token: "string-2"},
|
||||||
|
|
||||||
|
{regex: /(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/,
|
||||||
|
token: "number"},
|
||||||
|
{regex: /(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/, token: ["keyword", null, "def"]},
|
||||||
|
{regex: /(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, token: "keyword"},
|
||||||
|
{regex: /\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/, token: "atom"},
|
||||||
|
{regex: /\b(?:true|false|Some|None|Ok|Err)\b/, token: "builtin"},
|
||||||
|
{regex: /\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/,
|
||||||
|
token: ["keyword", null ,"def"]},
|
||||||
|
{regex: /#!?\[.*\]/, token: "meta"},
|
||||||
|
{regex: /\/\/.*/, token: "comment"},
|
||||||
|
{regex: /\/\*/, token: "comment", next: "comment"},
|
||||||
|
{regex: /[-+\/*=<>!]+/, token: "operator"},
|
||||||
|
{regex: /[a-zA-Z_]\w*!/,token: "variable-3"},
|
||||||
|
{regex: /[a-zA-Z_]\w*/, token: "variable"},
|
||||||
|
{regex: /[\{\[\(]/, indent: true},
|
||||||
|
{regex: /[\}\]\)]/, dedent: true}
|
||||||
|
],
|
||||||
|
string: [
|
||||||
|
{regex: /"/, token: "string", next: "start"},
|
||||||
|
{regex: /(?:[^\\"]|\\(?:.|$))*/, token: "string"}
|
||||||
|
],
|
||||||
|
string_raw: [
|
||||||
|
{regex: /"/, token: "string", next: "start"},
|
||||||
|
{regex: /[^"]*/, token: "string"}
|
||||||
|
],
|
||||||
|
string_raw_hash: [
|
||||||
|
{regex: /"#+/, token: "string", next: "start"},
|
||||||
|
{regex: /(?:[^"]|"(?!#))*/, token: "string"}
|
||||||
|
],
|
||||||
|
comment: [
|
||||||
|
{regex: /.*?\*\//, token: "comment", next: "start"},
|
||||||
|
{regex: /.*/, token: "comment"}
|
||||||
|
],
|
||||||
|
meta: {
|
||||||
|
dontIndentStates: ["comment"],
|
||||||
|
electricInput: /^\s*\}$/,
|
||||||
|
blockCommentStart: "/*",
|
||||||
|
blockCommentEnd: "*/",
|
||||||
|
lineComment: "//",
|
||||||
|
fold: "brace"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
CodeMirror.defineMIME("text/x-rustsrc", "rust");
|
||||||
|
CodeMirror.defineMIME("text/rust", "rust");
|
||||||
|
});
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
.diff-table .blob-code.blob-code-inner{padding-left:22px}.blob-code-marker::before{position:absolute;top:1px;left:8px;content:attr(data-code-marker)}.blob-code-marker-addition::before{position:absolute;top:1px;left:8px;content:"+ "}.blob-code-marker-deletion::before{position:absolute;top:1px;left:8px;content:"- "}.blob-code-marker-context::before{position:absolute;top:1px;left:8px;content:" "}.blob-code-context,.blob-code-addition,.blob-code-deletion{padding-left:22px}.blob-code-inner.blob-code-addition,.blob-code-inner.blob-code-deletion{position:relative;padding-left:22px !important}.soft-wrap .blob-code-context,.soft-wrap .blob-code-addition,.soft-wrap .blob-code-deletion{padding-left:24px;text-indent:0}.soft-wrap .blob-code-marker-context::before,.soft-wrap .blob-code-marker-addition::before,.soft-wrap .blob-code-marker-deletion::before{top:4px}.soft-wrap .add-line-comment{margin-top:0;margin-left:-24px}.add-line-comment{margin-left:-32px}
|
||||||
|
/*# sourceMappingURL=tab-size-fix-4dea5fc72f1af6d4243c63ac72dc54c2.css.map */
|
||||||
BIN
static/img/christopher-burns--mUBrTfsu0A-unsplash.jpg
Normal file
|
After Width: | Height: | Size: 799 KiB |
BIN
static/img/felicetti-family-tradition-2_1296x.webp
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
static/img/markus-winkler-08aic3qPcag-unsplash.jpg
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 31 KiB |
BIN
static/img/pradamas-gifarry-bVfMuhN9w6I-unsplash.jpg
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
static/img/rene-deanda-fa1U7S6glrc-unsplash-1.jpg
Normal file
|
After Width: | Height: | Size: 621 KiB |
17
themes/beautifulhugo/.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
||||||
50
themes/beautifulhugo/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
# Themes directory of example site; ignored so that we can clone the repo
|
||||||
|
# inside the themes directory and test the example site with "hugo server".
|
||||||
|
exampleSite/themes/
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
ehthumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
# Recycle Bin used on file shares
|
||||||
|
$RECYCLE.BIN/
|
||||||
|
|
||||||
|
# Windows Installer files
|
||||||
|
*.cab
|
||||||
|
*.msi
|
||||||
|
*.msm
|
||||||
|
*.msp
|
||||||
|
|
||||||
|
# Windows shortcuts
|
||||||
|
*.lnk
|
||||||
|
|
||||||
|
# Vim swap files
|
||||||
|
*.swp
|
||||||
|
|
||||||
|
# =========================
|
||||||
|
# Operating System Files
|
||||||
|
# =========================
|
||||||
|
|
||||||
|
# OSX
|
||||||
|
# =========================
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
.AppleDouble
|
||||||
|
.LSOverride
|
||||||
|
|
||||||
|
# Thumbnails
|
||||||
|
._*
|
||||||
|
|
||||||
|
# Files that might appear on external disk
|
||||||
|
.Spotlight-V100
|
||||||
|
.Trashes
|
||||||
|
|
||||||
|
# Directories potentially created on remote AFP share
|
||||||
|
.AppleDB
|
||||||
|
.AppleDesktop
|
||||||
|
Network Trash Folder
|
||||||
|
Temporary Items
|
||||||
|
.apdisk
|
||||||
22
themes/beautifulhugo/LICENSE
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Original work Copyright (c) 2015 Dean Attali
|
||||||
|
Modified work Copyright (c) 2017 Michael Romero
|
||||||
|
|
||||||
|
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.
|
||||||
184
themes/beautifulhugo/README.md
Normal file
|
|
@ -0,0 +1,184 @@
|
||||||
|
# Beautiful Hugo - An adaptation of the Beautiful Jekyll theme
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
$ mkdir themes
|
||||||
|
$ cd themes
|
||||||
|
$ git submodule add https://github.com/halogenica/beautifulhugo.git beautifulhugo
|
||||||
|
|
||||||
|
|
||||||
|
See [the Hugo documentation](https://gohugo.io/themes/installing/) for more information.
|
||||||
|
|
||||||
|
## Extra Features
|
||||||
|
|
||||||
|
### Responsive
|
||||||
|
|
||||||
|
This theme is designed to look great on both large-screen and small-screen (mobile) devices.
|
||||||
|
|
||||||
|
### Syntax highlighting
|
||||||
|
|
||||||
|
This theme has support for either Hugo's lightning fast Chroma, or both server side and client side highlighting. See [the Hugo docs for more](https://gohugo.io/content-management/syntax-highlighting/).
|
||||||
|
|
||||||
|
#### Chroma - New server side syntax highlighting
|
||||||
|
|
||||||
|
To enable Chroma, add the following to your site parameters:
|
||||||
|
|
||||||
|
```
|
||||||
|
pygmentsCodeFences = true
|
||||||
|
pygmentsUseClasses = true
|
||||||
|
```
|
||||||
|
|
||||||
|
Then, you can generate a different style by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
hugo gen chromastyles --style=trac > static/css/syntax.css
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Pygments - Old server side syntax highlighting
|
||||||
|
|
||||||
|
To use this feature install Pygments (`pip install Pygments`) and add the following to your site parameters:
|
||||||
|
|
||||||
|
```
|
||||||
|
pygmentsStyle = "trac"
|
||||||
|
pygmentsUseClassic = true
|
||||||
|
```
|
||||||
|
|
||||||
|
Pygments is mostly compatable with the newer Chroma. It is slower but has some additional theme options. I recommend Chroma over Pygments. Pygments will use `syntax.css` for highlighting, unless you also set the config `pygmentsUseClasses = false` which will generate the style code directly in the HTML file.
|
||||||
|
|
||||||
|
#### Highlight.js - Client side syntax highlighting
|
||||||
|
```
|
||||||
|
[Params]
|
||||||
|
useHLJS = true
|
||||||
|
```
|
||||||
|
|
||||||
|
Client side highlighting does not require pygments to be installed. This will use `highlight.min.css` instead of `syntax.css` for highlighting (effectively disabling Chroma). Highlight.js has a wider range of support for languages and themes, and an alternative highlighting engine.
|
||||||
|
|
||||||
|
### Disqus support
|
||||||
|
|
||||||
|
To use this feature, uncomment and fill out the `disqusShortname` parameter in `config.toml`.
|
||||||
|
|
||||||
|
### Staticman support
|
||||||
|
|
||||||
|
Add *Staticman* configuration section in `config.toml` or `config.yaml`
|
||||||
|
|
||||||
|
Sample `config.toml` configuration
|
||||||
|
|
||||||
|
```
|
||||||
|
[Params.staticman]
|
||||||
|
api = "https://<API-ENDPOINT>/v3/entry/{GIT-HOST}/<USERNAME>/<REPOSITORY-BLOGNAME>/master/comments"
|
||||||
|
[Params.staticman.recaptcha]
|
||||||
|
sitekey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v"
|
||||||
|
secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic="
|
||||||
|
```
|
||||||
|
|
||||||
|
Note: The public `API-ENDPOINT` https://staticman.net is currently hitting its API limit, so one may use other API instances to provide Staticman comment service.
|
||||||
|
|
||||||
|
The section `[Params.staticman.recaptcha]` is *optional*. To add reCAPTCHA to your site, you have to replace the default values with your own ones (to be obtained from Google.) The site `secret` has to be encrypted with
|
||||||
|
|
||||||
|
https://<API-ENDPOINT>/v3/encrypt/<SITE-SECRET>
|
||||||
|
|
||||||
|
You must also configure the `staticman.yml` in you blog website.
|
||||||
|
|
||||||
|
```
|
||||||
|
comments:
|
||||||
|
allowedFields: ["name", "email", "website", "comment"]
|
||||||
|
branch : "master"
|
||||||
|
commitMessage : "New comment in {options.slug}"
|
||||||
|
path: "data/comments/{options.slug}"
|
||||||
|
filename : "comment-{@timestamp}"
|
||||||
|
format : "yaml"
|
||||||
|
moderation : true
|
||||||
|
requiredFields : ['name', 'email', 'comment']
|
||||||
|
transforms:
|
||||||
|
email : md5
|
||||||
|
generatedFields:
|
||||||
|
date:
|
||||||
|
type : "date"
|
||||||
|
options:
|
||||||
|
format : "iso8601"
|
||||||
|
reCaptcha:
|
||||||
|
enabled: true
|
||||||
|
siteKey: "6LeGeTgUAAAAAAqVrfTwox1kJQFdWl-mLzKasV0v"
|
||||||
|
secret: "hsGjWtWHR4HK4pT7cUsWTArJdZDxxE2pkdg/ArwCguqYQrhuubjj3RS9C5qa8xu4cx/Y9EwHwAMEeXPCZbLR9eW1K9LshissvNcYFfC/b8KKb4deH4V1+oqJEk/JcoK6jp6Rr2nZV4rjDP9M7nunC3WR5UGwMIYb8kKhur9pAic="
|
||||||
|
```
|
||||||
|
|
||||||
|
If you *don't* have the section `[Params.staticman]` in `config.toml`, you *won't* need the section `reCaptcha` in `staticman.yml`
|
||||||
|
|
||||||
|
### Google Analytics
|
||||||
|
|
||||||
|
To add Google Analytics, simply sign up to [Google Analytics](https://www.google.com/analytics/) to obtain your Google Tracking ID, and add this tracking ID to the `googleAnalytics` parameter in `config.toml`.
|
||||||
|
|
||||||
|
### Commit SHA on the footer
|
||||||
|
|
||||||
|
If the source of your site is in a Git repo, the SHA corresponding to the commit the site is built from can be shown on the footer. To do so, two site parameters `commit` has to be defined in the config file `config.toml`:
|
||||||
|
|
||||||
|
```
|
||||||
|
enableGitInfo = true
|
||||||
|
[Params]
|
||||||
|
commit = "https://github.com/<username>/<siterepo>/tree/"
|
||||||
|
```
|
||||||
|
|
||||||
|
See at [vincenttam/vincenttam.gitlab.io](https://gitlab.com/vincenttam/vincenttam.gitlab.io) for an example of how to add it to a continuous integration system.
|
||||||
|
|
||||||
|
### Multilingual
|
||||||
|
|
||||||
|
To allow Beautiful Hugo to go multilingual, you need to define the languages
|
||||||
|
you want to use inside the `languages` parameter on `config.toml` file, also
|
||||||
|
redefining the content dir for each one. Check the `i18n/` folder to see all
|
||||||
|
languages available.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[languages]
|
||||||
|
[languages.en]
|
||||||
|
contentDir = "content/en" # English
|
||||||
|
[languages.ja]
|
||||||
|
contentDir = "content/ja" # Japanese
|
||||||
|
[languages.br]
|
||||||
|
contentDir = "content/br" # Brazilian Portuguese
|
||||||
|
```
|
||||||
|
|
||||||
|
Now you just need to create a subdir within the `content/` folder for each
|
||||||
|
language and just put stuff inside `page/` and `post/` regular directories.
|
||||||
|
```
|
||||||
|
content/ content/ content/
|
||||||
|
└── en/ └── br/ └── ja/
|
||||||
|
├── page/ ├── page/ ├── page/
|
||||||
|
└── post/ └── post/ └── post/
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extra shortcodes
|
||||||
|
|
||||||
|
There are two extra shortcodes provided (along with the customized figure shortcode):
|
||||||
|
|
||||||
|
#### Details
|
||||||
|
|
||||||
|
This simply adds the html5 detail attribute, supported on all *modern* browsers. Use it like this:
|
||||||
|
|
||||||
|
```
|
||||||
|
{{< details "This is the details title (click to expand)" >}}
|
||||||
|
This is the content (hidden until clicked).
|
||||||
|
{{< /details >}}
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Split
|
||||||
|
|
||||||
|
This adds a two column side-by-side environment (will turn into 1 col for narrow devices):
|
||||||
|
|
||||||
|
```
|
||||||
|
{{< columns >}}
|
||||||
|
This is column 1.
|
||||||
|
{{< column >}}
|
||||||
|
This is column 2.
|
||||||
|
{{< endcolumn >}}
|
||||||
|
```
|
||||||
|
|
||||||
|
## About
|
||||||
|
|
||||||
|
This is an adaptation of the Jekyll theme [Beautiful Jekyll](https://deanattali.com/beautiful-jekyll/) by [Dean Attali](https://deanattali.com/aboutme#contact). It supports most of the features of the original theme, and many new features. It has diverged from the Jekyll theme over time, with years of community updates.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT Licensed, see [LICENSE](https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE).
|
||||||
9
themes/beautifulhugo/archetypes/default.md
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
author: ""
|
||||||
|
type: ""
|
||||||
|
date: {{ .Date }}
|
||||||
|
subtitle: ""
|
||||||
|
image: ""
|
||||||
|
tags: []
|
||||||
|
---
|
||||||
161
themes/beautifulhugo/data/beautifulhugo/social.toml
Normal file
|
|
@ -0,0 +1,161 @@
|
||||||
|
[[social_icons]]
|
||||||
|
id = "email"
|
||||||
|
url = "mailto:%s"
|
||||||
|
title = "Email me"
|
||||||
|
icon = "fas fa-envelope"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "facebook"
|
||||||
|
url = "https://www.facebook.com/%s"
|
||||||
|
title = "Facebook"
|
||||||
|
icon = "fab fa-facebook"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "github"
|
||||||
|
url = "https://github.com/%s"
|
||||||
|
title = "GitHub"
|
||||||
|
icon = "fab fa-github"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "gitlab"
|
||||||
|
url = "https://gitlab.com/%s"
|
||||||
|
title = "GitLab"
|
||||||
|
icon = "fab fa-gitlab"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "bitbucket"
|
||||||
|
url = "https://bitbucket.org/%s"
|
||||||
|
title = "Bitbucket"
|
||||||
|
icon = "fab fa-bitbucket"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "twitter"
|
||||||
|
url = "https://twitter.com/%s"
|
||||||
|
title = "Twitter"
|
||||||
|
icon = "fab fa-twitter"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "slack"
|
||||||
|
url = "https://%s.slack.com/"
|
||||||
|
title = "Slack"
|
||||||
|
icon = "fab fa-slack"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "reddit"
|
||||||
|
url = "https://reddit.com/u/%s"
|
||||||
|
title = "Reddit"
|
||||||
|
icon = "fab fa-reddit-alien"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "linkedin"
|
||||||
|
url = "https://linkedin.com/in/%s"
|
||||||
|
title = "LinkedIn"
|
||||||
|
icon = "fab fa-linkedin"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "xing"
|
||||||
|
url = "https://www.xing.com/profile/%s"
|
||||||
|
title = "Xing"
|
||||||
|
icon = "fab fa-xing"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "stackoverflow"
|
||||||
|
url = "https://stackoverflow.com/%s"
|
||||||
|
title = "StackOverflow"
|
||||||
|
icon = "fab fa-stack-overflow"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "snapchat"
|
||||||
|
url = "https://www.snapchat.com/add/%s"
|
||||||
|
title = "Snapchat"
|
||||||
|
icon = "fab fa-snapchat-ghost"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "instagram"
|
||||||
|
url = "https://www.instagram.com/%s"
|
||||||
|
title = "Instagram"
|
||||||
|
icon = "fab fa-instagram"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "youtube"
|
||||||
|
url = "https://www.youtube.com/%s"
|
||||||
|
title = "Youtube"
|
||||||
|
icon = "fab fa-youtube"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "soundcloud"
|
||||||
|
url = "https://soundcloud.com/%s"
|
||||||
|
title = "SoundCloud"
|
||||||
|
icon = "fab fa-soundcloud"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "spotify"
|
||||||
|
url = "https://open.spotify.com/user/%s"
|
||||||
|
title = "Spotify"
|
||||||
|
icon = "fab fa-spotify"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "bandcamp"
|
||||||
|
url = "https://%s.bandcamp.com/"
|
||||||
|
title = "Bandcamp"
|
||||||
|
icon = "fab fa-bandcamp"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "itchio"
|
||||||
|
url = "https://itch.io/profile/%s"
|
||||||
|
title = "Itch.io"
|
||||||
|
icon = "fas fa-gamepad"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "keybase"
|
||||||
|
url = "https://keybase.io/%s"
|
||||||
|
title = "Keybase"
|
||||||
|
icon = "fab fa-keybase"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "vk"
|
||||||
|
url = "https://vk.com/%s"
|
||||||
|
title = "VK"
|
||||||
|
icon = "fab fa-vk"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "paypal"
|
||||||
|
url = "https://paypal.me/%s"
|
||||||
|
title = "PayPal"
|
||||||
|
icon = "fab fa-paypal"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "telegram"
|
||||||
|
url = "https://telegram.me/%s"
|
||||||
|
title = "Telegram"
|
||||||
|
icon = "fab fa-telegram"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "500px"
|
||||||
|
url = "https://500px.com/%s"
|
||||||
|
title = "500px"
|
||||||
|
icon = "fab fa-500px"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "codepen"
|
||||||
|
url = "https://codepen.io/%s"
|
||||||
|
title = "CodePen"
|
||||||
|
icon = "fab fa-codepen"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "kaggle"
|
||||||
|
url = "https://www.kaggle.com/%s"
|
||||||
|
title = "kaggle"
|
||||||
|
icon = "fab fa-kaggle"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "mastodon"
|
||||||
|
url = "https://%s"
|
||||||
|
title = "Mastodon"
|
||||||
|
icon = "fab fa-mastodon"
|
||||||
|
|
||||||
|
[[social_icons]]
|
||||||
|
id = "weibo"
|
||||||
|
url = "https://weibo.com/%s"
|
||||||
|
title = "Weibo"
|
||||||
|
icon = "fab fa-weibo"
|
||||||
113
themes/beautifulhugo/exampleSite/config.toml
Normal file
|
|
@ -0,0 +1,113 @@
|
||||||
|
baseurl = "https://username.github.io"
|
||||||
|
DefaultContentLanguage = "en"
|
||||||
|
#DefaultContentLanguage = "ja"
|
||||||
|
title = "Beautiful Hugo"
|
||||||
|
theme = "beautifulhugo"
|
||||||
|
metaDataFormat = "yaml"
|
||||||
|
pygmentsStyle = "trac"
|
||||||
|
pygmentsUseClasses = true
|
||||||
|
pygmentsCodeFences = true
|
||||||
|
pygmentsCodefencesGuessSyntax = true
|
||||||
|
#pygmentsUseClassic = true
|
||||||
|
#pygmentOptions = "linenos=inline"
|
||||||
|
#disqusShortname = "XXX"
|
||||||
|
#googleAnalytics = "XXX"
|
||||||
|
|
||||||
|
[Params]
|
||||||
|
# homeTitle = "Beautiful Hugo Theme" # Set a different text for the header on the home page
|
||||||
|
subtitle = "Build a beautiful and simple website in minutes"
|
||||||
|
mainSections = ["post","posts"]
|
||||||
|
logo = "img/avatar-icon.png" # Expecting square dimensions
|
||||||
|
favicon = "img/favicon.ico"
|
||||||
|
dateFormat = "January 2, 2006"
|
||||||
|
commit = false
|
||||||
|
rss = true
|
||||||
|
comments = true
|
||||||
|
readingTime = true
|
||||||
|
wordCount = true
|
||||||
|
useHLJS = true
|
||||||
|
socialShare = true
|
||||||
|
delayDisqus = true
|
||||||
|
showRelatedPosts = true
|
||||||
|
# hideAuthor = true
|
||||||
|
# gcse = "012345678901234567890:abcdefghijk" # Get your code from google.com/cse. Make sure to go to "Look and Feel" and change Layout to "Full Width" and Theme to "Classic"
|
||||||
|
|
||||||
|
#[[Params.bigimg]]
|
||||||
|
# src = "img/triangle.jpg"
|
||||||
|
# desc = "Triangle"
|
||||||
|
#[[Params.bigimg]]
|
||||||
|
# src = "img/sphere.jpg"
|
||||||
|
# desc = "Sphere"
|
||||||
|
# # position: see values of CSS background-position.
|
||||||
|
# position = "center top"
|
||||||
|
#[[Params.bigimg]]
|
||||||
|
# src = "img/hexagon.jpg"
|
||||||
|
# desc = "Hexagon"
|
||||||
|
|
||||||
|
[Author]
|
||||||
|
name = "Some Person"
|
||||||
|
website = "yourwebsite.com"
|
||||||
|
email = "youremail@domain.com"
|
||||||
|
facebook = "username"
|
||||||
|
github = "username"
|
||||||
|
gitlab = "username"
|
||||||
|
bitbucket = "username"
|
||||||
|
twitter = "username"
|
||||||
|
reddit = "username"
|
||||||
|
linkedin = "username"
|
||||||
|
xing = "username"
|
||||||
|
stackoverflow = "users/XXXXXXX/username"
|
||||||
|
snapchat = "username"
|
||||||
|
instagram = "username"
|
||||||
|
youtube = "user/username" # or channel/channelname
|
||||||
|
soundcloud = "username"
|
||||||
|
spotify = "username"
|
||||||
|
bandcamp = "username"
|
||||||
|
itchio = "username"
|
||||||
|
vk = "username"
|
||||||
|
paypal = "username"
|
||||||
|
telegram = "username"
|
||||||
|
500px = "username"
|
||||||
|
codepen = "username"
|
||||||
|
mastodon = "url"
|
||||||
|
kaggle = "username"
|
||||||
|
weibo = "username"
|
||||||
|
slack = "username"
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
name = "Blog"
|
||||||
|
url = ""
|
||||||
|
weight = 1
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
name = "About"
|
||||||
|
url = "page/about/"
|
||||||
|
weight = 3
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "samples"
|
||||||
|
name = "Samples"
|
||||||
|
weight = 2
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
parent = "samples"
|
||||||
|
name = "Big Image Sample"
|
||||||
|
url = "post/2017-03-07-bigimg-sample"
|
||||||
|
weight = 1
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
parent = "samples"
|
||||||
|
name = "Math Sample"
|
||||||
|
url = "post/2017-03-05-math-sample"
|
||||||
|
weight = 2
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
parent = "samples"
|
||||||
|
name = "Code Sample"
|
||||||
|
url = "post/2016-03-08-code-sample"
|
||||||
|
weight = 3
|
||||||
|
|
||||||
|
[[menu.main]]
|
||||||
|
name = "Tags"
|
||||||
|
url = "tags"
|
||||||
|
weight = 3
|
||||||
2
themes/beautifulhugo/exampleSite/content/_index.md
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
## Front Page Content
|
||||||
|
`beautifulhugo` supports content on your front page. Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` if you don't want any content here.
|
||||||
16
themes/beautifulhugo/exampleSite/content/page/about.md
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
---
|
||||||
|
title: About me
|
||||||
|
subtitle: Why you'd want to go on a date with me
|
||||||
|
comments: false
|
||||||
|
---
|
||||||
|
|
||||||
|
My name is Inigo Montoya. I have the following qualities:
|
||||||
|
|
||||||
|
- I rock a great mustache
|
||||||
|
- I'm extremely loyal to my family
|
||||||
|
|
||||||
|
What else do you need?
|
||||||
|
|
||||||
|
### my history
|
||||||
|
|
||||||
|
To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](http://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions.
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: First post!
|
||||||
|
date: 2015-01-05
|
||||||
|
---
|
||||||
|
|
||||||
|
This is my first post, how exciting!
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: Pirates arrrr
|
||||||
|
date: 2015-01-15
|
||||||
|
---
|
||||||
|
|
||||||
|
Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
---
|
||||||
|
title: Soccer
|
||||||
|
subtitle: Best sport ever!
|
||||||
|
date: 2015-01-19
|
||||||
|
---
|
||||||
|
|
||||||
|
From Wikipedia:
|
||||||
|
|
||||||
|
Association football, more commonly known as football or soccer,[2] is a sport played between two teams of eleven players with a spherical ball. It is played by 250 million players in over 200 countries, making it the world's most popular sport.[3][4][5][6] The game is played on a rectangular field with a goal at each end. The object of the game is to score by getting the ball into the opposing goal.
|
||||||
|
|
||||||
|
The goalkeepers are the only players allowed to touch the ball with their hands or arms while it is in play and then only in their penalty area. Outfield players mostly use their feet to strike or pass the ball, but may use their head or torso to strike the ball instead. The team that scores the most goals by the end of the match wins. If the score is level at the end of the game, either a draw is declared or the game goes into extra time and/or a penalty shootout depending on the format of the competition. The Laws of the Game were originally codified in England by The Football Association in 1863. Association football is governed internationally by the International Federation of Association Football (FIFA; French: Fédération Internationale de Football Association) which organises a World Cup every four years.[7]
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
title: Dear diary
|
||||||
|
date: 2015-01-27
|
||||||
|
---
|
||||||
|
|
||||||
|
What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
title: To be
|
||||||
|
subtitle: ... or not to be?
|
||||||
|
date: 2015-02-13
|
||||||
|
---
|
||||||
|
|
||||||
|
To be, or not to be--that is the question:
|
||||||
|
Whether 'tis nobler in the mind to suffer
|
||||||
|
The slings and arrows of outrageous fortune
|
||||||
|
Or to take arms against a sea of troubles
|
||||||
|
And by opposing end them. To die, to sleep--
|
||||||
|
No more--and by a sleep to say we end
|
||||||
|
The heartache, and the thousand natural shocks
|
||||||
|
That flesh is heir to. 'Tis a consummation
|
||||||
|
Devoutly to be wished. To die, to sleep--
|
||||||
|
To sleep--perchance to dream: ay, there's the rub,
|
||||||
|
For in that sleep of death what dreams may come
|
||||||
|
When we have shuffled off this mortal coil,
|
||||||
|
Must give us pause. There's the respect
|
||||||
|
That makes calamity of so long life.
|
||||||
|
For who would bear the whips and scorns of time,
|
||||||
|
Th' oppressor's wrong, the proud man's contumely
|
||||||
|
The pangs of despised love, the law's delay,
|
||||||
|
The insolence of office, and the spurns
|
||||||
|
That patient merit of th' unworthy takes,
|
||||||
|
When he himself might his quietus make
|
||||||
|
With a bare bodkin? Who would fardels bear,
|
||||||
|
To grunt and sweat under a weary life,
|
||||||
|
But that the dread of something after death,
|
||||||
|
The undiscovered country, from whose bourn
|
||||||
|
No traveller returns, puzzles the will,
|
||||||
|
And makes us rather bear those ills we have
|
||||||
|
Than fly to others that we know not of?
|
||||||
|
Thus conscience does make cowards of us all,
|
||||||
|
And thus the native hue of resolution
|
||||||
|
Is sicklied o'er with the pale cast of thought,
|
||||||
|
And enterprise of great pitch and moment
|
||||||
|
With this regard their currents turn awry
|
||||||
|
And lose the name of action. -- Soft you now,
|
||||||
|
The fair Ophelia! -- Nymph, in thy orisons
|
||||||
|
Be all my sins remembered.
|
||||||
|
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
title: Test markdown
|
||||||
|
subtitle: Each post also has a subtitle
|
||||||
|
date: 2015-02-20
|
||||||
|
tags: ["example", "markdown"]
|
||||||
|
---
|
||||||
|
|
||||||
|
You can write regular [markdown](http://markdowntutorial.com/) here and [Hugo](https://gohugo.io) will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc.
|
||||||
|
|
||||||
|
**Here is some bold text**
|
||||||
|
|
||||||
|
## Here is a secondary heading
|
||||||
|
|
||||||
|
Here's a useless table:
|
||||||
|
|
||||||
|
| Number | Next number | Previous number |
|
||||||
|
| :------ |:--- | :--- |
|
||||||
|
| Five | Six | Four |
|
||||||
|
| Ten | Eleven | Nine |
|
||||||
|
| Seven | Eight | Six |
|
||||||
|
| Two | Three | One |
|
||||||
|
|
||||||
|
|
||||||
|
How about a yummy crepe?
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Here's a code chunk with syntax highlighting:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var foo = function(x) {
|
||||||
|
return(x + 5);
|
||||||
|
}
|
||||||
|
foo(3)
|
||||||
|
```
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
---
|
||||||
|
title: Flake it till you make it
|
||||||
|
subtitle: Excerpt from Soulshaping by Jeff Brown
|
||||||
|
date: 2015-02-26
|
||||||
|
bigimg: [{src: "/img/path.jpg", desc: "Path"}]
|
||||||
|
---
|
||||||
|
|
||||||
|
Under what circumstances should we step off a path? When is it essential that we finish what we start? If I bought a bag of peanuts and had an allergic reaction, no one would fault me if I threw it out. If I ended a relationship with a woman who hit me, no one would say that I had a commitment problem. But if I walk away from a seemingly secure route because my soul has other ideas, I am a flake?
|
||||||
|
|
||||||
|
The truth is that no one else can definitively know the path we are here to walk. It’s tempting to listen—many of us long for the omnipotent other—but unless they are genuine psychic intuitives, they can’t know. All others can know is their own truth, and if they’ve actually done the work to excavate it, they will have the good sense to know that they cannot genuinely know anyone else’s. Only soul knows the path it is here to walk. Since you are the only one living in your temple, only you can know its scriptures and interpretive structure.
|
||||||
|
|
||||||
|
At the heart of the struggle are two very different ideas of success—survival-driven and soul-driven. For survivalists, success is security, pragmatism, power over others. Success is the absence of material suffering, the nourishing of the soul be damned. It is an odd and ironic thing that most of the material power in our world often resides in the hands of younger souls. Still working in the egoic and material realms, they love the sensations of power and focus most of their energy on accumulation. Older souls tend not to be as materially driven. They have already played the worldly game in previous lives and they search for more subtle shades of meaning in this one—authentication rather than accumulation. They are often ignored by the culture at large, although they really are the truest warriors.
|
||||||
|
|
||||||
|
A soulful notion of success rests on the actualization of our innate image. Success is simply the completion of a soul step, however unsightly it may be. We have finished what we started when the lesson is learned. What a fear-based culture calls a wonderful opportunity may be fruitless and misguided for the soul. Staying in a passionless relationship may satisfy our need for comfort, but it may stifle the soul. Becoming a famous lawyer is only worthwhile if the soul demands it. It is an essential failure if you are called to be a monastic this time around. If you need to explore and abandon ten careers in order to stretch your soul toward its innate image, then so be it. Flake it till you make it.
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
---
|
||||||
|
title: Code Sample
|
||||||
|
subtitle: Using Hugo or Pygments
|
||||||
|
date: 2016-03-08
|
||||||
|
tags: ["example", "code"]
|
||||||
|
---
|
||||||
|
|
||||||
|
The following are two code samples using syntax highlighting.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
The following is a code sample using triple backticks ( ``` ) code fencing provided in Hugo. This is client side highlighting and does not require any special installation.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
var num1, num2, sum
|
||||||
|
num1 = prompt("Enter first number")
|
||||||
|
num2 = prompt("Enter second number")
|
||||||
|
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
|
||||||
|
alert("Sum = " + sum) // "+" means combine into a string
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
The following is a code sample using the "highlight" shortcode provided in Hugo. This is server side highlighting and requires Python and Pygments to be installed.
|
||||||
|
|
||||||
|
{{< highlight javascript >}}
|
||||||
|
var num1, num2, sum
|
||||||
|
num1 = prompt("Enter first number")
|
||||||
|
num2 = prompt("Enter second number")
|
||||||
|
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
|
||||||
|
alert("Sum = " + sum) // "+" means combine into a string
|
||||||
|
{{</ highlight >}}
|
||||||
|
|
||||||
|
|
||||||
|
And here is the same code with line numbers:
|
||||||
|
|
||||||
|
{{< highlight javascript "linenos=inline">}}
|
||||||
|
var num1, num2, sum
|
||||||
|
num1 = prompt("Enter first number")
|
||||||
|
num2 = prompt("Enter second number")
|
||||||
|
sum = parseInt(num1) + parseInt(num2) // "+" means "add"
|
||||||
|
alert("Sum = " + sum) // "+" means combine into a string
|
||||||
|
{{</ highlight >}}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
---
|
||||||
|
title: Math Sample
|
||||||
|
subtitle: Using KaTeX
|
||||||
|
date: 2017-03-05
|
||||||
|
tags: ["example", "math"]
|
||||||
|
---
|
||||||
|
|
||||||
|
KaTeX can be used to generate complex math formulas server-side.
|
||||||
|
|
||||||
|
$$
|
||||||
|
\phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots
|
||||||
|
$$
|
||||||
|
|
||||||
|
Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/).
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
### Example 1
|
||||||
|
|
||||||
|
If the text between $$ contains newlines it will rendered in display mode:
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
|
||||||
|
$$
|
||||||
|
|
||||||
|
|
||||||
|
### Example 2
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
\frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
|
||||||
|
$$
|
||||||
|
|
||||||
|
|
||||||
|
### Example 3
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
|
||||||
|
$$
|
||||||
|
```
|
||||||
|
$$
|
||||||
|
1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
|
||||||
|
$$
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
---
|
||||||
|
title: Big Image Sample
|
||||||
|
subtitle: Using Multiple Images
|
||||||
|
date: 2017-03-07
|
||||||
|
tags: ["example", "bigimg"]
|
||||||
|
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||||
|
---
|
||||||
|
|
||||||
|
The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
|
||||||
|
A single bigimg can be specified in the front matter by the following YAML:
|
||||||
|
```
|
||||||
|
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}]
|
||||||
|
```
|
||||||
|
|
||||||
|
Multiple bigimgs can be specified in the front matter by the following YAML:
|
||||||
|
```
|
||||||
|
bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"},
|
||||||
|
{src: "/img/sphere.jpg", desc: "Sphere"},
|
||||||
|
{src: "/img/hexagon.jpg", desc: "Hexagon"}]
|
||||||
|
```
|
||||||
|
|
||||||
|
Also note that the description field is optional, and images could instead be specified by:
|
||||||
|
```
|
||||||
|
bigimg: [{src: "/img/triangle.jpg"},
|
||||||
|
{src: "/img/sphere.jpg"},
|
||||||
|
{src: "/img/hexagon.jpg"}]
|
||||||
|
```
|
||||||
|
|
||||||
|
The above YAML array of hashes were written in "flow" style. However when generating a new page or post with `hugo new post/mypost.md`, hugo may interpret the archetype for bigimg in the default YAML style. Defining multiple bigimg's complete with descriptions in this style would be specified by:
|
||||||
|
```
|
||||||
|
bigimg:
|
||||||
|
- {src: "/img/triangle.jpg", desc: "Triangle"}
|
||||||
|
- {src: "/img/sphere.jpg", desc: "Sphere"}
|
||||||
|
- {src: "/img/hexagon.jpg", desc: "Hexagon"}
|
||||||
|
```
|
||||||
|
|
||||||
|
Additional information can be found [in this YAML tutorial](https://rhnh.net/2011/01/31/yaml-tutorial/).
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
title: Photoswipe Gallery Sample
|
||||||
|
subtitle: Making a Gallery
|
||||||
|
date: 2017-03-20
|
||||||
|
tags: ["example", "photoswipe"]
|
||||||
|
---
|
||||||
|
|
||||||
|
Beautiful Hugo adds a few custom shortcodes created by [Li-Wen Yip](https://www.liwen.id.au/heg/) and [Gert-Jan van den Berg](https://github.com/GjjvdBurg/HugoPhotoSwipe) for making galleries with [PhotoSwipe](http://photoswipe.com) .
|
||||||
|
|
||||||
|
{{< gallery caption-effect="fade" >}}
|
||||||
|
{{< figure thumb="-thumb" link="/img/hexagon.jpg" >}}
|
||||||
|
{{< figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" >}}
|
||||||
|
{{< figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" >}}
|
||||||
|
{{< /gallery >}}
|
||||||
|
|
||||||
|
<!--more-->
|
||||||
|
## Example
|
||||||
|
The above gallery was created using the following shortcodes:
|
||||||
|
```
|
||||||
|
{{</* gallery caption-effect="fade" */>}}
|
||||||
|
{{</* figure thumb="-thumb" link="/img/hexagon.jpg" */>}}
|
||||||
|
{{</* figure thumb="-thumb" link="/img/sphere.jpg" caption="Sphere" */>}}
|
||||||
|
{{</* figure thumb="-thumb" link="/img/triangle.jpg" caption="Triangle" alt="This is a long comment about a triangle" */>}}
|
||||||
|
{{</* /gallery */>}}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
For full details please see the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) page. Basic usages from above are:
|
||||||
|
|
||||||
|
- Create a gallery with open and close tags `{{</* gallery */>}}` and `{{</* /gallery */>}}`
|
||||||
|
- `{{</* figure src="image.jpg" */>}}` will use `image.jpg` for thumbnail and lightbox
|
||||||
|
- `{{</* figure src="thumb.jpg" link="image.jpg" */>}}` will use `thumb.jpg` for thumbnail and `image.jpg` for lightbox
|
||||||
|
- `{{</* figure thumb="-small" link="image.jpg" */>}}` will use `image-small.jpg` for thumbnail and `image.jpg` for lightbox
|
||||||
|
- All the [features/parameters](https://gohugo.io/extras/shortcodes) of Hugo's built-in `figure` shortcode work as normal, i.e. src, link, title, caption, class, attr (attribution), attrlink, alt
|
||||||
|
- `{{</* gallery caption-effect="fade" */>}}` will fade in captions for all figures in this gallery instead of the default slide-up behavior
|
||||||
|
- Many gallery styles for captions and hover effects exist; view the [hugo-easy-gallery GitHub](https://github.com/liwenyip/hugo-easy-gallery/) for all options
|
||||||
|
- Note that this theme will load the photoswipe gallery theme and scripts by default, no need to load photoswipe on your individual pages
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<!--
|
||||||
|
If you want to include any custom html just before </body>, put it in this file.
|
||||||
|
Or you can delete these file if you don't need it.
|
||||||
|
-->
|
||||||
|
<!-- for example, you could include some js libraries:
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.js" integrity="sha256-HdIuWBZj4eftihsoDCJoMYjZi6aNVaw7YlUpzKT3ZxI=" crossorigin="anonymous"></script>
|
||||||
|
-->
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!--
|
||||||
|
If you want to include any custom html just before </head>, put it in this file.
|
||||||
|
Or you can delete these file if you don't need it.
|
||||||
|
-->
|
||||||
|
<!-- for example, you could insert this custom css, which makes the bigimg not stretch:
|
||||||
|
<style>
|
||||||
|
.intro-header.big-img, .intro-header.big-img .big-img-transition {
|
||||||
|
-webkit-background-size: contain !important;
|
||||||
|
-moz-background-size: contain !important;
|
||||||
|
background-size: contain !important;
|
||||||
|
-o-background-size: contain !important;
|
||||||
|
background-color: lightgrey;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
-->
|
||||||
|
<!-- or you could include some additional css libraries:
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.19.1/vis.css" integrity="sha256-I1UoFd33KHIydu88R9owFaQWzwkiZV4hXXug5aYaM28=" crossorigin="anonymous" />
|
||||||
|
-->
|
||||||
0
themes/beautifulhugo/exampleSite/static/.gitkeep
Normal file
74
themes/beautifulhugo/i18n/br.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2 de Janeiro de 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "02/Jan/2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Postado em {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Ultima modificação em {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Outras linguagens: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Saiba mais"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Posts antigos"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Posts novos"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Post anterior"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Próximo Post"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutos"
|
||||||
|
- id: words
|
||||||
|
translation: "palavras"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Opa, a página não existe"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> alimentada • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptado de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Ver navegação"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Idioma"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Buscar"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Buscar {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Fechar"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Sem comentários"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "comentário"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "comentários"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Você pode usar sintaxe MarkDown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Seu nome"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Seu email"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Seu website"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Mostrar"
|
||||||
|
- id: comments
|
||||||
|
translation: "comentários"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Veja também"
|
||||||
74
themes/beautifulhugo/i18n/de.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "02.01.2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Gepostet am {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Zuletzt geändert am {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Andere Sprachen: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Mehr"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Ältere Posts"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Neuere Posts"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Letzter Post"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Nächster Post"
|
||||||
|
- id: readTime
|
||||||
|
translation: "Minuten"
|
||||||
|
- id: words
|
||||||
|
translation: "Wörter"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Ups, diese Seite existiert nicht. (404 Error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> angetrieben • Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> angepasst von <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Navigation"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Sprache"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Suche"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Suche {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Schließen"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Kein Kommentar"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "Kommentar"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "Kommentare"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Sie können Markdown-Syntax verwenden"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Ihr Name"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Ihre Emailadresse"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Ihre Website"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Zeige"
|
||||||
|
- id: comments
|
||||||
|
translation: "Kommentare"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Siehe auch"
|
||||||
74
themes/beautifulhugo/i18n/dk.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "January 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "Jan 2, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Slået op den {{ .Count }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Senest redigeret den {{ .Count }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Andre sprog: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Læs mere"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Ældre opslag"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Nyere opslag"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Forrige opslag"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Næste opslag"
|
||||||
|
- id: readTime
|
||||||
|
translation: "Minutter"
|
||||||
|
- id: words
|
||||||
|
translation: "Ord"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Ups, denne side eksisterer ikke. (404 error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> drevet • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> tilpasset fra <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Navigation"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Sprog"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Søg"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Søg {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Luk"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Ingen kommentar"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "Kommentar"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "Kommentarer"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Du kan anvende Markdown syntax"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Dit navn"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Din emailadresse"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Din hjemmeside"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Vis"
|
||||||
|
- id: comments
|
||||||
|
translation: "Kommentarer"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Se også"
|
||||||
74
themes/beautifulhugo/i18n/en.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "January 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "Jan 2, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Posted on {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Last modified on {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Other languages: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Read More"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Older Posts"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Newer Posts"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Previous Post"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Next Post"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutes"
|
||||||
|
- id: words
|
||||||
|
translation: "words"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Whoops, this page doesn't exist. Move along. (404 error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> powered • Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adapted from <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Toggle navigation"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Language"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Search"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Search {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Close"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "No comment"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "comment"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "comments"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "You can use Markdown syntax"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Your name"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Your email address"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "You website"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Show"
|
||||||
|
- id: comments
|
||||||
|
translation: "comments"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "See also"
|
||||||
74
themes/beautifulhugo/i18n/eo.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2006-01-02"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Afiŝiĝis je {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Laste aliiĝis je {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Aliaj lingvoj: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Legi pli"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Plimalnovaj afiŝoj"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Plinovaj afiŝoj"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Antaŭa afiŝo"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Sekva afiŝo"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutoj"
|
||||||
|
- id: words
|
||||||
|
translation: "vortoj"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Ups, ĉi tiu paĝo ne ekzistas. (404 Error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-povigita • Haŭto de <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptiĝis de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Navigacio"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Lingvo"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Serĉi"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Serĉi {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Fermi"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Sen komentoj"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "komento"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "komentoj"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Vi povus uzi Markdown-sintakson"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Via nomo"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Via retpoŝtadreso"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Via retpaĝaro"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Montru"
|
||||||
|
- id: comments
|
||||||
|
translation: "komentoj"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Vidu ankaŭ"
|
||||||
74
themes/beautifulhugo/i18n/es.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2 de enero, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Publicado el {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Última modificación en {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Otros idiomas: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Leer más"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Artículos anteriores"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Artículos siguientes"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Artículo anterior"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Artículo siguiente"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutos"
|
||||||
|
- id: words
|
||||||
|
translation: "palabras"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "¡Vaya! Esta página no existe (error 404)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> alimentada • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adaptado de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Conmuta navegación"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Idioma"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Buscar"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Buscar en {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Cerrar"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Sin comentarios"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "comentario"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "comentarios"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Puedes usar la sintaxis de Markdown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Tu nombre"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Tu correo electrónico"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Tu sitio web"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Mostrar"
|
||||||
|
- id: comments
|
||||||
|
translation: "comentarios"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Ver también"
|
||||||
74
themes/beautifulhugo/i18n/fr.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "January 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Posté le {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Dernière modification le {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Autres langues : "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Voir plus"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Anciens posts"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Nouveaux posts"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Post précédent"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Post suivant"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutes"
|
||||||
|
- id: words
|
||||||
|
translation: "mots"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Oups, cette page n'existe pas. (erreur 404)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: 'Carbure avec <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Avec le Theme <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adapté de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Toggle navigation"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Langue"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Rechercher"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Rechercher {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Fermer"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Pas de commentaire"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "commentaire"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "commentaires"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Vous pouvez utiliser la syntaxe Markdown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Votre nom"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Votre addresse mail"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Votre site web"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Afficher"
|
||||||
|
- id: comments
|
||||||
|
translation: "commentaires"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Voir également"
|
||||||
74
themes/beautifulhugo/i18n/hr.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "Siječanj 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "Sij 2, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Obajvljeno na {{ .Count }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Zadnja promjena na {{ .Count }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Ostali jezici: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Pročitaj više"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Starije objave"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Novije objave"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Prethodna objava"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Slijedeća objava"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minuta"
|
||||||
|
- id: words
|
||||||
|
translation: "riječi"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Whoops, ova stranica ne postoji. Idemo dalje. (404 error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Pokreće Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> prilagođena od <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Uključi/isključi navigaciju"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Jezik"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Traži"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Traži {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Zatvori"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Nema komenatara"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "komentar"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "komenatari"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Možete koristiti Markdown sintaksu"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Vaše ime"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Vaša email adresa"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "You web stranica"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Pokaži"
|
||||||
|
- id: comments
|
||||||
|
translation: "komentari"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Također vidi"
|
||||||
74
themes/beautifulhugo/i18n/it.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2 January 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Redatto il {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Ultima modifica il {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Altre lingue: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Leggi"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Articoli più vecchi"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Articoli più recenti"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Articolo precedente"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Articolo successivo"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minuti"
|
||||||
|
- id: words
|
||||||
|
translation: "parole"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Ops, questa pagina non esiste. (errore 404)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Sviluppato con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattato da <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Attiva/disattiva la navigazione"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Linguaggio"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Cerca"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Cerca {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Chiudi"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Nessun commento"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "commento"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "commenti"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Puoi usare la sintassi Markdown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Il tuo nome"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Il tuo indirizzo mail"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Il tuo website"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Mostra"
|
||||||
|
- id: comments
|
||||||
|
translation: "commenti"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Guarda anche"
|
||||||
74
themes/beautifulhugo/i18n/ja.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2006年1月2日"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "{{ . }}に投稿"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(最終更新日時{{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "翻訳:"
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: "・"
|
||||||
|
- id: readMore
|
||||||
|
translation: "続きを読む"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "古いページ"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "新しいページ"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "前ページ"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "次ページ"
|
||||||
|
- id: readTime
|
||||||
|
translation: "分間"
|
||||||
|
- id: words
|
||||||
|
translation: "言葉"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "おっと、このページが存在しない。他にあたってください。(404エラー)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '起動力に<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • テーマに<a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a>に基づいている<a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "メニューを切り替え"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "言語"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "検索"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "{{ .Site.Title }}を検索"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "閉じる"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "0 件のコメント"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "件のコメント"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "件のコメント"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Markdown を使用できます"
|
||||||
|
- id: yourName
|
||||||
|
translation: "名前"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "メールアドレス"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "ウェブサイト"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "ショー"
|
||||||
|
- id: comments
|
||||||
|
translation: "コメント"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "も参照してください"
|
||||||
74
themes/beautifulhugo/i18n/ko.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2006년 1월 2일"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2006. 1. 2. 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "{{ .Count }}에 게시됨"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "({{ .Count }}에 마지막으로 수정됨)"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "다른 언어: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "더 읽기"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "이전 페이지"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "다음 페이지"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "이전 글"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "다음 글"
|
||||||
|
- id: readTime
|
||||||
|
translation: "분"
|
||||||
|
- id: words
|
||||||
|
translation: "단어"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "이런, 이 페이지를 찾을 수 없어요. (404 오류)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 을 사용함 • <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> 를 개조한 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 테마'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "네비게이션 토글"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "언어"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "검색"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "{{ .Site.Title }}에서 검색"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "닫기"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "댓글이 없습니다."
|
||||||
|
- id: oneComment
|
||||||
|
translation: "개의 댓글"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "개의 댓글들"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "마크다운 문법을 쓸 수 있습니다."
|
||||||
|
- id: yourName
|
||||||
|
translation: "이름"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "이메일"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "웹사이트"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "표시"
|
||||||
|
- id: comments
|
||||||
|
translation: "댓글들"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "더 보면 좋을 글들"
|
||||||
297
themes/beautifulhugo/i18n/lmo.yaml
Normal file
|
|
@ -0,0 +1,297 @@
|
||||||
|
|
||||||
|
|
||||||
|
# Content
|
||||||
|
|
||||||
|
- id: dateFormat
|
||||||
|
|
||||||
|
translation: "2 January 2006"
|
||||||
|
|
||||||
|
- id: shortdateFormat
|
||||||
|
|
||||||
|
translation: "2 Jan 2006 15:04:05"
|
||||||
|
|
||||||
|
- id: postedOnDate
|
||||||
|
|
||||||
|
translation: "Publegaa il {{ .Count }}"
|
||||||
|
|
||||||
|
- id: lastModified
|
||||||
|
|
||||||
|
translation: "(Darrera modifega ell {{ .Count }})"
|
||||||
|
|
||||||
|
- id: translationsLabel
|
||||||
|
|
||||||
|
translation: "Alter lengov: "
|
||||||
|
|
||||||
|
- id: translationsSeparator
|
||||||
|
|
||||||
|
translation: ", "
|
||||||
|
|
||||||
|
- id: readMore
|
||||||
|
|
||||||
|
translation: "Lensg"
|
||||||
|
|
||||||
|
- id: olderPosts
|
||||||
|
|
||||||
|
translation: "Articol pussee vegg"
|
||||||
|
|
||||||
|
- id: newerPosts
|
||||||
|
|
||||||
|
translation: "Articoli pussee noeuv"
|
||||||
|
|
||||||
|
- id: previousPost
|
||||||
|
|
||||||
|
translation: "Articolo de prima"
|
||||||
|
|
||||||
|
- id: nextPost
|
||||||
|
|
||||||
|
translation: "Articolo dopo"
|
||||||
|
|
||||||
|
- id: readTime
|
||||||
|
|
||||||
|
translation: "megnuu"
|
||||||
|
|
||||||
|
- id: words
|
||||||
|
|
||||||
|
translation: "paroll"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
|
||||||
|
- id: pageNotFound
|
||||||
|
|
||||||
|
translation: "Ocio, quella pagina chi la esist no. (errore 404)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
|
||||||
|
translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
|
||||||
|
- id: toggleNavigation
|
||||||
|
|
||||||
|
translation: "Attiva/disattiva la navigazion"
|
||||||
|
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
|
||||||
|
translation: "Lengua"
|
||||||
|
|
||||||
|
- id: gcseLabelShort
|
||||||
|
|
||||||
|
translation: "Cerca"
|
||||||
|
|
||||||
|
- id: gcseLabelLong
|
||||||
|
|
||||||
|
translation: "Cerca {{ .Site.Title }}"
|
||||||
|
|
||||||
|
- id: gcseClose
|
||||||
|
|
||||||
|
translation: "Sara su"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
|
||||||
|
- id: noComment
|
||||||
|
|
||||||
|
translation: "Nissub comment"
|
||||||
|
|
||||||
|
- id: oneComment
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
- id: moreComment
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
- id: useMarkdown
|
||||||
|
|
||||||
|
translation: "Te pòdet doperà la sintassi Markdown"
|
||||||
|
|
||||||
|
- id: yourName
|
||||||
|
|
||||||
|
translation: "El tò nomm"
|
||||||
|
|
||||||
|
- id: yourEmail
|
||||||
|
|
||||||
|
translation: "La toa adressa e-mail"
|
||||||
|
|
||||||
|
- id: yourWebsite
|
||||||
|
|
||||||
|
translation: "El tò sitt web"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
|
||||||
|
- id: show
|
||||||
|
|
||||||
|
translation: "Mostra"
|
||||||
|
|
||||||
|
- id: comments
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
|
||||||
|
- id: seeAlso
|
||||||
|
|
||||||
|
translation: "Varda anca"
|
||||||
|
|
||||||
|
# Content
|
||||||
|
|
||||||
|
- id: dateFormat
|
||||||
|
|
||||||
|
translation: "2 January 2006"
|
||||||
|
|
||||||
|
- id: shortdateFormat
|
||||||
|
|
||||||
|
translation: "2 Jan 2006 15:04:05"
|
||||||
|
|
||||||
|
- id: postedOnDate
|
||||||
|
|
||||||
|
translation: "Publegaa il {{ .Count }}"
|
||||||
|
|
||||||
|
- id: lastModified
|
||||||
|
|
||||||
|
translation: "(Darrera modifega ell {{ .Count }})"
|
||||||
|
|
||||||
|
- id: translationsLabel
|
||||||
|
|
||||||
|
translation: "Alter lengov: "
|
||||||
|
|
||||||
|
- id: translationsSeparator
|
||||||
|
|
||||||
|
translation: ", "
|
||||||
|
|
||||||
|
- id: readMore
|
||||||
|
|
||||||
|
translation: "Lensg"
|
||||||
|
|
||||||
|
- id: olderPosts
|
||||||
|
|
||||||
|
translation: "Articol pussee vegg"
|
||||||
|
|
||||||
|
- id: newerPosts
|
||||||
|
|
||||||
|
translation: "Articoli pussee noeuv"
|
||||||
|
|
||||||
|
- id: previousPost
|
||||||
|
|
||||||
|
translation: "Articolo de prima"
|
||||||
|
|
||||||
|
- id: nextPost
|
||||||
|
|
||||||
|
translation: "Articolo dopo"
|
||||||
|
|
||||||
|
- id: readTime
|
||||||
|
|
||||||
|
translation: "megnuu"
|
||||||
|
|
||||||
|
- id: words
|
||||||
|
|
||||||
|
translation: "paroll"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
|
||||||
|
- id: pageNotFound
|
||||||
|
|
||||||
|
translation: "Ocio, quella pagina chi la esist no. (errore 404)"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
|
||||||
|
translation: '<a href="https://gohugo.io">Desviluppaa con Hugo v{{ .Site.Hugo.Version }}</a> • Tema <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> adattaa de <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
|
||||||
|
- id: toggleNavigation
|
||||||
|
|
||||||
|
translation: "Attiva/disattiva la navigazion"
|
||||||
|
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
|
||||||
|
translation: "Lengua"
|
||||||
|
|
||||||
|
- id: gcseLabelShort
|
||||||
|
|
||||||
|
translation: "Cerca"
|
||||||
|
|
||||||
|
- id: gcseLabelLong
|
||||||
|
|
||||||
|
translation: "Cerca {{ .Site.Title }}"
|
||||||
|
|
||||||
|
- id: gcseClose
|
||||||
|
|
||||||
|
translation: "Sara su"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
|
||||||
|
- id: noComment
|
||||||
|
|
||||||
|
translation: "Nissub comment"
|
||||||
|
|
||||||
|
- id: oneComment
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
- id: moreComment
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
- id: useMarkdown
|
||||||
|
|
||||||
|
translation: "Te pòdet doperà la sintassi Markdown"
|
||||||
|
|
||||||
|
- id: yourName
|
||||||
|
|
||||||
|
translation: "El tò nomm"
|
||||||
|
|
||||||
|
- id: yourEmail
|
||||||
|
|
||||||
|
translation: "La toa adressa e-mail"
|
||||||
|
|
||||||
|
- id: yourWebsite
|
||||||
|
|
||||||
|
translation: "El tò sitt web"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
|
||||||
|
- id: show
|
||||||
|
|
||||||
|
translation: "Mostra"
|
||||||
|
|
||||||
|
- id: comments
|
||||||
|
|
||||||
|
translation: "comment"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
|
||||||
|
- id: seeAlso
|
||||||
|
|
||||||
|
translation: "Varda anca"
|
||||||
74
themes/beautifulhugo/i18n/nb.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "02.01.2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Postet {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Sist endret {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Andre språk: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Les Mer"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Eldre Poster"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Nyere Poster"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Forrige Post"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Neste Post"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minutter"
|
||||||
|
- id: words
|
||||||
|
translation: "ord"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Oisann! Denne siden finnes visst ikke. Prøv noe annet. (404 feil)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: 'Kjører på <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Tema fra <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> tilpasset fra <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Navigasjon på/av"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Språk"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Søk"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Søk {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Lukk"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Ingen kommentarer"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "kommentar"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "kommentarer"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Du kan bruke Markdown syntax"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Ditt navn"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Din e-postadresse"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Din webside"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Vis"
|
||||||
|
- id: comments
|
||||||
|
translation: "kommentarer"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Se også"
|
||||||
74
themes/beautifulhugo/i18n/nl.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2006-01-02"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Gepost op {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Laatst gewijzigd op {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Andere talen: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Meer lezen"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Oudere berichten"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Nieuwere berichten"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Vorige bericht"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Volgende bericht"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minuten"
|
||||||
|
- id: words
|
||||||
|
translation: "woorden"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Oeps, deze pagina bestaat niet. (404 Error)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a>-aangedreven • Thema door <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> aangepast van <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Navigatie"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Taal"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Zoeken"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Zoek {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Sluiten"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Geen commentaar"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "reactie"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "reacties"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Je kunt Markdown-syntax gebruiken"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Jouw naam"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Jouw e-mailadres"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Jouw website"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Laat zien"
|
||||||
|
- id: comments
|
||||||
|
translation: "reacties"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Zie ook"
|
||||||
74
themes/beautifulhugo/i18n/pl.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "02.01.2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Opublikowany {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Ostatnia modyfikacja {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Inne języki: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Więcej"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Poprzednie wpisy"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Następne wpisy"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Poprzedni"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Następny"
|
||||||
|
- id: readTime
|
||||||
|
translation: "minuty"
|
||||||
|
- id: words
|
||||||
|
translation: "słowa"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Nieprawidłowy adres (błąd 404)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> napędzany • Motyw <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> przystosowany od <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Nawigacja"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Język"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Szukaj"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Szukaj {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Zamknij"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Bez komentarza"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "komentarz"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "komentarzy"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Możesz użyć składni Markdown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Twoje imię"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Twój adres email"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Twoja strona internetowa"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Pokaż"
|
||||||
|
- id: comments
|
||||||
|
translation: "komentarzy"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Zobacz też"
|
||||||
74
themes/beautifulhugo/i18n/ru.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "02.01.2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "Опубликовано {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(Последнее изменение {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Другие языки: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Далее"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Предыдущие записи"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Новые записи"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Предыдущий"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Следующий"
|
||||||
|
- id: readTime
|
||||||
|
translation: "минут"
|
||||||
|
- id: words
|
||||||
|
translation: "слова"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Уууупс, страница не найдена. Поищите ещё. (ошибка 404)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: 'На базе <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> • Тема <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> на базе <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Навигация"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Язык"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Поиск"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "Поиск по {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Закрыть"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Без комментариев"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "комментарий"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "комментарии"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Вы можете использовать синтаксис Markdown"
|
||||||
|
- id: yourName
|
||||||
|
translation: "Ваше имя"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "Ваш адрес электронной почты"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Ваш сайт"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Показать"
|
||||||
|
- id: comments
|
||||||
|
translation: "комментариев"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Смотрите также"
|
||||||
74
themes/beautifulhugo/i18n/tr.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "2 Ocak 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Oca 2006 15.04.05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "{{ .Count }} tarihinde paylaşıldı"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "({{ .Count }} tarihinde güncellendi)"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "Diğer diller: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "Daha fazla oku"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "Önceki gönderiler"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "Son gönderiler"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "Önceki gönderi"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "Sonraki gönderi"
|
||||||
|
- id: readTime
|
||||||
|
translation: "dakika"
|
||||||
|
- id: words
|
||||||
|
translation: "kelime"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "Ups, bu sayfa mevcut değil. Başka bir yöne ilerleyin. (404 hatası)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '<a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> altyapısı • <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a> temasından uyarlanan <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> teması kullanılmaktadır.'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "Gezinmeyi aktifleştirin"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "Dil"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "Arama"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "{{ .Site.Title }} içinde arayın"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "Kapat"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "Yorum yok"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "yorum"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "yorum"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "Markdown söz dizimini kullanabilirsiniz"
|
||||||
|
- id: yourName
|
||||||
|
translation: "İsminiz"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "E-posta adresiniz"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "Web siteniz"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "Göster"
|
||||||
|
- id: comments
|
||||||
|
translation: "yorumlar"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "Ayrıca bakınız"
|
||||||
74
themes/beautifulhugo/i18n/zh-CN.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "January 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "发表于 {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(上次修改时间 {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "其它语言: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "阅读全文"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "下一页"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "上一页"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "前一篇"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "后一篇"
|
||||||
|
- id: readTime
|
||||||
|
translation: "分钟"
|
||||||
|
- id: words
|
||||||
|
translation: "个字"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "啊哦,这篇文章不存在。 (404 错误)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '由 <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 强力驱动 • 主题 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "切换导航"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "语言"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "搜索"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "搜索 {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "关闭"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "没有评论"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "则评论"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "则评论"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "您可以使用Markdown语法"
|
||||||
|
- id: yourName
|
||||||
|
translation: "你的名字"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "您的电子邮件地址"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "你的网页"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "显示"
|
||||||
|
- id: comments
|
||||||
|
translation: "则评论"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "也可以看看"
|
||||||
74
themes/beautifulhugo/i18n/zh-TW.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
# Content
|
||||||
|
- id: dateFormat
|
||||||
|
translation: "January 2, 2006"
|
||||||
|
- id: shortdateFormat
|
||||||
|
translation: "2 Jan, 2006 15:04:05"
|
||||||
|
- id: postedOnDate
|
||||||
|
translation: "發表於 {{ . }}"
|
||||||
|
- id: lastModified
|
||||||
|
translation: "(最後修改於 {{ . }})"
|
||||||
|
- id: translationsLabel
|
||||||
|
translation: "其他語言: "
|
||||||
|
- id: translationsSeparator
|
||||||
|
translation: ", "
|
||||||
|
- id: readMore
|
||||||
|
translation: "閱讀全文"
|
||||||
|
- id: olderPosts
|
||||||
|
translation: "更舊的文章"
|
||||||
|
- id: newerPosts
|
||||||
|
translation: "更新的文章"
|
||||||
|
- id: previousPost
|
||||||
|
translation: "上一篇"
|
||||||
|
- id: nextPost
|
||||||
|
translation: "下一篇"
|
||||||
|
- id: readTime
|
||||||
|
translation: "分鐘"
|
||||||
|
- id: words
|
||||||
|
translation: "個字"
|
||||||
|
|
||||||
|
|
||||||
|
# 404 page
|
||||||
|
- id: pageNotFound
|
||||||
|
translation: "哎呀呀,這個頁面不存在,去其他地方逛逛吧。 (404 錯誤)"
|
||||||
|
|
||||||
|
# Footer
|
||||||
|
- id: poweredBy # Accepts HTML
|
||||||
|
translation: '由 <a href="https://gohugo.io">Hugo v{{ .Site.Hugo.Version }}</a> 提供 • 主題 <a href="https://github.com/halogenica/beautifulhugo">Beautiful Hugo</a> 移植自 <a href="https://deanattali.com/beautiful-jekyll/">Beautiful Jekyll</a>'
|
||||||
|
|
||||||
|
# Navigation
|
||||||
|
- id: toggleNavigation
|
||||||
|
translation: "開關導覽"
|
||||||
|
- id: languageSwitcherLabel
|
||||||
|
translation: "語言"
|
||||||
|
- id: gcseLabelShort
|
||||||
|
translation: "搜尋"
|
||||||
|
- id: gcseLabelLong
|
||||||
|
translation: "搜尋 {{ .Site.Title }}"
|
||||||
|
- id: gcseClose
|
||||||
|
translation: "關閉"
|
||||||
|
|
||||||
|
# Staticman
|
||||||
|
- id: noComment
|
||||||
|
translation: "沒有評論"
|
||||||
|
- id: oneComment
|
||||||
|
translation: "則評論"
|
||||||
|
- id: moreComment
|
||||||
|
translation: "則評論"
|
||||||
|
- id: useMarkdown
|
||||||
|
translation: "您可以使用Markdown語法"
|
||||||
|
- id: yourName
|
||||||
|
translation: "您的名字"
|
||||||
|
- id: yourEmail
|
||||||
|
translation: "您的電子信箱"
|
||||||
|
- id: yourWebsite
|
||||||
|
translation: "您的網頁"
|
||||||
|
|
||||||
|
# Delayed Disqus
|
||||||
|
- id: show
|
||||||
|
translation: "顯示"
|
||||||
|
- id: comments
|
||||||
|
translation: "則評論"
|
||||||
|
|
||||||
|
# Related posts
|
||||||
|
- id: seeAlso
|
||||||
|
translation: "其他相關"
|
||||||
BIN
themes/beautifulhugo/images/screenshot.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
themes/beautifulhugo/images/tn.png
Normal file
|
After Width: | Height: | Size: 74 KiB |
18
themes/beautifulhugo/layouts/404.html
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{{ define "header" }}<!-- No header on 404 pages -->{{ end }}
|
||||||
|
{{ define "main" }}
|
||||||
|
<div role="main" class="container main-content">
|
||||||
|
<div class="text-center">
|
||||||
|
<h1 class="error-emoji"></h1>
|
||||||
|
<p class="error-text">{{ i18n "pageNotFound" }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<script>
|
||||||
|
var errorEmojiContainer = document.getElementsByClassName('error-emoji')[0];
|
||||||
|
var emojiArray = [
|
||||||
|
'\\(o_o)/', '(o^^)o', '(˚Δ˚)b', '(^-^*)', '(≥o≤)', '(^_^)b', '(·_·)',
|
||||||
|
'(=\'X\'=)', '(>_<)', '(;-;)', '\\(^Д^)/',
|
||||||
|
];
|
||||||
|
var errorEmoji = emojiArray[Math.floor(Math.random() * emojiArray.length)];
|
||||||
|
errorEmojiContainer.appendChild(document.createTextNode(errorEmoji));
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
14
themes/beautifulhugo/layouts/_default/baseof.html
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ .Lang }}" itemscope itemtype="http://schema.org/WebPage">
|
||||||
|
<head>
|
||||||
|
{{ partial "head.html" . }}
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
{{ partial "nav.html" . }}
|
||||||
|
{{ block "header" . }}{{ partial "header.html" . }}{{ end }}
|
||||||
|
{{ block "main" . }}{{ end }}
|
||||||
|
{{ partial "footer.html" . }}
|
||||||
|
{{ block "footer" . }}{{ end }}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
32
themes/beautifulhugo/layouts/_default/list.html
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<div class="container" role="main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
{{ with .Content }}
|
||||||
|
<div class="well">
|
||||||
|
{{.}}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
<div class="posts-list">
|
||||||
|
{{ range .Paginator.Pages }}
|
||||||
|
{{ partial "post_preview.html" .}}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
<ul class="pager main-pager">
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">← {{ i18n "newerPosts" }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} →</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
89
themes/beautifulhugo/layouts/_default/single.html
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<div class="container" role="main">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<article role="main" class="blog-post">
|
||||||
|
{{ .Content }}
|
||||||
|
|
||||||
|
{{ if .Params.tags }}
|
||||||
|
<div class="blog-tags">
|
||||||
|
{{ range .Params.tags }}
|
||||||
|
<a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $.Param "socialShare" }}
|
||||||
|
<hr/>
|
||||||
|
<section id="social-share">
|
||||||
|
<div class="list-inline footer-links">
|
||||||
|
{{ partial "share-links" . }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.showRelatedPosts }}
|
||||||
|
{{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||||
|
{{ $.Scratch.Set "has_related" true }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if $.Scratch.Get "has_related" }}
|
||||||
|
<h4 class="see-also">{{ i18n "seeAlso" }}</h4>
|
||||||
|
<ul>
|
||||||
|
{{ $num_to_show := .Site.Params.related_content_limit | default 5 }}
|
||||||
|
{{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
|
||||||
|
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</article>
|
||||||
|
|
||||||
|
{{ if ne .Type "page" }}
|
||||||
|
<ul class="pager blog-pager">
|
||||||
|
{{ if .PrevInSection }}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .NextInSection }}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
|
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }}
|
||||||
|
{{ if .Site.DisqusShortname }}
|
||||||
|
{{ if .Site.Params.delayDisqus }}
|
||||||
|
<div class="disqus-comments">
|
||||||
|
<button id="show-comments" class="btn btn-default" type="button">{{ i18n "show" }} <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">{{ i18n "comments" }}</span></button>
|
||||||
|
<div id="disqus_thread"></div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
var disqus_config = function () {
|
||||||
|
this.page.url = '{{ trim .Permalink "/" }}';
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</div>
|
||||||
|
{{ else }}
|
||||||
|
<div class="disqus-comments">
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.staticman }}
|
||||||
|
<div class="staticman-comments">
|
||||||
|
{{ partial "staticman-comments.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
38
themes/beautifulhugo/layouts/_default/terms.html
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
|
||||||
|
{{ $data := .Data }}
|
||||||
|
|
||||||
|
<div class="container" role="main">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<article class="post-preview">
|
||||||
|
<div class="panel-group" id="accordion">
|
||||||
|
{{ range $key, $value := .Data.Terms.ByCount }}
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<a class="collapsed" role="button" data-toggle="collapse" data-target="#collapse{{ $value.Name }}" data-parent="#accordion">
|
||||||
|
<div class="panel-heading" id="header{{ $value.Name }}">
|
||||||
|
<h4 class="panel-title">
|
||||||
|
{{ $value.Name }}
|
||||||
|
<span class="badge">{{ $value.Count }}</span>
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div id="collapse{{ $value.Name }}" class="panel-collapse collapse">
|
||||||
|
<div class="panel-body">
|
||||||
|
<a href="{{ $.Site.LanguagePrefix | absURL }}/{{ $data.Plural }}/{{ $value.Name | urlize }}/" class="list-group-item view-all">
|
||||||
|
View all</a>
|
||||||
|
<div class="list-group">
|
||||||
|
{{ range $item := $value.WeightedPages }}
|
||||||
|
<a href="{{$item.Permalink}}" class="list-group-item">{{ $item.Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{{ end }}
|
||||||
35
themes/beautifulhugo/layouts/index.html
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{{ define "main" }}
|
||||||
|
<div role="main" class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
{{ with .Content }}
|
||||||
|
<div class="well">
|
||||||
|
{{.}}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<div class="posts-list">
|
||||||
|
{{ $pag := .Paginate (where site.RegularPages "Type" "in" site.Params.mainSections) }}
|
||||||
|
{{ range $pag.Pages }}
|
||||||
|
{{ partial "post_preview" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if or (.Paginator.HasPrev) (.Paginator.HasNext) }}
|
||||||
|
<ul class="pager main-pager">
|
||||||
|
{{ if .Paginator.HasPrev }}
|
||||||
|
<li class="previous">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Prev.PageNumber }}/">← {{ i18n "newerPosts" }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Paginator.HasNext }}
|
||||||
|
<li class="next">
|
||||||
|
<a href="{{ .Permalink }}page/{{ .Paginator.Next.PageNumber }}/">{{ i18n "olderPosts" }} →</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
7
themes/beautifulhugo/layouts/partials/disqus.html
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
|
||||||
|
{{ if .Site.DisqusShortname }}
|
||||||
|
<div class="comments">
|
||||||
|
{{ template "_internal/disqus.html" . }}
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
157
themes/beautifulhugo/layouts/partials/footer.html
Normal file
|
|
@ -0,0 +1,157 @@
|
||||||
|
{{ if eq .Type "page" }}
|
||||||
|
{{ partial "page_meta.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
<footer>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<ul class="list-inline text-center footer-links">
|
||||||
|
{{ range .Site.Data.beautifulhugo.social.social_icons }}
|
||||||
|
{{- if isset $.Site.Author .id }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ printf .url (index $.Site.Author .id) }}" title="{{ .title }}">
|
||||||
|
<span class="fa-stack fa-lg">
|
||||||
|
<i class="fas fa-circle fa-stack-2x"></i>
|
||||||
|
<i class="{{ .icon }} fa-stack-1x fa-inverse"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{- end -}}
|
||||||
|
{{ end }}
|
||||||
|
{{ if .Site.Params.rss }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" title="RSS">
|
||||||
|
<span class="fa-stack fa-lg">
|
||||||
|
<i class="fas fa-circle fa-stack-2x"></i>
|
||||||
|
<i class="fas fa-rss fa-stack-1x fa-inverse"></i>
|
||||||
|
</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
<p class="credits copyright text-muted">
|
||||||
|
{{ if .Site.Author.name }}
|
||||||
|
{{ if .Site.Author.website }}
|
||||||
|
<a href="{{ .Site.Author.website }}">{{ .Site.Author.name }}</a>
|
||||||
|
{{ else }}
|
||||||
|
{{ .Site.Author.name }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
• ©
|
||||||
|
{{ if .Site.Params.since }}
|
||||||
|
{{ .Site.Params.since }} - {{ .Site.LastChange.Format "2006" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ .Site.LastChange.Format "2006" }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Title }}
|
||||||
|
•
|
||||||
|
<a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</p>
|
||||||
|
<!-- Please don't remove this, keep my open source work credited :) -->
|
||||||
|
<p class="credits theme-by text-muted">
|
||||||
|
{{ i18n "poweredBy" . | safeHTML }}
|
||||||
|
{{ if $.GitInfo }} • [<a href="{{ .Site.Params.commit }}{{ .GitInfo.Hash }}">{{ substr .GitInfo.Hash 0 8 }}</a>]{{ end }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
{{- if .Site.Params.selfHosted -}}
|
||||||
|
<script src="{{ "js/katex.min.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "js/auto-render.min.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "js/jquery.min.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "js/bootstrap.min.js" | absURL }}"></script>
|
||||||
|
{{- else -}}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
<script src="{{ "js/main.js" | absURL }}"></script>
|
||||||
|
{{- if .Site.Params.staticman }}
|
||||||
|
<script src="{{ "js/staticman.js" | absURL }}"></script>
|
||||||
|
{{- end }}
|
||||||
|
{{- if .Site.Params.useHLJS }}
|
||||||
|
<script src="{{ "js/highlight.min.js" | absURL }}"></script>
|
||||||
|
<script> hljs.initHighlightingOnLoad(); </script>
|
||||||
|
<script> $(document).ready(function() {$("pre.chroma").css("padding","0");}); </script>
|
||||||
|
{{- end -}}
|
||||||
|
<script> renderMathInElement(document.body); </script>
|
||||||
|
|
||||||
|
{{- if .Site.Params.selfHosted -}}
|
||||||
|
<script src="{{ "js/photoswipe.min.js" | absURL }}"></script>
|
||||||
|
<script src="{{ "js/photoswipe-ui-default.min.js" | absURL }}"></script>
|
||||||
|
{{- else -}}
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.js" integrity="sha384-QELNnmcmU8IR9ZAykt67vGr9/rZJdHbiWi64V88fCPaOohUlHCqUD/unNN0BXSqy" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe-ui-default.min.js" integrity="sha384-m67o7SkQ1ALzKZIFh4CiTA8tmadaujiTa9Vu+nqPSwDOqHrDmxLezTdFln8077+q" crossorigin="anonymous"></script>
|
||||||
|
{{- end -}}
|
||||||
|
<script src="{{ "js/load-photoswipe.js" | absURL }}"></script>
|
||||||
|
|
||||||
|
<!-- Google Custom Search Engine -->
|
||||||
|
{{ if .Site.Params.gcse }}
|
||||||
|
<script>
|
||||||
|
(function() {
|
||||||
|
var cx = '{{ .Site.Params.gcse }}';
|
||||||
|
var gcse = document.createElement('script');
|
||||||
|
gcse.type = 'text/javascript';
|
||||||
|
gcse.async = true;
|
||||||
|
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||||
|
var s = document.getElementsByTagName('script')[0];
|
||||||
|
s.parentNode.insertBefore(gcse, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.Params.piwik }}
|
||||||
|
<!-- Piwik -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
var _paq = _paq || [];
|
||||||
|
_paq.push(["trackPageView"]);
|
||||||
|
_paq.push(["enableLinkTracking"]);
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var u=(("https:" == document.location.protocol) ? "https" : "http") + "://{{ .Site.Params.piwik.server }}/";
|
||||||
|
_paq.push(["setTrackerUrl", u+"piwik.php"]);
|
||||||
|
_paq.push(["setSiteId", "{{ .Site.Params.piwik.id }}"]);
|
||||||
|
var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
|
||||||
|
g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
<noscript>
|
||||||
|
<!-- Piwik Image Tracker -->
|
||||||
|
<img src="http://{{ .Site.Params.piwik.server }}/piwik.php?idsite={{ .Site.Params.piwik.id }}&rec=1" style="border:0" alt="" />
|
||||||
|
<!-- End Piwik -->
|
||||||
|
</noscript>
|
||||||
|
<!-- End Piwik Code -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if and .Site.Params.delayDisqus .Site.DisqusShortname }}
|
||||||
|
<!-- Delayed Disqus -->
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(function(){
|
||||||
|
$('#show-comments').on('click', function(){
|
||||||
|
var disqus_shortname = '{{ .Site.DisqusShortname }}';
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
var disqus = document.createElement('script');
|
||||||
|
disqus.type = 'text/javascript';
|
||||||
|
disqus.async = true;
|
||||||
|
disqus.src = '//' + disqus_shortname + '.disqus.com/embed.js';
|
||||||
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(disqus);
|
||||||
|
})();
|
||||||
|
|
||||||
|
$(this).hide();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<script id="dsq-count-scr" src="//{{ .Site.DisqusShortname }}.disqus.com/count.js" async></script>
|
||||||
|
<!-- End Delayed Disqus -->
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{- partial "footer_custom.html" . }}
|
||||||
4
themes/beautifulhugo/layouts/partials/footer_custom.html
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<!--
|
||||||
|
If you want to include any custom html just before </body>, put it in /layouts/partials/footer_custom.html
|
||||||
|
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/footer_custom.html doesn't exist.
|
||||||
|
-->
|
||||||
91
themes/beautifulhugo/layouts/partials/head.html
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
{{- if eq .Kind "taxonomyTerm" }}
|
||||||
|
{{- range $key, $value := .Data.Terms.ByCount }}
|
||||||
|
{{- $.Scratch.Add "most_used" (slice $value.Name) }}
|
||||||
|
{{- end }}
|
||||||
|
{{- if not ($.Scratch.Get "most_used") }}
|
||||||
|
{{- $description := printf "A full overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular | truncate 180 }}
|
||||||
|
{{- $.Scratch.Set "Description" $description }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $description := printf "A full overview of all pages with %s, ordered by %s, such as: %s" .Data.Plural .Data.Singular ( delimit ( $.Scratch.Get "most_used" ) ", " ", and " ) | truncate 180 }}
|
||||||
|
{{- $.Scratch.Set "Description" $description }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- $title := printf "Overview of all pages with %s, ordered by %s" .Data.Plural .Data.Singular }}
|
||||||
|
{{- $.Scratch.Set "Title" $title }}
|
||||||
|
{{- else if eq .Kind "taxonomy" }}
|
||||||
|
{{- $description := printf "Overview of all pages with the %s #%s, such as: %s" .Data.Singular $.Title ( index .Pages 0).Title | truncate 160 }}
|
||||||
|
{{- $.Scratch.Set "Description" $description }}
|
||||||
|
|
||||||
|
{{- $title := printf "Overview of all pages with the %s #%s" .Data.Singular $.Title }}
|
||||||
|
{{- $.Scratch.Set "Title" $title }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $.Scratch.Set "Description" ( .Description | default .Params.subtitle | default .Summary ) }}
|
||||||
|
{{- $.Scratch.Set "Title" ( .Title | default .Site.Title ) }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
<!-- Site Title, Description, Author, and Favicon -->
|
||||||
|
{{- with ($.Scratch.Get "Title") }}
|
||||||
|
<title>{{ . }} - {{ $.Site.Title }}</title>
|
||||||
|
{{- end }}
|
||||||
|
{{- with ($.Scratch.Get "Description") }}
|
||||||
|
<meta name="description" content="{{ . }}">
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Site.Author.name }}
|
||||||
|
<meta name="author" content="{{ . }}"/>
|
||||||
|
{{- end }}
|
||||||
|
{{- partial "seo/main.html" . }}
|
||||||
|
{{- with .Site.Params.favicon }}
|
||||||
|
<link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/>
|
||||||
|
{{- end -}}
|
||||||
|
<!-- Hugo Version number -->
|
||||||
|
{{ hugo.Generator -}}
|
||||||
|
<!-- Links and stylesheets -->
|
||||||
|
<link rel="alternate" href="{{ "index.xml" | absLangURL }}" type="application/rss+xml" title="{{ .Site.Title }}">
|
||||||
|
|
||||||
|
{{- if .Site.Params.selfHosted -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/katex.min.css" | absURL }}" />
|
||||||
|
<link rel="stylesheet" href="{{ "fontawesome/css/all.css" | absURL }}" />
|
||||||
|
<link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}" />
|
||||||
|
{{- else -}}
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.10.0/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}" />
|
||||||
|
|
||||||
|
{{- if .Site.Params.staticman -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/staticman.css" | absURL }}" />
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .Site.Params.selfHosted -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/fonts.css" | absURL }}" />
|
||||||
|
{{- else -}}
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" />
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" />
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .Site.Params.useHLJS }}
|
||||||
|
<link rel="stylesheet" href="{{ "css/highlight.min.css" | absURL }}" />
|
||||||
|
{{- else -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/syntax.css" | absURL }}" />
|
||||||
|
{{- end -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/codeblock.css" | absURL }}" />
|
||||||
|
|
||||||
|
{{- if .Site.Params.staticman.recaptcha -}}
|
||||||
|
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .Site.Params.selfHosted -}}
|
||||||
|
<link rel="stylesheet" href="{{ "css/photoswipe.min.css" | absURL }}" />
|
||||||
|
<link rel="stylesheet" href="{{ "css/photoswipe.default-skin.min.css" | absURL }}" />
|
||||||
|
{{- else -}}
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/photoswipe.min.css" integrity="sha384-h/L2W9KefUClHWaty3SLE5F/qvc4djlyR4qY3NUV5HGQBBW7stbcfff1+I/vmsHh" crossorigin="anonymous">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.2/default-skin/default-skin.min.css" integrity="sha384-iD0dNku6PYSIQLyfTOpB06F2KCZJAKLOThS5HRe8b3ibhdEQ6eKsFf/EeFxdOt5R" crossorigin="anonymous">
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- partial "head_custom.html" . }}
|
||||||
|
{{ template "_internal/google_analytics_async.html" . }}
|
||||||
4
themes/beautifulhugo/layouts/partials/head_custom.html
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<!--
|
||||||
|
If you want to include any custom html just before </head>, put it in /layouts/partials/head_custom.html
|
||||||
|
Do not put anything in this file - it's only here so that hugo won't throw an error if /layouts/partials/head_custom.html doesn't exist.
|
||||||
|
-->
|
||||||
87
themes/beautifulhugo/layouts/partials/header.html
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
{{- partial "load-photoswipe-theme.html" . }}
|
||||||
|
|
||||||
|
{{ if .IsHome }}
|
||||||
|
{{ if .Site.Params.homeTitle }}{{ $.Scratch.Set "title" .Site.Params.homeTitle }}{{ else }}{{ $.Scratch.Set "title" .Site.Title }}{{ end }}
|
||||||
|
{{ if .Site.Params.subtitle }}{{ $.Scratch.Set "subtitle" .Site.Params.subtitle }}{{ end }}
|
||||||
|
{{ if .Site.Params.bigimg }}{{ $.Scratch.Set "bigimg" .Site.Params.bigimg }}{{ end }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $.Scratch.Set "title" .Title }}
|
||||||
|
{{ if .Params.subtitle }}{{ $.Scratch.Set "subtitle" .Params.subtitle }}{{ end }}
|
||||||
|
{{ if .Params.bigimg }}{{ $.Scratch.Set "bigimg" .Params.bigimg }}{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $bigimg := $.Scratch.Get "bigimg" }}
|
||||||
|
{{ $title := $.Scratch.Get "title" }}
|
||||||
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
|
|
||||||
|
{{ if or $bigimg $title }}
|
||||||
|
{{ if $bigimg }}
|
||||||
|
<div id="header-big-imgs" data-num-img={{len $bigimg}}
|
||||||
|
{{range $i, $img := $bigimg}}
|
||||||
|
{{ if (fileExists $img.src)}}
|
||||||
|
data-img-src-{{add $i 1}}="{{$img.src | absURL }}"
|
||||||
|
{{else}}
|
||||||
|
data-img-src-{{add $i 1}}="{{$img.src}}"
|
||||||
|
{{end}}
|
||||||
|
{{ if $img.desc}}data-img-desc-{{add $i 1}}="{{$img.desc}}"{{end}}
|
||||||
|
{{end}}></div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
<header class="header-section {{ if $bigimg }}has-img{{ end }}">
|
||||||
|
{{ if $bigimg }}
|
||||||
|
<div class="intro-header big-img">
|
||||||
|
{{ $subtitle := $.Scratch.Get "subtitle" }}
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<div class="{{ .Type }}-heading">
|
||||||
|
<h1>{{ with $.Scratch.Get "title" }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||||
|
{{ if $subtitle }}
|
||||||
|
{{ if eq .Type "page" }}
|
||||||
|
<hr class="small">
|
||||||
|
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||||
|
{{ else }}
|
||||||
|
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if eq .Type "post" }}
|
||||||
|
{{ partial "post_meta.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="img-desc" style="display: inline;"></span>
|
||||||
|
</div>
|
||||||
|
{{end}}
|
||||||
|
<div class="intro-header no-img">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
|
||||||
|
<div class="{{ .Type }}-heading">
|
||||||
|
{{ if eq .Type "list" }}
|
||||||
|
<h1>{{ if .Data.Singular }}#{{ end }}{{ .Title }}</h1>
|
||||||
|
{{ else }}
|
||||||
|
<h1>{{ with $title }}{{.}}{{ else }}<br/>{{ end }}</h1>
|
||||||
|
{{ end }}
|
||||||
|
{{ if ne .Type "post" }}
|
||||||
|
<hr class="small">
|
||||||
|
{{ end }}
|
||||||
|
{{ if $subtitle }}
|
||||||
|
{{ if eq .Type "page" }}
|
||||||
|
<span class="{{ .Type }}-subheading">{{ $subtitle }}</span>
|
||||||
|
{{ else }}
|
||||||
|
<h2 class="{{ .Type }}-subheading">{{ $subtitle }}</h2>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
{{ if eq .Type "post" }}
|
||||||
|
{{ partial "post_meta.html" . }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
{{ else }}
|
||||||
|
<div class="intro-header"></div>
|
||||||
|
{{ end }}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<!--
|
||||||
|
Documentation and licence at https://github.com/liwenyip/hugo-easy-gallery/
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Root element of PhotoSwipe. Must have class pswp. -->
|
||||||
|
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
|
||||||
|
<!-- Background of PhotoSwipe.
|
||||||
|
It's a separate element, as animating opacity is faster than rgba(). -->
|
||||||
|
<div class="pswp__bg"></div>
|
||||||
|
<!-- Slides wrapper with overflow:hidden. -->
|
||||||
|
<div class="pswp__scroll-wrap">
|
||||||
|
<!-- Container that holds slides.
|
||||||
|
PhotoSwipe keeps only 3 of them in DOM to save memory.
|
||||||
|
Don't modify these 3 pswp__item elements, data is added later on. -->
|
||||||
|
<div class="pswp__container">
|
||||||
|
<div class="pswp__item"></div>
|
||||||
|
<div class="pswp__item"></div>
|
||||||
|
<div class="pswp__item"></div>
|
||||||
|
</div>
|
||||||
|
<!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
|
||||||
|
<div class="pswp__ui pswp__ui--hidden">
|
||||||
|
<div class="pswp__top-bar">
|
||||||
|
<!-- Controls are self-explanatory. Order can be changed. -->
|
||||||
|
<div class="pswp__counter"></div>
|
||||||
|
<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
|
||||||
|
<button class="pswp__button pswp__button--share" title="Share"></button>
|
||||||
|
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
|
||||||
|
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
|
||||||
|
<!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
|
||||||
|
<!-- element will get class pswp__preloader--active when preloader is running -->
|
||||||
|
<div class="pswp__preloader">
|
||||||
|
<div class="pswp__preloader__icn">
|
||||||
|
<div class="pswp__preloader__cut">
|
||||||
|
<div class="pswp__preloader__donut"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
|
||||||
|
<div class="pswp__share-tooltip"></div>
|
||||||
|
</div>
|
||||||
|
<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
|
||||||
|
</button>
|
||||||
|
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
|
||||||
|
</button>
|
||||||
|
<div class="pswp__caption">
|
||||||
|
<div class="pswp__caption__center"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
96
themes/beautifulhugo/layouts/partials/nav.html
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
<nav class="navbar navbar-default navbar-fixed-top navbar-custom">
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="navbar-header">
|
||||||
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
|
||||||
|
<span class="sr-only">{{ i18n "toggleNavigation" }}</span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
<span class="icon-bar"></span>
|
||||||
|
</button>
|
||||||
|
<a class="navbar-brand" href="{{ "" | absLangURL }}">{{ .Site.Title }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="collapse navbar-collapse" id="main-navbar">
|
||||||
|
<ul class="nav navbar-nav navbar-right">
|
||||||
|
{{ range .Site.Menus.main.ByWeight }}
|
||||||
|
{{ if .HasChildren }}
|
||||||
|
<li class="navlinks-container">
|
||||||
|
<a class="navlinks-parent">{{ .Name }}</a>
|
||||||
|
<div class="navlinks-children">
|
||||||
|
{{ range .Children }}
|
||||||
|
<a href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li>
|
||||||
|
<a title="{{ .Name }}" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if .Site.IsMultiLingual }}
|
||||||
|
{{ if ge (len .Site.Languages) 3 }}
|
||||||
|
<li class="navlinks-container">
|
||||||
|
<a class="navlinks-parent">{{ i18n "languageSwitcherLabel" }}</a>
|
||||||
|
<div class="navlinks-children">
|
||||||
|
{{ range .Site.Languages }}
|
||||||
|
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||||
|
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
{{ else }}
|
||||||
|
<li>
|
||||||
|
{{ range .Site.Languages }}
|
||||||
|
{{ if not (eq .Lang $.Site.Language.Lang) }}
|
||||||
|
<a href="/{{ .Lang }}" lang="{{ .Lang }}">{{ default .Lang .LanguageName }}</a>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "gcse" }}
|
||||||
|
<li>
|
||||||
|
<a href="#modalSearch" data-toggle="modal" data-target="#modalSearch" style="outline: none;">
|
||||||
|
<span class="hidden-sm hidden-md hidden-lg">{{ i18n "gcseLabelShort" }}</span> <span id="searchGlyph" class="glyphicon glyphicon-search"></span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ if isset .Site.Params "logo" }}
|
||||||
|
<div class="avatar-container">
|
||||||
|
<div class="avatar-img-border">
|
||||||
|
<a title="{{ .Site.Title }}" href="{{ "" | absLangURL }}">
|
||||||
|
<img class="avatar-img" src="{{ .Site.Params.logo | absURL }}" alt="{{ .Site.Title }}" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<!-- Search Modal -->
|
||||||
|
{{ if isset .Site.Params "gcse" }}
|
||||||
|
<div id="modalSearch" class="modal fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
|
<h4 class="modal-title">{{ i18n "gcseLabelLong" . }}</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<gcse:search></gcse:search>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{ i18n "gcseClose" }}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
8
themes/beautifulhugo/layouts/partials/page_meta.html
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<div class="page-meta">
|
||||||
|
{{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }}
|
||||||
|
{{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }}
|
||||||
|
{{ if ne $datestr $lastmodstr }}
|
||||||
|
{{ $lastmodstr | i18n "lastModified" }}
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
|
||||||