Improve OpenGraph / favicons
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 7.1 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 9.8 KiB |
After Width: | Height: | Size: 94 KiB |
14
src/db/db.go
|
@ -338,6 +338,20 @@ func QueryScalar(ctx context.Context, conn ConnOrTx, query string, args ...inter
|
|||
return nil, ErrNoMatchingRows
|
||||
}
|
||||
|
||||
func QueryString(ctx context.Context, conn ConnOrTx, query string, args ...interface{}) (string, error) {
|
||||
result, err := QueryScalar(ctx, conn, query, args...)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
switch r := result.(type) {
|
||||
case string:
|
||||
return r, nil
|
||||
default:
|
||||
return "", oops.New(nil, "QueryString got a non-string result: %v", result)
|
||||
}
|
||||
}
|
||||
|
||||
func QueryInt(ctx context.Context, conn ConnOrTx, query string, args ...interface{}) (int, error) {
|
||||
result, err := QueryScalar(ctx, conn, query, args...)
|
||||
if err != nil {
|
||||
|
|
|
@ -1,52 +1,49 @@
|
|||
{{ template "base.html" . }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="content-block">
|
||||
<div class="description mw7 ph3 ph0-ns">
|
||||
<h1>Handmade Code of Conduct v1.0</h1>
|
||||
<p>The Handmade community is an international community of programmers, designers, artists, musicians, mathematicians, and other creatives dedicated to building and improving high quality software.</p>
|
||||
<p>Outlined herein are the guidelines we pledge to uphold to maintain a healthy community, stay true to the ideas first explored in our <a href="/manifesto">Manifesto</a> and refined by valuable feedback, and ensure we mature into a functional, inclusive, and innovative network.</p>
|
||||
<h2>COMMUNITY</h2>
|
||||
<h3>OPEN-MINDED</h3>
|
||||
<p>The Handmade community strives to be unprejudiced—we welcome unusual ideas, encourage different points of view, and consider their effectiveness in reality.</p>
|
||||
<p>The Handmade community does not waste time and alienate others by engaging in flame-wars, drawing out pointless arguments, singling out developers, or making attacks on the hard work of others; instead, we learn from exercising the methods that we believe to be reasonable, and offer suggestions on how to improve ourselves and others.</p>
|
||||
<h3>DOWN-TO-EARTH</h3>
|
||||
<p>Handmade favors the languages and tools that first serve the users of our software by not wasting their time and resources, and second those who develop it by making meaningful abstractions oriented to the task at hand.</p>
|
||||
<p>We try to minimize the emergent complexity of tightly coupled systems, avoid the over-complication by refusing to blindly apply accepted strategies without clear understanding of their costs, and we prefer that which is simple to that which is easy. When uncertain, we make measurements and follow the data.</p>
|
||||
<h3>DIVERSE</h3>
|
||||
<p>Handmade encourages participation by everyone. We will do everything in our power to ensure everyone feels accepted and respected in their interactions with our community.</p>
|
||||
<p>If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. We accept that jokes and trolling can be taken too far and are not valid excuses for the alienation of any person.</p>
|
||||
<p>Although this list cannot be exhaustive, we explicitly honour diversity in age, culture, ethnicity, family background, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socio-economic status, membership in other communities, and technical ability.</p>
|
||||
<p>Some of the ideas and wording for this statement were based on diversity statements from <a class="external" href="https://www.ubuntu.com/about/about-ubuntu/diversity">Ubuntu Diversity Page</a>, which is in turn based on the Python community and Dreamwidth Studios (CC-BY-SA 3.0).</p>
|
||||
<p>To see how we encourage participation by everyone, see our <a href="/communication-guidelines">Handmade Guide to Community Interaction</a>.</p>
|
||||
<h2>INDIVIDUAL</h2>
|
||||
<h3>INQUISITIVE</h3>
|
||||
<p>The Handmade developer strives to understand their creations on a technical level. They will take the time on their personal software projects to meet their goals to the best of their abilities, without taking shortcuts that diminish the value of their work.</p>
|
||||
<p>They include technical understanding and user experience as important metrics for the quality of their creations, and minimize trade-offs which impact these negatively.</p>
|
||||
<p>They will ask questions exhaustively, and always re-evaluate what they consider to be a “good solution” in light of new evidence. Their curiosity is one of the primary driving forces in their work.</p>
|
||||
<h3>CONSIDERATE</h3>
|
||||
<p>The developer practices empathy; they try to understand how those they interact with and those they create for see the world in order to better understand each other.</p>
|
||||
<p>They realize that their actions in both professional and community contexts can have consequences for other people that they may not immediately understand, and will do their best to correct themselves when they make a mistake.</p>
|
||||
<p>They will, to the best of their abilities, keep those who enjoy their ongoing personal software projects up to date on the state of development and be honest about their progress and achievement of their stated goals.</p>
|
||||
<h3>WILLING TO SHARE</h3>
|
||||
<p>Handmade community members share their knowledge and expertise unflinchingly. They will not hesitate to lend a hand if the opportunity to improve the software development space arises.</p>
|
||||
<p>They realize that their fellow community member not knowing something is an opportunity rather than a character flaw. They also realize that their knowledge and experience, however deep and long-collected, is not absolute, and accept that the experiences of others may differ.</p>
|
||||
<h2>LEADERS</h2>
|
||||
<h3>TIGHT-KNIT</h3>
|
||||
<p>The Handmade Dev Team acts as one unit.</p>
|
||||
<p>The staff are open with each other, make decisions unanimously, and perform their roles admirably for the benefit of the community.</p>
|
||||
<h3>RECEPTIVE</h3>
|
||||
<p>The leaders are receptive to the state of the community.</p>
|
||||
<p>They will listen to everyone's concerns and make careful, considered judgment calls to move forward or solve a problem.</p>
|
||||
<p>They will never place personal benefit over the well-being of the community, and only act against the community's immediate short-term interests if it’s for the long-term benefit of everyone involved.</p>
|
||||
<h3>SERIOUS</h3>
|
||||
<p>The leaders are serious about their roles.</p>
|
||||
<p>They will uphold the ideas explored in the <a href="/manifesto">Manifesto</a>, setting the prime example of Handmade values in their development, behavior, and character.</p>
|
||||
<p>They agree to enforce the code of conduct as written and accepted by the community, understanding that there are times when enforcement involves consequences for those shown to be in repeated and flagrant violation thereof.</p>
|
||||
<p>They also agree to ensure all future revisions to such are accepted by and in the best interest of the community.</p>
|
||||
<a class="external" href="https://creativecommons.org/licenses/by-sa/4.0" rel="nofollow" target="_blank"><img src="/static/creative-commons-by-sa.png"></a>
|
||||
<p>This code of conduct is released under a <a class="external" href="https://creativecommons.org/licenses/by-sa/4.0">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
|
||||
<p class="mt4 edited">Written by Jeroen van Rijn</p>
|
||||
</div>
|
||||
<div class="center-layout mw7 mv3 ph3 ph0-ns post-content">
|
||||
<h1>Handmade Code of Conduct v1.0</h1>
|
||||
<p>The Handmade community is an international community of programmers, designers, artists, musicians, mathematicians, and other creatives dedicated to building and improving high quality software.</p>
|
||||
<p>Outlined herein are the guidelines we pledge to uphold to maintain a healthy community, stay true to the ideas first explored in our <a href="/manifesto">Manifesto</a> and refined by valuable feedback, and ensure we mature into a functional, inclusive, and innovative network.</p>
|
||||
<h2>COMMUNITY</h2>
|
||||
<h3>OPEN-MINDED</h3>
|
||||
<p>The Handmade community strives to be unprejudiced—we welcome unusual ideas, encourage different points of view, and consider their effectiveness in reality.</p>
|
||||
<p>The Handmade community does not waste time and alienate others by engaging in flame-wars, drawing out pointless arguments, singling out developers, or making attacks on the hard work of others; instead, we learn from exercising the methods that we believe to be reasonable, and offer suggestions on how to improve ourselves and others.</p>
|
||||
<h3>DOWN-TO-EARTH</h3>
|
||||
<p>Handmade favors the languages and tools that first serve the users of our software by not wasting their time and resources, and second those who develop it by making meaningful abstractions oriented to the task at hand.</p>
|
||||
<p>We try to minimize the emergent complexity of tightly coupled systems, avoid the over-complication by refusing to blindly apply accepted strategies without clear understanding of their costs, and we prefer that which is simple to that which is easy. When uncertain, we make measurements and follow the data.</p>
|
||||
<h3>DIVERSE</h3>
|
||||
<p>Handmade encourages participation by everyone. We will do everything in our power to ensure everyone feels accepted and respected in their interactions with our community.</p>
|
||||
<p>If someone has been harmed or offended, it is our responsibility to listen carefully and respectfully, and do our best to right the wrong. We accept that jokes and trolling can be taken too far and are not valid excuses for the alienation of any person.</p>
|
||||
<p>Although this list cannot be exhaustive, we explicitly honour diversity in age, culture, ethnicity, family background, gender identity or expression, language, national origin, neurotype, phenotype, political beliefs, profession, race, religion, sexual orientation, socio-economic status, membership in other communities, and technical ability.</p>
|
||||
<p>Some of the ideas and wording for this statement were based on diversity statements from <a class="external" href="https://www.ubuntu.com/about/about-ubuntu/diversity">Ubuntu Diversity Page</a>, which is in turn based on the Python community and Dreamwidth Studios (CC-BY-SA 3.0).</p>
|
||||
<p>To see how we encourage participation by everyone, see our <a href="/communication-guidelines">Handmade Guide to Community Interaction</a>.</p>
|
||||
<h2>INDIVIDUAL</h2>
|
||||
<h3>INQUISITIVE</h3>
|
||||
<p>The Handmade developer strives to understand their creations on a technical level. They will take the time on their personal software projects to meet their goals to the best of their abilities, without taking shortcuts that diminish the value of their work.</p>
|
||||
<p>They include technical understanding and user experience as important metrics for the quality of their creations, and minimize trade-offs which impact these negatively.</p>
|
||||
<p>They will ask questions exhaustively, and always re-evaluate what they consider to be a “good solution” in light of new evidence. Their curiosity is one of the primary driving forces in their work.</p>
|
||||
<h3>CONSIDERATE</h3>
|
||||
<p>The developer practices empathy; they try to understand how those they interact with and those they create for see the world in order to better understand each other.</p>
|
||||
<p>They realize that their actions in both professional and community contexts can have consequences for other people that they may not immediately understand, and will do their best to correct themselves when they make a mistake.</p>
|
||||
<p>They will, to the best of their abilities, keep those who enjoy their ongoing personal software projects up to date on the state of development and be honest about their progress and achievement of their stated goals.</p>
|
||||
<h3>WILLING TO SHARE</h3>
|
||||
<p>Handmade community members share their knowledge and expertise unflinchingly. They will not hesitate to lend a hand if the opportunity to improve the software development space arises.</p>
|
||||
<p>They realize that their fellow community member not knowing something is an opportunity rather than a character flaw. They also realize that their knowledge and experience, however deep and long-collected, is not absolute, and accept that the experiences of others may differ.</p>
|
||||
<h2>LEADERS</h2>
|
||||
<h3>TIGHT-KNIT</h3>
|
||||
<p>The Handmade Dev Team acts as one unit.</p>
|
||||
<p>The staff are open with each other, make decisions unanimously, and perform their roles admirably for the benefit of the community.</p>
|
||||
<h3>RECEPTIVE</h3>
|
||||
<p>The leaders are receptive to the state of the community.</p>
|
||||
<p>They will listen to everyone's concerns and make careful, considered judgment calls to move forward or solve a problem.</p>
|
||||
<p>They will never place personal benefit over the well-being of the community, and only act against the community's immediate short-term interests if it’s for the long-term benefit of everyone involved.</p>
|
||||
<h3>SERIOUS</h3>
|
||||
<p>The leaders are serious about their roles.</p>
|
||||
<p>They will uphold the ideas explored in the <a href="/manifesto">Manifesto</a>, setting the prime example of Handmade values in their development, behavior, and character.</p>
|
||||
<p>They agree to enforce the code of conduct as written and accepted by the community, understanding that there are times when enforcement involves consequences for those shown to be in repeated and flagrant violation thereof.</p>
|
||||
<p>They also agree to ensure all future revisions to such are accepted by and in the best interest of the community.</p>
|
||||
<p>This code of conduct is released under a <a class="external" href="https://creativecommons.org/licenses/by-sa/4.0">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
|
||||
<p class="c--dim i">Written by Jeroen van Rijn</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,47 +1,44 @@
|
|||
{{ template "base.html" . }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="content-block">
|
||||
<div class="description mw7 ph3 ph0-ns">
|
||||
<h1>Handmade Guide to Community Interaction v1.0</h1>
|
||||
<h2>Our Philosophy</h2>
|
||||
<p>The Handmade community strives to create an environment conducive to innovation, education, and constructive discussion. To that end, we expect members of the site to respect the following set of principles to maintain civil discourse and create an inclusive environment.</p>
|
||||
<h2>Discourse</h2>
|
||||
<ul>
|
||||
<li>The community is mostly business, with a bit of fun. Discussion should primarily be about software development, and in particular about the relevant project or topic at hand.</li>
|
||||
<li>Support arguments with evidence and rational discussion. Don't resort to ad hominem attacks or personality judgments.</li>
|
||||
<li>Differing opinions are valuable and should be respected. Not everyone sees eye-to-eye on every matter, but we're all trying to write useful software.</li>
|
||||
<li>Language has meaning, and can be used in destructive ways. Be aware that what you say may not seem injurious to you, but might make someone else's experience on the site tangibly worse. If you are asked to reconsider your conduct, please exercise some introspection. We want everyone to feel welcome here. This includes people both inside and outside the Handmade community.</li>
|
||||
<li>Be aware of differences in English comprehension and culture. What you say may be misinterpreted by a more fluent or less fluent speaker, or someone from a different culture. Misunderstandings should be resolved with the help of a third party, preferably a staff member.</li>
|
||||
</ul>
|
||||
<h2>Inclusiveness</h2>
|
||||
<p>The Handmade community will encourage participation of underrepresented groups. In order to promote diversity among the community, a Handmade community member shall not:</p>
|
||||
<ul>
|
||||
<li>Sexualize or objectify other members, even if you think it’s a compliment.</li>
|
||||
<li>Use pejoratives or excessively rely on foul language, especially if used to attack an individual.</li>
|
||||
<li>Denigrate, belittle, defame, or speak ill of any individual.</li>
|
||||
<li>Leave unsubstantiated or unjust criticism on someone's work, or disparage a person while critiquing their work.</li>
|
||||
<li>Dismiss other people’s contributions, opinions, or concerns based on their personal attributes, especially those described in the Diversity section of the code of conduct.</li>
|
||||
<li>Be rude. Disagreement is not an excuse to be flippant or inconsiderate.</li>
|
||||
<li>Antagonize others, particularly if a disagreement has occurred. Instead, a peaceful resolution should be sought, with an impartial third party if necessary.</li>
|
||||
<li>Assume a motive for uncharacteristic behavior. Everyone has a bad day.</li>
|
||||
<li>Dwell excessively on a topic or argument when the other parties involved have made it clear they are no longer interested or comfortable discussing it.</li>
|
||||
<li>Continue to ask a person to disclose information, particularly about their personal lives, when that person has declined to do so.</li>
|
||||
</ul>
|
||||
<h2>Integrity</h2>
|
||||
<p>The Handmade community values integrity, the honest pursuit of knowledge, and working hard to build effective, uncomplicated software.</p>
|
||||
<p>In particular, we strive to:</p>
|
||||
<ul>
|
||||
<li>Be honest to others about the state of our work.</li>
|
||||
<li>Foster an environment where dedicated learners of any skill level may ask questions and receive detailed, useful answers.</li>
|
||||
<li>Ensure all members of a project are kept up to date on the status of that project.</li>
|
||||
<li>Advertise projects for what they are and what their authors have reasonable hope and expectations their project will become.</li>
|
||||
</ul>
|
||||
<p>It is up to the discretion of the moderators to determine when these guidelines are being met, and they are permitted to act accordingly.</p>
|
||||
<p>If you feel an action has been made against you unreasonably, please contact the <a href="/contact">Handmade Dev Team</a> privately with your grievance and we will review the decision.</p>
|
||||
<a class="external" href="https://creativecommons.org/licenses/by-sa/4.0" rel="nofollow" target="_blank"><img src="/static/creative-commons-by-sa.png"></a>
|
||||
<p>This code of conduct is released under a <a class="external" href="https://creativecommons.org/licenses/by-sa/4.0">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
|
||||
<p class="mt4 edited">Written by Jeroen van Rijn</p>
|
||||
</div>
|
||||
<div class="center-layout mw7 mv3 ph3 ph0-ns post-content">
|
||||
<h1>Handmade Guide to Community Interaction v1.0</h1>
|
||||
<h2>Our Philosophy</h2>
|
||||
<p>The Handmade community strives to create an environment conducive to innovation, education, and constructive discussion. To that end, we expect members of the site to respect the following set of principles to maintain civil discourse and create an inclusive environment.</p>
|
||||
<h2>Discourse</h2>
|
||||
<ul>
|
||||
<li>The community is mostly business, with a bit of fun. Discussion should primarily be about software development, and in particular about the relevant project or topic at hand.</li>
|
||||
<li>Support arguments with evidence and rational discussion. Don't resort to ad hominem attacks or personality judgments.</li>
|
||||
<li>Differing opinions are valuable and should be respected. Not everyone sees eye-to-eye on every matter, but we're all trying to write useful software.</li>
|
||||
<li>Language has meaning, and can be used in destructive ways. Be aware that what you say may not seem injurious to you, but might make someone else's experience on the site tangibly worse. If you are asked to reconsider your conduct, please exercise some introspection. We want everyone to feel welcome here. This includes people both inside and outside the Handmade community.</li>
|
||||
<li>Be aware of differences in English comprehension and culture. What you say may be misinterpreted by a more fluent or less fluent speaker, or someone from a different culture. Misunderstandings should be resolved with the help of a third party, preferably a staff member.</li>
|
||||
</ul>
|
||||
<h2>Inclusiveness</h2>
|
||||
<p>The Handmade community will encourage participation of underrepresented groups. In order to promote diversity among the community, a Handmade community member shall not:</p>
|
||||
<ul>
|
||||
<li>Sexualize or objectify other members, even if you think it’s a compliment.</li>
|
||||
<li>Use pejoratives or excessively rely on foul language, especially if used to attack an individual.</li>
|
||||
<li>Denigrate, belittle, defame, or speak ill of any individual.</li>
|
||||
<li>Leave unsubstantiated or unjust criticism on someone's work, or disparage a person while critiquing their work.</li>
|
||||
<li>Dismiss other people’s contributions, opinions, or concerns based on their personal attributes, especially those described in the Diversity section of the code of conduct.</li>
|
||||
<li>Be rude. Disagreement is not an excuse to be flippant or inconsiderate.</li>
|
||||
<li>Antagonize others, particularly if a disagreement has occurred. Instead, a peaceful resolution should be sought, with an impartial third party if necessary.</li>
|
||||
<li>Assume a motive for uncharacteristic behavior. Everyone has a bad day.</li>
|
||||
<li>Dwell excessively on a topic or argument when the other parties involved have made it clear they are no longer interested or comfortable discussing it.</li>
|
||||
<li>Continue to ask a person to disclose information, particularly about their personal lives, when that person has declined to do so.</li>
|
||||
</ul>
|
||||
<h2>Integrity</h2>
|
||||
<p>The Handmade community values integrity, the honest pursuit of knowledge, and working hard to build effective, uncomplicated software.</p>
|
||||
<p>In particular, we strive to:</p>
|
||||
<ul>
|
||||
<li>Be honest to others about the state of our work.</li>
|
||||
<li>Foster an environment where dedicated learners of any skill level may ask questions and receive detailed, useful answers.</li>
|
||||
<li>Ensure all members of a project are kept up to date on the status of that project.</li>
|
||||
<li>Advertise projects for what they are and what their authors have reasonable hope and expectations their project will become.</li>
|
||||
</ul>
|
||||
<p>It is up to the discretion of the moderators to determine when these guidelines are being met, and they are permitted to act accordingly.</p>
|
||||
<p>If you feel an action has been made against you unreasonably, please contact the <a href="/contact">Handmade Network Team</a> privately with your grievance and we will review the decision.</p>
|
||||
<p>This code of conduct is released under a <a class="external" href="https://creativecommons.org/licenses/by-sa/4.0">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
|
||||
<p class="c--dim i">Written by Jeroen van Rijn</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
{{ define "content" }}
|
||||
<div class="content-block">
|
||||
{{ range .Subforums }}
|
||||
<div class="pv3">
|
||||
<div class="mv3">
|
||||
<h2 class="ma0 ph3 pb2">
|
||||
<a href="{{ .Url }}">
|
||||
{{ .Name }} »<br/>
|
||||
|
|
|
@ -44,20 +44,10 @@
|
|||
|
||||
<link rel="stylesheet" href="{{ statictheme .Theme "theme.css" }}" />
|
||||
<link rel="stylesheet" href="{{ .ProjectCSSUrl }}" />
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="{{ static "apple-icon-57x57.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="{{ static "apple-icon-60x60.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="{{ static "apple-icon-72x72.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="{{ static "apple-icon-76x76.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="{{ static "apple-icon-114x114.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="{{ static "apple-icon-120x120.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="{{ static "apple-icon-144x144.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="{{ static "apple-icon-152x152.png" }}">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ static "apple-icon-180x180.png" }}">
|
||||
<link rel="icon" type="image/png" sizes="192x192" href="{{ static "android-icon-192x192.png" }}">
|
||||
<link rel="apple-touch-icon" href="{{ static "logo.png" }}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="{{ static "favicon-16x16.png" }}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="{{ static "favicon-32x32.png" }}">
|
||||
<link rel="icon" type="image/png" sizes="96x96" href="{{ static "favicon-96x96.png" }}">
|
||||
<link rel="manifest" href="{{ static "manifest.json" }}">
|
||||
<link rel="icon" type="image/png" sizes="400x400" href="{{ static "logo.png" }}">
|
||||
<meta name="msapplication-TileColor" content="#ffffff">
|
||||
<meta name="msapplication-TileImage" content="{{ static "ms-icon-144x144.png" }}">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
|
@ -83,7 +73,7 @@
|
|||
{{ template "header.html" . }}
|
||||
{{ template "notices.html" .Notices }}
|
||||
{{ with .Breadcrumbs }}
|
||||
<div class="tc tl-ns ph2 ph0-ns pb2 pb0-ns">
|
||||
<div class="tc tl-ns ph2 ph0-ns mb2">
|
||||
{{ range $i, $e := . -}}
|
||||
{{- if gt $i 0 -}}
|
||||
<span class="ph2">»</span>
|
||||
|
|
|
@ -1,25 +1,23 @@
|
|||
{{ template "base.html" . }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="content-block">
|
||||
<div class="description mw7 ph3 ph0-ns">
|
||||
<p>Modern computer hardware is amazing. Manufacturers have orchestrated billions of pieces of silicon into terrifyingly complex and efficient structures that sweep electrons through innumerable tangled paths, branchings, and reunions with the sole purpose of performing computations at more than a billion times per second. This awe-inspiring piece of computational wizardry has at its disposal multiple billions of uniquely addressible silicon plates where it can store the results of millions of computations in an array of several vanishingly small chips. All of this hardware, though each component often sits no further than 7 or 8 centimeters away from the others, cycles so fast that the speed of light, a physical law of the universe, limits the rate at which they communicate with each other.</p>
|
||||
<h2>So why is software still slow?</h2>
|
||||
<p>Why does it take your operating system 10 seconds, 30 seconds, a minute to boot up? Why does your word processor freeze when you save a document on the cloud? Why does your web browser take 3, 4, 10 seconds to load a web page? Why does your phone struggle to keep more than a few apps open at a time? And why does each update somehow make the problem worse?</p>
|
||||
<h2>We made it slow.</h2>
|
||||
<p>Not necessarily you, not necessarily me, not necessarily any single person in particular. But we, the software development community, made it slow by ignoring the fundamental reality of our occupation. We write code, code that runs on computers. Real computers, with central processing units and random access memory and hard disk drives and display buffers. Real computers, with integer and bitwise math and floating point units and L2 caches, with threads and cores and a tenuous little network connection to a million billion other computers. Real computers not built for ease of human understanding but for blindingly, incomprehensibly fast speed.</p>
|
||||
<h2>A lot of us have forgotten that.</h2>
|
||||
<p>In our haste to get our products, our projects, the works of our hands and minds, to as many people as possible, we take shortcuts. We make assumptions. We generalize, and abstract, and assume that just because these problems have been solved before that they never need to be solved again. We build abstraction layers, then forget we built them and build more on top.</p>
|
||||
<p>And it's true that many of us think we do not have the time, the money, the mental bandwidth to always consider these things in detail. The deadline is approaching or the rent is due or we have taxes to fill out and a manager on our back and someone asking us why we always spend so much time at the office, and we just have to stick the library or virtual machine or garbage collector in there to cover up the places we can't think through right now.</p>
|
||||
<p>Others of us were never taught to think about the computer itself. We learned about objects and classes and templates and how to make our code clean and pretty. We learned how to write code to make the client or the manager or the teacher happy, but made the processor churn. And because we did, that amazing speed we'd been granted was wasted, by us, in a death by a thousand abstraction layers.</p>
|
||||
<h2>But some of us aren't satisfied with that.</h2>
|
||||
<p>Some of us take a few extra steps into the covered territory, the wheels sitting, motionless, in a pile behind us, examine their designs and decide there is a better way. The more experienced among us remember how software used to be, the potential that we know exists for computer programs to be useful, general, and efficient. Others of us got fed up with the tools we were expected to use without complaint, but which failed us time and time again. Some of us are just curious and don't know what's good for us. Don't trust what we've been told is good for us.</p>
|
||||
<p>We sat down and looked at our hardware, and examined our data, and thought about how to use the one to transform the other. We tinkered, and measured, and read, and compared, and wrote, and refined, and modified, and measured again, over and over, until we found we had built the same thing, but 10 times faster and incomparably more useful to the people we designed it for. And we had built it by hand.</p>
|
||||
<p>That is what Handmade means. It's not a technique or a language or a management strategy, it isn't a formula or a library or an abstraction. It's an idea. The idea that we can build software that works with the computer, not against it. The idea that sometimes an individual programmer can be more productive than a large team, that a small group can do more than an army of software engineers and *do it better*. The idea that programming is about transforming data and we wield the code, the tool we use to bend that data to our will.</p>
|
||||
<p>It doesn't require a degree, or a dissertation, or a decade of experience. You don't need an expensive computer or a certificate or even prior knowledge. All you need is an open mind and a sense of curiosity. We'll help you with the rest.</p>
|
||||
<h2>Will you join us?</h2>
|
||||
<p>Will you build your software by hand?</p>
|
||||
<p class="edited mt4">Written by Andrew Chronister</p>
|
||||
</div>
|
||||
<div class="center-layout mw7 mv3 ph3 ph0-ns post-content">
|
||||
<p>Modern computer hardware is amazing. Manufacturers have orchestrated billions of pieces of silicon into terrifyingly complex and efficient structures that sweep electrons through innumerable tangled paths, branchings, and reunions with the sole purpose of performing computations at more than a billion times per second. This awe-inspiring piece of computational wizardry has at its disposal multiple billions of uniquely addressible silicon plates where it can store the results of millions of computations in an array of several vanishingly small chips. All of this hardware, though each component often sits no further than 7 or 8 centimeters away from the others, cycles so fast that the speed of light, a physical law of the universe, limits the rate at which they communicate with each other.</p>
|
||||
<h2>So why is software still slow?</h2>
|
||||
<p>Why does it take your operating system 10 seconds, 30 seconds, a minute to boot up? Why does your word processor freeze when you save a document on the cloud? Why does your web browser take 3, 4, 10 seconds to load a web page? Why does your phone struggle to keep more than a few apps open at a time? And why does each update somehow make the problem worse?</p>
|
||||
<h2>We made it slow.</h2>
|
||||
<p>Not necessarily you, not necessarily me, not necessarily any single person in particular. But we, the software development community, made it slow by ignoring the fundamental reality of our occupation. We write code, code that runs on computers. Real computers, with central processing units and random access memory and hard disk drives and display buffers. Real computers, with integer and bitwise math and floating point units and L2 caches, with threads and cores and a tenuous little network connection to a million billion other computers. Real computers not built for ease of human understanding but for blindingly, incomprehensibly fast speed.</p>
|
||||
<h2>A lot of us have forgotten that.</h2>
|
||||
<p>In our haste to get our products, our projects, the works of our hands and minds, to as many people as possible, we take shortcuts. We make assumptions. We generalize, and abstract, and assume that just because these problems have been solved before that they never need to be solved again. We build abstraction layers, then forget we built them and build more on top.</p>
|
||||
<p>And it's true that many of us think we do not have the time, the money, the mental bandwidth to always consider these things in detail. The deadline is approaching or the rent is due or we have taxes to fill out and a manager on our back and someone asking us why we always spend so much time at the office, and we just have to stick the library or virtual machine or garbage collector in there to cover up the places we can't think through right now.</p>
|
||||
<p>Others of us were never taught to think about the computer itself. We learned about objects and classes and templates and how to make our code clean and pretty. We learned how to write code to make the client or the manager or the teacher happy, but made the processor churn. And because we did, that amazing speed we'd been granted was wasted, by us, in a death by a thousand abstraction layers.</p>
|
||||
<h2>But some of us aren't satisfied with that.</h2>
|
||||
<p>Some of us take a few extra steps into the covered territory, the wheels sitting, motionless, in a pile behind us, examine their designs and decide there is a better way. The more experienced among us remember how software used to be, the potential that we know exists for computer programs to be useful, general, and efficient. Others of us got fed up with the tools we were expected to use without complaint, but which failed us time and time again. Some of us are just curious and don't know what's good for us. Don't trust what we've been told is good for us.</p>
|
||||
<p>We sat down and looked at our hardware, and examined our data, and thought about how to use the one to transform the other. We tinkered, and measured, and read, and compared, and wrote, and refined, and modified, and measured again, over and over, until we found we had built the same thing, but 10 times faster and incomparably more useful to the people we designed it for. And we had built it by hand.</p>
|
||||
<p>That is what Handmade means. It's not a technique or a language or a management strategy, it isn't a formula or a library or an abstraction. It's an idea. The idea that we can build software that works with the computer, not against it. The idea that sometimes an individual programmer can be more productive than a large team, that a small group can do more than an army of software engineers and *do it better*. The idea that programming is about transforming data and we wield the code, the tool we use to bend that data to our will.</p>
|
||||
<p>It doesn't require a degree, or a dissertation, or a decade of experience. You don't need an expensive computer or a certificate or even prior knowledge. All you need is an open mind and a sense of curiosity. We'll help you with the rest.</p>
|
||||
<h2>Will you join us?</h2>
|
||||
<p>Will you build your software by hand?</p>
|
||||
<p class="c--dim i">Written by Andrew Chronister</p>
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
|
@ -158,7 +158,7 @@ func BlogThread(c *RequestContext) ResponseData {
|
|||
return FourOhFour(c)
|
||||
}
|
||||
|
||||
thread, posts := FetchThreadPostsAndStuff(
|
||||
thread, posts, preview := FetchThreadPostsAndStuff(
|
||||
c.Context(),
|
||||
c.Conn,
|
||||
cd.ThreadID,
|
||||
|
@ -200,6 +200,10 @@ func BlogThread(c *RequestContext) ResponseData {
|
|||
}
|
||||
|
||||
baseData := getBaseData(c, thread.Title, []templates.Breadcrumb{BlogBreadcrumb(c.CurrentProject.Slug)})
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: preview,
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("blog_post.html", blogPostData{
|
||||
|
|
|
@ -449,7 +449,7 @@ func ForumThread(c *RequestContext) ResponseData {
|
|||
}
|
||||
|
||||
c.Perf.StartBlock("SQL", "Fetch posts")
|
||||
_, postsAndStuff := FetchThreadPostsAndStuff(
|
||||
_, postsAndStuff, preview := FetchThreadPostsAndStuff(
|
||||
c.Context(),
|
||||
c.Conn,
|
||||
cd.ThreadID,
|
||||
|
@ -497,6 +497,10 @@ func ForumThread(c *RequestContext) ResponseData {
|
|||
}
|
||||
|
||||
baseData := getBaseData(c, thread.Title, SubforumBreadcrumbs(cd.LineageBuilder, c.CurrentProject, cd.SubforumID))
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: preview,
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("forum_thread.html", forumThreadData{
|
||||
|
|
|
@ -318,6 +318,10 @@ func Index(c *RequestContext) ResponseData {
|
|||
|
||||
baseData := getBaseData(c, "", nil)
|
||||
baseData.BodyClasses = append(baseData.BodyClasses, "hmdev", "landing") // TODO: Is "hmdev" necessary any more?
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: "A community of programmers committed to producing quality software through deeper understanding",
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
err = res.WriteTemplate("landing.html", LandingTemplateData{
|
||||
|
|
|
@ -178,7 +178,7 @@ func ProjectIndex(c *RequestContext) ResponseData {
|
|||
}
|
||||
c.Perf.EndBlock()
|
||||
|
||||
baseData := getBaseDataAutocrumb(c, "Project List")
|
||||
baseData := getBaseDataAutocrumb(c, "Projects")
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("project_index.html", ProjectTemplateData{
|
||||
BaseData: baseData,
|
||||
|
@ -366,6 +366,11 @@ func ProjectHomepage(c *RequestContext) ResponseData {
|
|||
if canEdit {
|
||||
projectHomepageData.BaseData.Header.EditUrl = hmnurl.BuildProjectEdit(project.Slug, "")
|
||||
}
|
||||
projectHomepageData.BaseData.OpenGraphItems = append(projectHomepageData.BaseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: project.Blurb,
|
||||
})
|
||||
|
||||
projectHomepageData.Project = templates.ProjectToTemplate(project, c.Theme)
|
||||
for _, owner := range owners {
|
||||
projectHomepageData.Owners = append(projectHomepageData.Owners, templates.UserToTemplate(owner, c.Theme))
|
||||
|
|
|
@ -304,7 +304,7 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc
|
|||
|
||||
ReportIssueMailto: "team@handmade.network",
|
||||
|
||||
OpenGraphItems: buildDefaultOpenGraphItems(c.CurrentProject),
|
||||
OpenGraphItems: buildDefaultOpenGraphItems(c.CurrentProject, title),
|
||||
|
||||
IsProjectPage: !c.CurrentProject.IsHMN(),
|
||||
Header: templates.Header{
|
||||
|
@ -344,12 +344,21 @@ func getBaseData(c *RequestContext, title string, breadcrumbs []templates.Breadc
|
|||
return baseData
|
||||
}
|
||||
|
||||
func buildDefaultOpenGraphItems(project *models.Project) []templates.OpenGraphItem {
|
||||
func buildDefaultOpenGraphItems(project *models.Project, title string) []templates.OpenGraphItem {
|
||||
if title == "" {
|
||||
title = "Handmade Network"
|
||||
}
|
||||
|
||||
image := hmnurl.BuildPublic("logo.png", false)
|
||||
if !project.IsHMN() {
|
||||
image = hmnurl.BuildUserFile(project.LogoLight)
|
||||
}
|
||||
|
||||
return []templates.OpenGraphItem{
|
||||
{Property: "og:site_name", Value: "Handmade.Network"},
|
||||
{Property: "og:title", Value: title},
|
||||
{Property: "og:site_name", Value: "Handmade Network"},
|
||||
{Property: "og:type", Value: "website"},
|
||||
{Property: "og:image", Value: hmnurl.BuildUserFile(project.LogoLight)},
|
||||
{Property: "og:image:secure_url", Value: hmnurl.BuildUserFile(project.LogoLight)},
|
||||
{Property: "og:image", Value: image},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
package website
|
||||
|
||||
import "git.handmade.network/hmn/hmn/src/templates"
|
||||
|
||||
func Manifesto(c *RequestContext) ResponseData {
|
||||
baseData := getBaseDataAutocrumb(c, "Handmade Manifesto")
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: "Modern computer hardware is amazing. Manufacturers have orchestrated billions of pieces of silicon into terrifyingly complex and efficient structures…",
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("manifesto.html", getBaseDataAutocrumb(c, "Manifesto"), c.Perf)
|
||||
res.MustWriteTemplate("manifesto.html", baseData, c.Perf)
|
||||
return res
|
||||
}
|
||||
|
||||
|
@ -13,14 +21,26 @@ func About(c *RequestContext) ResponseData {
|
|||
}
|
||||
|
||||
func CodeOfConduct(c *RequestContext) ResponseData {
|
||||
baseData := getBaseDataAutocrumb(c, "Code of Conduct")
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: "The Handmade community is an international community of creatives dedicated to building and improving high quality software. These are the guidelines we pledge to uphold to maintain a healthy community.",
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("code_of_conduct.html", getBaseDataAutocrumb(c, "Code of Conduct"), c.Perf)
|
||||
res.MustWriteTemplate("code_of_conduct.html", baseData, c.Perf)
|
||||
return res
|
||||
}
|
||||
|
||||
func CommunicationGuidelines(c *RequestContext) ResponseData {
|
||||
baseData := getBaseDataAutocrumb(c, "Communication Guidelines")
|
||||
baseData.OpenGraphItems = append(baseData.OpenGraphItems, templates.OpenGraphItem{
|
||||
Property: "og:description",
|
||||
Value: "The Handmade community strives to create an environment conducive to innovation, education, and constructive discussion. These are the principles we expect members to respect.",
|
||||
})
|
||||
|
||||
var res ResponseData
|
||||
res.MustWriteTemplate("communication_guidelines.html", getBaseDataAutocrumb(c, "Communication Guidelines"), c.Perf)
|
||||
res.MustWriteTemplate("communication_guidelines.html", baseData, c.Perf)
|
||||
return res
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ func FetchThreadPostsAndStuff(
|
|||
connOrTx db.ConnOrTx,
|
||||
threadId int,
|
||||
page, postsPerPage int,
|
||||
) (models.Thread, []postAndRelatedModels) {
|
||||
) (models.Thread, []postAndRelatedModels, string) {
|
||||
limit := postsPerPage
|
||||
offset := (page - 1) * postsPerPage
|
||||
if postsPerPage == 0 {
|
||||
|
@ -188,7 +188,24 @@ func FetchThreadPostsAndStuff(
|
|||
})
|
||||
}
|
||||
|
||||
return thread, posts
|
||||
preview, err := db.QueryString(ctx, connOrTx,
|
||||
`
|
||||
SELECT post.preview
|
||||
FROM
|
||||
handmade_post AS post
|
||||
JOIN handmade_thread AS thread ON post.thread_id = thread.id
|
||||
JOIN handmade_postversion AS ver ON post.current_id = ver.id
|
||||
WHERE
|
||||
post.thread_id = $1
|
||||
AND thread.first_id = post.id
|
||||
`,
|
||||
thread.ID,
|
||||
)
|
||||
if err != nil && !errors.Is(err, db.ErrNoMatchingRows) {
|
||||
panic(oops.New(err, "failed to fetch posts for thread"))
|
||||
}
|
||||
|
||||
return thread, posts, preview
|
||||
}
|
||||
|
||||
func UserCanEditPost(ctx context.Context, connOrTx db.ConnOrTx, user models.User, postId int) bool {
|
||||
|
|